From 269f84758058454223f0191dfa00a0e1ed63053f Mon Sep 17 00:00:00 2001 From: Eugene Chornyi Date: Fri, 17 Jul 2020 21:18:17 +0200 Subject: [PATCH] Wininstaller2, code readability --- .../Win32/packaging/installer2/src/main.nsh | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/development/Win32/packaging/installer2/src/main.nsh b/development/Win32/packaging/installer2/src/main.nsh index ea18e052dd..e39cdfb3b6 100644 --- a/development/Win32/packaging/installer2/src/main.nsh +++ b/development/Win32/packaging/installer2/src/main.nsh @@ -258,21 +258,24 @@ Exch $9 # resultRegIdx FunctionEnd - !macro CreatePrepareShellCTXFun UnPrefix - Function ${UnPrefix}PrepareShellCTX - ${if} $MultiUser.InstallMode == "CurrentUser" - SetShellVarContext current - ${Else} - SetShellVarContext all - ${EndIf} - ${If} ${RunningX64} - SetRegView ${APP_ARCHITECTURE} - ${EndIf} - FunctionEnd + !macro PrepareShellCTX + ${if} $MultiUser.InstallMode == "CurrentUser" + SetShellVarContext current + ${Else} + SetShellVarContext all + ${EndIf} + ${If} ${RunningX64} + SetRegView ${APP_ARCHITECTURE} + ${EndIf} !macroend - - !insertmacro CreatePrepareShellCTXFun "" - !insertmacro CreatePrepareShellCTXFun "un." + + Function PrepareShellCTX + !insertmacro PrepareShellCTX + FunctionEnd + + Function un.PrepareShellCTX + !insertmacro PrepareShellCTX + FunctionEnd #------------------------------------------------------------- # - - - - - - - - - - - - Sections - - - - - - - - - - - - - -