more of patch #1644712 - new compiler predefines
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4999 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
6842d80d30
commit
576446db5e
3 changed files with 24 additions and 13 deletions
|
@ -276,7 +276,7 @@ Defined as the function name, without any prefixes, in \R{ffunction}{function} s
|
|||
|
||||
\S2{} $\{__PAGEEX__\}
|
||||
|
||||
Defined in \R{pageex}{PageEx} scope.
|
||||
Defined as the page type in \R{pageex}{PageEx} scope.
|
||||
|
||||
\c !ifdef __PAGEEX__
|
||||
\c !error "this shouldn't be here!"
|
||||
|
@ -287,6 +287,10 @@ Defined in \R{pageex}{PageEx} scope.
|
|||
\c !ifndef __PAGEEX__
|
||||
\c !error "missing predefine!"
|
||||
\c !endif
|
||||
\c
|
||||
\c !if ${__PAGEEX__} != instfiles
|
||||
\c !error "wrong page type"
|
||||
\c !endif
|
||||
\c
|
||||
\c PageExEnd
|
||||
|
||||
|
|
|
@ -202,10 +202,16 @@ FunctionEnd
|
|||
|
||||
PageEx instfiles
|
||||
!insertmacro TEST_SCOPES "pageex" n n n y n
|
||||
!if ${__PAGEEX__} != instfiles
|
||||
!error "invalid __PAGEEX__ value"
|
||||
!endif
|
||||
PageExEnd
|
||||
|
||||
PageEx un.instfiles
|
||||
!insertmacro TEST_SCOPES "uninstall pageex" n n n y y
|
||||
!if ${__PAGEEX__} != instfiles
|
||||
!error "invalid __PAGEEX__ value"
|
||||
!endif
|
||||
PageExEnd
|
||||
|
||||
!insertmacro TEST_SCOPES "global" y n n n n
|
||||
|
|
|
@ -1544,26 +1544,27 @@ int CEXEBuild::add_page(int type)
|
|||
struct {
|
||||
int wndproc_id;
|
||||
int dlg_id;
|
||||
char *name;
|
||||
} ids[] = {
|
||||
{PWP_CUSTOM, 0}, // custom
|
||||
{PWP_CUSTOM, 0, "custom"}, // custom
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
{PWP_LICENSE, IDD_LICENSE}, // license
|
||||
{PWP_LICENSE, IDD_LICENSE, "license"}, // license
|
||||
#else
|
||||
{0, IDD_LICENSE}, // license
|
||||
{0, IDD_LICENSE, "license"}, // license
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
{PWP_SELCOM, IDD_SELCOM}, // components
|
||||
{PWP_SELCOM, IDD_SELCOM, "components"}, // components
|
||||
#else
|
||||
{0, IDD_SELCOM}, // components
|
||||
{0, IDD_SELCOM, "components"}, // components
|
||||
#endif
|
||||
{PWP_DIR, IDD_DIR}, // directory
|
||||
{PWP_INSTFILES, IDD_INSTFILES}, // instfiles
|
||||
{PWP_DIR, IDD_DIR, "directory"}, // directory
|
||||
{PWP_INSTFILES, IDD_INSTFILES, "instfiles"}, // instfiles
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
{PWP_UNINST, IDD_UNINST}, // uninstConfirm
|
||||
{PWP_UNINST, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
|
||||
#else
|
||||
{0, IDD_UNINST}, // uninstConfirm
|
||||
{0, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
|
||||
#endif
|
||||
{PWP_COMPLETED, -1} // completed
|
||||
{PWP_COMPLETED, -1, NULL} // completed
|
||||
};
|
||||
|
||||
pg.wndproc_id = ids[type].wndproc_id;
|
||||
|
@ -1575,7 +1576,7 @@ int CEXEBuild::add_page(int type)
|
|||
|
||||
cur_page_type = type;
|
||||
|
||||
set_code_type_predefines();
|
||||
set_code_type_predefines(ids[type].name);
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
|
@ -3448,7 +3449,7 @@ void CEXEBuild::set_code_type_predefines(const char *value)
|
|||
definedlist.add("__FUNCTION__", value==NULL?"":value);
|
||||
break;
|
||||
case TP_PAGEEX:
|
||||
definedlist.add("__PAGEEX__");
|
||||
definedlist.add("__PAGEEX__", value==NULL?"":value);
|
||||
break;
|
||||
default:
|
||||
definedlist.add("__GLOBAL__");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue