commit 8c32a1a7b91c62507806883f925a0ba7ba3a4105
Author: Richard Kimberly Heck <[email protected]>
Date: Sat Sep 8 16:56:05 2018 -0400
Kill off the bundled installer.
---
.../Win32/packaging/installer/include/LaTeX.nsh | 145 +++-----------------
.../packaging/installer/include/declarations.nsh | 11 +--
.../Win32/packaging/installer/include/gui.nsh | 6 +-
.../Win32/packaging/installer/include/init.nsh | 34 -----
.../Win32/packaging/installer/include/nsis.nsh | 6 +-
.../packaging/installer/include/variables.nsh | 4 +-
.../Win32/packaging/installer/lyx-bundle.nsi | 68 ---------
development/Win32/packaging/installer/settings.nsh | 12 +--
.../Win32/packaging/installer/setup/install.nsh | 26 +---
9 files changed, 32 insertions(+), 280 deletions(-)
diff --git a/development/Win32/packaging/installer/include/LaTeX.nsh
b/development/Win32/packaging/installer/include/LaTeX.nsh
index 59f9320..d7e527b 100644
--- a/development/Win32/packaging/installer/include/LaTeX.nsh
+++ b/development/Win32/packaging/installer/include/LaTeX.nsh
@@ -8,10 +8,6 @@ Handling of LaTeX distributions
#
# - LaTeXActions (checks if MiKTeX or TeXLive is installed)
#
-# - InstallMiKTeX (installs MiKTeX if not already installed),
-# only for bunlde installer, uses:
-# LaTeXCheck # function from LyXUtils.nsh
-#
# - ConfigureMiKTeX
# (installs the LaTeX class files that are delivered with LyX,
# a Perl interpreter for splitindex and pdfcrop
@@ -19,8 +15,6 @@ Handling of LaTeX distributions
#
# - ConfigureTeXLive
# (installs the LaTeX class files that are delivered with LyX)
-#
-# - UpdateMiKTeX (asks to update MiKTeX)
# ---------------------------------------
@@ -204,50 +198,6 @@ Function LaTeXActions
FunctionEnd
-# -------------------------------------------
-
-!if ${SETUPTYPE} == BUNDLE
-
- Function InstallMiKTeX
- # installs MiKTeX if not already installed
-
- ${if} $PathLaTeX == ""
- # launch MiKTeX's installer
- MessageBox MB_OK|MB_ICONINFORMATION "$(LatexInfo)" /SD IDOK
- ${if} $MultiUser.Privileges != "Admin"
- ${andif} $MultiUser.Privileges != "Power"
- # call the non-admin version
- ExecWait ${MiKTeXInstall}
- ${else}
- ExecWait "${MiKTeXInstall} --shared"
- ${endif}
- # test if MiKTeX is installed
- Call LaTeXActions
- ${if} ${RunningX64}
- SetRegView 32 # we install the 32bit version of MiKTeX
- ${endif}
- ${if} $PathLaTeX != ""
- # special entry that it was installed together with LyX
- # so that we can later uninstall it together with LyX
- ${if} $MiKTeXUser == "HKCU"
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
"Yes${APP_SERIES_KEY}"
- ${else}
- WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
"Yes${APP_SERIES_KEY}"
- ${endif}
- StrCpy $LaTeXInstalled "MiKTeX"
- StrCpy $MiKTeXVersion ${MiKTeXDeliveredVersion}
- ${else}
- MessageBox MB_OK|MB_ICONSTOP "$(LatexError1)" /SD IDOK
- SetOutPath $TEMP # to be able to delete the $INSTDIR
- RMDir /r $INSTDIR
- Abort
- ${endif} # endif $PathLaTeX != ""
- ${endif}
-
- FunctionEnd
-
-!endif # endif ${SETUPTYPE} == BUNDLE
-
# ------------------------------
Function ConfigureMiKTeX
@@ -276,83 +226,28 @@ Function ConfigureMiKTeX
# files in Resources\tex
SetOutPath "$PathLaTeXLocal\tex\latex\lyx"
CopyFiles /SILENT "$INSTDIR\Resources\tex\*.*"
"$PathLaTeXLocal\tex\latex\lyx"
+
+ # refresh MiKTeX's file name database (do this always to assure everything
is in place)
+ ${if} $MultiUser.Privileges != "Admin"
+ ${andif} $MultiUser.Privileges != "Power"
+ # call the non-admin version
+ nsExec::ExecToLog "$PathLaTeX\initexmf --update-fndb"
+ ${else}
+ ${if} $MiKTeXUser != "HKCU" # call the admin version
+ nsExec::ExecToLog "$PathLaTeX\initexmf --admin --update-fndb"
+ ${else}
+ nsExec::ExecToLog "$PathLaTeX\initexmf --update-fndb"
+ ${endif}
+ ${endif}
+ Pop $UpdateFNDBReturn # Return value
${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"
- ${andif} $MultiUser.Privileges != "Power"
- # call the non-admin version
- nsExec::ExecToLog "$PathLaTeX\initexmf --update-fndb"
- ${else}
- ${if} $MiKTeXUser != "HKCU" # call the admin version
- nsExec::ExecToLog "$PathLaTeX\initexmf --admin --update-fndb"
- ${else}
- nsExec::ExecToLog "$PathLaTeX\initexmf --update-fndb"
- ${endif}
- ${endif}
- Pop $UpdateFNDBReturn # Return value
-
- ${endif} # end if $PathLaTeX != ""
-
- # enable package installation without asking (1 = Yes, 0 = No, 2 = Ask me
first) and
- # if there is not package repository (MiKTeX's primary package repository)
then set it
- ${if} ${RunningX64}
- ${andif} $Is64bit == "true"
- SetRegView 64
- ${else}
- SetRegView 32
- ${endif}
- ${if} $MiKTeXUser == "HKCU" # if only for current user
- # if AutoInstall is set to "0" we can assume that this was set purposly
since the default is "1"
- ReadRegStr $2 HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"AutoInstall"
- ${if} $2 == "0"
- Goto NoAutoInstall
- ${endif}
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"AutoInstall" "1"
- ReadRegStr $1 HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RemoteRepository"
- ${if} $1 == ""
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RemoteRepository" "${MiKTeXRepo}"
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RepositoryType" "remote"
- ${endif}
- ${else}
- # if AutoInstall is set to "0" we can assume that this was set purposly
since the default is "1"
- ReadRegStr $2 HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"AutoInstall"
- ${if} $2 == "0"
- Goto NoAutoInstall
- ${endif}
- WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"AutoInstall" "1"
- ReadRegStr $1 HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RemoteRepository"
- ${if} $1 == ""
- WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RemoteRepository" "${MiKTeXRepo}"
- WriteRegStr HKLM "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"RepositoryType" "remote"
- ${endif}
- # we need to state that missing packages should be installed for all users
too
- WriteRegStr HKCU "SOFTWARE\MiKTeX.org\MiKTeX\$MiKTeXVersion\MPM"
"AutoAdmin" "t"
- ${endif}
- NoAutoInstall:
-
- # update MiKTeX's package file list
- ${if} $MultiUser.Privileges != "Admin"
- ${andif} $MultiUser.Privileges != "Power"
- # call the non-admin version
- nsExec::ExecToLog "$PathLaTeX\mpm.exe --update-fndb"
- ${else}
- ${if} $MiKTeXUser != "HKCU" # call the admin version
- nsExec::ExecToLog "$PathLaTeX\mpm.exe --admin --update-fndb"
- ${else}
- nsExec::ExecToLog "$PathLaTeX\mpm.exe --update-fndb"
- ${endif}
- ${endif}
- Pop $UpdateFNDBReturn # Return value
-
- # we must return to 32bit because LyX is a 32bit application
- SetRegView 32
-
+
+ ${endif} # end if $PathLaTeX != ""
FunctionEnd
# ------------------------------
@@ -372,13 +267,9 @@ Function ConfigureTeXLive
# files in Resources\tex
SetOutPath "$PathLaTeXLocal\texmf-dist\tex\latex\lyx"
CopyFiles /SILENT "$INSTDIR\Resources\tex\*.*"
"$PathLaTeXLocal\texmf-dist\tex\latex\lyx"
+ # update TeXLive's package file list
+ ExecWait '$PathLaTeX\texhash'
${endif}
${endif}
- # update TeXLive's package file list
- ExecWait '$PathLaTeX\texhash'
-
- # update TeXLive
- ExecWait '$PathLaTeX\tlmgr update --all'
-
FunctionEnd
diff --git a/development/Win32/packaging/installer/include/declarations.nsh
b/development/Win32/packaging/installer/include/declarations.nsh
index e8546b9..547bfe5 100644
--- a/development/Win32/packaging/installer/include/declarations.nsh
+++ b/development/Win32/packaging/installer/include/declarations.nsh
@@ -34,11 +34,6 @@ Configuration of LyX installer
!define DOWNLOAD_LATEX
"http://mirrors.ctan.org/systems/win32/miktex/setup/${SETUPFILE_LATEX}"
#--------------------------------
-# Locations of setup files for components (for bundled setup)
-
-!define INSTALL_LATEX "${SETUPFILE_LATEX}"
-
-#--------------------------------
# Names and version
!define APP_NAME "LyX"
@@ -57,10 +52,9 @@ Configuration of LyX installer
!define APP_WIKI "https://wiki.lyx.org"
!define APP_WIKI_INFO "${APP_NAME} Wiki"
!define APP_COPYRIGHT "${APP_NAME} is Copyright © 1995 by Matthias Ettrich,
1995-${COPYRIGHT_YEAR} by the ${APP_NAME} Team"
+
!if ${SETUPTYPE} == STANDARD
!define APP_SETUPTYPE "Standard"
-!else if ${SETUPTYPE} == BUNDLE
- !define APP_SETUPTYPE "Bundle"
!endif
!define BIN_LYX "LyX${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.exe"
@@ -85,9 +79,6 @@ Configuration of LyX installer
!if ${SETUPTYPE} == STANDARD
!define SETUP_EXE ${ExeFile}
-!else if ${SETUPTYPE} == BUNDLE
- !define SETUP_EXE ${BundleExeFile}
- !define BUNDLESETUP_LATEX
!endif
!define SETUP_ICON "${FILES_ICONS}\lyx.ico"
diff --git a/development/Win32/packaging/installer/include/gui.nsh
b/development/Win32/packaging/installer/include/gui.nsh
index 7c512f5..3f7e716 100644
--- a/development/Win32/packaging/installer/include/gui.nsh
+++ b/development/Win32/packaging/installer/include/gui.nsh
@@ -52,10 +52,8 @@ BrandingText " "
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APP_NAME} ${APP_SERIES_NAME}"
!insertmacro MUI_PAGE_STARTMENU ${APP_NAME} $StartmenuFolder
-!if ${SETUPTYPE} != BUNDLE
- # Select latex.exe manually
- Page custom LatexFolder LatexFolder_LeaveFunction
-!endif # end if != BUNDLE
+# Select latex.exe manually
+Page custom LatexFolder LatexFolder_LeaveFunction
# Watch the components being installed.
!insertmacro MUI_PAGE_INSTFILES
diff --git a/development/Win32/packaging/installer/include/init.nsh
b/development/Win32/packaging/installer/include/init.nsh
index 85e1350..9f36dfa 100644
--- a/development/Win32/packaging/installer/include/init.nsh
+++ b/development/Win32/packaging/installer/include/init.nsh
@@ -44,16 +44,6 @@ FunctionEnd
#--------------------------------
# visible installer sections
-Section "!${APP_NAME}" SecCore
- SectionIn RO
- !if ${SETUPTYPE} == BUNDLE
- # if no TeX was found MiKTeX will be installed which requires space
- !if $PathLaTeX == ""
- AddSize 1020000 # size in KB
- !endif
- !endif
-SectionEnd
-
Section "$(SecFileAssocTitle)" SecFileAssoc
StrCpy $CreateFileAssociations "true"
SectionEnd
@@ -588,7 +578,6 @@ SectionGroupEnd
# Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecDictionaries}
"$(SecDictionariesDescription)"
@@ -609,22 +598,6 @@ Function .onInit
Quit
${endif}
- # check that another LyX installer is not currently running
- !if ${SETUPTYPE} == STANDARD
- FindProcDLL::FindProc "${BundleExeFile}"
- ${if} $R0 == "1"
- MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- Abort
- ${endif}
- !endif
- !if ${SETUPTYPE} == BUNDLE
- FindProcDLL::FindProc "${ExeFile}"
- ${if} $R0 == "1"
- MessageBox MB_OK|MB_ICONSTOP "$(InstallRunning)" /SD IDOK
- Abort
- ${endif}
- !endif
-
# Check that LyX is not currently running
FindProcDLL::FindProc "${BIN_LYX}"
${if} $R0 == "1"
@@ -714,13 +687,6 @@ Function .onInit
Call SearchExternal
- #!if ${SETUPTYPE} == BUNDLE
- # # don't let the installer sections appear when the programs are already
installed
- # ${if} $PathBibTeXEditor != ""
- # SectionSetText 3 "" # hides the corresponding uninstaller section,
${SecInstJabRef}
- # ${endif}
- #!endif
-
# select sections of already installed spell-checker dictionaries, make them
read-only
# and set the necessary size to 0 bytes
StrCpy $String $FoundDict
diff --git a/development/Win32/packaging/installer/include/nsis.nsh
b/development/Win32/packaging/installer/include/nsis.nsh
index e04d177..442a878 100644
--- a/development/Win32/packaging/installer/include/nsis.nsh
+++ b/development/Win32/packaging/installer/include/nsis.nsh
@@ -39,10 +39,8 @@ Configuration of standard NSIS header files
# Functions to check and configure the LaTeX-system
!include include\LaTeX.nsh
-!if ${SETUPTYPE} != BUNDLE
- # Function for page to manually select LaTeX's installation folder
- !include gui\LaTeXFolder.nsh
-!endif # end if != BUNDLE
+# Function for page to manually select LaTeX's installation folder
+!include gui\LaTeXFolder.nsh
# Functions to download spell-checker and thesaurus dictionaries
!include include\dictionaries.nsh
diff --git a/development/Win32/packaging/installer/include/variables.nsh
b/development/Win32/packaging/installer/include/variables.nsh
index 85d91ff..bb6982c 100644
--- a/development/Win32/packaging/installer/include/variables.nsh
+++ b/development/Win32/packaging/installer/include/variables.nsh
@@ -40,9 +40,7 @@ Var Pointer
Var PSVPath
Var PythonPath
Var Search
-!if ${SETUPTYPE} != BUNDLE
- Var State
-!endif
+Var State
Var SVGPath
Var StartmenuFolder
Var String
diff --git a/development/Win32/packaging/installer/lyx-bundle.nsi
b/development/Win32/packaging/installer/lyx-bundle.nsi
deleted file mode 100644
index 9490f03..0000000
--- a/development/Win32/packaging/installer/lyx-bundle.nsi
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-
-NSIS Script - LyX 2.3 Installer for Windows
-Authors: Joost Verburg, Angus Leeming, Uwe Stöhr
-Compatible with NSIS 3.0
-
-*/
-
-# Do a Cyclic Redundancy Check to make sure the installer
-# was not corrupted by the download.
-CRCCheck force
-#
-# Make the installer as small as possible
-SetCompressor /SOLID lzma
-
-# make it a Unicode installer
-Unicode true
-
-# enable support for high DPI resolution
-ManifestDPIAware true
-
-!ifndef SETUPTYPE
- !define SETUPTYPE BUNDLE
-!endif
-
-# installer settings like version numbers
-!include settings.nsh
-
-# declarations of LyX's registry keys and installer variant
-!include include\declarations.nsh
-
-# definitions of global variables
-!include include\variables.nsh
-
-# configuration of standard NSIS header files
-!include include\nsis.nsh
-
-# list of files to be included in the installer
-!include include\filelist.nsh
-
-# detect third-party programs like Inkscape and LaTeX
-!include include\detection.nsh
-
-# set up the installer pages
-!include include\gui.nsh
-
-# sets the install sections and checks the system on starting the un/installer
-!include include\init.nsh
-
-# install LyX and needed third-party programs like Python etc.
-!include setup\install.nsh
-
-# loads a function to modify Windows environment variables
-!include include\EnvVarUpdate.nsh
-
-# uninstall LyX and all programs that were installed together with LyX
-!include setup\uninstall.nsh
-
-# configure LyX (set start menu and write registry entries)
-!include setup\configure.nsh
-
-# provides downloads of external programs
-#!include gui\external.nsh
-
-#--------------------------------
-# Output file
-
-Outfile "${SETUP_EXE}"
diff --git a/development/Win32/packaging/installer/settings.nsh
b/development/Win32/packaging/installer/settings.nsh
index ab2b3bb..0dc43c7 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 1
!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 2 # Start with 1 for the installer releases of each
version
+!define APP_VERSION_BUILD 3 # 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
@@ -28,9 +28,6 @@ These typically need to be modified for each LyX release
!ifndef ExeFile
!define ExeFile
"${APP_NAME}-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Installer-${APP_VERSION_BUILD}.exe"
!endif
-!ifndef BundleExeFile
- !define BundleExeFile
"${APP_NAME}-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}${APP_VERSION_EMERGENCY}-Bundle-${APP_VERSION_BUILD}.exe"
-!endif
#--------------------------------
# File locations
@@ -49,11 +46,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 MiKTeXDeliveredVersion "2.9"
!define ImageMagickVersion "7.0.7"
-
-# definitions for the Complete installer
-!if ${SETUPTYPE} == BUNDLE
- !define MiKTeXInstall "$INSTDIR\basic-miktex-2.9.6813-x64.exe"
- !define MiKTeXInstaller "${FILES_BASE}\basic-miktex-2.9.6813-x64.exe"
-!endif
diff --git a/development/Win32/packaging/installer/setup/install.nsh
b/development/Win32/packaging/installer/setup/install.nsh
index 462af20..ad814e3 100644
--- a/development/Win32/packaging/installer/setup/install.nsh
+++ b/development/Win32/packaging/installer/setup/install.nsh
@@ -24,15 +24,13 @@ Section -ProgramFiles SecProgramFiles
StrCpy $INSTDIR "$INSTDIR\${APP_DIR}"
${endif}
- !if ${SETUPTYPE} != BUNDLE
- # abort the installation if no LaTeX was found but should be used
- ${if} $PathLaTeX == ""
- ${andif} $State == "0"
- SetOutPath $TEMP # to be able to delete the $INSTDIR
- RMDir /r $INSTDIR
- Abort
- ${endif}
- !endif # end if != BUNDLE
+ # abort the installation if no LaTeX was found but should be used
+ ${if} $PathLaTeX == ""
+ ${andif} $State == "0"
+ SetOutPath $TEMP # to be able to delete the $INSTDIR
+ RMDir /r $INSTDIR
+ Abort
+ ${endif}
# Install and register the core LyX files
@@ -70,16 +68,6 @@ Section -ProgramFiles SecProgramFiles
File /r "${FILES_LYX}\Resources"
File /r "${FILES_DEPS}\Resources"
- !if ${SETUPTYPE} == BUNDLE
-
- # include the MiKTeX installer
- File ${MiKTeXInstaller}
-
- # install MiKTeX if not already installed
- Call InstallMiKTeX # function from LaTeX.nsh
-
- !endif # end if BUNDLE
-
# Python
SetOutPath "$INSTDIR"
# recursively copy all files under Python