]> git.lyx.org Git - features.git/commitdiff
Win installer: update to JabRef 3.x
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 8 May 2016 01:05:55 +0000 (03:05 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 8 May 2016 01:05:55 +0000 (03:05 +0200)
- also another minor correction

development/Win32/packaging/installer/ChangeLog.txt
development/Win32/packaging/installer/include/detection.nsh
development/Win32/packaging/installer/include/init.nsh
development/Win32/packaging/installer/setup/install.nsh
development/Win32/packaging/installer/setup/uninstall.nsh

index 308242dc1633074ae983a5371a7f53bc997e5692..b60f73d862e185ccdb69c6a20ed30315e54fbd30 100644 (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
index 0d02308b835cc7f50faf92dc55abf919737c662c..f04e594e480a165063731d40e776c15fe156f8eb 100644 (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 ""
index 5695bda8fbacbe949d2bd8ca80b696222250a0b4..a76f4008af61fb75b9d0efde2a32881784bad662 100644 (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"
index 939b990df6516713b5dafb177a28bec37e2374e5..64289a82d0e8d9ad26901ac7b0d0a327fb41175e 100644 (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
index 496307d487ee80bba95b8d09d14a5655f8ec145d..8d32ee82bcf0a484ff93db93dea516cc65b02a17 100644 (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}