[Inteproxy-commits] r159 - in trunk: . packaging/Windows
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jul 14 11:42:57 CEST 2008
Author: emanuel
Date: 2008-07-14 11:42:56 +0200 (Mon, 14 Jul 2008)
New Revision: 159
Modified:
trunk/ChangeLog
trunk/packaging/Windows/inteproxy-installer.nsi
Log:
Allow installation for limited user.
Removed non-administrator warning. Changed default instDir.
Changed HKLM to HKCU.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-07-11 15:36:43 UTC (rev 158)
+++ trunk/ChangeLog 2008-07-14 09:42:56 UTC (rev 159)
@@ -1,3 +1,9 @@
+2008-07-14 Emanuel Schuetze <emanuel at intevation.de>
+
+ * packaging/Windows/inteproxy-installer.nsi: Allow installation
+ for limited user. Remove non-administrator warning.
+ Changed default instDir. Changed HKLM to HKCU.
+
2008-07-11 Stephan Holl <stephan.holl at intevation.de>
* demo.cfg: inserted secured WMS-services from LGN to the default
Modified: trunk/packaging/Windows/inteproxy-installer.nsi
===================================================================
--- trunk/packaging/Windows/inteproxy-installer.nsi 2008-07-11 15:36:43 UTC (rev 158)
+++ trunk/packaging/Windows/inteproxy-installer.nsi 2008-07-14 09:42:56 UTC (rev 159)
@@ -6,8 +6,6 @@
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
- ;!include "Sections.nsh"
- ;!addplugindir plugins
;--------------------------------
@@ -41,10 +39,10 @@
; Define Name, File and Installdir of Installer
Name "${PRODUCT_NAME_SHORT}"
OutFile "${PRODUCT_NAME_SHORT}-${VERSION_NUMBER}.exe"
- InstallDir "$PROGRAMFILES\${PRODUCT_NAME_SHORT}"
+ InstallDir "$DOCUMENTS\${PRODUCT_NAME_SHORT}"
;Get installation folder from registry if available
- InstallDirRegKey HKLM "Software\${PRODUCT_NAME_SHORT}" ""
+ InstallDirRegKey HKCU "Software\${PRODUCT_NAME_SHORT}" ""
; Define src dir
!define DIST_DIR "dist-${VERSION_NUMBER}"
@@ -61,14 +59,13 @@
BrandingText " "
;Language Selection Dialog Settings to remember the installer language
- !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
+ !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT_NAME_SHORT}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Pages
- !define MUI_PAGE_CUSTOMFUNCTION_SHOW PrintNonAdminWarning
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_DIRECTORY
@@ -76,7 +73,6 @@
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
- !define MUI_PAGE_CUSTOMFUNCTION_SHOW un.PrintNonAdminWarning
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
@@ -105,7 +101,7 @@
SetOutPath "$INSTDIR"
;Store installation folder
- WriteRegStr HKLM "Software\${PRODUCT_NAME_SHORT}" "" $INSTDIR
+ WriteRegStr HKCU "Software\${PRODUCT_NAME_SHORT}" "" $INSTDIR
; Include the license file
File "license.txt"
@@ -117,17 +113,15 @@
WriteUninstaller "$INSTDIR\Uninstall.exe"
; Create Registry keys
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayName" "${PRODUCT_NAME_SHORT}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionNumber" "${VERSION_NUMBER}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionDate" "${VERSION_DATE}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "UninstallString" '"$INSTDIR\uninstall.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "NoRepair" 1
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayName" "${PRODUCT_NAME_SHORT} ${VERSION_NUMBER}"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionNumber" "${VERSION_NUMBER}"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionDate" "${VERSION_DATE}"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "NoModify" 1
+ WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "NoRepair" 1
SetOutPath "$INSTDIR"
- # 'all users' shell folder is used (for $DESKTOP, $SMPROGRAMS, $QUICKLAUNCH,...)
- SetShellVarContext all
# ** Start menu **
# Delete old Start menu entries.
@@ -183,7 +177,7 @@
Function CheckExistingVersion
ClearErrors
Push $0
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionNumber"
+ ReadRegStr $0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}" "DisplayVersionNumber"
IfErrors leave 0
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${PRODUCT_NAME_SHORT} $0 \
$(T_AlreadyInstalled)" IDYES leave
@@ -191,25 +185,7 @@
leave:
FunctionEnd
-# PrintNonAdminWarning
-# Check whether the current user is in the Administrator group or an
-# OS version without the need for an Administrator is in use. Print a
-# diagnostic if this is not the case and abort installation.
-Function PrintNonAdminWarning
- ClearErrors
- UserInfo::GetName
- IfErrors leave
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" leave +1
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(T_AdminNeeded)"
- Quit
-
- leave:
-FunctionEnd
-
; Custom Page for add Desktop, Startmenu and Quick Launch links
Function CustomPageOptions
!insertmacro MUI_HEADER_TEXT "$(T_InstallOptions)" "$(T_InstallOptLinks)"
@@ -258,16 +234,6 @@
LangString T_InstOptFieldB ${LANG_GERMAN} "Arbeitsfläche"
LangString T_InstOptFieldC ${LANG_GERMAN} "Schnellstartleiste"
-# From Function (un.)PrintNonAdminWarning
-LangString T_AdminNeeded ${LANG_ENGLISH} \
- "Warning: Administrator permissions required for the installation of ${PRODUCT_NAME_SHORT}."
-LangString T_AdminNeeded ${LANG_GERMAN} \
- "Achtung: Für die Installation von ${PRODUCT_NAME_SHORT} werden Administratorrechte benötigt."
-LangString T_AdminNeeded_uninstall ${LANG_ENGLISH} \
- "Warning: Administrator permissions required for the uninstallation of ${PRODUCT_NAME_SHORT}."
-LangString T_AdminNeeded_uninstall ${LANG_GERMAN} \
- "Achtung: Für die Deinstallation von ${PRODUCT_NAME_SHORT} werden Administratorrechte benötigt."
-
# User Manual Strings
LangString UserManualLinkName ${LANG_ENGLISH} "User Manual.lnk"
LangString UserManualLinkName ${LANG_GERMAN} "Benutzerhandbuch.lnk"
@@ -284,9 +250,6 @@
; Delete installation dir
RMDir /R "$INSTDIR"
-
- # 'all users' shell folder is used (for $DESKTOP, $SMPROGRAMS, $QUICKLAUNCH,...)
- SetShellVarContext all
; Delete start menu entries
RMDir /R "$SMPROGRAMS\${PRODUCT_NAME_SHORT}"
@@ -295,9 +258,9 @@
; Delete Quick Launch Link
Delete "$QUICKLAUNCH\InteProxy.lnk"
- ; Delete regestry keys
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}"
- DeleteRegKey /ifempty HKLM "Software\${PRODUCT_NAME_SHORT}"
+ ; Delete registry keys
+ DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME_SHORT}"
+ DeleteRegKey /ifempty HKCU "Software\${PRODUCT_NAME_SHORT}"
SectionEnd
@@ -310,18 +273,3 @@
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
-
-# PrintNonAdminWarning (uninstall)
-Function un.PrintNonAdminWarning
- ClearErrors
- UserInfo::GetName
- IfErrors leave
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" leave +1
- MessageBox MB_OK|MB_ICONEXCLAMATION "$(T_AdminNeeded_uninstall)"
- Quit
-
- leave:
-FunctionEnd
More information about the Inteproxy-commits
mailing list