]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-nsis-20050628
authorRobert S Murawski IV <rsm4@ieee.org>
Fri, 1 Jul 2005 19:40:31 +0000 (19:40 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 1 Jul 2005 19:40:31 +0000 (19:40 +0000)
Support for NSIS 2.07 including named installation configurations
and an Icon for the uninstall entry listed in the Add/Remove Programs
control panel.

(cherry picked from commit 4464c62f92541c8b1f46260d6c4cbdd1ba4cf85f)

doc/txt/winnotes/afs-install-notes.txt
src/WINNT/install/NSIS/OpenAFS.nsi

index c6e7eaa9bbc2652f6caf6e9cd5388f805925148f..86702d43b5278cf9df5d07489007319271e73786 100644 (file)
@@ -1,4 +1,4 @@
-OpenAFS for Windows 1.3.8400 Installation Notes
+OpenAFS for Windows 1.3.8500 Installation Notes
 ---------------------------------------------
 
 The OpenAFS for Windows product was very poorly maintained throughout the 
index 3fd63f0c9144d53d47571e4c9185b4d2c9bbc99b..00388e7816f804b6366a3d13e0cc78c6fa7681a0 100644 (file)
@@ -1,5 +1,5 @@
-;OpenAFS Install Script for NSIS
-;                             This version compiles with NSIS v2.0
+; OpenAFS Install Script for NSIS
+; This version compiles with NSIS v2.07
 ;
 ; Originally written by Rob Murawski <rsm4@ieee.org>
 ;
@@ -70,7 +70,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows-DEBUG.exe"
 !endif
   SilentInstall normal
-  SetCompressor lzma
+  SetCompressor /solid lzma
   !define MUI_ICON "..\..\client_config\afs_config.ico"
   !define MUI_UNICON "..\..\client_config\afs_config.ico"
   !define AFS_COMPANY_NAME "OpenAFS"
@@ -490,7 +490,7 @@ var REG_DATA_3
 
 ;----------------------
 ; OpenAFS CLIENT
-Section "AFS Client" secClient
+Section "!AFS Client" secClient
 
   SetShellVarContext all
 
@@ -735,6 +735,7 @@ skipremove:
   SetRebootFlag true
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
   Call CreateDesktopIni
   
 SectionEnd
@@ -742,7 +743,7 @@ SectionEnd
 
 
 ; MS Loopback adapter
-Section "MS Loopback Adapter" secLoopback
+Section "!MS Loopback Adapter" secLoopback
 
 Call afs.InstallMSLoopback
 
@@ -751,7 +752,7 @@ SectionEnd
 
 ;------------------------
 ; OpenAFS SERVER  
-Section "AFS Server" secServer
+Section /o "AFS Server" secServer
 
   SetShellVarContext all
 
@@ -874,13 +875,14 @@ SkipStartup:
   
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
 
 SectionEnd
 
 
 ;----------------------------
 ; OpenAFS Control Center
-Section "AFS Control Center" secControl
+Section /o "AFS Control Center" secControl
 
   SetShellVarContext all
 
@@ -920,13 +922,14 @@ Section "AFS Control Center" secControl
   CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
 
 SectionEnd   
 
 
 ;----------------------------
 ; OpenAFS Supplemental Documentation
-Section "Supplemental Documentation" secDocs
+Section /o "Supplemental Documentation" secDocs
   SetShellVarContext all
 
    StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
@@ -1076,12 +1079,13 @@ DoneLanguage:
   
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
   CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
   Call AFSCommon.Install
 SectionEnd  
   
 
-Section "Software Development Kit (SDK)" secSDK
+Section /o "Software Development Kit (SDK)" secSDK
 
     SetOutPath "$INSTDIR\Client\Program\lib"
     File /r "${AFS_CLIENT_LIBDIR}\*.*"
@@ -1105,15 +1109,17 @@ Section "Software Development Kit (SDK)" secSDK
   WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
 
   WriteUninstaller "$INSTDIR\Uninstall.exe"
+  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
+
   SetOutPath "$SMPROGRAMS\OpenAFS"
   CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
 
-   Call AFSCommon.Install
+  Call AFSCommon.Install
 SectionEnd
 
 
-Section "Debug symbols" secDebug
-       SectionGetFlags ${secClient} $R0
+Section /o "Debug symbols" secDebug
+   SectionGetFlags ${secClient} $R0
    IntOp $R0 $R0 & ${SF_SELECTED}
    IntCmp $R0 ${SF_SELECTED} +1 DoServer
   
@@ -1148,7 +1154,7 @@ Section "Debug symbols" secDebug
   File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
   
 DoServer:
-       SectionGetFlags ${secServer} $R0
+   SectionGetFlags ${secServer} $R0
    IntOp $R0 $R0 & ${SF_SELECTED}
    IntCmp $R0 ${SF_SELECTED} +1 DoControl
 
@@ -1184,7 +1190,7 @@ DoServer:
 
    ; Do control center components
 DoControl:
-       SectionGetFlags ${secControl} $R0
+   SectionGetFlags ${secControl} $R0
    IntOp $R0 $R0 & ${SF_SELECTED}
    IntCmp $R0 ${SF_SELECTED} +1 DoCommon
 
@@ -1260,6 +1266,25 @@ Function .onInit
    
 contInstall:
 
+   ; Set Install Type text
+   InstTypeSetText 0 "AFS Client"
+   InstTypeSetText 1 "AFS Administrator"
+   InstTypeSetText 2 "AFS Server"
+   InstTypeSetText 3 "AFS Developer Tools"
+
+   ; Set sections in each install type
+   SectionSetInstTypes 0 15            ; AFS Client
+   SectionSetInstTypes 1 15            ; Loopback adapter
+   SectionSetInstTypes 2 4              ; AFS Server
+   SectionSetInstTypes 3 6              ; AFS Control Center
+   SectionSetInstTypes 4 14            ; Documentation
+   SectionSetInstTypes 5 8             ; SDK
+!ifndef DEBUG
+   SectionSetInstTypes 6 8             ; Debug symbols
+!else
+   SectionSetInstTypes 6 15            ; Debug symbols
+!endif
+
    ; Check that RPC functions are installed (I believe any one of these can be present for
    ; OpenAFS to work)
    ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\RPC\ClientProtocols" "ncacn_np"
@@ -1274,7 +1299,6 @@ contInstall:
 
 
 contInstall2:
-DoLoop:
    ; If the Loopback is already installed, we mark the option OFF and Read Only
    ; so the user can not select it.
    Call afs.isLoopbackInstalled
@@ -1283,6 +1307,8 @@ DoLoop:
    IntOp $0 $0 & ${SECTION_OFF}
    IntOp $0 $0 | ${SF_RO}
    SectionSetFlags ${secLoopback} $0
+   ; And disable the loopback in the types
+   SectionSetInstTypes 1 0             ; Loopback adapter
    
 SkipLoop:
    ; Never install debug symbols unless explicitly selected, except in DEBUG mode
@@ -1365,10 +1391,10 @@ skipClient:
    StrCmp $R2 "2" UpgradeServer
    StrCmp $R2 "3" DowngradeServer
    
-       SectionGetFlags ${secServer} $0
-       IntOp $0 $0 | ${SF_SELECTED}
-       SectionSetFlags ${secServer} $0
-       ;# !insertmacro UnselectSection ${secServer}
+   SectionGetFlags ${secServer} $0
+   IntOp $0 $0 | ${SF_SELECTED}
+   SectionSetFlags ${secServer} $0
+   ;# !insertmacro UnselectSection ${secServer}
    goto skipServer
 
 UpgradeServer:
@@ -1393,10 +1419,10 @@ DowngradeServer:
    goto skipServer
    
 NoServer:
-       SectionGetFlags ${secServer} $0
-       IntOp $0 $0 & ${SECTION_OFF}
-       SectionSetFlags ${secServer} $0
-       ;# !insertmacro UnselectSection ${secServer}
+   SectionGetFlags ${secServer} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secServer} $0
+   ;# !insertmacro UnselectSection ${secServer}
    goto skipServer
    
 skipServer:
