[LyX/master] WinInstaller2: assure configure.py is run in the user dir, by Eugene

Juergen Spitzmueller spitz at lyx.org
Tue Jun 9 10:50:54 UTC 2020


commit 0f6045848af6a9dc471cd181bc6f68e39bbe86a2
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Tue Jun 9 13:13:26 2020 +0200

    WinInstaller2: assure configure.py is run in the user dir, by Eugene
---
 .../Win32/packaging/installer2/src/main.nsh        |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/development/Win32/packaging/installer2/src/main.nsh b/development/Win32/packaging/installer2/src/main.nsh
index 2c70438..2ca99a0 100644
--- a/development/Win32/packaging/installer2/src/main.nsh
+++ b/development/Win32/packaging/installer2/src/main.nsh
@@ -964,6 +964,10 @@ 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
+  
+  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