From: Richard Kimberly Heck Date: Sat, 4 Apr 2020 23:16:29 +0000 (-0400) Subject: Implement 64 bit installer. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=686e31953ad50dff3f6bea4e93217b639afa9773;p=features.git Implement 64 bit installer. Remove registry hacking for imagemagick (using portable now). --- diff --git a/development/Win32/packaging/installer/ChangeLog.txt b/development/Win32/packaging/installer/ChangeLog.txt index 3d3ddb59c8..0ff3fcf6fa 100644 --- a/development/Win32/packaging/installer/ChangeLog.txt +++ b/development/Win32/packaging/installer/ChangeLog.txt @@ -1,4 +1,15 @@ -Changelog for LyX-230: +Changelog for LyX-23x: +- introduced windows 64 bit installer +- updated to ImageMagick 7.0.10-0 (portable) +- updated to Ghostscript 9.50 +- updated to Python 2.7.17 +- updated to DTL 0.6.1 +- updated to Netpbm 10.27 +- updated to rsvg-convert 2.40.20 +- updated to unoconv 0.8.2 +- Perl folder is no longer added to PATH if TexLive installation was detected + +Changelog for LyX-230: - installs LyX 2.3.0 - fix installation of Arabic spell checker - updated to MiKTeX 2.9 build 6615 diff --git a/development/Win32/packaging/installer/include/EnvVarUpdate.nsh b/development/Win32/packaging/installer/include/EnvVarUpdate.nsh index e67472cf80..0fd1755633 100644 --- a/development/Win32/packaging/installer/include/EnvVarUpdate.nsh +++ b/development/Win32/packaging/installer/include/EnvVarUpdate.nsh @@ -43,7 +43,7 @@ !ifndef Un${StrFuncName}_INCLUDED ${Un${StrFuncName}} !endif - !define un.${StrFuncName} "${Un${StrFuncName}}" + !define un.${StrFuncName} '${Un${StrFuncName}}' !macroend !insertmacro _IncludeStrFunction StrTok diff --git a/development/Win32/packaging/installer/include/LaTeX.nsh b/development/Win32/packaging/installer/include/LaTeX.nsh index f65037c799..fa6f34daf3 100644 --- a/development/Win32/packaging/installer/include/LaTeX.nsh +++ b/development/Win32/packaging/installer/include/LaTeX.nsh @@ -221,9 +221,9 @@ Function ConfigureMiKTeX ${endif} # install a Perl interpreter for splitindex and pdfcrop - SetOutPath "$INSTDIR" + SetOutPath "$INSTDIR\Perl" # recursively copy all files under Perl - File /r "${FILES_PERL}" + File /r "${FILES_PERL}\" ${endif} # end if $PathLaTeX != "" FunctionEnd diff --git a/development/Win32/packaging/installer/include/declarations.nsh b/development/Win32/packaging/installer/include/declarations.nsh index 01f98b36a0..9a71f547c4 100644 --- a/development/Win32/packaging/installer/include/declarations.nsh +++ b/development/Win32/packaging/installer/include/declarations.nsh @@ -9,7 +9,7 @@ Configuration of LyX installer #-------------------------------- # File locations -!define FILES_LICENSE "${FILES_GIT}\license.rtf" +!define FILES_LICENSE "${FILES_GIT}\installer\license.rtf" !define FILES_ICONS "${FILES_GIT}\icons" !define FILES_PDFVIEW "${FILES_DEPS}\bin" !define FILES_MSVC "${FILES_DEPS}\bin" diff --git a/development/Win32/packaging/installer/include/detection.nsh b/development/Win32/packaging/installer/include/detection.nsh index 493f03f5e4..01c44ff616 100644 --- a/development/Win32/packaging/installer/include/detection.nsh +++ b/development/Win32/packaging/installer/include/detection.nsh @@ -27,6 +27,7 @@ Detection of external component locations Function SearchExternal Call LaTeXActions # function from LaTeX.nsh Call MissingPrograms + SetRegView ${APP_VERSION_ACHITECHTURE} Call FindDictionaries # function from dictionaries.nsh FunctionEnd diff --git a/development/Win32/packaging/installer/include/filelist.nsh b/development/Win32/packaging/installer/include/filelist.nsh index 84311e087d..b1d3df7799 100644 --- a/development/Win32/packaging/installer/include/filelist.nsh +++ b/development/Win32/packaging/installer/include/filelist.nsh @@ -86,7 +86,7 @@ Lists of files to include in the installer !macro FileListMSVC COMMAND DIRECTORY - # Files needed for MSVC 2015 + # Files needed for MSVC 2019 # Seem to be installed for dependencies ${FILE}concrt140.dll" ${FILE}msvcp140.dll" @@ -94,6 +94,9 @@ Lists of files to include in the installer ${FILE}vccorlib140.dll" ${FILE}vcomp140.dll" ${FILE}vcruntime140.dll" + !if ${APP_VERSION_ACHITECHTURE} = 64 + ${File}vcruntime140_1.dll" + !endif !macroend diff --git a/development/Win32/packaging/installer/include/init.nsh b/development/Win32/packaging/installer/include/init.nsh index 4276a07cb7..4902d26785 100644 --- a/development/Win32/packaging/installer/include/init.nsh +++ b/development/Win32/packaging/installer/include/init.nsh @@ -594,6 +594,15 @@ SectionGroupEnd # the selection states of the dictionary sections Function .onInit + !if ${APP_VERSION_ACHITECHTURE} = 64 + ${IfNot} ${RunningX64} + MessageBox MB_OK|MB_ICONSTOP "Cannot install a 64 bit app on 32 bit Windows, please use the 32 bit installer" /SD IDOK + Abort + ${EndIf} + !EndIf + + SetRegView ${APP_VERSION_ACHITECHTURE} + ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion ${if} $R0 == "5.0" # 2000 ${orif} $R0 == "5.1" # XP @@ -1412,6 +1421,8 @@ FunctionEnd # this function is called at first after starting the uninstaller Function un.onInit + SetRegView ${APP_VERSION_ACHITECHTURE} + !insertmacro MULTIUSER_UNINIT # Check that LyX is not currently running diff --git a/development/Win32/packaging/installer/include/nsis.nsh b/development/Win32/packaging/installer/include/nsis.nsh index 442a87823a..4a045fc352 100644 --- a/development/Win32/packaging/installer/include/nsis.nsh +++ b/development/Win32/packaging/installer/include/nsis.nsh @@ -20,6 +20,9 @@ Configuration of standard NSIS header files !define MULTIUSER_INSTALLMODE_FUNCTION InitUser !define MULTIUSER_MUI +!if ${APP_VERSION_ACHITECHTURE} = 64 + !define MULTIUSER_USE_PROGRAMFILES64 +!endif #-------------------------------- # Standard header files diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index 0ad3514c0b..2a79525302 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -10,15 +10,18 @@ These typically need to be modified for each LyX release # Version number !define APP_VERSION_MAJOR 2 -!define APP_VERSION_MINOR 3 -!define APP_VERSION_REVISION 2 -!define APP_VERSION_EMERGENCY "" # use "1" for an emergency release of LyX otherwise "" +!define APP_VERSION_MINOR 4 +!define APP_VERSION_REVISION 0 +!define APP_VERSION_EMERGENCY "dev" # 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 1 # Start with 1 for the installer releases of each version +# 32 or 64 bit, use build folder names and dependencies folder names containing "32" or "64" to use following constant in File locations declarations below +!define APP_VERSION_ACHITECHTURE 32 + !define APP_VERSION "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}" # Version to display -!define COPYRIGHT_YEAR 2019 +!define COPYRIGHT_YEAR 2020 #-------------------------------- # Installer file name @@ -26,18 +29,19 @@ These typically need to be modified for each LyX release # Typical names for the release are "LyX-232-Installer-1.exe" etc. !ifndef ExeFile - !define ExeFile "${APP_NAME}-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Installer-${APP_VERSION_BUILD}.exe" + !define ExeFile "${APP_NAME}-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Installer-${APP_VERSION_BUILD}-\ + x${APP_VERSION_ACHITECHTURE}.exe" !endif #-------------------------------- # File locations # !!! you need to adjust them to the folders in your Windows system !!! -!define FILES_BASE "C:\Users\rikih\LyX" -!define FILES_GIT "${FILES_BASE}\git\development\Win32\packaging\installer" -!define FILES_LYX "${FILES_BASE}\LyX23" -!define FILES_DEPS "${FILES_BASE}\Dependencies" -!define FILES_QT "${FILES_BASE}\LyX23" +!define FILES_BASE "C:\lyx" +!define FILES_GIT "${FILES_BASE}\master\development\Win32\packaging" +!define FILES_LYX "${FILES_BASE}\masterbuild${APP_VERSION_ACHITECHTURE}\LYX_INSTALLED" +!define FILES_DEPS "${FILES_BASE}\lyx-windows-deps-msvc2019_${APP_VERSION_ACHITECHTURE}" +!define FILES_QT "${FILES_BASE}\masterbuild${APP_VERSION_ACHITECHTURE}\LYX_INSTALLED" !define ClassFileDir "${FILES_LYX}\Resources\tex" #-------------------------------- @@ -45,4 +49,4 @@ These typically need to be modified for each LyX release !define MiKTeXRepo "ftp://ftp.tu-chemnitz.de/pub/tex/systems/win32/miktex/tm/packages/" -!define ImageMagickVersion "7.0.7" +!define ImageMagickVersion "7.0.10" diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index 5daf6d6e2c..c7d93e8097 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -218,12 +218,14 @@ Section -Configure ClearErrors # for texindy the path to the perl.exe must unfortunately be in Windows' PATH variable - ${if} $MultiUser.Privileges != "Admin" - ${andif} $MultiUser.Privileges != "Power" - # call the non-admin version - ${EnvVarUpdate} $0 "PATH" "A" "HKCU" "$INSTDIR\Perl\bin" - ${else} - ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\Perl\bin" + ${if} $LaTeXInstalled != "TeXLive" + ${if} $MultiUser.Privileges != "Admin" + ${andif} $MultiUser.Privileges != "Power" + # call the non-admin version + ${EnvVarUpdate} $0 "PATH" "A" "HKCU" "$INSTDIR\Perl\bin" + ${else} + ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\Perl\bin" + ${endif} ${endif} SectionEnd diff --git a/development/Win32/packaging/installer/setup/install.nsh b/development/Win32/packaging/installer/setup/install.nsh index 5846f8d5bd..2177e15143 100644 --- a/development/Win32/packaging/installer/setup/install.nsh +++ b/development/Win32/packaging/installer/setup/install.nsh @@ -49,7 +49,7 @@ Section -ProgramFiles SecProgramFiles Delete "$INSTDIR\bin\LyX2.3.exe" Delete "$INSTDIR\bin\tex2lyx2.3.exe" !insertmacro FileListQtBin File "${FILES_QT}\bin\" - !insertmacro FileListMinGW File "${FILES_LYX}\bin\" + !insertmacro FileListMSVC File "${FILES_LYX}\bin\" !insertmacro FileListNetpbmBin File "${FILES_NETPBM}\" !insertmacro FileListDTLBin File "${FILES_DTL}\" !insertmacro FileListRsvg File "${FILES_RSVG}\" @@ -66,15 +66,15 @@ Section -ProgramFiles SecProgramFiles !insertmacro FileListQtStyles File "${FILES_QT}\bin\styles\" # Resources - SetOutPath "$INSTDIR" + SetOutPath "$INSTDIR\Resources" # recursively copy all files under Resources - File /r "${FILES_LYX}\Resources" - File /r "${FILES_DEPS}\Resources" + File /r "${FILES_LYX}\Resources\" + File /r "${FILES_DEPS}\Resources\" # Python - SetOutPath "$INSTDIR" + SetOutPath "$INSTDIR\Python" # recursively copy all files under Python - File /r "${FILES_PYTHON}" + File /r "${FILES_PYTHON}\" #FIXME We probably should not do this, as dicussed on the list. # register .py files if necessary ReadRegStr $0 SHCTX "Software\Classes\Python.File\shell\open\command" "" @@ -100,27 +100,11 @@ Section -ProgramFiles SecProgramFiles # Components of ImageMagick SetOutPath "$INSTDIR\imagemagick" File /r "${FILES_IMAGEMAGICK}\" - !insertmacro FileListMSVC File "${FILES_MSVC}\" - # register ImageMagick - WriteRegStr SHCTX "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "BinPath" "$INSTDIR\imagemagick" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "CoderModulesPath" "$INSTDIR\imagemagick\modules\coders" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "ConfigurePath" "$INSTDIR\imagemagick" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "FilterModulesPath" "$INSTDIR\imagemagick\modules\filters" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\${ImageMagickVersion}\Q:16" "LibPath" "$INSTDIR\imagemagick" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "BinPath" "$INSTDIR\imagemagick" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "CoderModulesPath" "$INSTDIR\imagemagick\modules\coders" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "ConfigurePath" "$INSTDIR\imagemagick" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "FilterModulesPath" "$INSTDIR\imagemagick\modules\filters" - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "LibPath" "$INSTDIR\imagemagick" - WriteRegDWORD SHCTX "SOFTWARE\ImageMagick\Current" "QuantumDepth" 0x00000010 - WriteRegStr SHCTX "SOFTWARE\ImageMagick\Current" "Version" "${ImageMagickVersion}" - WriteRegStr SHCTX "SOFTWARE\ImageMagick" "OnlyWithLyX" "Yes${APP_SERIES_KEY}" # Components of Ghostscript ${if} $GhostscriptPath == "" SetOutPath "$INSTDIR\ghostscript" File /r "${FILES_GHOSTSCRIPT}\" - !insertmacro FileListMSVC File "${FILES_MSVC}\" StrCpy $GhostscriptPath "$INSTDIR\ghostscript\bin" ${endif} diff --git a/development/Win32/packaging/installer/setup/uninstall.nsh b/development/Win32/packaging/installer/setup/uninstall.nsh index 1d1d383c60..fb7db193a7 100644 --- a/development/Win32/packaging/installer/setup/uninstall.nsh +++ b/development/Win32/packaging/installer/setup/uninstall.nsh @@ -32,11 +32,6 @@ Section "un.LyX" un.SecUnProgramFiles # ImageMagick RMDir /r "$INSTDIR\imagemagick" - ReadRegStr $0 SHCTX "SOFTWARE\ImageMagick" "OnlyWithLyX" # test if it was installed together with this LyX version - ${if} $0 == "Yes${APP_SERIES_KEY}" - WriteRegStr SHCTX "SOFTWARE\Classes\Applications" "AutoRun" "" - DeleteRegKey SHCTX "Software\ImageMagick" - ${endif} # Components of Ghostscript RMDir /r "$INSTDIR\ghostscript"