]> git.lyx.org Git - features.git/commitdiff
installer: fix potential serious bug
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 9 Mar 2014 06:57:47 +0000 (07:57 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 9 Mar 2014 06:57:47 +0000 (07:57 +0100)
development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/setup/install.nsh

index 66d1339d437e282d48cb29e856b63bca7eaa5fae..fc21866960874809e721652a8fd22e93e07e4152 100644 (file)
@@ -1,4 +1,9 @@
-Changelog for LyX-207-2:
+Changelog for LyX-207-3:
+- fix serious bug that LyX could directly be installed to c:\programs
+  the uninstaller would then delete the whole c:\programs folder
+
+
+Changelog for LyX-207-2:
 - LyX can now be installed and uninstalled silently
   (administrators can start the installer with "LyX-207-Installer-2.exe /S")
 - updated to Python 2.7.6
index 262fec5025ec5c5dbba353c975e4940923dbc54c..b34b52a06c3d559edb42492bfe28c1d1ff63febd 100644 (file)
@@ -14,6 +14,16 @@ Var PythonCompileReturn
 
 Section -ProgramFiles SecProgramFiles
 
+  # if the $INSTDIR does not contain "LyX" we must add a subfolder to avoid that LyX will e.g.
+  # be installed directly to C:\programs - the uninstaller will then delete the whole
+  # C:\programs directory
+  StrCpy $String $INSTDIR
+  StrCpy $Search "LyX"
+  Call StrPoint # function from LyXUtils.nsh
+  ${if} $Pointer == "-1"
+   StrCpy $INSTDIR "$INSTDIR\${APP_DIR}"
+  ${endif}
+
  !if ${SETUPTYPE} != BUNDLE
   # abort the installation if no LaTeX was found but should be used
   ${if} $PathLaTeX == ""