Windows: Installer support for legacy configuration files

This commit is contained in:
Asanka C. Herath
2010-11-01 16:55:24 -04:00
parent c0b62e3204
commit d230cb454d

View File

@@ -172,7 +172,12 @@
Permanent='yes' NeverOverwrite='yes'>
<File Name='krb5.conf' KeyPath='yes' Id='krb5_conf' />
<Environment Id='KRB5_CONFIG_by_krb5.conf' Name='KRB5_CONFIG' Action='set' System='yes' Value='[#krb5_conf]' />
<Condition>Not LEGACYKRB5INI And Not LEGACYKRB5CONF</Condition>
<!-- Backwards compatibility -->
<RegistryKey Action='createAndRemoveOnUninstall' Root='HKLM'
Key='Software\MIT\Kerberos'>
<RegistryValue Name='config' Type='string' Value='[#krb_conf]' />
</RegistryKey>
<Condition>Not LEGACYKRB5INI And Not LEGACYKRB5CONF And Not LEGACYKRB5REG32 And Not LEGACYKRB5REG64</Condition>
</Component>
<Component Id='comp.krb5.ini.move'
@@ -181,10 +186,18 @@
DestinationDirectory='dirCommonKerberos'
DestinationName='krb5.conf' DestinationShortName='krb5.cnf'
SourceProperty='LEGACYKRB5INI' />
<Environment Id='KRB5_CONFIG_by_legacy_krb5.ini' Name='KRB5_CONFIG' Action='set' System='yes' Value='[dirCommonKerberos]krb5.conf' />
<Environment Id='KRB5_CONFIG_by_legacy_krb5.ini' Name='KRB5_CONFIG'
Action='set' System='yes' Value='[dirCommonKerberos]krb5.conf' />
<RegistryKey Action='createAndRemoveOnUninstall' Root='HKLM'
Key='Software\Heimdal\CurrentVersion'>
<RegistryValue Name='LegacyKrb5IniLocation' Type='string' Value='[LEGACYKRB5INI]' KeyPath='yes' />
<RegistryValue Name='LegacyKrb5IniLocation' Type='string'
Value='[LEGACYKRB5INI]' KeyPath='yes' />
</RegistryKey>
<!-- Backwards compatibility -->
<RegistryKey Action='createAndRemoveOnUninstall' Root='HKLM'
Key='Software\MIT\Kerberos'>
<RegistryValue Name='config' Type='string'
Value='[dirCommonKerberos]krb5.conf' />
</RegistryKey>
<Condition>LEGACYKRB5INI</Condition>
</Component>
@@ -195,10 +208,18 @@
DestinationDirectory='dirCommonKerberos'
DestinationName='krb5.conf' DestinationShortName='krb5.cnf'
SourceProperty='LEGACYKRB5CONF' />
<Environment Id='KRB5_CONFIG_by_legacy_krb5.conf' Name='KRB5_CONFIG' Action='set' System='yes' Value='[dirCommonKerberos]krb5.conf' />
<Environment Id='KRB5_CONFIG_by_legacy_krb5.conf' Name='KRB5_CONFIG'
Action='set' System='yes' Value='[dirCommonKerberos]krb5.conf' />
<RegistryKey Action='createAndRemoveOnUninstall' Root='HKLM'
Key='Software\Heimdal\CurrentVersion'>
<RegistryValue Name='LegacyKrb5ConfLocation' Type='string' Value='[LEGACYKRB5CONF]' KeyPath='yes' />
<RegistryValue Name='LegacyKrb5ConfLocation' Type='string'
Value='[LEGACYKRB5CONF]' KeyPath='yes' />
</RegistryKey>
<!-- Backwards compatibility -->
<RegistryKey Action='createAndRemoveOnUninstall' Root='HKLM'
Key='Software\MIT\Kerberos'>
<RegistryValue Name='config' Type='string'
Value='[dirCommonKerberos]krb5.conf' />
</RegistryKey>
<Condition>LEGACYKRB5CONF</Condition>
</Component>
@@ -220,6 +241,7 @@
</Upgrade>
<!-- Search for existing configuration files -->
<Property Id='LEGACYKRB5INI' Secure='yes'>
<DirectorySearch Id='dirSearchKrb5Ini' Depth='1' Path='[WindowsFolder]'>
<FileSearch Name='krb5.ini' />
@@ -232,6 +254,22 @@
</DirectorySearch>
</Property>
<Property Id='LEGACYKRB5REG32' Secure='yes'>
<RegistrySearch Id='regSearchKrb5ConfUser' Key='Software\MIT\Kerberos' Name='config'
Root='HKLM' Type='file' Win64='no'>
<FileSearch Name='krb5.ini' />
</RegistrySearch>
</Property>
<?if $(var.Platform)=x64 ?>
<Property Id='LEGACYKRB5REG64' Secure='yes'>
<RegistrySearch Id='regSearchKrb5ConfMach' Key='Software\MIT\Kerberos' Name='config'
Root='HKLM' Type='file' Win64='yes'>
<FileSearch Name='krb5.ini' />
</RegistrySearch>
</Property>
<?endif?>
<InstallExecuteSequence>
<RemoveExistingProducts After='InstallFinalize' />
</InstallExecuteSequence>