]> git.lyx.org Git - features.git/commitdiff
installer: support 64bit MiKTeX
authorUwe Stöhr <uwestoehr@lyx.org>
Tue, 26 Feb 2013 01:25:04 +0000 (02:25 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Tue, 26 Feb 2013 01:25:04 +0000 (02:25 +0100)
- the installer will now recognize an already installed 64bit MiKTeX
- the installer will still install 32bit MiKTeX for new installations because biblatex does not yet work with 64bit MiKTeX

development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/variables.nsh
development/Win32/packaging/installer/settings.nsh
development/Win32/packaging/installer/setup/install.nsh

index c11d58ac9af021814d810fa46d7f7e92a775d634..389d87f00b63e3946437e48befc8a8033b2433ae 100644 (file)
@@ -1,4 +1,14 @@
-Changelog for LyX-2051-4:
+Changelog for LyX-2051-5:
+- Fix broken importing of TeX files to LyX
+- If a 64bit version of MiKTeX is installed, it now be recognized by LyX
+- Fix broken installation of the Perl interpreter (Perl is only necessary to use
+  several global indexes in a LyX document.)
+- Fix bug that installation of LyX was not aborted if no LaTeX-distribution was found
+  but LaTeX should be used (does not affect the bundle installer)
+- updated to GhostScript 9.07
+
+
+Changelog for LyX-2051-4:
 - If LyX is installed together with MiKTeX (bundle installer) the installation of
   LaTeX-packages required by LyX takes now much less time and you get a visual feedback
   about the installation process. 
index e0bcfc6bec8d1fdd0d3bec81f952fb7d900221de..4900f84f922d2af482407447071122a2d73e0cdc 100644 (file)
@@ -27,6 +27,8 @@ Handling of LaTeX distributions
 Function LaTeXActions
  # checks if MiKTeX or TeXLive is installed
 
+  StrCpy $Is64bit "false"
+  
   ${if} ${RunningX64}
    SetRegView 64 # the PATH is in the 64bit registry section
   ${endif}
@@ -36,8 +38,16 @@ Function LaTeXActions
   StrCpy $Search "miktex"
   Call LaTeXCheck # sets the path to the latex.exe to $PathLaTeX # Function from LyXUtils.nsh
   
+  StrCpy $String $PathLaTeX
+  StrCpy $Search "x64" # search if it is 64bit MiKTeX
+  Call StrPoint # Function from LyXUtils.nsh
+  ${if} $Pointer != "-1" # if something was found
+   StrCpy $Is64bit "true"
+  ${endif}
+  
   # check for 32bit MiKTeX
   ${if} $PathLaTeX != ""
+  ${andif} $Is64bit != "true"
    ${if} ${RunningX64}
     SetRegView 32
    ${endif}
@@ -61,7 +71,7 @@ Function LaTeXActions
   ${endif}
   
   # check for 64bit MiKTeX
-  ${if} $PathLaTeX == ""
+  ${if} $LaTeXName == ""
    ${if} ${RunningX64}
     SetRegView 64
    ${endif}
@@ -115,8 +125,14 @@ Function LaTeXActions
     StrCpy $LaTeXName "MiKTeX 2.9"
    ${endif}
   ${endif}
-    
+  
   ${if} $PathLaTeX != ""
+   StrCpy $String $PathLaTeX
+   StrCpy $Search "x64" # search if it is 64bit MiKTeX
+   Call StrPoint # Function from LyXUtils.nsh
+   ${if} $Pointer != "-1" # if something was found
+    StrCpy $Is64bit "true"
+   ${endif}
    StrCpy $LaTeXInstalled "MiKTeX"
    # on some installations the path ends with a "\" on some not
    # therefore assure that we remove it if it exists
@@ -231,7 +247,11 @@ Function ConfigureMiKTeX
  ${if} $PathLaTeX != ""
   ${if} $MultiUser.Privileges == "Admin"
   ${orif} $MultiUser.Privileges == "Power"
-   StrCpy $PathLaTeXLocal "$PathLaTeX" -11 # delete "\miktex\bin"
+   ${if} $Is64bit == "true"
+    StrCpy $PathLaTeXLocal "$PathLaTeX" -15 # delete "\miktex\bin\x64"
+   ${else}
+    StrCpy $PathLaTeXLocal "$PathLaTeX" -11 # delete "\miktex\bin"
+   ${endif}
   ${else}
    StrCpy $PathLaTeXLocal "$APPDATA\MiKTeX\$MiKTeXVersion"
   ${endif}
@@ -260,14 +280,35 @@ Function ConfigureMiKTeX
     ${endif}
    ${else}
     ${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
-     SetOutPath "$PathLaTeXLocal"
+     ${if} $Is64bit == "true"
+      StrCpy $3 "$PathLaTeX" -15 # delete "\miktex\bin\x64"
+     ${else}
+      StrCpy $3 "$PathLaTeX" -11 # delete "\miktex\bin"
+     ${endif}
+     SetOutPath "$3"
      File /r ${FILES_MIKTEX}
+     # move the files to the correct location for 64bit
+     ${if} $Is64bit == "true"
+      CopyFiles /SILENT /FILESONLY "$3\miktex\bin\*.*" "$PathLaTeX"
+      Delete "$3\miktex\bin\*.*"
+      CreateDirectory "$3\miktex\bin\lib"
+      CopyFiles /SILENT "$3\miktex\lib\*.*" "$3\miktex\bin\lib"
+      RMDir /r "$3\miktex\lib"
+     ${endif}
     ${endif}
    ${endif}
   ${else}
    ${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
     SetOutPath "$PathLaTeXLocal"
     File /r ${FILES_MIKTEX}
+    # move the files to the correct location for 64bit
+    ${if} $Is64bit == "true"
+     CopyFiles /SILENT /FILESONLY "$PathLaTeXLocal\miktex\bin\*.*" "$PathLaTeX"
+     Delete "$PathLaTeXLocal\miktex\bin\*.*"
+     CreateDirectory "$PathLaTeXLocal\miktex\bin\lib"
+     CopyFiles /SILENT "$PathLaTeXLocal\miktex\lib\*.*" "$PathLaTeXLocal\miktex\bin\lib"
+     RMDir /r "$PathLaTeXLocal\miktex\lib"
+    ${endif}
    ${endif}
   ${endif}
   
@@ -289,7 +330,12 @@ Function ConfigureMiKTeX
   
   # enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me first) and
   # if there is not package repository (MiKTeX's primary package repository) then set it
-  # FIXME: support 64bit MiKTeX if it is out of beta state
+  ${if} ${RunningX64}
+  ${andif} $Is64bit == "true"
+   SetRegView 64
+  ${else}
+   SetRegView 32
+  ${endif}
   ${if} $MiKTeXUser == "HKCU" # if only for current user
    WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "AutoInstall" "1"
    ReadRegStr $1 HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM" "RemoteRepository"
@@ -311,6 +357,9 @@ Function ConfigureMiKTeX
   # update MiKTeX's package file list
   ExecWait '$PathLaTeX\mpm.exe --update-fndb'
   
+  # we must return to 32bit because LyX is a 32bit application
+  SetRegView 32
+  
 FunctionEnd
 
 # ------------------------------
index 65bfcccdd698c624db93e323adfcf3cc0d23760d..38e030bd8f0894e7e0baea96676e24d5d3f9770b 100644 (file)
@@ -25,6 +25,7 @@ Var FoundThes
 Var GhostscriptPath
 Var GnumericPath
 Var ImageEditorPath
+Var Is64bit
 !if ${SETUPTYPE} == BUNDLE
  Var InstallJabRef
 !endif
index 9b350aebbf78805bea4ec1fad6e6dc19a8b3b6db..dfb708b95f6f0b5c2ac2fec1d78e126b986fe34b 100644 (file)
@@ -14,7 +14,7 @@ These typically need to be modified for each LyX release
 !define APP_VERSION_REVISION 5
 !define APP_VERSION_EMERGENCY "1" # use "1" for an emergency release of LyX otherwise ""
 !define APP_EMERGENCY_DOT "." # use "." for an emergency release of LyX otherwise ""
-!define APP_VERSION_BUILD 4 # Start with 1 for the installer releases of each version
+!define APP_VERSION_BUILD 5 # Start with 1 for the installer releases of each version
 
 !define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display
 
index e8c8f8f98d7edf65d9beb317d7044f295070d168..27e5fba10ce06dba9b2106cc6c9baf9444d1e384 100644 (file)
@@ -14,6 +14,16 @@ Var PythonCompileReturn
 
 Section -ProgramFiles SecProgramFiles
 
+ !if ${SETUPTYPE} != BUNDLE
+  # abort the installation if no LaTeX was found but should be used
+  ${if} $PathLaTeX == ""
+  ${andif} $State == "0"
+   SetOutPath $TEMP # to be able to delete the $INSTDIR
+   RMDir /r $INSTDIR
+   Abort
+  ${endif}
+ !endif # end if != BUNDLE
+
   # Install and register the core LyX files
   
   # The macros are defined in filelists.nsh