An option to change the text in the script
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2363 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5afc7ec7d4
commit
586bbd99d1
2 changed files with 20 additions and 2 deletions
|
@ -1062,8 +1062,25 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
return make_sure_not_in_secorfunc(line.gettoken_str(0));
|
||||
case TOK_LICENSEFORCESELECTION:
|
||||
{
|
||||
int k=line.gettoken_enum(1,"off\0checkbox\0radiobuttons\0");
|
||||
LANGID lang = 0;
|
||||
int a = 0;
|
||||
|
||||
if (!strnicmp(line.gettoken_str(1),"/LANG=",6)) {
|
||||
lang=atoi(line.gettoken_str(1)+6);
|
||||
a++;
|
||||
}
|
||||
|
||||
int k=line.gettoken_enum(1+a,"off\0checkbox\0radiobuttons\0");
|
||||
if (k == -1) PRINTHELP()
|
||||
if (k < line.getnumtokens() - 2 - a) PRINTHELP()
|
||||
|
||||
switch (line.getnumtokens()-a) {
|
||||
case 4:
|
||||
SetString(line.gettoken_str(3+a), NLF_BTN_LICENSE_DISAGREE, 0, lang);
|
||||
case 3:
|
||||
SetString(line.gettoken_str(2+a), NLF_BTN_LICENSE_AGREE, 0, lang);
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
init_res_editor();
|
||||
|
@ -1154,6 +1171,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
ERROR_MSG("Error setting smooth progress bar: %s\n", err.what());
|
||||
return PS_ERROR;
|
||||
}
|
||||
SCRIPT_MSG("LicenseForceSelection: %s \"%s\" \"%s\"\n", line.gettoken_str(1+a), line.gettoken_str(2+a), line.gettoken_str(3+a));
|
||||
}
|
||||
return make_sure_not_in_secorfunc(line.gettoken_str(0));
|
||||
case TOK_LICENSEBKCOLOR:
|
||||
|
|
|
@ -97,7 +97,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_LANGSTRING,"LangString",3,0,"[un.]name lang_id string"},
|
||||
{TOK_LANGSTRINGUP,"LangStringUP",3,0,"[un.]name lang_id string"},
|
||||
{TOK_LICENSEDATA,"LicenseData",1,1,"[/LANG=lang_id] local_file_that_has_license_text.txt"},
|
||||
{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,0,"checkbox|radiobuttons|off"},
|
||||
{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,3,"[/LANG=lang_id] (checkbox|radiobuttons|off) accept_text decline_text"},
|
||||
{TOK_LICENSETEXT,"LicenseText",1,2,"[/LANG=lang_id] license_page_description [license_button_text]"},
|
||||
{TOK_LICENSEBKCOLOR,"LicenseBkColor",1,0,"background_color"},
|
||||
{TOK_LOADNLF,"LoadLanguageFile",1,0,"language.nlf"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue