]> git.lyx.org Git - features.git/commitdiff
Implement 64 bit installer.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 4 Apr 2020 23:16:29 +0000 (19:16 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:55 +0000 (15:48 +0200)
Remove registry hacking for imagemagick (using portable now).

12 files changed:
development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/include/EnvVarUpdate.nsh
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/declarations.nsh
development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/filelist.nsh
development/Win32/packaging/installer/include/init.nsh
development/Win32/packaging/installer/include/nsis.nsh
development/Win32/packaging/installer/settings.nsh
development/Win32/packaging/installer/setup/configure.nsh
development/Win32/packaging/installer/setup/install.nsh
development/Win32/packaging/installer/setup/uninstall.nsh

index 3d3ddb59c8f2fab7790a4203c9ecb3ac69c40a3a..0ff3fcf6fa70c0889138d95325797dfb22dffb2f 100644 (file)
@@ -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
index e67472cf80a92e4e747935f0a0d5d1b1517baadb..0fd17556331dd1c9ff4d25dfc81953d575639cbd 100644 (file)
@@ -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
index f65037c799bdf147d8bbccdb3cc5480c925fe4c9..fa6f34daf378be9baf0da252cae706f0082986bb 100644 (file)
@@ -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
index 01f98b36a0d46d6ade81a7b33b04238fb04b9404..9a71f547c48cbc3ad87e6bac3532288ab24c09ef 100644 (file)
@@ -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"
index 493f03f5e4af48302d8f915f7f0748383556860e..01c44ff616f572808c784a57ced4f372061c1933 100644 (file)
@@ -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
 
index 84311e087d66eb370797e0f544a2e1848b388c50..b1d3df7799513748df190385ef58b848d580470b 100644 (file)
@@ -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
 
index 4276a07cb7e46d1825fe3e7332c03ea171c17b49..4902d2678547611ea67cffc6fc0abd276a14e830 100644 (file)
@@ -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
index 442a87823abeeedc5ca0497a9dfc76bbdea2bcf9..4a045fc352aed0cb53f315965a7221021234df3b 100644 (file)
@@ -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
index 0ad3514c0b5f2e8656b09474d06c0732148d3a29..2a79525302be3d4e1bc0ebee0a567a9b5e02eba1 100644 (file)
@@ -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"
index 5daf6d6e2cd07b39a139c42f713521aa82bf561a..c7d93e809786f9ab2a3dbeb01ff9f0e23643db86 100644 (file)
@@ -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
index 5846f8d5bd84e3993a10694576d3476074d7176f..2177e1514383a2139b3a2ca10ee73223cdf268a0 100644 (file)
@@ -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}
   
index 1d1d383c602dedc6639e85ca20f7ab8db36abd75..fb7db193a7bfafceb6eadde7d163f4f4e49b96ca 100644 (file)
@@ -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"