Windows: Support building a lite-client installer

If LITECLIENT is defined when invoking the WiX based MSI installer
build, we will build a light-weight client installer MSI.  This
minimizes the size of the installer for users who only need client
functionality from OpenAFS.

The light-weight client excludes:

  - Server components
  - Control center components
  - Administration utilities
  - Debug symbols

Lite-client installer can also be built by invoking target wix-lite
from the root NTMakefile.

Change-Id: I544cdb7170d17358eb235f3c476c468dbae62776
Reviewed-on: http://gerrit.openafs.org/2034
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Asanka Herath 2010-06-03 23:58:42 -04:00 committed by Jeffrey Altman
parent 1e0c6d22d7
commit dbef3c8b0b
7 changed files with 82 additions and 22 deletions

View File

@ -713,10 +713,18 @@ wix: loopback man-pages documentation
$(NTMAKE)
$(CD) ..\..\..\..
wix-lite: loopback man-pages documentation
@echo ***** Making Wix MSI Installer (Lite)
$(DOCD) $(SRC)\WINNT\install\wix
$(CD) $(SRC)\WINNT\install\wix
$(NTMAKE) LITECLIENT=1
$(CD) ..\..\..\..
media: install NSIS wix
install-nsis: install NSIS
install-wix: install wix
install-wix-lite: install wix-lite

View File

@ -713,10 +713,18 @@ wix: loopback man-pages documentation
$(NTMAKE)
$(CD) ..\..\..\..
wix-lite: loopback man-pages documentation
@echo ***** Making Wix MSI Installer (Lite)
$(DOCD) $(SRC)\WINNT\install\wix
$(CD) $(SRC)\WINNT\install\wix
$(NTMAKE) LITECLIENT=1
$(CD) ..\..\..\..
media: install NSIS wix
install-nsis: install NSIS
install-wix: install wix
install-wix-lite: install wix-lite

View File

@ -12,9 +12,15 @@ RELDIR=WINNT\install\wix
MEDIADIR = $(DESTDIR)\WinInstall
MEDIABINDIR = $(MEDIADIR)\Dll
MSIFILE = $(MEDIADIR)\openafs-$(LANG).msi
!IFDEF LITECLIENT
LITE=-lite
!ELSE
LITE=
!ENDIF
MSIFILE = $(MEDIADIR)\openafs-$(LANG)$(LITE).msi
!IF ("$(CPU)" == "i386")
BINMSIFILE = $(MEDIADIR)\openafs-32bit-tools-$(LANG).msi
BINMSIFILE = $(MEDIADIR)\openafs-32bit-tools-$(LANG)$(LITE).msi
!ENDIF
!IFNDEF MSIDNNLS
@ -31,9 +37,9 @@ WIXINCLUDES = \
registry.wxi \
lang\$(LANG)\ui.wxi
WIXOBJ = $(OUT)\openafs-$(LANG).wixobj
WIXOBJ = $(OUT)\openafs-$(LANG)$(LITE).wixobj
!IF ("$(CPU)" == "i386")
BINWIXOBJ = $(OUT)\openafs-32bit-tools-$(LANG).wixobj
BINWIXOBJ = $(OUT)\openafs-32bit-tools-$(LANG)$(LITE).wixobj
!ENDIF
!IFNDEF NOCYGWIN
WIXCYGOPT=-dCygwinArchives
@ -53,9 +59,16 @@ languages:
# )
$(MAKE) /f NTMakefile /nologo LANG=en_US lang
lang:: lang_clean $(MSIFILE) $(BINMSIFILE)
lang_clean:
-$(DEL) $(WIXOBJ)
-$(DEL) $(MSIFILE)
!IF ("$(CPU)" == "i386")
-$(DEL) $(BINWIXOBJ)
-$(DEL) $(BINMSIFILE)
!ENDIF
uninst:
$(CD) uninstall
$(MAKE) /f NTMakefile /nologo install
@ -86,6 +99,9 @@ $(WIXOBJ): openafs.wxs $(WIXINCLUDES)
"-dDestDir=$(DESTDIR)\\" \
-dCellDbFile=CellServDB \
"-dIDNMRedistDir=$(MSIDNNLS)\\REDIST" \
!IFDEF LITECLIENT
-dLiteClient=1 \
!ENDIF
-v0 \
-w0 \
$(WIXCYGOPT) $(AFSDEV_AUXWIXDEFINES) openafs.wxs
@ -101,6 +117,9 @@ $(BINWIXOBJ): oafwbins.wxs $(WIXINCLUDES)
-dVersionPatch=$(AFSPRODUCT_VER_PATCH) \
"-dDestDir=$(DESTDIR)\\" \
-dCellDbFile=CellServDB \
!IFDEF LITECLIENT
-dLiteClient=1 \
!ENDIF
-v0 \
-w0 \
$(WIXCYGOPT) $(AFSDEV_AUXWIXDEFINES) oafwbins.wxs
@ -113,6 +132,12 @@ $(BINMSIFILE): $(BINWIXOBJ)
dir $(BINMSIFILE)
!ENDIF
# Pseudotarget for building lite installer.
!IFNDEF LITECLIENT
lite:
$(MAKE) /f NTMakefile /nologo install LITECLIENT=1
!ENDIF
# Cleanup
clean::
for %l in ( $(LANGUAGES) ) do \
@ -124,13 +149,5 @@ clean::
$(MAKE) /f NTMakefile /nologo clean
$(CD) ..
lang_clean:
-$(DEL) $(WIXOBJ)
-$(DEL) $(MSIFILE)
!IF ("$(CPU)" == "i386")
-$(DEL) $(BINWIXOBJ)
-$(DEL) $(BINMSIFILE)
!ENDIF

