installer: uninstall fixes

- fix uninstallation of Metafile2EPS pinter
- fix un/installation of JabRef if the bundle version is executed without admin privileges
- some whitespace fixes
This commit is contained in:
Uwe Stöhr 2012-11-12 01:31:00 +01:00
parent 290efe6190
commit 4a3f80fe05
4 changed files with 32 additions and 12 deletions

View File

@ -1,6 +1,8 @@
Changelog for LyX-205-2: Changelog for LyX-205-2:
- the installer detects now existing spell-checker and thesaurus dictionaries - the installer detects now existing spell-checker and thesaurus dictionaries
of existing LyX installations of existing LyX installations
- fixed un/installation of Jabref if bundle installer is executed without having admin privileges
- fixed uninstallation of Metafile2EPS printer
- fixed detection for already installed Ghostscript and GSview on 64bit Windows - fixed detection for already installed Ghostscript and GSview on 64bit Windows
- fixed detection for jEdit, Vim, WinEdt and TeXnicCenter as LaTeX source file editor - fixed detection for jEdit, Vim, WinEdt and TeXnicCenter as LaTeX source file editor
- fixed detection of Gimp and Photoshop as image manipulating program - fixed detection of Gimp and Photoshop as image manipulating program
@ -26,7 +28,8 @@ Changelog for LyX-204-3:
- link the LyX Wiki and website in LyX's start menu folder Changelog for LyX-204-2: - link the LyX Wiki and website in LyX's start menu folder Changelog for LyX-204-2:
- Prevent that LyX can first be installed with admin privileges and afterwards without them - Prevent that LyX can first be installed with admin privileges and afterwards without them
- In the uninstaller it is now the default not to uninstall the user preferences and settings - In the uninstaller it is now the default not to uninstall the user preferences and settings
- Fix the path in which the LyX start menu shortcut is executed - Also if LyX is installed without admin privileges, the .lyx file associations are set - Fix the path in which the LyX start menu shortcut is executed
- Also if LyX is installed without admin privileges, the .lyx file associations are set
- Fix a typo in English translation - Fix a typo in English translation

View File

@ -47,9 +47,11 @@ FunctionEnd
Section "!${APP_NAME}" SecCore Section "!${APP_NAME}" SecCore
SectionIn RO SectionIn RO
SectionEnd SectionEnd
Section "$(SecFileAssocTitle)" SecFileAssoc Section "$(SecFileAssocTitle)" SecFileAssoc
StrCpy $CreateFileAssociations "true" StrCpy $CreateFileAssociations "true"
SectionEnd SectionEnd
Section "$(SecDesktopTitle)" SecDesktop Section "$(SecDesktopTitle)" SecDesktop
StrCpy $CreateDesktopIcon "true" StrCpy $CreateDesktopIcon "true"
SectionEnd SectionEnd

View File

@ -108,7 +108,13 @@ Section -ProgramFiles SecProgramFiles
ExecWait "$INSTDIR\${JabRefInstall}" ExecWait "$INSTDIR\${JabRefInstall}"
# test if JabRef is now installed # test if JabRef is now installed
StrCpy $PathBibTeXEditor "" StrCpy $PathBibTeXEditor ""
ReadRegStr $PathBibTeXEditor SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString" ${if} $MultiUser.Privileges == "Admin"
${orif} $MultiUser.Privileges == "Power"
ReadRegStr $PathBibTeXEditor HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
${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 == "" ${if} $PathBibTeXEditor == ""
MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)" MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
${else} ${else}

View File

@ -12,6 +12,7 @@ Var FileAssociation
Section "un.LyX" un.SecUnProgramFiles Section "un.LyX" un.SecUnProgramFiles
SectionIn RO
# LaTeX class files that were installed together with LyX # LaTeX class files that were installed together with LyX
# will not be uninstalled because other LyX versions will # will not be uninstalled because other LyX versions will
# need them and these few files don't harm to stay in LaTeX # need them and these few files don't harm to stay in LaTeX
@ -91,8 +92,8 @@ Section "un.LyX" un.SecUnProgramFiles
DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}" DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}"
${EndIf} ${EndIf}
${If} $MultiUser.Privileges != "Admin" ${If} $MultiUser.Privileges == "Admin"
${OrIf} $MultiUser.Privileges != "Power" ${OrIf} $MultiUser.Privileges == "Power"
# Delete Postscript printer for metafile to EPS conversion # Delete Postscript printer for metafile to EPS conversion
ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"' ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
${EndIf} ${EndIf}
@ -133,8 +134,16 @@ SectionEnd
Section "un.JabRef" un.SecUnJabRef Section "un.JabRef" un.SecUnJabRef
${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed together with LyX ${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed together with LyX
ReadRegStr $1 SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString" ${If} $MultiUser.Privileges == "Admin"
${OrIf} $MultiUser.Privileges == "Power"
ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" "UninstallString"
ExecWait "$1" # run JabRef's uninstaller ExecWait "$1" # run JabRef's uninstaller
${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 2.8.lnk"
ExecShell "" "$1" # run JabRef's uninstaller
${endif}
${endif} ${endif}
SectionEnd SectionEnd