? AbiWord.nsi.patch
Index: AbiWord.nsi
===================================================================
RCS file: /cvsroot/abi/src/pkg/win/setup/AbiWord.nsi,v
retrieving revision 1.14
diff -u -5 -r1.14 AbiWord.nsi
--- AbiWord.nsi	24 Apr 2002 20:16:24 -0000	1.14
+++ AbiWord.nsi	14 Jun 2002 13:50:57 -0000
@@ -22,26 +22,27 @@
 InstallDirRegKey HKLM SOFTWARE\Abisuite "Install_Dir"
 
 ; The text to prompt the user to enter a directory
 ComponentText "This will install Abiword on your computer. Select which optional components you want installed."
 
-;
-InstType "Typical (default)"
-InstType "Full (with File Associations)"
-InstType "Minimal"
+; Install types 
+InstType "Typical (default)"			; Section 1
+InstType "Full (with File Associations)" 	; Section 2
+InstType "Minimal"				; Section 3
+; any other combination is "Custom"
 
 ; The text to prompt the user to enter a directory
 DirText "Choose a directory to install in to:"
 
 EnabledBitmap  ..\..\pkg\win\setup\checkbox.bmp
 DisabledBitmap ..\..\pkg\win\setup\emptybox.bmp
 
 ; The stuff that must be installed
 ; binary, license, and American dictionary
 Section "Abiword.exe (required)"
-	SectionIn 123
-	;;;;
+	SectionIn 1 2 3	; included in Typical, Full, Minimal 
+	;;
 	; Testing clause to Overwrite Existing Version - if exists
 	IfFileExists "$INSTDIR\AbiWord\bin\AbiWord.exe" 0 DoInstall
 	
 	MessageBox MB_YESNO "Overwrite Existing AbiWord?" IDYES DoInstall
 	
@@ -55,11 +56,10 @@
 
 	SetOutPath $INSTDIR\AbiWord
 	File "..\AbiSuite\AbiWord\system.*"
 	File /r "..\AbiSuite\AbiWord\strings"
 
-
 	SetOutPath $INSTDIR
 	File /oname=copying.txt "..\AbiSuite\Copying"
 	File "..\AbiSuite\readme.txt"
 
 	; Special Install of Dingbats font
@@ -84,11 +84,11 @@
 
 SectionEnd
 
 ; OPTIONAL Registry Settings
 Section "Update Registry Settings"
-	SectionIn 123
+	SectionIn 1 2 3
 	; Write the AbiSuite.AbiWord Keys
 	WriteRegStr HKCR "AbiSuite.AbiWord" "" "AbiWord Document"
 	WriteRegStr HKCR "AbiSuite.AbiWord\DefaultIcon" "" "$INSTDIR\AbiWord\bin\AbiWord.exe,2"
 	WriteRegStr HKCR "AbiSuite.AbiWord\shell\open\command" "" "$INSTDIR\AbiWord\bin\AbiWord.exe"
 	WriteRegStr HKCR "AbiSuite.AbiWord\shell\open\ddeexec" "" '[Open("%1")]'
@@ -103,62 +103,85 @@
 	WriteRegStr HKCR ".zabw" "" "AbiSuite.AbiWord"
 	WriteRegStr HKCR ".zabw" "Content Type" "application/abiword-compressed"
 
 SectionEnd
 
-; OPTIONAL Start Menu Shortcut
-Section "Start Menu Shortcuts"
-	SectionIn 123
+; OPTIONAL Start Menu Shortcut for the current user profile
+Section "Start Menu Shortcuts (Current User)"
+	SectionIn 1 3
+	SetShellVarContext current  	; This is probably overkill, but playing it safe
 	CreateDirectory "$SMPROGRAMS\Abiword"
 	CreateShortCut "$SMPROGRAMS\Abiword\Uninstall Abiword.lnk" "$INSTDIR\UninstallAbiWord.exe" "" "$INSTDIR\UninstallAbiWord.exe" 0
 	CreateShortCut "$SMPROGRAMS\Abiword\Abiword.lnk" "$INSTDIR\Abiword\bin\Abiword.exe" "" "$INSTDIR\Abiword\bin\Abiword.exe" 0
 SectionEnd
 
