Added !uninstfinalize (patch 280)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7294 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
1768555f2b
commit
41bb557cbc
11 changed files with 166 additions and 79 deletions
|
@ -1058,8 +1058,15 @@ template<class T> void slist_append(T&list, T&item)
|
|||
(prev ? prev->next : list) = item;
|
||||
}
|
||||
|
||||
int CEXEBuild::pp_finalize(LineParser&line)
|
||||
int CEXEBuild::pp_finalize(int which_token, LineParser&line)
|
||||
{
|
||||
#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
if (which_token == TOK_P_UNINSTFINALIZE)
|
||||
{
|
||||
ERROR_MSG(_T("Error: %") NPRIs _T(" specified, %") NPRIns _T(" not defined.\n"), line.gettoken_str(0), "NSIS_CONFIG_UNINSTALL_SUPPORT");
|
||||
return PS_ERROR;
|
||||
}
|
||||
#endif
|
||||
TCHAR* cmdstr = line.gettoken_str(1);
|
||||
int validparams = false;
|
||||
postbuild_cmd *newcmd = postbuild_cmd::make(cmdstr, line.gettoken_enum(2, _T("<\0>\0<>\0=\0ignore\0")), line.gettoken_int(3, &validparams));
|
||||
|
@ -1067,8 +1074,8 @@ int CEXEBuild::pp_finalize(LineParser&line)
|
|||
newcmd->cmpop = 4, validparams = true; // Just a command, ignore the exit code
|
||||
if (newcmd->cmpop == -1 || !validparams)
|
||||
PRINTHELP();
|
||||
slist_append(postbuild_cmds, newcmd);
|
||||
SCRIPT_MSG(_T("!finalize: \"%") NPRIs _T("\"\n"), cmdstr);
|
||||
slist_append(which_token == TOK_P_UNINSTFINALIZE ? postubuild_cmds : postbuild_cmds, newcmd);
|
||||
SCRIPT_MSG(_T("!%") NPRIns _T("finalize: \"%") NPRIs _T("\"\n"), which_token == TOK_P_UNINSTFINALIZE ? "uninst" : "", cmdstr);
|
||||
return PS_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue