]> git.lyx.org Git - features.git/blobdiff - development/Win32/packaging/installer/setup/configure.nsh
Consider inset strings in simple find/replaceAll (#12049)
[features.git] / development / Win32 / packaging / installer / setup / configure.nsh
index ae283362e9491832fec20a257037130470ec8063..59cf1b4a530d6ae94a7f1c43de55e50f1c3df12b 100644 (file)
@@ -64,8 +64,10 @@ Section -InstallData
    DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber"
    DeleteRegKey SHCTX "SOFTWARE\${APP_NAME}\$OldVersionNumber"
    # also delete in the case of an emergency release
-   DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber1"
-   DeleteRegKey SHCTX "SOFTWARE\${APP_NAME}\$OldVersionNumber1"
+   ${For} $7 0 20
+    DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}$OldVersionNumber$7"
+    DeleteRegKey SHCTX "SOFTWARE\${APP_NAME}\$OldVersionNumber$7"
+   ${Next}
   ${endif}
 SectionEnd
 
@@ -162,10 +164,8 @@ Section -Configure
   
   # Set the path prefix in lyxrc.dist
   ClearErrors
-  Delete "$INSTDIR\Resources\lyxrc.dist"
-  FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" w
-  # set the format to the latest LyXRC format
-  FileWrite $R1 'Format 24$\r$\n'
+  FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" a
+  FileSeek $R1 0 END
   # set some general things
   FileWrite $R1 '\screen_zoom 120$\r$\n'
   ${if} "$PathPrefix" != ""
@@ -241,6 +241,8 @@ Var ConfigureReturn
 Section -ConfigureScript
 
   DetailPrint $(TEXT_CONFIGURE_LYX)
+  SetShellVarContext current
+  SetOutPath "$APPDATA\${APP_DIR_USERDATA}"
   nsExec::ExecToLog '"$INSTDIR\Python\python.exe" "$INSTDIR\Resources\configure.py"'
   # $ConfigureReturn is "0" if successful, otherwise "1"
   Pop $ConfigureReturn # Return value
@@ -250,11 +252,11 @@ SectionEnd
 #--------------------------------
 #
 
-Function StartLyX
+#Function StartLyX
 
   # run LyX in a command line window to give the users feedback about
   # the time consuming LaTeX package installation
   
-  Exec "$INSTDIR\${APP_RUN}"
+#  Exec "$INSTDIR\${APP_RUN}"
 
-FunctionEnd
+#FunctionEnd