Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
greghudson committed Nov 7, 2023
1 parent c20251d commit 892f497
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 92 deletions.
17 changes: 5 additions & 12 deletions src/windows/installer/wix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
LANG=1033

# Program macros
CANDLE=candle -nologo

LIGHT=light -nologo
WIX=wix

CD=cd

Expand Down Expand Up @@ -49,15 +47,10 @@ WIXARCH = x64

all: $(MSIFILE)

$(OBJFILE): kfw.wxs $(WIXINCLUDES)
$(CANDLE) -arch $(WIXARCH) -out $@ kfw.wxs \
"-dDate=%DATE%" \
"-dTime=%TIME%" \
-dBuildLang=$(LANG)

$(MSIFILE): $(OBJFILE) $(CUSTOMDLL)
$(LIGHT) -out $@ $(OBJFILE) \
-loc lang\strings_$(LANG).wxl -ext WixUtilExtension.dll
$(MSIFILE): kfw.wxs $(WIXINCLUDES)
$(WIX) build -o $@ kfw.wxs \
-d "Date=%DATE%" -d "Time=%TIME%" -d "BuildLang=$(LANG)" \
-loc lang\strings_$(LANG).wxl

$(CUSTOMDLL): custom\custom.cpp
$(CD) custom
Expand Down
152 changes: 72 additions & 80 deletions src/windows/installer/wix/kfw.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<!--
Copyright (C) 2004,2005, 2006 by the Massachusetts Institute of Technology.
All rights reserved.
Expand Down Expand Up @@ -29,27 +28,21 @@
<?include config.wxi?>
<?include platform.wxi?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product
Id="$(var.ProductCode)"
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package
Codepage="$(var.CodePage)"
Language="$(var.Language)"
Manufacturer="!(loc.Manufacturer)"
Name="$(var.ProductName)"
UpgradeCode="$(var.UpgradeCode)"
Version="$(var.VersionString)">

<!-- The weird package code results in a new one being generated each time we compile -->
<Package
Id="????????-????-????-????-????????????"
Version="$(var.VersionString)"
InstallerVersion="$(var.InstallerVersion)">

<SummaryInformation
Keywords="Installer,MSI,Database"
Description="$(var.ProductName)"
Comments="$(var.ProductFullName)"
Manufacturer="!(loc.Manufacturer)"
InstallerVersion="$(var.InstallerVersion)"
Languages="$(var.Language)"
Compressed="yes"
SummaryCodepage="$(var.CodePage)"
Codepage="$(var.CodePage)"
/>

<?include lang\ui_$(var.BuildLang).wxi?>
Expand All @@ -58,24 +51,22 @@
<?include property.wxi?>

<!-- Launch conditions -->
<Condition Message="!(loc.AdminRequired)">Privileged</Condition>
<Condition Message="!(loc.OsVersionRequired)">VersionNT &gt;= 501</Condition>
<Condition Message="!(loc.OsXPSP3)">(Not (VersionNT = 501)) Or (ServicePackLevel &gt;= 3)</Condition>
<Condition Message="!(loc.OsVistaSP2)">(Not (VersionNT = 600)) Or (ServicePackLevel &gt;= 2)</Condition>
<Condition Message="!(loc.CMNotSelected)">USELEASH Or USENETIDMGR</Condition>
<Condition Message="!(loc.CMDupSelected)">Not (USELEASH And USENETIDMGR)</Condition>
<Launch Condition="Privileged" Message="!(loc.AdminRequired)" />
<Launch Condition="VersionNT &gt;= 501" Message="!(loc.OsVersionRequired)" />
<Launch Condition="(Not (VersionNT = 501)) Or (ServicePackLevel &gt;= 3)" Message="!(loc.OsXPSP3)" />
<Launch Condition="(Not (VersionNT = 600)) Or (ServicePackLevel &gt;= 2)" Message="!(loc.OsVistaSP2)" />
<Launch Condition="USELEASH Or USENETIDMGR" Message="!(loc.CMNotSelected)" />
<Launch Condition="Not (USELEASH And USENETIDMGR)" Message="!(loc.CMDupSelected)" />
<?if $(sys.BUILDARCH) = "x64" ?>
<Condition Message="!(loc.StrPlatform64)">
<![CDATA[VersionNT64]]>
</Condition>
<Launch Condition="VersionNT64" Message="!(loc.StrPlatform64)" />
<?endif?>

<!-- Custom actions -->
<Binary Id="binCustom" SourceFile="custom\custom.dll" />

<CustomAction
Id="EnableTgtSessionKey"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="EnableAllowTgtSessionKey"
Execute="deferred"
Impersonate="no"
Expand All @@ -84,7 +75,7 @@

