use NSIS_VERSION from the new automatically genereated version.h

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4537 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2006-02-24 19:14:18 +00:00
parent 32a717faf5
commit 578065d849
4 changed files with 13 additions and 7 deletions

View file

@ -3,6 +3,8 @@
#include "exehead/config.h"
#include "exehead/fileform.h"
#include "version.h"
#include "build.h"
#include "util.h"
@ -84,7 +86,7 @@ CEXEBuild::CEXEBuild() :
ns_func.add("",0); // make sure offset 0 is special on these (i.e. never used by a label)
ns_label.add("",0);
definedlist.add("NSIS_VERSION", CONST_STR(NSIS_VERSION));
definedlist.add("NSIS_VERSION", NSIS_VERSION);
#define intdef2str_(x) #x
#define intdef2str(x) intdef2str_(x)

View file

@ -5,6 +5,7 @@
#include "util.h"
#include "DialogTemplate.h"
#include "exehead/resource.h"
#include "version.h"
using namespace std;
@ -840,8 +841,8 @@ void CEXEBuild::FillLanguageTable(LanguageTable *table) {
if (!dstr)
continue;
if (i == NLF_BRANDING) {
char temp[NSIS_MAX_STRLEN + sizeof(CONST_STR(NSIS_VERSION))];
sprintf(temp, dstr, CONST_STR(NSIS_VERSION));
char temp[NSIS_MAX_STRLEN + sizeof(NSIS_VERSION)];
sprintf(temp, dstr, NSIS_VERSION);
table->lang_strings->set(sn, temp);
continue;
}

View file

@ -44,6 +44,8 @@
#include "build.h"
#include "util.h"
#include "version.h"
using namespace std;
int g_noconfig=0;
@ -85,7 +87,7 @@ static void print_logo()
"Portions Copyright (C) 1996-2002 Julian R Seward (bzip2).\n"
"Portions Copyright (C) 1999-2003 Igor Pavlov (lzma).\n"
"\n"
"Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater, Yaroslav Faybishenko, Jeff Doozan, Amir Szekely, Ximon Eighteen, et al.\n\n",CONST_STR(NSIS_VERSION));
"Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater, Yaroslav Faybishenko, Jeff Doozan, Amir Szekely, Ximon Eighteen, et al.\n\n",NSIS_VERSION);
fflush(g_output);
}
@ -254,7 +256,7 @@ int main(int argc, char **argv)
if (argc > 1 && !stricmp(argv[1], OPT_STR "VERSION"))
{
fprintf(g_output,CONST_STR(NSIS_VERSION));
fprintf(g_output,NSIS_VERSION);
fflush(g_output);
return 0;
}

View file

@ -8,6 +8,7 @@
#include "DialogTemplate.h"
#include "lang.h"
#include "dirreader.h"
#include "version.h"
#include "exehead/resource.h"
#include <cassert> // for assert(3)
#include <time.h>
@ -2336,7 +2337,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (k == -1) PRINTHELP()
SCRIPT_MSG("XPStyle: %s\n", line.gettoken_str(1));
init_res_editor();
const char *szXPManifest = k ? 0 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System " CONST_STR(NSIS_VERSION) "</description><dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency></assembly>";
const char *szXPManifest = k ? 0 : "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System " NSIS_VERSION "</description><dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency></assembly>";
res_editor->UpdateResource(MAKEINTRESOURCE(24), MAKEINTRESOURCE(1), NSIS_DEFAULT_LANG, (unsigned char*)szXPManifest, k ? 0 : strlen(szXPManifest));
}
catch (exception& err) {
@ -3365,7 +3366,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (line.getnumtokens()==a+1 && line.gettoken_str(a)[0])
strcpy(str, line.gettoken_str(a));
else
wsprintf(str, "Nullsoft Install System %s", CONST_STR(NSIS_VERSION));
wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION);
short old_width = td.GetItem(IDC_VERSTR)->sWidth;