View File

@ -102,8 +102,16 @@
<?error AFSDEV_BUILDTYPE is not set in the environment.?>
<?endif?>
<!-- We are including debug symbols anyway. Undefine this for a leaner installer without debug syms. -->
<?define DebugSyms = "yes"?>
<!-- Are we building a lite installer? then don't include debug symbols -->
<?ifdef LiteClient ?>
<?define NoDebugSyms ?>
<?endif?>
<!-- Default to including debug symbols unless someone defines
NoDebugSyms. -->
<?ifndef NoDebugSyms ?>
<?define DebugSyms = "yes"?>
<?endif?>
<!-- Parameters for the features containing debug symbols -->
<?ifdef DebugSyms?>

View File

@ -113,7 +113,8 @@
<!-- Runtime -->
<?include runtime.wxi?>
</Feature>
<?ifndef LiteClient ?>
<Feature Id="feaServer" AllowAdvertise="no" Description="$(loc.StrAFSServerLongDesc)" Display="expand"
InstallDefault="followParent" Level="130" Title="$(loc.StrAFSServerDesc)">
@ -172,10 +173,11 @@
<?include runtime_debug.wxi?>
</Feature>
<?endif?>
<!-- Runtime -->
<?include runtime.wxi?>
</Feature>
<?endif?>
<?ifndef LiteClient ?>
<Feature Id="feaControlCenter" AllowAdvertise="no" Description="$(loc.StrAFSCCLongDesc)"
Display="expand" InstallDefault="followParent" Level="130" Title="$(loc.StrAFSCCDesc)">
@ -227,6 +229,8 @@
<!-- Runtime -->
<?include runtime.wxi?>
</Feature>
<?endif?>
<?ifndef LiteClient ?>
<Feature Id="feaSDK" AllowAdvertise="no" Description="$(loc.StrAFSSDKLongDesc)" Display="expand"
InstallDefault="followParent" Level="130" Title="$(loc.StrAFSSDKDesc)">
@ -253,6 +257,7 @@
<!-- Runtime -->
<?include runtime.wxi?>
</Feature>
<?endif?>
<Feature Id="feaDocumentation" AllowAdvertise="no" Description="$(loc.StrAFSDocLongDesc)"
Display="expand" InstallDefault="followParent" Level="130" Title="$(loc.StrAFSDocDesc)">