@@ -1405,31 +1431,31 @@ skipServer:
    Pop $R2
    StrCmp $R2 "0" NoControl
 
-       SectionGetFlags ${secControl} $0
-       IntOp $0 $0 | ${SF_SELECTED}
-       SectionSetFlags ${secControl} $0
+   SectionGetFlags ${secControl} $0
+   IntOp $0 $0 | ${SF_SELECTED}
+   SectionSetFlags ${secControl} $0
    goto CheckDocs
    
 NoControl:   
-       SectionGetFlags ${secControl} $0
-       IntOp $0 $0 & ${SECTION_OFF}
-       SectionSetFlags ${secControl} $0
-       ;# !insertmacro UnselectSection ${secControl}
+   SectionGetFlags ${secControl} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secControl} $0
+   ;# !insertmacro UnselectSection ${secControl}
 
 CheckDocs:
    ; Check Documentation
    Call IsDocumentationInstalled
    Pop $R2
    StrCmp $R2 "0" NoDocs
-       SectionGetFlags ${secDocs} $0
-       IntOp $0 $0 | ${SF_SELECTED}
-       SectionSetFlags ${secDocs} $0
+   SectionGetFlags ${secDocs} $0
+   IntOp $0 $0 | ${SF_SELECTED}
+   SectionSetFlags ${secDocs} $0
    goto CheckSDK
    
 NoDocs:
