]> git.lyx.org Git - features.git/commitdiff
Add comments to installer code
authorBo Peng <bpeng@lyx.org>
Fri, 23 Mar 2007 02:03:42 +0000 (02:03 +0000)
committerBo Peng <bpeng@lyx.org>
Fri, 23 Mar 2007 02:03:42 +0000 (02:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17517 a592a061-630c-0410-9148-cb99ea01b6c8

development/Win32/packaging/installer/components/reinstall.nsh
development/Win32/packaging/installer/components/user.nsh

index 610819328a148faf6a347efa3ddd1807e5024c51..7464fbc8927e8c2b90942a9cb7f7a56debd1c70c 100644 (file)
@@ -9,7 +9,8 @@ Reinstall options
 
 Function PageReinstall
 
-  #Check whether this version is already installed
+  # Check whether this version is already installed
+  # If so, some registry key like Software/lyx15 should exist
 
   ReadRegStr $R0 SHELL_CONTEXT ${APP_REGKEY} "Version"
 
@@ -26,10 +27,12 @@ Function PageReinstallValidate
 
   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "reinstall.ini" "Field 2" "State"
 
+  # if re-installation, hide many sections
+  # FIXME: where is SelectSection defined?
   ${if} $R0 == "1"
     !insertmacro SelectSection ${SecCore}
   ${else}
     !insertmacro UnselectSection ${SecCore}
   ${endif}
 
-FunctionEnd
\ No newline at end of file
+FunctionEnd
index f21e70b0ff2d3b5845025e6400a6f631877022c9..dc6b32484adef4c1981fdb6288f6ac6040cacf0f 100644 (file)
@@ -7,13 +7,18 @@ Install type setting (current user/all users)
 #--------------------------------
 #Macros
 
+# COMPONENT can be LaTeX ImageMagick and Ghostscript
 !macro GetDirExternal COMPONENT
 
+  # APP_REGKEY_SETUP = "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
+  # where ${APP_NAME}${APP_SERIES_KEY} is something like LyX15
   ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
   
+  # BIN_LATEX etc are defined in settings.nsh
   ${if} ${FileExists} "$R0\${BIN_${COMPONENT}}"
 
     ${if} $R0 != ""
+      # define variables like PathLATEX
       StrCpy $Path${COMPONENT} $R0
     ${endif}
   
@@ -38,8 +43,8 @@ Function InitUser
   !insertmacro GetDirExternal ImageMagick
   !insertmacro GetDirExternal Ghostscript
   
-  #Set directories in dialogs
-
+  # Set directories in dialogs
+  # Macro defined in include/gui.sh, parameters are COMPONENT CURRENTUSER_POSSIBLE
   !insertmacro InitDialogExternalDir latex ${TRUE}
   !insertmacro InitDialogExternalDir imagemagick ${FALSE}
   !insertmacro InitDialogExternalDir ghostscript ${FALSE}
@@ -74,6 +79,8 @@ Function PageUserValidate
   
   !insertmacro MUI_INSTALLOPTIONS_READ $R0 "user.ini" "Field 2" "State"
   
+  # shell var context is important because it determines the actual
+  # meaning of variables like $DESKTOP
   ${if} $R0 == "1"
     SetShellVarContext all
     StrCpy $CurrentUserInstall ${FALSE}
@@ -84,4 +91,4 @@ Function PageUserValidate
   
   Call InitUser
   
-FunctionEnd
\ No newline at end of file
+FunctionEnd