wix-compatibilityK-20041101
[openafs.git] / src / WINNT / install / wix / openafs.wxs
index d2e48c6..d0c493b 100644 (file)
@@ -23,6 +23,7 @@
                         Id="$(var.PackageCode)"
                -->
         <Package
+                Id="????????-????-????-????-????????????"
          AdminImage="no"
          Comments="$(var.PackageComments)"
          Compressed="yes"
          />
         
         <!-- Launch conditions -->
-        <Condition
-         Message="$(loc.StrLaunchCond)">
+        <Condition Message="$(loc.StrLaunchCond)">
          <![CDATA[VersionNT >= 500]]>
         </Condition>
+        <Condition Message="$(loc.AdminRequired)">Privileged</Condition>
+        
         
         <!-- Global Properties -->
         <?include property.wxi?>
         <?include lang\$(var.Language)\ui.wxi?>
         
         <!-- Custom actions -->
+    <?ifndef UseDllLoopbackInstaller?>
         <Binary
-         Id="BIN_Instloop"
+         Id="BIN_instloop"
          src="$(var.MediaBinDir)instloop.exe"/>
+    <?else?>
+        <Binary
+         Id="BIN_afsLoopback"
+         src="$(var.MediaBinDir)afsloopback.dll"/>
+    <?endif?>
         <Binary
                 Id="BIN_afsCustom"
-                src="$(var.MediaBinDir)afscustom.dll"/>
+                src="$(var.MediaDllDir)afscustom.dll"/>
+       <?ifdef UseDllLoopbackInstaller?>
         <CustomAction
          Id="InstallLoopback"
-         BinaryKey="BIN_Instloop"
-         ExeCommand="-i"
-         Execute="deferred"
+         BinaryKey="BIN_afsLoopback"
+         DllEntry="installLoopbackMSI"
+         Execute="deferred" 
          Impersonate="no"
          />
        <?ifdef RemoveLoopback?>
         <CustomAction
          Id="RemoveLoopback"
-         BinaryKey="BIN_Instloop"
-         ExeCommand="-u"
-         Execute="deferred"
-         Return="ignore"
-         Impersonate="no"
+         BinaryKey="BIN_afsLoopback"
+         DllEntry="uninstallLoopbackMSI"
+         Execute="deferred" 
          />
         <CustomAction
          Id="RollbackLoopback"
-         BinaryKey="BIN_Instloop"
-         ExeCommand="-u"
-         Execute="rollback"
-         Return="ignore"
-         Impersonate="no"
+         BinaryKey="BIN_afsLoopback"
+         DllEntry="uninstallLoopbackMSI"
+         Execute="deferred" 
          />
        <?endif?>
+       <?else?>
+               <CustomAction
+                Id="InstallLoopback"
+                BinaryKey="BIN_instloop"
+                ExeCommand="-i"
+                Impersonate="no"
+                Execute="deferred"
+                />
+               <?ifdef RemoveLoopback?>
+                       <CustomAction
+                       Id="RollbackLoopback"
+                       BinaryKey="BIN_instloop"
+                       ExeCommand="-u"
+                       Impersonate="no"
+                       Execute="rollback"
+                       />
+                       <CustomAction
+                       Id="RemoveLoopback"
+                       BinaryKey="BIN_instloop"
+                       ExeCommand="-u"
+                       Impersonate="no"
+                       Execute="deferred"
+                       />
+               <?endif?>
+       <?endif?>
         <CustomAction
          Id="InstallNetProvider" 
          BinaryKey="BIN_afsCustom" 
                 DllEntry="UninstallNsisInstallation"
                 Execute="immediate" />
                <CustomAction
-                Id="AbortInstallation"
+                Id="CreateAFSAdminGroup"
+                BinaryKey="BIN_afsCustom"
+                DllEntry="CreateAFSClientAdminGroup"
+                Impersonate="no"
+                Execute="deferred" />
+               <CustomAction
+                Id="RemoveAFSAdminGroup"
+                BinaryKey="BIN_afsCustom"
+                DllEntry="RemoveAFSClientAdminGroup"
+                Impersonate="no"
+                Execute="deferred" />
+               <CustomAction
+                Id="RollbackAFSAdminGroup"
+                BinaryKey="BIN_afsCustom"
+                DllEntry="RemoveAFSClientAdminGroup"
+                Impersonate="no"
+                Execute="rollback" />
+               <CustomAction
+                Id="AbortInstallationA"
+                BinaryKey="BIN_afsCustom"
+                DllEntry="AbortMsiImmediate"
+                Execute="immediate" />
+               <CustomAction
+                Id="AbortInstallationB"
                 BinaryKey="BIN_afsCustom"
                 DllEntry="AbortMsiImmediate"
                 Execute="immediate" />
         <AdminExecuteSequence />
         <InstallExecuteSequence>
                        <RemoveExistingProducts After="InstallValidate">IBMAFS_UPGRADE OR OPENAFS_UPGRADE</RemoveExistingProducts>
-                       <Custom Action="RemoveNsisInstallation" Before="AbortInstallation">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
-                       <Custom Action="AbortInstallation" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
+                       <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
+                       <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
+                       <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
+                       <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
+                               <![CDATA[((&feaServer=3 OR (!feaServer=3 AND &feaServer<1)) AND (&feaClient=2 OR (&feaClient<>3 AND !feaClient<>3) OR &feaControlCenter=2 OR (&feaControlCenter<>3 AND !feaControlCenter<>3) ))]]>
+                       </Custom>
                <?ifdef RemoveLoopback?>
                        <Custom Action="RemoveLoopback" After="SelfRegModules">&amp;feaLoopback=2 OR &amp;feaLoopback=3</Custom>
             <Custom Action="RollbackLoopback" After="RemoveLoopback">&amp;feaLoopback=3</Custom>
                        <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaClient=2</Custom>
                        <Custom Action="ConfigureClient" After="InstallServices">&amp;feaClient=3</Custom>
                        <Custom Action="ConfigureServer" After="ConfigureClient">&amp;feaServer=3</Custom>
+                       <!-- <Custom Action="RemoveAFSAdminGroup" Before="">&amp;feaClient=2</Custom> -->
+                       <Custom Action="RollbackAFSAdminGroup" Before="CreateAFSAdminGroup">&amp;feaClient=3</Custom>
+                       <Custom Action="CreateAFSAdminGroup" Before="CreateFolders">&amp;feaClient=3</Custom>
             <ScheduleReboot After="PublishProduct">&amp;feaClient=3 OR &amp;feaServer=3 OR &amp;feaClient=2 OR &amp;feaServer=2</ScheduleReboot>
         </InstallExecuteSequence>
 
         <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
 
                <!-- Media -->
-               <Media Id="1" Cabinet="disk1.cab" CompressionLevel="mszip" EmbedCab="yes" />
+               <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />
     </Product>
 </Wix>