-; OPTIONAL Desktop Shortcut 
-Section "Desktop Shortcut"
-	SectionIn 123
+; OPTIONAL Desktop Shortcut for the current user profile
+Section "Desktop Shortcut (Current User)"
+	SectionIn 1 3
+	SetShellVarContext current  	; This is probably overkill, but playing it safe
 	CreateShortCut "$DESKTOP\Abiword.lnk" "$INSTDIR\Abiword\bin\Abiword.exe" "" "$INSTDIR\Abiword\bin\Abiword.exe" 0
 SectionEnd
 
+
+; OPTIONAL Start Menu Shortcut for the special All User profile (not used in win9x) 
+Section "Start Menu Shortcuts (All Users)"
+	SectionIn 2		; off by default, included in 2 Full Install
+        SetShellVarContext all  	; set to all, reset at end of section
+	CreateDirectory "$SMPROGRAMS\Abiword"
+	CreateShortCut "$SMPROGRAMS\Abiword\Uninstall Abiword.lnk" "$INSTDIR\UninstallAbiWord.exe" "" "$INSTDIR\UninstallAbiWord.exe" 0
+	CreateShortCut "$SMPROGRAMS\Abiword\Abiword.lnk" "$INSTDIR\Abiword\bin\Abiword.exe" "" "$INSTDIR\Abiword\bin\Abiword.exe" 0
+	SetShellVarContext current  	; This is pro'ly overkill
+SectionEnd
+
+
+; OPTIONAL Desktop Shortcut for All Users
+Section "Desktop Shortcut (All Users)"
+	SectionIn 2	; not in default, included in 2 Full Install
+        SetShellVarContext all  	;  All users 
+	CreateShortCut "$DESKTOP\Abiword.lnk" "$INSTDIR\Abiword\bin\Abiword.exe" "" "$INSTDIR\Abiword\bin\Abiword.exe" 0
+        SetShellVarContext current  	; reset to current user
+SectionEnd
+
+
 ; MORE OPTIONS
 ; language packs, clipart, help docs, templates etc.   
 ;Section "Help Files"
 ;SectionEnd
 
 SectionDivider " helper files "
 
 ; OPTIONAL Installation of Default Dictionary
 Section "Dictionary - US-English"
-	SectionIn 12
+	SectionIn 1 2
 	SetOutPath $INSTDIR
 	File /r "..\AbiSuite\dictionary"
 SectionEnd
 
 ; OPTIONAL Installation of Help Files
 Section "Help Files"
-	SectionIn 12
+	SectionIn 1 2
 	SetOutPath $INSTDIR\AbiWord
 	file /r "..\abisuite\abiword\help"
 SectionEnd
 
 ; OPTIONAL Installation of Templates
 Section "Templates"
-	SectionIn 12
+	SectionIn 1 2
 	SetOutPath $INSTDIR
 	File /r "..\AbiSuite\templates"
 SectionEnd
 
 ; OPTIONAL Installation of Samples - REMOVED
 ;Section "Samples"
-;	SectionIn 12
+;	SectionIn 1 2
 ;	SetOutPath $INSTDIR\AbiWord
 ;	File /r "..\AbiSuite\AbiWord\sample"
 ;SectionEnd
 
 ; OPTIONAL Installation of Clipart
 Section "Clipart"
-	SectionIn 12
+	SectionIn 1 2
 	SetOutPath $INSTDIR
 	File /r "..\AbiSuite\clipart"
 SectionEnd
 
 
@@ -221,9 +244,9 @@
 	Delete "$DESKTOP\Abiword.lnk"
 
 	; remove directories used
 	RMDir "$SMPROGRAMS\Abiword"
 	RMDir /r "$INSTDIR"
-
+	 
 SectionEnd
 
 ; eof
