commit ea05826908abe2bab72575cae55fb7a7eb33584c
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Sun Mar 9 18:19:58 2014 +0100

    installer: cleaner support for splitindex and pdfcrop
    
    - 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

diff --git a/development/Win32/packaging/installer/ChangeLog.txt 
b/development/Win32/packaging/installer/ChangeLog.txt
index fc21866..48b8e4a 100644
--- a/development/Win32/packaging/installer/ChangeLog.txt
+++ b/development/Win32/packaging/installer/ChangeLog.txt
@@ -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:
diff --git a/development/Win32/packaging/installer/include/LaTeX.nsh 
b/development/Win32/packaging/installer/include/LaTeX.nsh
index 70d50a8..1b4cf98 100644
--- a/development/Win32/packaging/installer/include/LaTeX.nsh
+++ b/development/Win32/packaging/installer/include/LaTeX.nsh
@@ -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"
diff --git a/development/Win32/packaging/installer/include/declarations.nsh 
b/development/Win32/packaging/installer/include/declarations.nsh
index 02062d2..797ac6e 100644
--- a/development/Win32/packaging/installer/include/declarations.nsh
+++ b/development/Win32/packaging/installer/include/declarations.nsh
@@ -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"
diff --git a/development/Win32/packaging/installer/setup/configure.nsh 
b/development/Win32/packaging/installer/setup/configure.nsh
index 42d6148..c4de7cd 100644
--- a/development/Win32/packaging/installer/setup/configure.nsh
+++ b/development/Win32/packaging/installer/setup/configure.nsh
@@ -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"

Reply via email to