You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
7.6 KiB
137 lines
7.6 KiB
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
|
<Package Name="Housing" Manufacturer="Housing" Version="$(var.ProductVersion)"
|
|
UpgradeCode="{FD4F1ED8-73C1-42EF-8A8D-1C0F424D8CC3}" Scope="perUser">
|
|
<MajorUpgrade DowngradeErrorMessage="A newer version of Housing is already installed." />
|
|
<MediaTemplate EmbedCab="yes" />
|
|
<Icon Id="HousingIcon.exe" SourceFile="$(var.PublishDir)\Housing.exe" />
|
|
|
|
<!-- AppSearch runs before costing: keep existing desktop settings, otherwise
|
|
copy the previous installation's settings instead of installing defaults. -->
|
|
<Property Id="DESKTOP_HARDWARE">
|
|
<DirectorySearch Id="FindDesktopHardwareDirectory" Path="[DesktopFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindDesktopHardware" Name="Hardware.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="LEGACY_HARDWARE">
|
|
<DirectorySearch Id="FindLegacyHardwareDirectory" Path="[LocalAppDataFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindLegacyHardware" Name="Hardware.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="DESKTOP_DATABASE">
|
|
<DirectorySearch Id="FindDesktopDatabaseDirectory" Path="[DesktopFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindDesktopDatabase" Name="Database.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="LEGACY_DATABASE">
|
|
<DirectorySearch Id="FindLegacyDatabaseDirectory" Path="[LocalAppDataFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindLegacyDatabase" Name="Database.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="DESKTOP_INSPECTIONSETTINGS">
|
|
<DirectorySearch Id="FindDesktopInspectionSettingsDirectory" Path="[DesktopFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindDesktopInspectionSettings" Name="InspectionSettings.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="LEGACY_INSPECTIONSETTINGS">
|
|
<DirectorySearch Id="FindLegacyInspectionSettingsDirectory" Path="[LocalAppDataFolder]Housing" Depth="0">
|
|
<FileSearch Id="FindLegacyInspectionSettings" Name="InspectionSettings.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<Property Id="LEGACY_SAVED_INSPECTION">
|
|
<DirectorySearch Id="FindSavedInspectionDirectory" Path="[LocalAppDataFolder]AMO Housing" Depth="0">
|
|
<FileSearch Id="FindSavedInspection" Name="InspectionSettings.ini" />
|
|
</DirectorySearch>
|
|
</Property>
|
|
<SetProperty Id="LEGACY_INSPECTIONSETTINGS" Value="[LEGACY_SAVED_INSPECTION]"
|
|
After="AppSearch" Sequence="both" Condition="LEGACY_SAVED_INSPECTION" />
|
|
|
|
<StandardDirectory Id="LocalAppDataFolder">
|
|
<Directory Id="INSTALLFOLDER" Name="Housing">
|
|
<Component Id="AppExecutable" Guid="*">
|
|
<File Id="HousingExe" Source="$(var.PublishDir)\Housing.exe" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="LoginOptions" Guid="*" Permanent="yes" NeverOverwrite="yes">
|
|
<File Source="$(var.PublishDir)\LoginOptions.json" KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
</StandardDirectory>
|
|
|
|
<StandardDirectory Id="DesktopFolder">
|
|
<Component Id="DesktopShortcut" Guid="*">
|
|
<Shortcut Id="HousingDesktopShortcut" Name="Housing" Target="[INSTALLFOLDER]Housing.exe"
|
|
WorkingDirectory="INSTALLFOLDER" Icon="HousingIcon.exe" IconIndex="0" />
|
|
<RegistryValue Root="HKCU" Key="Software\Housing\Installer" Name="DesktopShortcutInstalled"
|
|
Type="integer" Value="1" KeyPath="yes" />
|
|
</Component>
|
|
<Directory Id="DESKTOPSETTINGSFOLDER" Name="Housing">
|
|
<!-- Settings survive upgrade, repair and uninstall. -->
|
|
<Component Id="DesktopHardwareSettings" Guid="*" Permanent="yes" NeverOverwrite="yes"
|
|
Condition="NOT LEGACY_HARDWARE">
|
|
<File Id="DesktopHardwareIni" Source="$(var.PublishDir)\Hardware.ini" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="MigrateHardwareSettings" Guid="*" Permanent="yes" Transitive="yes"
|
|
Condition="LEGACY_HARDWARE AND NOT DESKTOP_HARDWARE">
|
|
<CreateFolder />
|
|
<CopyFile Id="CopyLegacyHardware" SourceProperty="LEGACY_HARDWARE"
|
|
DestinationDirectory="DESKTOPSETTINGSFOLDER" DestinationName="Hardware.ini" />
|
|
<RegistryValue Root="HKCU" Key="Software\Housing\Installer" Name="MigratedHardware"
|
|
Type="integer" Value="1" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="DesktopDatabaseSettings" Guid="*" Permanent="yes" NeverOverwrite="yes"
|
|
Condition="NOT LEGACY_DATABASE">
|
|
<File Id="DesktopDatabaseIni" Source="$(var.PublishDir)\Database.ini" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="MigrateDatabaseSettings" Guid="*" Permanent="yes" Transitive="yes"
|
|
Condition="LEGACY_DATABASE AND NOT DESKTOP_DATABASE">
|
|
<CreateFolder />
|
|
<CopyFile Id="CopyLegacyDatabase" SourceProperty="LEGACY_DATABASE"
|
|
DestinationDirectory="DESKTOPSETTINGSFOLDER" DestinationName="Database.ini" />
|
|
<RegistryValue Root="HKCU" Key="Software\Housing\Installer" Name="MigratedDatabase"
|
|
Type="integer" Value="1" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="DesktopInspectionSettingsSettings" Guid="*" Permanent="yes" NeverOverwrite="yes"
|
|
Condition="NOT LEGACY_INSPECTIONSETTINGS">
|
|
<File Id="DesktopInspectionSettingsIni" Source="$(var.PublishDir)\InspectionSettings.ini" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="MigrateInspectionSettingsSettings" Guid="*" Permanent="yes" Transitive="yes"
|
|
Condition="LEGACY_INSPECTIONSETTINGS AND NOT DESKTOP_INSPECTIONSETTINGS">
|
|
<CreateFolder />
|
|
<CopyFile Id="CopyLegacyInspectionSettings" SourceProperty="LEGACY_INSPECTIONSETTINGS"
|
|
DestinationDirectory="DESKTOPSETTINGSFOLDER" DestinationName="InspectionSettings.ini" />
|
|
<RegistryValue Root="HKCU" Key="Software\Housing\Installer" Name="MigratedInspectionSettings"
|
|
Type="integer" Value="1" KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
</StandardDirectory>
|
|
|
|
<StandardDirectory Id="ProgramMenuFolder">
|
|
<Directory Id="HousingProgramMenu" Name="Housing">
|
|
<Component Id="StartMenuShortcut" Guid="*">
|
|
<Shortcut Id="HousingShortcut" Name="Housing" Target="[INSTALLFOLDER]Housing.exe"
|
|
WorkingDirectory="INSTALLFOLDER" Icon="HousingIcon.exe" IconIndex="0" />
|
|
<RemoveFolder Id="RemoveHousingProgramMenu" On="uninstall" />
|
|
<RegistryValue Root="HKCU" Key="Software\Housing\Installer" Name="ShortcutInstalled"
|
|
Type="integer" Value="1" KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
</StandardDirectory>
|
|
|
|
<Feature Id="Main" Title="Housing" Level="1">
|
|
<Files Directory="INSTALLFOLDER" Include="$(var.PublishDir)\**">
|
|
<Exclude Files="$(var.PublishDir)\Housing.exe" />
|
|
<Exclude Files="$(var.PublishDir)\Hardware.ini" />
|
|
<Exclude Files="$(var.PublishDir)\Database.ini" />
|
|
<Exclude Files="$(var.PublishDir)\InspectionSettings.ini" />
|
|
<Exclude Files="$(var.PublishDir)\LoginOptions.json" />
|
|
</Files>
|
|
<ComponentRef Id="AppExecutable" />
|
|
<?foreach Setting in Hardware;Database;InspectionSettings ?>
|
|
<ComponentRef Id="Desktop$(var.Setting)Settings" />
|
|
<ComponentRef Id="Migrate$(var.Setting)Settings" />
|
|
<?endforeach ?>
|
|
<ComponentRef Id="LoginOptions" />
|
|
<ComponentRef Id="StartMenuShortcut" />
|
|
<ComponentRef Id="DesktopShortcut" />
|
|
</Feature>
|
|
</Package>
|
|
</Wix>
|
|
|