]> git.lyx.org Git - features.git/commitdiff
Win installer: prepare 2.2.4 release
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 11 Mar 2018 13:36:40 +0000 (14:36 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 11 Mar 2018 13:36:40 +0000 (14:36 +0100)
development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/include/LaTeX.nsh
development/Win32/packaging/installer/include/filelist.nsh

index 6c5243819aa7f58f7a7353de43921661c56080e9..821559ca4ccbeb1519f36e5ab6162e465cec1211 100644 (file)
@@ -4,7 +4,7 @@
 - fix installation of Arabic spell checker
 - LyX will work under Windows Vista but is no longer supported
 - updated to MiKTeX 2.9 build 6615
-- updated to ImageMagick 7.0.7-22
+- updated to ImageMagick 7.0.7-25
 - updated to Qt 5.9.4
 - new thesaurus for Arabic
 - updated thesaurus for Ukrainian
index ecb82b4c9a4d85031664815deefbadc8a0cb7693..c06d8665b0d75d1b40f54443b998ffe4f144bc4b 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
 LaTeX.nsh
 
 Handling of LaTeX distributions
@@ -388,21 +388,89 @@ FunctionEnd
 Function UpdateMiKTeX
  # asks to update MiKTeX
 
-  MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" /SD IDNO IDYES UpdateNow IDNO UpdateLater
-  UpdateNow:
-  # the update wizard is started by the miktex-update.exe
+  # only for the 2.2.4 installer: force a silent update of MiKTeX then restore
+  # MiKTeX's inernal links
+  # The reason is that MikTeX uses a new package handling system LyX must use
+  # Due to a bug in the old MikTeX package handling the update to the new package
+  # handling might fail and users cannot use LaTeX at all afterwards - they then
+  # would have no other choice than to reinstall MiKTeX
+  # This case is fixed by forcing the restoration of the internal links
+  # There is another issue: the MiKTeX update program needs to be replaced by
+  # the new MiKTeX console. This is a 3-step process.
+  #MessageBox MB_YESNO|MB_ICONINFORMATION "$(MiKTeXInfo)" #/SD IDNO IDYES UpdateNow IDNO UpdateLater
+  #UpdateNow:
+  # graphical update:
+  #MessageBox MB_OK|MB_ICONINFORMATION 'To assure that LyX can create PDF files the MiKTeX update program must be run two times.$\r$\n\
+  # Please click in the MiKTeX update program only on the "Next" button.$\r$\n\
+  # If "Next" is disabled, click on "Cancel" or "Finish".'
+  #${if} $MultiUser.Privileges != "Admin"
+  #${andif} $MultiUser.Privileges != "Power"
+  # # call the non-admin version
+  # nsExec::ExecToLog '"$PathLaTeX\internal\miktex-update.exe"'
+  #${else}
+  # ${if} $MiKTeXUser != "HKCU" # call the admin version
+  #  nsExec::ExecToLog '"$PathLaTeX\internal\miktex-update_admin.exe"'
+  # ${else}
+  #   nsExec::ExecToLog '"$PathLaTeX\internal\miktex-update.exe"'
+  # ${endif}
+  #${endif}
+  # silent update:
+  MessageBox MB_OK|MB_ICONINFORMATION "MiKTeX must be updated to assure that LyX can create PDF files.$\r$\n\
+   This update can take several minutes, depending on your Internet speed.$\r$\n\
+   Please do not close the LyX installer until it is finished!" /SD IDOK
   ${if} $MultiUser.Privileges != "Admin"
   ${andif} $MultiUser.Privileges != "Power"
    # call the non-admin version
-    ExecWait '"$PathLaTeX\internal\miktex-update.exe"'
+   # the order of the different commands is important!
+   ${if} $Is64bit == "true"
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update=miktex-bin-x64-2.9"'
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--install=miktex-console-bin-x64-2.9"'
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--uninstall=miktex-mpm-bin-x64-2.9"'
+   ${else}
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update=miktex-bin-2.9"'
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--install=miktex-console-bin-2.9"'
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--uninstall=miktex-mpm-bin-2.9"'
+   ${endif}
+   nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update"'
+  ${else}
+   ${if} $MiKTeXUser != "HKCU" # call the admin version
+    # the order of the different commands is important!
+    ${if} $Is64bit == "true"
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--update=miktex-bin-x64-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--install=miktex-console-bin-x64-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--uninstall=miktex-mpm-bin-x64-2.9"'
+    ${else}
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--update=miktex-bin-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--install=miktex-console-bin-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--uninstall=miktex-mpm-bin-2.9"'
+    ${endif}
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--update"'
+   ${else}
+    ${if} $Is64bit == "true"
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update=miktex-bin-x64-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--install=miktex-console-bin-x64-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--uninstall=miktex-mpm-bin-x64-2.9"'
+    ${else}
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update=miktex-bin-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--install=miktex-console-bin-2.9"'
+     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--uninstall=miktex-mpm-bin-2.9"'
+    ${endif}
+    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update"'
+   ${endif}
+  ${endif}
+  # restore possibly broken internal MiKTeX links after the update
+  # suggested by the MikTeX maintainer: https://github.com/MiKTeX/miktex/issues/82
+  ${if} $MultiUser.Privileges != "Admin"
+  ${andif} $MultiUser.Privileges != "Power"
+   # call the non-admin version
+   nsExec::ExecToLog '"$PathLaTeX\initexmf.exe" "--mklinks" "--force"'
   ${else}
    ${if} $MiKTeXUser != "HKCU" # call the admin version
-    ExecWait '"$PathLaTeX\internal\miktex-update_admin.exe"'
+    nsExec::ExecToLog '"$PathLaTeX\initexmf.exe" "--admin" "--mklinks" "--force"'
    ${else}
-     ExecWait '"$PathLaTeX\internal\miktex-update.exe"'
+     nsExec::ExecToLog '"$PathLaTeX\initexmf.exe" "--mklinks" "--force"'
    ${endif}
   ${endif}
-  UpdateLater:
+  #UpdateLater:
 
 FunctionEnd
-
index 3ac112fd0399931d7d38687133039526e75d02b3..758f410826cd16672b4cab3959b833f9e7048da3 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
 
 filelist.nsh
 
@@ -22,7 +22,6 @@ Lists of files to include in the installer
   ${FILE}Qt5Svg.dll"
   ${FILE}Qt5Widgets.dll"
   ${FILE}Qt5WinExtras.dll"
-  ${FILE}Qt5Xml.dll"
 
 !macroend