]> git.lyx.org Git - lyx.git/commitdiff
Wininstaller2, code readability
authorEugene Chornyi <yu_jin@lyx.org>
Fri, 17 Jul 2020 19:18:17 +0000 (21:18 +0200)
committerEugene Chornyi <yu_jin@lyx.org>
Fri, 17 Jul 2020 19:18:17 +0000 (21:18 +0200)
development/Win32/packaging/installer2/src/main.nsh

index ea18e052dd8936620b3c341edc3d2f4aa4edca4c..e39cdfb3b6a210e76c18186472f1141f206bd45f 100644 (file)
     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 - - - - - - - - - - - - - -