#
# - 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
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
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"
!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"