installer: some simplifications

This commit is contained in:
Uwe Stöhr 2012-11-22 20:17:45 +01:00
parent e74b088c26
commit be03816e9e
5 changed files with 36 additions and 41 deletions

View File

@ -3,7 +3,7 @@
(To benefit from them you must uninstall an already installed LyX 2.0.x and
then use this installer.)
- updated thesaurus for Slovenian
(need to uninstall to benefit from this)
(need to reinstall LyX to benefit from this)
Changelog for LyX-205-4:
@ -38,7 +38,7 @@ Changelog for LyX-205-2:
(To benefit from them you must uninstall an already installed LyX 2.0.x and
then use this installer.)
- updated thesaurus for German
(need to uninstall to benefit from this)
(need to reinstall LyX to benefit from this)
- bugfix: remove registry entries of existing LyX version when installing over it
- don't allow to install an older LyX version over an existing newer one

View File

@ -24,9 +24,6 @@ Detection of external component locations
#
#--------------------------
#Var ReportReturn
#Var CommandLineOutput
Function SearchExternal
Call LaTeXActions # function from LaTeX.nsh
Call MissingPrograms
@ -150,9 +147,9 @@ Function MissingPrograms
ReadRegStr $PathBibTeXEditor HKLM "Software\JabRef" "Path"
${endif}
${IfNot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
StrCpy $PathBibTeXEditor ""
StrCpy $JabRefInstalled == "No"
${ifnot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
StrCpy $PathBibTeXEditor ""
StrCpy $JabRefInstalled == "No"
${else}
StrCpy $JabRefInstalled == "Yes"
${endif}

View File

@ -58,7 +58,7 @@ SectionEnd
!if ${SETUPTYPE} == BUNDLE
Section /o "$(SecInstJabRefTitle)" SecInstJabRef
AddSize 12400
AddSize ${SIZE_JABREF}
StrCpy $InstallJabRef "true"
SectionEnd
!endif
@ -637,7 +637,6 @@ Function .onInit
${EndIf}
Call SearchExternal
#Call InitExternal
!if ${SETUPTYPE} == BUNDLE
# don't let the installer sections appear when the programs are already installed

View File

@ -19,7 +19,7 @@ These typically need to be modified for each LyX release
#--------------------------------
# Installer file name
# Typical names for the release are "LyX-201-1-Installer.exe" etc.
# Typical names for the release are "LyX-201-Installer-1.exe" etc.
!ifndef ExeFile
!define ExeFile "LyX-${APP_VERSION_MAJOR}${APP_VERSION_MINOR}${APP_VERSION_REVISION}-Installer-${APP_VERSION_BUILD}.exe"
@ -55,8 +55,9 @@ These typically need to be modified for each LyX release
# definitions for the Complete installer
!if ${SETUPTYPE} == BUNDLE
!define JabRefInstall "external\JabRef-2.8.1-setup.exe"
!define SIZE_JABREF 12400
!define MiKTeXInstall "$INSTDIR\external\basic-miktex-2.9.4521.exe"
!define SIZE_DOWNLOAD_LATEX 162476
!define SIZE_LATEX 380000
#!define SIZE_DOWNLOAD_LATEX 157100
#!define SIZE_LATEX 600000
!endif

View File

@ -11,7 +11,6 @@ Installation of program files, dictionaries and external components
Var PythonCompileFile
Var PythonCompileReturn
#Var DownloadResult
Section -ProgramFiles SecProgramFiles
@ -103,34 +102,33 @@ Section -ProgramFiles SecProgramFiles
# install JabRef if not already installed and the user selected it
# if no BibTeX editor is installed
${if} $PathBibTeXEditor == ""
${if} $InstallJabRef == "true"
# launch installer
MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)"
ExecWait "$INSTDIR\${JabRefInstall}"
# test if JabRef is now installed
StrCpy $PathBibTeXEditor ""
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
ReadRegStr $PathBibTeXEditor HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
StrCpy $PathBibTeXEditor $PathBibTeXEditor -14 # remove "\uninstall.exe"
${else}
# for non-admin users we can only check if it is in the start menu
ReadRegStr $PathBibTeXEditor HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
${endif}
${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else}
# special entry that it was installed together with LyX
# so that we can later uninstall it together with LyX
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${else}
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${endif}
${endif} # end if PathBibTeXEditor
${andif} $InstallJabRef == "true"
# launch installer
MessageBox MB_OK|MB_ICONINFORMATION "$(JabRefInfo)"
ExecWait "$INSTDIR\${JabRefInstall}"
# test if JabRef is now installed
StrCpy $PathBibTeXEditor ""
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
ReadRegStr $PathBibTeXEditor HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
StrCpy $PathBibTeXEditor $PathBibTeXEditor -14 # remove "\uninstall.exe"
${else}
# for non-admin users we can only check if it is in the start menu
ReadRegStr $PathBibTeXEditor HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
${endif}
${endif}
${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else}
# special entry that it was installed together with LyX
# so that we can later uninstall it together with LyX
${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${else}
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
${endif}
${endif}
${endif} # end if PathBibTeXEditor
!endif # end if BUNDLE
# install eLyXer