]> git.lyx.org Git - features.git/commitdiff
installer: cleaner support for splitindex and pdfcrop
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 9 Mar 2014 17:19:58 +0000 (18:19 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 9 Mar 2014 17:19:58 +0000 (18:19 +0100)
- it turned out that the hack to install a stripped-down Perl directly to MiKTEX is not only error-prone, requires admin permission but that it is also not safe because MiKTeX changes the folder structure from time to time. With the new solution Perl is installed directly for LyX like we do for ImageMagick, Python etc.
- for pdfcrop support there is a bug in pdfcriop that the requirement is hardcoded to Ghostscript 32bit - I contacted the pdfcrop author to fix this

development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/declarations.nsh
development/Win32/packaging/installer/setup/configure.nsh

index fc21866960874809e721652a8fd22e93e07e4152..48b8e4a00d174ba8a7b7ca7d25d9046642098caf 100644 (file)
@@ -1,6 +1,10 @@
 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
+- install a stripped-down version of Perl to be able to use LyX's feature
+  to have several indexe also when LyX is installed without admin privileges
+- updated to Qt 4.8.5
+- updated to Perl 5.18
 
 
 Changelog for LyX-207-2:
index 70d50a8fe3de57d7f38fe9b7ef61cbe8d311fd24..1b4cf98ec3087434dd32a0de495771f039a503aa 100644 (file)
@@ -14,7 +14,7 @@ Handling of LaTeX distributions
 #
 # - ConfigureMiKTeX
 #   (installs the LaTeX class files that are delivered with LyX,
-#    a Perl interpreter for splitindex
+#    a Perl interpreter for splitindex and pdfcrop
 #    and enable MiKTeX's automatic package installation)
 #
 # - ConfigureTeXLive
@@ -240,7 +240,7 @@ FunctionEnd
 
 Function ConfigureMiKTeX
  # installs the LaTeX class files that are delivered with LyX,
- # a Perl interpreter for splitindex
+ # a Perl interpreter for splitindex and pdfcrop
  # and enable MiKTeX's automatic package installation
  
  # install LyX's LaTeX class and style files and a Perl interpreter
@@ -276,59 +276,10 @@ Function ConfigureMiKTeX
   SetOutPath "$PathLaTeXLocal\tex\generic\babel"
   File "${FILES_DVIPOST_PKG}\magyar.ldf"
   
-  # only install a Perl interpreter if it is not already installed
-  # this is only possible if MikTeX _and_ LyX is installed with the same privileges
-  ${if} ${RunningX64}
-   SetRegView 32 # FIXME: recheck this if the 64bit version of MiKTeX is out of beta state 
-  ${endif}
-  ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\MiKTeX $MiKTeXVersion" "DisplayVersion"
-  ${if} $MultiUser.Privileges != "Admin"
-  ${andif} $MultiUser.Privileges != "Power"
-   ${if} $0 == ""
-    ${ifnot} ${FileExists} "$PathLaTeX\perl.exe"
-     MessageBox MB_OK|MB_ICONINFORMATION "$(MultipleIndexesNotAvailable)" /SD IDOK
-    ${endif}
-   ${else}
-    # ${FileExists} is disabled for now to repair existing LyX installations using 64bit MiKTeX
-    # re-enable this for LyX 2.1.1
-    #${ifnot} ${FileExists} "$PathLaTeX\perl.exe" 
-     ${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
-     # on 32bit MiKTeX the lib folder has to be parallel to the bin folder
-     # while on 64bit MiKTeX the lib folder has to be inside the bin folder
-     ${if} $Is64bit == "true"
-      CopyFiles /SILENT /FILESONLY "$3\miktex\bin\*.*" "$PathLaTeX"
-      CreateDirectory "$3\miktex\bin\x64\lib"
-      CopyFiles /SILENT "$3\miktex\lib\*.*" "$3\miktex\bin\x64\lib"
-      RMDir /r "$3\miktex\lib"
-      RMDir /r "$3\miktex\bin\lib" # to clean up existing installations; can be removed for LyX 2.1.1
-      Delete "$3\miktex\bin\*.*"
-     ${endif}
-    #${endif}
-   ${endif}
-  ${else} # if admin or power user
-   # ${FileExists} is disabled for now to repair existing LyX installations using 64bit MiKTeX
-   # re-enable this for LyX 2.1.1
-   #${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"
-     CreateDirectory "$PathLaTeXLocal\miktex\bin\x64\lib"
-     CopyFiles /SILENT "$PathLaTeXLocal\miktex\lib\*.*" "$PathLaTeXLocal\miktex\bin\x64\lib"
-     RMDir /r "$PathLaTeXLocal\miktex\lib"
-     RMDir /r "$PathLaTeXLocal\miktex\bin\lib" # to clean up existing installations; can be removed for LyX 2.1.1
-     Delete "$PathLaTeXLocal\miktex\bin\*.*"
-    ${endif}
-   #${endif}
-  ${endif}
+  # install a Perl interpreter for splitindex and pdfcrop
+  SetOutPath "$INSTDIR"
+  # recursively copy all files under Perl
+  File /r "${FILES_PERL}"
   
   # refresh MiKTeX's file name database (do this always to assure everything is in place)
   ${if} $MultiUser.Privileges != "Admin"
index 02062d26056848fbeed7c23587912a7e730007e2..797ac6eb24287f574357d0ea458d237a9d046c69 100644 (file)
@@ -13,12 +13,12 @@ Configuration of LyX installer
 !define FILES_ICONS "icons"
 !define FILES_PDFVIEW "${FILES_DEPS}\bin"
 !define FILES_MSVC "${FILES_DEPS}\bin"
+!define FILES_PERL "${FILES_DEPS}\Perl"
 !define FILES_PYTHON "${FILES_DEPS}\Python"
 !define FILES_ELYXER "${FILES_DEPS}\bin"
 !define FILES_UNOCONV "${FILES_DEPS}\bin"
 !define FILES_IMAGEMAGICK "${FILES_DEPS}\imagemagick"
 !define FILES_GHOSTSCRIPT "${FILES_DEPS}\ghostscript"
-!define FILES_MIKTEX "${FILES_DEPS}\miktex"
 !define FILES_NETPBM "${FILES_DEPS}\bin"
 !define FILES_DTL "${FILES_DEPS}\bin"
 !define FILES_DVIPOST "${FILES_DEPS}\bin"
index 42d6148afa5946e33a1402c7db667714a08e8924..c4de7cde6ee6922949aba82f86845d1007954253 100644 (file)
@@ -109,7 +109,7 @@ Section -Configure
 
   # create the path prefix
   # $$ represents a literal $ in an NSIS string
-  StrCpy $PathPrefix "$$LyXDir\bin;$$LyXDir\Python;$$LyXDir\Python\Lib;$$LyXDir\imagemagick"
+  StrCpy $PathPrefix "$$LyXDir\bin;$$LyXDir\Python;$$LyXDir\Python\Lib;$$LyXDir\Perl\bin;$$LyXDir\imagemagick"
   
   ${if} $PathLaTeX != ""
     StrCpy $PathPrefix "$PathPrefix;$PathLaTeX"