Auto define of last page
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1671 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fc81283206
commit
279b1c3703
5 changed files with 14 additions and 3 deletions
|
@ -297,6 +297,9 @@ CEXEBuild::CEXEBuild()
|
|||
ubuild_custom_used=0;
|
||||
|
||||
res_editor=0;
|
||||
|
||||
build_last_page_define[0]=0;
|
||||
ubuild_last_page_define[0]=0;
|
||||
}
|
||||
|
||||
int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); }
|
||||
|
|
|
@ -205,6 +205,8 @@ class CEXEBuild {
|
|||
StringList build_userlangstrings, ubuild_userlangstrings;
|
||||
GrowBuf build_pages, ubuild_pages;
|
||||
|
||||
char build_last_page_define[1024], ubuild_last_page_define[1024];
|
||||
|
||||
int build_custom_used, ubuild_custom_used;
|
||||
|
||||
MMapBuf build_datablock, ubuild_datablock; // use GrowBuf here instead of MMapBuf if you want
|
||||
|
|
|
@ -526,7 +526,7 @@ nextPage:
|
|||
{
|
||||
process_string_fromtab(
|
||||
g_tmp+mystrlen(g_tmp),
|
||||
this_page->caption // post_func contains the caption for custom functions
|
||||
this_page->caption
|
||||
);
|
||||
|
||||
SetWindowText(hwndDlg,g_tmp);
|
||||
|
|
|
@ -538,6 +538,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
p.postfunc = ns_func.add(line.gettoken_str(3),0);
|
||||
else
|
||||
p.caption = add_string_main(line.gettoken_str(3),0);
|
||||
if (line.getnumtokens()>4)
|
||||
lstrcpy(build_last_page_define, line.gettoken_str(4));
|
||||
}
|
||||
#else
|
||||
ERROR_MSG("Error: Page callback specified, NSIS_CONFIG_LICENSEPAGE not defined.\n");
|
||||
|
@ -574,6 +576,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
p.id = NSIS_PAGE_DIR;
|
||||
break;
|
||||
case 4:
|
||||
if (*build_last_page_define) definedlist.add(build_last_page_define,"");
|
||||
p.id = NSIS_PAGE_INSTFILES;
|
||||
break;
|
||||
default:
|
||||
|
@ -636,6 +639,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
}
|
||||
else
|
||||
p.caption = add_string_uninst(line.gettoken_str(3),0);
|
||||
if (line.getnumtokens()>4)
|
||||
lstrcpy(ubuild_last_page_define, line.gettoken_str(4));
|
||||
}
|
||||
#else
|
||||
ERROR_MSG("Error: UninstPage callback specified, NSIS_CONFIG_LICENSEPAGE not defined.\n");
|
||||
|
@ -656,6 +661,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
p.id = NSIS_PAGE_UNINST;
|
||||
break;
|
||||
case 2:
|
||||
if (*ubuild_last_page_define) definedlist.add(ubuild_last_page_define,"");
|
||||
p.id = NSIS_PAGE_INSTFILES;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -105,7 +105,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_NOP,"Nop",0,0,""},
|
||||
{TOK_NAME,"Name",1,1,"[/LANG=lang_id] installer_name"},
|
||||
{TOK_OUTFILE,"OutFile",1,0,"install_output.exe"},
|
||||
{TOK_PAGE,"Page",1,2,"(custom function [caption]) | ((license|components|directory|instfiles) [pre_function] [post_function])"},
|
||||
{TOK_PAGE,"Page",1,3,"(custom function [caption]) | ((license|components|directory|instfiles) [pre_function] [post_function])"},
|
||||
{TOK_POP,"Pop",1,0,"$(user_var: output)"},
|
||||
{TOK_PUSH,"Push",1,0,"string"},
|
||||
{TOK_QUIT,"Quit",0,0,""},
|
||||
|
@ -157,7 +157,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_UNINSTALLEXENAME,"UninstallExeName",0,0,"no longer supported, use WriteUninstaller from section."},
|
||||
{TOK_UNINSTCAPTION,"UninstallCaption",1,1,"[/LANG=lang_id] uninstaller_caption"},
|
||||
{TOK_UNINSTICON,"UninstallIcon",1,0,"icon_on_local_system.ico"},
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,2,"(custom function [caption]) | ((uninstConfirm|instfiles) [pre_function] [post_function])"},
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,3,"(custom function [caption]) | ((uninstConfirm|instfiles) [pre_function] [post_function])"},
|
||||
{TOK_UNINSTTEXT,"UninstallText",1,2,"[/LANG=lang_id] Text_to_go_on_uninstall page [subtext]"},
|
||||
{TOK_UNINSTSUBCAPTION,"UninstallSubCaption",2,1,"[/LANG=lang_id] page_number(0-2) new_subcaption"},
|
||||
{TOK_UNREGDLL,"UnRegDLL",1,0,"dll_path_on_target.dll"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue