]> git.lyx.org Git - features.git/blobdiff - development/Win32/packaging/installer2/src/main.nsh
WinInstaller2: assure configure.py is run in the user dir, by Eugene
[features.git] / development / Win32 / packaging / installer2 / src / main.nsh
index ca3487dc5d204e4c8742df0671d57ffaaa4b94d2..2ca99a048efa223bd65f8067bc003a9d6a8b7988 100644 (file)
     #!include LangFile.nsh # included in MUI2 # Header file to create language files that can be included with a single command.
     !include x64.nsh # Header file to check if target system is 64 bit or not with ${RunningX64}, also defines ${DisableX64FSRedirection} and ${EnableX64FSRedirection}
     !include NSISList.nsh # Header file to create and work with lists in NSIS (plugin)
-    !include nsProcess.nsh # Header file to search for a running process (plugin)
 
     #!include StrFunc.nsh # included in MultiUser # Provides some additional string functions
     ${StrRep} # Define this function from StrFunc.nsh for further use
@@ -965,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