View File

@ -31,6 +31,7 @@
<File Id="fileafsvosadmin_DLL" Name="afsvosad.dll" LongName="afsvosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsvosadmin.dll"/>
</Component>
<?ifndef BinsOnly?>
<?ifndef LiteClient?>
<Component Win64="$(var.Win64)" Id="cmf_afsbosadmin_DLL" Guid="$(var.cmf_afsbosadmin_DLL_guid)">
<File Id="fileafsbosadmin_DLL" Name="afsbosad.dll" LongName="afsbosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsbosadmin.dll"/>
</Component>
@ -43,6 +44,7 @@
<Component Win64="$(var.Win64)" Id="cmf_afsptsadmin_DLL" Guid="$(var.cmf_afsptsadmin_DLL_guid)">
<File Id="fileafsptsadmin_DLL" Name="afsptsad.dll" LongName="afsptsadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsptsadmin.dll"/>
</Component>
<?endif?>
<?endif?>
<Component Win64="$(var.Win64)" Id="cmf_afsrpc_DLL" Guid="$(var.cmf_afsrpc_DLL_guid)">
@ -99,6 +101,7 @@
<?ifndef BinsOnly ?>
<!-- <<LanguageSpecific:1033/en_US>> -->
<?if $(var.Language) ="en_US"?>
<?ifndef LiteClient?>
<Component Win64="$(var.Win64)" Id="cmf_afseventmsg_1033_DLL" Guid="$(var.cmf_afseventmsg_1033_DLL_guid)">
<File Id="fileafseventmsg_1033_DLL" Name="afse1033.dll" LongName="afseventmsg_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afseventmsg_1033.dll"/>
</Component>
@ -111,12 +114,13 @@
<Component Win64="$(var.Win64)" Id="cmf_TaAfsAccountManager_1033_DLL" Guid="$(var.cmf_TaAfsAccountManager_1033_DLL_guid)">
<File Id="fileTaAfsAccountManager_1033_DLL" Name="tacm1033.dll" LongName="TaAfsAccountManager_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAccountManager_1033.dll"/>
</Component>
<Component Win64="$(var.Win64)" Id="cmf_TaAfsAppLib_1033_DLL" Guid="$(var.cmf_TaAfsAppLib_1033_DLL_guid)">
<File Id="fileTaAfsAppLib_1033_DLL" Name="taal1033.dll" LongName="TaAfsAppLib_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib_1033.dll"/>
</Component>
<Component Win64="$(var.Win64)" Id="cmf_TaAfsServerManager_1033_DLL" Guid="$(var.cmf_TaAfsServerManager_1033_DLL_guid)">
<File Id="fileTaAfsServerManager_1033_DLL" Name="tasm1033.dll" LongName="TaAfsServerManager_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsServerManager_1033.dll"/>
</Component>
<?endif?>
<Component Win64="$(var.Win64)" Id="cmf_TaAfsAppLib_1033_DLL" Guid="$(var.cmf_TaAfsAppLib_1033_DLL_guid)">
<File Id="fileTaAfsAppLib_1033_DLL" Name="taal1033.dll" LongName="TaAfsAppLib_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib_1033.dll"/>
</Component>
<Component Win64="$(var.Win64)" Id="cmf_afs_config_1033_DLL" Guid="$(var.cmf_afs_config_1033_DLL_guid)">
<File Id="fileafs_config_1033_DLL" Name="acfg1033.dll" LongName="afs_config_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_config_1033.dll"/>
</Component>
@ -295,7 +299,8 @@
<?endif?>
</Directory> <!-- /common -->
<?ifndef BinsOnly ?>
<?ifndef BinsOnly ?>
<?ifndef LiteClient ?>
<Directory Id="dirControl_Center" Name="Contr" LongName="Control Center" SourceName="ControlC" LongSource="Control Center">
<Component Win64="$(var.Win64)" Id="cmf_TaAfsServerManager_EXE" Guid="$(var.cmf_TaAfsServerManager_EXE_guid)">
<File Id="fileTaAfsServerManager_EXE" Name="TaAfsSvM.exe" LongName="TaAfsServerManager.exe" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\TaAfsServerManager.exe">
@ -319,6 +324,7 @@
<?endif?>
</Directory> <!-- /Control center -->
<?endif?>
<?endif?>
<?ifndef BinsOnly?>
<Directory Id="dirDocumentation" Name="Docum" LongName="Documentation" SourceName="Docs">
@ -1268,6 +1274,7 @@
</Directory> <!-- /Program -->
</Directory> <!-- /Client -->
<?ifndef BinsOnly ?>
<?ifndef LiteClient ?>
<Directory Id="dirServer" Name="Server">
<Directory Id="dirusr" Name="usr">
<Directory Id="dirafs" Name="afs">
@ -1384,7 +1391,9 @@
</Directory>
</Directory> <!-- Server -->
<?endif?>
<?ifndef BinsOnly?>
<?endif?>
<?ifndef BinsOnly?>
<?ifndef LiteClient ?>
<Directory Id="dirSDK" Name="SDK">
<Directory Id="dirSample" Name="Sample">
<Component Id="cmp_SDK_Sample" Guid="F9373E95-F410-4AA5-AA79-07C11EE00334">
@ -1721,6 +1730,7 @@
</Directory>
</Directory>
</Directory> <!-- SDK -->
<?endif?>
<?endif?>
</Directory> <!-- AFS -->