<CustomAction
Id="RevertTgtSessionKey"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="RevertAllowTgtSessionKey"
Execute="deferred"
Impersonate="no"
Expand All @@ -93,7 +84,7 @@

<CustomAction
Id="RollbackTgtSessionKey"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="RevertAllowTgtSessionKey"
Execute="rollback"
Impersonate="no"
Expand All @@ -102,7 +93,7 @@

<CustomAction
Id="RemoveNsisInstallation"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="UninstallNsisInstallation"
Execute="immediate" />

Expand All @@ -118,28 +109,28 @@

<CustomAction
Id="ListRunningProcesses"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="ListRunningProcesses"
Execute="immediate"
Return="ignore" />

<CustomAction
Id="KillRunningProcesses"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="KillRunningProcesses"
Execute="immediate"
Return="ignore" />

<CustomAction
Id="InstallNetProvider"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="InstallNetProvider"
Impersonate="no"
Execute="deferred" />

<CustomAction
Id="RemoveNetProvider"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="UninstallNetProvider"
Impersonate="no"
Return="ignore"
Expand All @@ -149,17 +140,18 @@
Property="RenameKrb5Ini"
Value="&quot;cmd.exe&quot; /c rename &quot;[WindowsFolder]\krb5.ini&quot; krb5-ini-pre-kfw4"
Execute="immediate" />

<CustomAction
Id="RenameKrb5Ini"
BinaryKey="WixCA"
DllEntry="CAQuietExec"
BinaryRef="Wix4UtilCA_X86"
DllEntry="WixQuietExec"
Execute="deferred"
Impersonate="no"
Return="ignore" />

<CustomAction
Id="RollbackNetProvider"
BinaryKey="binCustom"
BinaryRef="binCustom"
DllEntry="UninstallNetProvider"
Return="ignore"
Execute="rollback" />
Expand All @@ -169,20 +161,20 @@
<InstallExecuteSequence>
<Custom Action="ListRunningProcesses" Before="KillRunningProcesses" />
<Custom Action="KillRunningProcesses" Before="InstallValidate"/>
<RemoveExistingProducts After="InstallValidate">(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW Or UPGRADEKFW64)</RemoveExistingProducts>
<RemoveExistingProducts After="InstallValidate" Condition="(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW Or UPGRADEKFW64)" />
<Custom Action="RenameKrb5Ini_Cmd" Before="RenameKrb5Ini"/>
<Custom Action="RenameKrb5Ini" Before="InstallFinalize">SYSTEMKRB5INI &lt;&gt; ""</Custom>
<Custom Action="RenameKrb5Ini" Before="InstallFinalize" Condition="SYSTEMKRB5INI &lt;&gt; &quot;&quot;" />
<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)</Custom>
<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS &lt;&gt; "" And UILevel &gt;= 4</Custom>
<Custom Action="AbortCantRemoveNSIS" Before="CostInitialize">UPGRADENSIS &lt;&gt; "" And UILevel &lt; 4</Custom>
<Custom Action="RollbackTgtSessionKey" After="WriteRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
<Custom Action="EnableTgtSessionKey" After="RollbackTgtSessionKey">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
<Custom Action="RevertTgtSessionKey" Before="RemoveRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=2</Custom>
<Custom Action="AbortNoIE" Before="RemoveNsisInstallation" Condition="UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)" />
<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS" Condition="UPGRADENSIS &lt;&gt; &quot;&quot; And UILevel &gt;= 4" />
<Custom Action="AbortCantRemoveNSIS" Before="CostInitialize" Condition="UPGRADENSIS &lt;&gt; &quot;&quot; And UILevel &lt; 4" />
<Custom Action="RollbackTgtSessionKey" After="WriteRegistryValues" Condition="VersionNT &gt;= 500 And &amp;feaKfwClient=3" />
<Custom Action="EnableTgtSessionKey" After="RollbackTgtSessionKey" Condition="VersionNT &gt;= 500 And &amp;feaKfwClient=3" />
<Custom Action="RevertTgtSessionKey" Before="RemoveRegistryValues" Condition="VersionNT &gt;= 500 And &amp;feaKfwClient=2" />

<Custom Action="RollbackNetProvider" After="EnableTgtSessionKey">&amp;feaKfwClient=3</Custom>
<Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaKfwClient=3</Custom>
<Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaKfwClient=2</Custom>
<Custom Action="RollbackNetProvider" After="EnableTgtSessionKey" Condition="&amp;feaKfwClient=3" />
<Custom Action="InstallNetProvider" After="RollbackNetProvider" Condition="&amp;feaKfwClient=3" />
<Custom Action="RemoveNetProvider" After="InstallNetProvider" Condition="&amp;feaKfwClient=2" />
<ScheduleReboot After="InstallFinalize" />
</InstallExecuteSequence>

