Fix MSI installer not setting houses read-only

This commit is contained in:
elasota
2020-05-11 05:35:29 -04:00
parent 931d7e0f30
commit 35308e41f3
3 changed files with 37 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:template match="wix:File">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:attribute name="ReadOnly">
<xsl:text>yes</xsl:text>
</xsl:attribute>
<xsl:apply-templates select="*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="* | text()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@* | text()">
<xsl:copy />
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>

View File

@@ -31,9 +31,10 @@
</Directory>
</Directory>
<DirectoryRef Id="AEROFOILPRODUCTDIR">
<Component Id="Aerofoil.exe" Guid="*">
<File Id="Aerofoil.exe" Source="$(var.Aerofoil.TargetPath)" KeyPath="yes" Checksum="yes"/>
<File Id="Aerofoil.exe" Source="$(var.Aerofoil.TargetPath)" KeyPath="yes" Checksum="yes" />
</Component>
<Component Id="FreeType.dll" Guid="*">
<File Id="FreeType.dll" Source="$(var.FreeType.TargetPath)" KeyPath="yes" Checksum="yes"/>
@@ -108,7 +109,7 @@
</Component>
</DirectoryRef>
<Feature Id="AerofoilApplication" Title="Glider PRO Game Data" Level="1" Display="expand">
<Feature Id="AerofoilApplication" Title="Glider PRO Game Data" Level="1" Display="expand" ConfigurableDirectory="AEROFOILPRODUCTDIR">
<ComponentRef Id="Aerofoil.exe" />
<ComponentRef Id="FreeType.dll" />
<ComponentRef Id="GpApp.dll" />
@@ -140,7 +141,6 @@
<Feature Id="HousePack1Feature" Title="Additional Houses" Level="1">
<ComponentGroupRef Id="HousePack1ComponentGroup" />
</Feature>
</Feature>
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\LICENSE.rtf"/>
@@ -153,8 +153,6 @@
<MergeRef Id="VCRedist" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="AEROFOILPRODUCTDIR" />
<UI>
<UIRef Id="WixUI_Mondo" />
<Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>

View File

@@ -188,6 +188,7 @@ PackagedDataDir=$(SolutionDir)\Packaged;
<ComponentGroupName>DefaultHousesComponentGroup</ComponentGroupName>
<AutogenerateGuids>true</AutogenerateGuids>
<PreprocessorVariable>var.HousesDataDir</PreprocessorVariable>
<Transforms>AddReadOnlyFlag.xslt</Transforms>
</HarvestDirectory>
<HarvestDirectory Include="$(SolutionDir)\InstallerPackages\HousePack1">
<DirectoryRefId>AEROFOILHOUSESDIR</DirectoryRefId>
@@ -197,6 +198,7 @@ PackagedDataDir=$(SolutionDir)\Packaged;
<ComponentGroupName>HousePack1ComponentGroup</ComponentGroupName>
<AutogenerateGuids>true</AutogenerateGuids>
<PreprocessorVariable>var.HousesDataDir</PreprocessorVariable>
<Transforms>AddReadOnlyFlag.xslt</Transforms>
</HarvestDirectory>
<HarvestDirectory Include="$(SolutionDir)\InstallerPackages\LooseDocumentation">
<DirectoryRefId>AEROFOILDOCUMENTATIONDIR</DirectoryRefId>