SEBWIN-300: Extended setup to use file version as product version and added setup artifact to CI build.

This commit is contained in:
dbuechel 2019-07-26 12:58:07 +02:00
parent 0f639aa550
commit 18352bb4c8
4 changed files with 27 additions and 7 deletions

View file

@ -0,0 +1,16 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="wix:File[substring(@Source, string-length(@Source) - string-length('SafeExamBrowser.exe') + 1) = 'SafeExamBrowser.exe']">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
<xsl:attribute name="Id">
<xsl:text>MainExecutable</xsl:text>
</xsl:attribute>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Safe Exam Browser" Language="1033" Codepage="1252" Version="3.0.0" Manufacturer="ETH Zürich" UpgradeCode="97A8B13E-48FB-4BE1-A7C2-DD1863F95CCB"> <Product Name="Safe Exam Browser" Manufacturer="ETH Zürich" Language="1033" Codepage="1252"
Id="*" Version="!(bind.fileVersion.MainExecutable)" UpgradeCode="97A8B13E-48FB-4BE1-A7C2-DD1863F95CCB">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="yes" /> <MediaTemplate EmbedCab="yes" />
<UIRef Id="WixUI_Minimal" /> <UIRef Id="WixUI_Minimal" />

View file

@ -61,6 +61,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Components\Application.xslt" />
<Content Include="Resources\License.rtf" /> <Content Include="Resources\License.rtf" />
<Content Include="Resources\SafeExamBrowser.ico" /> <Content Include="Resources\SafeExamBrowser.ico" />
</ItemGroup> </ItemGroup>
@ -70,11 +71,10 @@
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" /> <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target> </Target>
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.Runtime\bin\$(PlatformName)\$(ConfigurationName)" -nologo -gg -g1 -srd -cg ApplicationComponents -dr ApplicationDirectory -sfrag -var var.SafeExamBrowser.Runtime.TargetDir -out $(ProjectDir)Components\Application.wxs</PreBuildEvent> <PreBuildEvent>"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.Runtime\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -srd -cg ApplicationComponents -dr ApplicationDirectory -sfrag -var var.SafeExamBrowser.Runtime.TargetDir -out $(ProjectDir)Components\Application.wxs -t $(ProjectDir)Components\Application.xslt</PreBuildEvent>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>cd $(SolutionDir) <PostBuildEvent>git -C $(SolutionDir) checkout -- Setup/Components/Application.wxs</PostBuildEvent>
git checkout -- Setup/Components/Application.wxs</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<!-- <!--
To modify your build process, add your task inside one of the targets below and uncomment it. To modify your build process, add your task inside one of the targets below and uncomment it.

View file

@ -28,11 +28,14 @@ after_test:
- codecov -f "coverage.xml" - codecov -f "coverage.xml"
artifacts: artifacts:
- path: SafeExamBrowser.Runtime\bin\$(platform)\$(configuration) - path: SafeExamBrowser.Runtime\bin\$(platform)\$(configuration)
name: '$(appveyor_build_version)_Application' name: 'SEB_$(appveyor_build_version)_Application'
type: zip type: zip
- path: SafeExamBrowser.ResetUtility\bin\$(platform)\$(configuration) - path: SafeExamBrowser.ResetUtility\bin\$(platform)\$(configuration)
name: '$(appveyor_build_version)_Reset' name: 'SEB_$(appveyor_build_version)_Reset'
type: zip type: zip
- path: SafeExamBrowser.Service\bin\$(platform)\$(configuration) - path: SafeExamBrowser.Service\bin\$(platform)\$(configuration)
name: '$(appveyor_build_version)_Service' name: 'SEB_$(appveyor_build_version)_Service'
type: zip type: zip
- path: SafeExamBrowser.Setup\bin\$(configuration)\Setup.msi
name: 'SEB_$(appveyor_build_version)_Setup'
type: file