Expand Down Expand Up @@ -223,61 +215,61 @@
<Column Id="Desc" Nullable="yes" Type="string" Width="255" />

<Row>
<Data Column="Id">kpLeash</Data>
<Data Column="Image">leash32.exe</Data>
<Data Column="Desc">Leash Ticket Manager</Data>
<Data Column="Id" Value="kpLeash" />
<Data Column="Image" Value="leash32.exe" />
<Data Column="Desc" Value="Leash Ticket Manager" />
</Row>
<Row>
<Data Column="Id">kpNetIDMgr</Data>
<Data Column="Image">netidmgr.exe</Data>
<Data Column="Desc">Network Identity Manager</Data>
<Data Column="Id" Value="kpNetIDMgr" />
<Data Column="Image" Value="netidmgr.exe" />
<Data Column="Desc" Value="Network Identity Manager" />
</Row>
<Row>
<Data Column="Id">kpKrbcc</Data>
<Data Column="Image">krbcc32s.exe</Data>
<Data Column="Desc">Kerberos Credential Cache</Data>
<Data Column="Id" Value="kpKrbcc" />
<Data Column="Image" Value="krbcc32s.exe" />
<Data Column="Desc" Value="Kerberos Credential Cache" />
</Row>
<Row>
<Data Column="Id">kpKrbcc64</Data>
<Data Column="Image">krbcc64s.exe</Data>
<Data Column="Desc">Kerberos Credential Cache</Data>
<Data Column="Id" Value="kpKrbcc64" />
<Data Column="Image" Value="krbcc64s.exe" />
<Data Column="Desc" Value="Kerberos Credential Cache" />
</Row>
<Row>
<Data Column="Id">kpK95</Data>
<Data Column="Image">k95.exe</Data>
<Data Column="Desc">Kermit 95</Data>
<Data Column="Id" Value="kpK95" />
<Data Column="Image" Value="k95.exe" />
<Data Column="Desc" Value="Kermit 95" />
</Row>
<Row>
<Data Column="Id">kpK95g</Data>
<Data Column="Image">k95g.exe</Data>
<Data Column="Desc">Kermit 95 GUI</Data>
<Data Column="Id" Value="kpK95g" />
<Data Column="Image" Value="k95g.exe" />
<Data Column="Desc" Value="Kermit 95 GUI" />
</Row>
<Row>
<Data Column="Id">kpkrb5</Data>
<Data Column="Image">krb5.exe</Data>
<Data Column="Desc">Kerberos Client</Data>
<Data Column="Id" Value="kpkrb5" />
<Data Column="Image" Value="krb5.exe" />
<Data Column="Desc" Value="Kerberos Client" />
</Row>
<Row>
<Data Column="Id">kpgss</Data>
<Data Column="Image">gss.exe</Data>
<Data Column="Desc">GSSAPI Test Client</Data>
<Data Column="Id" Value="kpgss" />
<Data Column="Image" Value="gss.exe" />
<Data Column="Desc" Value="GSSAPI Test Client" />
</Row>
<Row>
<Data Column="Id">kpafscreds</Data>
<Data Column="Image">afscreds.exe</Data>
<Data Column="Desc">AFS Credentials Manager</Data>
<Data Column="Id" Value="kpafscreds" />
<Data Column="Image" Value="afscreds.exe" />
<Data Column="Desc" Value="AFS Credentials Manager" />
</Row>
<Row>
<Data Column="Id">kccapiserver</Data>
<Data Column="Image">ccapiserver.exe</Data>
<Data Column="Desc">Credentials Cache API Server</Data>
<Data Column="Id" Value="kccapiserver" />
<Data Column="Image" Value="ccapiserver.exe" />
<Data Column="Desc" Value="Credentials Cache API Server" />
</Row>
<Row>
<Data Column="Id">kMITKerberos</Data>
<Data Column="Image">MIT Kerberos.exe</Data>
<Data Column="Desc">MIT Kerberos Ticket Manager</Data>
<Data Column="Id" Value="kMITKerberos" />
<Data Column="Image" Value="MIT Kerberos.exe" />
<Data Column="Desc" Value="MIT Kerberos Ticket Manager" />
</Row>
</CustomTable>
</Product>
</Package>
</Wix>

0 comments on commit 892f497

Please sign in to comment.