set __UNINSTALL__ in set_uninstall_mode, as in original patch #1644712

PageEx and PageExEnd set uninstall_mode in script.cpp, so setting this in set_code_type_predefines doesn't work
it's probably better to set it in set_uninstall_mode as other commands probably use it as well


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4908 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-01-27 15:39:23 +00:00
parent 14f085bcbe
commit 60c3a6165e

View file

@ -2990,6 +2990,8 @@ void CEXEBuild::set_uninstall_mode(int un)
cur_strlist=&ubuild_strlist;
cur_langtables=&ubuild_langtables;
cur_ctlcolors=&ubuild_ctlcolors;
definedlist.add("__UNINSTALL__");
}
else
{
@ -3005,6 +3007,8 @@ void CEXEBuild::set_uninstall_mode(int un)
cur_strlist=&build_strlist;
cur_langtables=&build_langtables;
cur_ctlcolors=&build_ctlcolors;
definedlist.del("__UNINSTALL__");
}
SWAP(db_opt_save_u,db_opt_save,int);
@ -3410,7 +3414,6 @@ void CEXEBuild::set_code_type_predefines(const char *value)
definedlist.del("__FUNCTION__");
definedlist.del("__PAGEEX__");
definedlist.del("__GLOBAL__");
definedlist.del("__UNINSTALL__");
switch (GetCurrentTokenPlace())
{
@ -3426,10 +3429,5 @@ void CEXEBuild::set_code_type_predefines(const char *value)
default:
definedlist.add("__GLOBAL__");
}
if (uninstall_mode)
{
definedlist.add("__UNINSTALL__");
}
}