View File

@ -4,6 +4,7 @@
This file will be included as a child of the root Directory tag.
-->
<?ifndef BinsOnly ?>
<?ifndef LiteClient ?>
<Component Id="rcm_Server" Guid="$(var.rcm_server_guid)" Win64="$(var.Win64)">
<Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_Server"/>
<Registry Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\AFS Service" Id="reg_Server3"/>
@ -61,6 +62,7 @@
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center\$(var.NumericVersion)" Name="InstallDateString" Type="string" Value="$(var.InstallTimestamp)" Id="reg_Control_Center26" />
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Control Center\$(var.NumericVersion)" Name="Description" Type="string" Value="$(loc.StrAFSCCDesc)" Id="reg_Control_Center27" />
</Component>
<?endif?> <!-- /!LiteClient -->
<Component Id="rcm_Client" Guid="$(var.rcm_client_guid)" Win64="$(var.Win64)">
<Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Id="reg_Client_NoUninstall2" />
<Registry Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" Action="createKey" Id="reg_Client_NoUninstall" />
@ -166,6 +168,7 @@
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation\$(var.NumericVersion)" Name="InstallDateString" Type="string" Value="$(var.InstallTimestamp)" Id="reg_Docs26" />
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS Supplemental Documentation\$(var.NumericVersion)" Name="Description" Type="string" Value="$(loc.StrAFSDocDesc)" Id="reg_Docs27" />
</Component>
<?ifndef LiteClient ?>
<Component Id="rcm_SDK" Guid="$(var.rcm_sdk_guid)" Win64="$(var.Win64)">
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK" KeyPath="yes" Id="reg_SDK2" />
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK" Action="createKeyAndRemoveKeyOnUninstall" Id="reg_SDK" />
@ -192,6 +195,7 @@
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK\$(var.NumericVersion)" Name="InstallDateString" Type="string" Value="$(var.InstallTimestamp)" Id="reg_SDK26" />
<Registry Root="HKLM" Key="SOFTWARE\TransarcCorporation\AFS SDK\$(var.NumericVersion)" Name="Description" Type="string" Value="$(loc.StrAFSSDKDesc)" Id="reg_SDK27" />
</Component>
<?endif?> <!-- /!LiteClient-->
<!-- Work around bug KB30673. Only for Windows 2000. -->
<Component Id="rcm_KB301673" Guid="$(var.rcm_kb301673_guid)" Win64="$(var.Win64)">