diff --git a/Source/lang.cpp b/Source/lang.cpp index f08b61c8..1de2eccf 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -123,6 +123,7 @@ int CEXEBuild::SetString(char *string, int id, int process, StringTable *table) HANDLE_STRING_I(NLF_BTN_BROWSE, installer.browse); HANDLE_STRING_I(NLF_COMP_SUBTEXT1, installer.componentsubtext[0]); HANDLE_STRING_I(NLF_COMP_SUBTEXT2, installer.componentsubtext[1]); + HANDLE_STRING_I(NLF_COMP_CUSTOM, installer.custom); HANDLE_STRING_I(NLF_DIR_SUBTEXT, installer.dirsubtext); HANDLE_STRING_I(NLF_SPACE_AVAIL, installer.spaceavailable); HANDLE_STRING_I(NLF_SPACE_REQ, installer.spacerequired); diff --git a/Source/script.cpp b/Source/script.cpp index 1feeb1ef..b7911b7e 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -630,6 +630,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char case TOK_INSTTYPE: { int x; + if (strnicmp(line.gettoken_str(1),"/LANG=",6) && line.getnumtokens() > 2) PRINTHELP(); if (!stricmp(line.gettoken_str(1),"/NOCUSTOM")) { build_header.no_custom_instmode_flag=1; @@ -642,15 +643,15 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char } else if (!strnicmp(line.gettoken_str(1),"/LANG=",6)) { if (!strnicmp(line.gettoken_str(2),"/CUSTOMSTRING=",14)) { - SetString(line.gettoken_str(2)+14,NLF_COMP_CUSTOM,0,atoi(line.gettoken_str(1)+6)); SCRIPT_MSG("InstType: setting custom text to: /LANG=%d \"%s\"\n",line.gettoken_str(1)+6,line.gettoken_str(2)+14); + SetString(line.gettoken_str(2)+14,NLF_COMP_CUSTOM,0,atoi(line.gettoken_str(1)+6)); } else PRINTHELP() } else if (!strnicmp(line.gettoken_str(1),"/CUSTOMSTRING=",14)) { - SetString(line.gettoken_str(1)+14,NLF_COMP_CUSTOM,0); SCRIPT_MSG("InstType: setting custom text to: \"%s\"\n",line.gettoken_str(1)+14); + SetString(line.gettoken_str(1)+14,NLF_COMP_CUSTOM,0); } else if (line.gettoken_str(1)[0]=='/') PRINTHELP() else diff --git a/Source/tokens.cpp b/Source/tokens.cpp index c4514f06..1508e087 100644 --- a/Source/tokens.cpp +++ b/Source/tokens.cpp @@ -84,7 +84,7 @@ static tokenType tokenlist[TOK__LAST] = {TOK_INSTCOLORS,"InstallColors",1,1,"(/windows | (foreground_color background_color))"}, {TOK_INSTDIR,"InstallDir",1,0,"default_install_directory"}, {TOK_INSTPROGRESSFLAGS,"InstProgressFlags",0,-1,"[flag [...]]\n flag={smooth|colored}"}, -{TOK_INSTTYPE,"InstType",1,0,"(/NOCUSTOM|/CUSTOMSTRING=CustomStr|TypeName)"}, +{TOK_INSTTYPE,"InstType",1,1,"(/NOCUSTOM|[LANG=lang_id] /CUSTOMSTRING=CustomStr|TypeName)"}, {TOK_INTOP,"IntOp",3,1,"$(user_var: result) val1 OP [val2]\n OP=(+ - * / % | & ^ ~ ! || &&)"}, {TOK_INTCMP,"IntCmp",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"}, {TOK_INTCMPU,"IntCmpU",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"},