commit 848462a139aedfcdd3b02efa1e456a583d474145
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Thu Mar 8 22:35:38 2018 +0100

    Win installer: adapt update process to work with recent MiKTeX
    
    - finally the installer should result in a fully functional LyX, no matter 
when users installed MiKTeX or updated it the last time (or never)
---
 .../Win32/packaging/installer/ChangeLog.txt        |    4 ++--
 .../Win32/packaging/installer/include/LaTeX.nsh    |   10 ++++++++++
 development/Win32/packaging/installer/settings.nsh |    2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/development/Win32/packaging/installer/ChangeLog.txt 
b/development/Win32/packaging/installer/ChangeLog.txt
index 31f4735..d42a6cb 100644
--- a/development/Win32/packaging/installer/ChangeLog.txt
+++ b/development/Win32/packaging/installer/ChangeLog.txt
@@ -1,8 +1,8 @@
-Changelog for LyX-230-1:
+Changelog for LyX-230-4:
 - installs LyX 2.3.0
 - fix installation of Arabic spell checker
 - updated to MiKTeX 2.9 build 6615
-- updated to ImageMagick 7.0.7-24
+- updated to ImageMagick 7.0.7-25
 - new thesaurus for Arabic
 - updated thesaurus for Ukrainian
 - updated spell checker dictionaries for Arabic, Breton and Ukrainian
diff --git a/development/Win32/packaging/installer/include/LaTeX.nsh 
b/development/Win32/packaging/installer/include/LaTeX.nsh
index 399ef18..ab6775f 100644
--- a/development/Win32/packaging/installer/include/LaTeX.nsh
+++ b/development/Win32/packaging/installer/include/LaTeX.nsh
@@ -395,6 +395,8 @@ Function UpdateMiKTeX
   # 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:
@@ -419,9 +421,17 @@ Function UpdateMiKTeX
   ${if} $MultiUser.Privileges != "Admin"
   ${andif} $MultiUser.Privileges != "Power"
    # call the non-admin version
+   # the order of the different commands is important!
+   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"'
    nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update"'
   ${else}
    ${if} $MiKTeXUser != "HKCU" # call the admin version
+    # the order of the different commands is important!
+    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"'
     nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--admin" "--update"'
    ${else}
      nsExec::ExecToLog '"$PathLaTeX\mpm.exe" "--update"'
diff --git a/development/Win32/packaging/installer/settings.nsh 
b/development/Win32/packaging/installer/settings.nsh
index 7d25cb7..87fb2a0 100644
--- a/development/Win32/packaging/installer/settings.nsh
+++ b/development/Win32/packaging/installer/settings.nsh
@@ -14,7 +14,7 @@ These typically need to be modified for each LyX release
 !define APP_VERSION_REVISION 0
 !define APP_VERSION_EMERGENCY "" # 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 3 # Start with 1 for the installer releases of each 
version
+!define APP_VERSION_BUILD 4 # Start with 1 for the installer releases of each 
version
 
 !define APP_VERSION 
"${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_REVISION}${APP_EMERGENCY_DOT}${APP_VERSION_EMERGENCY}"
 # Version to display
 

Reply via email to