[LyX/master] Wininstaller2: small cosmetic bugfix
Eugene Chornyi
yu_jin at lyx.org
Mon Nov 30 05:32:57 UTC 2020
commit baf792f1b0f1db08512fa7eb05c1665281095540
Author: Eugene Chornyi <yu_jin at lyx.org>
Date: Mon Nov 30 07:02:46 2020 +0100
Wininstaller2: small cosmetic bugfix
---
.../Win32/packaging/installer2/src/main.nsh | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/development/Win32/packaging/installer2/src/main.nsh b/development/Win32/packaging/installer2/src/main.nsh
index 32493ab..9bcd87a 100644
--- a/development/Win32/packaging/installer2/src/main.nsh
+++ b/development/Win32/packaging/installer2/src/main.nsh
@@ -957,6 +957,16 @@ Section -UninstallInfoRegistry # Registry information in "SOFTWARE\Microsoft\Win
SectionEnd
Section -ConfigureScript # Runs the configure.py script
+
+ # Manipulate PATH environment of the running installer process, so that configure.py can find all the stuff needed
+ ReadEnvStr $0 "PATH"
+ ${StrRep} $pathPrefix $pathPrefix "$$LyXDir" "$INSTDIR"
+ System::Call 'Kernel32::SetEnvironmentVariable(t "PATH", t "$pathPrefix;$0")'
+
+ Call PrepareShellCTX
+ SetShellVarContext current # Otherwise $APPDATA would return C:\ProgrammData instead of C:\Users\username\AppData\Roaming
+ SetOutPath "$APPDATA\LyX${VERSION_MAJOR}.${VERSION_MINOR}" # Need to run configure from the user dir, because it creates .lst files and some folders.
+
${StrStr} $0 $LatexPath "\miktex\bin"
# R9 is used in $(TEXT_CONFIGURE_LYX)
${If} $0 == "" # TexLive
@@ -966,15 +976,7 @@ Section -ConfigureScript # Runs the configure.py script
${EndIf}
StrCpy $LaTeXInstalled $R9 # FIXME remove
DetailPrint $(TEXT_CONFIGURE_LYX) # Uses R9 to display the name of the installed latex distribution
-
- # Manipulate PATH environment of the running installer process, so that configure.py can find all the stuff needed
- ReadEnvStr $0 "PATH"
- ${StrRep} $pathPrefix $pathPrefix "$$LyXDir" "$INSTDIR"
- System::Call 'Kernel32::SetEnvironmentVariable(t "PATH", t "$pathPrefix;$0")'
- Call PrepareShellCTX
- SetShellVarContext current # Otherwise $APPDATA would return C:\ProgrammData instead of C:\Users\username\AppData\Roaming
- SetOutPath "$APPDATA\LyX${VERSION_MAJOR}.${VERSION_MINOR}" # Need to run configure from the user dir, because it creates .lst files and some folders.
nsExec::ExecToLog '"$INSTDIR\Python\python.exe" "$INSTDIR\Resources\configure.py"'
Pop $0 # Return value
SectionEnd
More information about the lyx-cvs
mailing list