diff --git a/constructor/nsis/main.nsi.tmpl b/constructor/nsis/main.nsi.tmpl index 7bfc37013..d38fb93b2 100644 --- a/constructor/nsis/main.nsi.tmpl +++ b/constructor/nsis/main.nsi.tmpl @@ -67,7 +67,7 @@ var /global StdOutHandleSet !include "Utils.nsh" -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} !include "StandaloneUninstallerOptions.nsh" {%- endif %} @@ -114,7 +114,7 @@ var /global ARGV_NoScripts var /global ARGV_NoShortcuts var /global ARGV_CheckPathLength var /global ARGV_QuietMode -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} var /global ARGV_Uninst_RemoveConfigFiles var /global ARGV_Uninst_RemoveUserData var /global ARGV_Uninst_RemoveCaches @@ -212,7 +212,7 @@ Page Custom mui_AnaCustomOptions_Show !insertmacro MUI_UNPAGE_WELCOME !define MUI_PAGE_CUSTOMFUNCTION_LEAVE un.OnDirectoryLeave !insertmacro MUI_UNPAGE_CONFIRM -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} UninstPage Custom un.UninstCustomOptions_Show {%- endif %} !insertmacro MUI_UNPAGE_INSTFILES @@ -748,7 +748,7 @@ FunctionEnd /? (show this help message)$\n\ /S (run in CLI/headless mode)$\n\ /Q (quiet mode, do not print output to console)$\n\ -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} /RemoveCaches=[0|1] [default: 0]$\n\ /RemoveConfigFiles=[none|users|system|all] [default: none]$\n\ /RemoveUserData=[0|1] [default: 0]$\n\ @@ -774,7 +774,7 @@ FunctionEnd ${IfNot} ${Errors} StrCpy $QuietMode "1" ${EndIf} -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} ClearErrors ${GetOptions} $ARGV "/RemoveConfigFiles=" $ARGV_Uninst_RemoveConfigFiles ${IfNot} ${Errors} @@ -824,7 +824,7 @@ FunctionEnd Function un.onInit -{%- uninstall_with_conda_exe %} +{%- if uninstall_with_conda_exe %} Call un.UninstCustomOptions_InitDefaults {%- endif %}