Win installer: update to JabRef 3.x

- also another minor correction
This commit is contained in:
Uwe Stöhr 2016-05-08 03:05:55 +02:00
parent 05ef47f47c
commit fa2805118b
5 changed files with 37 additions and 20 deletions

View File

@ -1,4 +1,10 @@
Changelog for LyX.220-RC1-1:
Changelog for LyX.220-RC2-1:
- installs LyX 2.2.0 RC2
- updated to Imagemagick 7.0.1-1
- updated to JabRef 3.3
Changelog for LyX.220-RC1-1:
- installs LyX 2.2.0 RC1
- updated to Ghostscript 9.19
- updated to Imagemagick 6.9.3-8

View File

@ -156,7 +156,7 @@ Function MissingPrograms
StrCpy $ImageEditor "Krita"
${endif}
# test if and where the BibTeX-editor JabRef is installed
# test if and where the BibTeX-editor JabRef 2.x is installed
ReadRegStr $PathBibTeXEditor HKCU "Software\JabRef" "Path"
${if} $PathBibTeXEditor == ""
ReadRegStr $PathBibTeXEditor HKLM "Software\JabRef" "Path"
@ -169,6 +169,11 @@ Function MissingPrograms
StrCpy $PathBibTeXEditor $PathBibTeXEditor -17 # remove '\JabRef.exe" "%1"'
StrCpy $PathBibTeXEditor $PathBibTeXEditor "" 1 # remove the leading quote
${endif}
${if} $PathBibTeXEditor == ""
# $Documents is the path to the documents folder of the current user (contains the user name)
StrCpy $PathBibTeXEditor $Documents -10 # remove '\Documents'
StrCpy $PathBibTeXEditor "$PathBibTeXEditor\JabRef"
${endif}
${ifnot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
StrCpy $PathBibTeXEditor ""

View File

@ -49,17 +49,15 @@ Section "!${APP_NAME}" SecCore
SectionEnd
Section "$(SecFileAssocTitle)" SecFileAssoc
SectionIn RO
StrCpy $CreateFileAssociations "true"
SectionEnd
Section "$(SecDesktopTitle)" SecDesktop
SectionIn RO
StrCpy $CreateDesktopIcon "false"
StrCpy $CreateDesktopIcon "true"
SectionEnd
!if ${SETUPTYPE} == BUNDLE
Section /o "$(SecInstJabRefTitle)" SecInstJabRef
Section "$(SecInstJabRefTitle)" SecInstJabRef
AddSize ${SIZE_JABREF}
StrCpy $InstallJabRef "true"
SectionEnd
@ -1443,7 +1441,7 @@ Function un.onInit
${endif}
# test if JabRef was installed together with LyX
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
ReadRegStr $0 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "OnlyWithLyX"
${if} $0 == "Yes${APP_SERIES_KEY}"
SectionSetText 3 "JabRef" # names the corersponding uninstaller section
StrCpy $JabRefInstalled "Yes"

View File

@ -134,7 +134,6 @@ Section -ProgramFiles SecProgramFiles
# install JabRef if not already installed, the user selected it
# and if no BibTeX editor is installed
# due to an installer bug in the installer of JabRef version 3.x, we still install JabRef 2.11.1
${if} $PathBibTeXEditor == ""
${andif} $InstallJabRef == "true"
# launch installer
@ -146,11 +145,16 @@ Section -ProgramFiles SecProgramFiles
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"
ReadRegStr $PathBibTeXEditor HKLM "SOFTWARE\Classes\JabRef\shell\open\command" ""
StrCpy $PathBibTeXEditor $PathBibTeXEditor -17 # remove '\JabRef.exe" "%1"'
StrCpy $PathBibTeXEditor $PathBibTeXEditor "" 1 # remove the leading quote
${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"
# $Documents is the path to the documents folder of the current user (contains the user name)
StrCpy $PathBibTeXEditor $Documents -10 # remove '\Documents'
StrCpy $PathBibTeXEditor "$PathBibTeXEditor\JabRef"
${ifnot} ${FileExists} "$PathBibTeXEditor\${BIN_BIBTEXEDITOR}"
StrCpy $PathBibTeXEditor ""
${endif}
${endif}
${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)" /SD IDOK
@ -159,9 +163,11 @@ Section -ProgramFiles SecProgramFiles
# 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}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "UninstallString" "$PathBibTeXEditor\uninstall.exe"
${else}
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "OnlyWithLyX" "Yes${APP_SERIES_KEY}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "UninstallString" "$PathBibTeXEditor\uninstall.exe"
${endif}
${endif}
${endif} # end if PathBibTeXEditor

View File

@ -91,7 +91,6 @@ Section "un.LyX" un.SecUnProgramFiles
DeleteRegKey SHCTX "SOFTWARE\${APP_REGKEY}"
# delete info that programs were installed together with LyX
DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "OnlyWithLyX"
DeleteRegValue SHCTX "SOFTWARE\MiKTeX.org\MiKTeX" "OnlyWithLyX"
# for texindy the path to the perl.exe must unfortunately be in Windows' PATH variable
@ -134,15 +133,18 @@ Section "un.JabRef" un.SecUnJabRef
${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed together with LyX
${If} $MultiUser.Privileges == "Admin"
${OrIf} $MultiUser.Privileges == "Power"
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "UninstallString"
IfSilent 0 +2
ExecWait "$1 /S" # run JabRef's uninstaller
ExecWait "$1" # run JabRef's uninstaller
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef"
${else}
# in this case we can only read the start menu location and then start the linked uninstaller
ReadRegStr $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "StartMenu"
StrCpy $1 "$1\Uninstall JabRef "${JabRefVersion}".lnk"
ExecShell "" "$1" # run JabRef's uninstaller
# in this case we cannot do anything due to a bug in the installer of jabRef 3.x
ReadRegStr $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef" "UninstallString"
IfSilent 0 +2
ExecWait "$1 /S" # run JabRef's uninstaller
ExecWait "$1" # run JabRef's uninstaller
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef"
${endif}
${endif}