The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 4a3f80fe055bcaff79814238c36bd86195cea807
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Mon Nov 12 01:31:00 2012 +0100

    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

diff --git a/development/Win32/packaging/installer/ChangeLog.txt 
b/development/Win32/packaging/installer/ChangeLog.txt
index 5b9fa03..9519886 100644
--- a/development/Win32/packaging/installer/ChangeLog.txt
+++ b/development/Win32/packaging/installer/ChangeLog.txt
@@ -1,6 +1,8 @@
 Changelog for LyX-205-2:
 - the installer detects now existing spell-checker and thesaurus dictionaries
   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 jEdit, Vim, WinEdt and TeXnicCenter as LaTeX source file 
editor
 - 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:
 - 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
-- 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
 
 
diff --git a/development/Win32/packaging/installer/include/init.nsh 
b/development/Win32/packaging/installer/include/init.nsh
index 058971d..d10d3f1 100644
--- a/development/Win32/packaging/installer/include/init.nsh
+++ b/development/Win32/packaging/installer/include/init.nsh
@@ -45,13 +45,15 @@ FunctionEnd
 # visible installer sections
 
 Section "!${APP_NAME}" SecCore
-  SectionIn RO
+ SectionIn RO
 SectionEnd
+
 Section "$(SecFileAssocTitle)" SecFileAssoc
-  StrCpy $CreateFileAssociations "true"
+ StrCpy $CreateFileAssociations "true"
 SectionEnd
+
 Section "$(SecDesktopTitle)" SecDesktop
-  StrCpy $CreateDesktopIcon "true"
+ StrCpy $CreateDesktopIcon "true"
 SectionEnd
 
 !if ${SETUPTYPE} == BUNDLE
diff --git a/development/Win32/packaging/installer/setup/install.nsh 
b/development/Win32/packaging/installer/setup/install.nsh
index 8586aa7..68e5531 100644
--- a/development/Win32/packaging/installer/setup/install.nsh
+++ b/development/Win32/packaging/installer/setup/install.nsh
@@ -108,7 +108,13 @@ Section -ProgramFiles SecProgramFiles
      ExecWait "$INSTDIR\${JabRefInstall}"
      # test if JabRef is now installed
      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 == ""
       MessageBox MB_OK|MB_ICONEXCLAMATION "$(JabRefError)"
      ${else}
diff --git a/development/Win32/packaging/installer/setup/uninstall.nsh 
b/development/Win32/packaging/installer/setup/uninstall.nsh
index e47e197..0cf286e 100644
--- a/development/Win32/packaging/installer/setup/uninstall.nsh
+++ b/development/Win32/packaging/installer/setup/uninstall.nsh
@@ -12,6 +12,7 @@ Var FileAssociation
 
 Section "un.LyX" un.SecUnProgramFiles
 
+  SectionIn RO
   # LaTeX class files that were installed together with LyX
   # will not be uninstalled because other LyX versions will
   # need them and these few files don't harm to stay in LaTeX 
@@ -91,10 +92,10 @@ Section "un.LyX" un.SecUnProgramFiles
      DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}"
   ${EndIf}
   
-  ${If} $MultiUser.Privileges != "Admin"
-    ${OrIf} $MultiUser.Privileges != "Power"
-    # Delete Postscript printer for metafile to EPS conversion
-    ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
+  ${If} $MultiUser.Privileges == "Admin"
+  ${OrIf} $MultiUser.Privileges == "Power"
+   # Delete Postscript printer for metafile to EPS conversion
+   ExecWait '$PrinterConf /q /dl /n "Metafile to EPS Converter"'
   ${EndIf}
   
   # clean other registry entries
@@ -132,9 +133,17 @@ SectionEnd
 # JabRef
 Section "un.JabRef" un.SecUnJabRef
 
- ${if} $JabRefInstalled == "Yes" # only uninstall JabRef when it was installed 
together with LyX 
-  ReadRegStr $1 SHCTX 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\JabRef ${JabRefVersion}" 
"UninstallString"
-  ExecWait "$1" # run JabRef's uninstaller
+ ${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"
+   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}
 
 SectionEnd

-----------------------------------------------------------------------

Summary of changes:
 .../Win32/packaging/installer/ChangeLog.txt        |    5 +++-
 .../Win32/packaging/installer/include/init.nsh     |    8 ++++--
 .../Win32/packaging/installer/setup/install.nsh    |    8 ++++++-
 .../Win32/packaging/installer/setup/uninstall.nsh  |   23 +++++++++++++------
 4 files changed, 32 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to