-       SectionGetFlags ${secDocs} $0
-       IntOp $0 $0 & ${SECTION_OFF}
-       SectionSetFlags ${secDocs} $0
+   SectionGetFlags ${secDocs} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secDocs} $0
    goto CheckSDK
    
 ; To check the SDK, we simply look to see if the files exist.  If they do,
@@ -1450,26 +1476,26 @@ NoSDK:
    
 DefaultOptions:
    ; Client Selected
-       SectionGetFlags ${secClient} $0
-       IntOp $0 $0 | ${SF_SELECTED}
-       SectionSetFlags ${secClient} $0
+   SectionGetFlags ${secClient} $0
+   IntOp $0 $0 | ${SF_SELECTED}
+   SectionSetFlags ${secClient} $0
 
    ; Server NOT selected
-       SectionGetFlags ${secServer} $0
-       IntOp $0 $0 & ${SECTION_OFF}
-       SectionSetFlags ${secServer} $0
+   SectionGetFlags ${secServer} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secServer} $0
    
    ; Control Center NOT selected
-       SectionGetFlags ${secControl} $0
-       IntOp $0 $0 & ${SECTION_OFF}
-       SectionSetFlags ${secControl} $0
-       ;# !insertmacro UnselectSection ${secControl}
+   SectionGetFlags ${secControl} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secControl} $0
+   ;# !insertmacro UnselectSection ${secControl}
 
-   ; Documentation selected
-       SectionGetFlags ${secDocs} $0
-       IntOp $0 $0 | ${SF_SELECTED}
-       SectionSetFlags ${secDocs} $0
-       ;# !insertmacro UnselectSection ${secDocs}
+   ; Documentation NOT selected
+   SectionGetFlags ${secDocs} $0
+   IntOp $0 $0 & ${SECTION_OFF}
+   SectionSetFlags ${secDocs} $0
+   ;# !insertmacro UnselectSection ${secDocs}
    
    ; SDK not selected
    SectionGetFlags ${secSDK} $0
@@ -1480,7 +1506,7 @@ DefaultOptions:
    goto end
 
 end:
-       Pop $0
+   Pop $0
   
    Push $R0
   
@@ -1539,9 +1565,6 @@ Nope:
 FunctionEnd
 
 
-
-
-
 ;--------------------------------
 ; These are our cleanup functions
 Function .onInstFailed
@@ -2619,6 +2642,7 @@ end:
 FunctionEnd
 
 
+!ifdef USE_GETPARAMETERS
 ; GetParameters
 ; input, none
 ; output, top of stack (replaces, with e.g. whatever)
@@ -2648,6 +2672,7 @@ Function GetParameters
   Pop $R1
   Exch $R0
 FunctionEnd
+!endif
 
 
 ;Check to see if any AFS component is installed