SEBWIN-300: Added service to installer.
This commit is contained in:
parent
ff0f85d9f9
commit
68f3f352fe
4 changed files with 32 additions and 4 deletions
17
Setup/Components/Service.xslt
Normal file
17
Setup/Components/Service.xslt
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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('Service.exe') + 1) = 'Service.exe']">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
<wix:ServiceInstall DisplayName="Safe Exam Browser Service" Name="SafeExamBrowser" Account="LocalSystem" ErrorControl="normal" Start="auto"
|
||||
Type="ownProcess" Vital="yes" Interactive="no" Description="Performs operations which require elevated privileges." />
|
||||
<wix:ServiceControl Id="ServiceControl" Name="SafeExamBrowser" Start="install" Stop="uninstall" Remove="uninstall" Wait="yes" />
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -6,7 +6,7 @@
|
|||
<Directory Id="InstallFolder" Name="SafeExamBrowser">
|
||||
<Directory Id="ApplicationDirectory" Name="Application" />
|
||||
<Directory Id="ResetDirectory" Name="Reset" />
|
||||
<!--<Directory Id="ServiceDirectory" Name="Service" />-->
|
||||
<Directory Id="ServiceDirectory" Name="Service" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<Feature Id="ProductFeature" Title="Safe Exam Browser" Level="1">
|
||||
<ComponentGroupRef Id="ApplicationComponents" />
|
||||
<ComponentGroupRef Id="ResetComponents" />
|
||||
<!--<ComponentGroupRef Id="ServiceComponents" />-->
|
||||
<ComponentGroupRef Id="ServiceComponents" />
|
||||
<ComponentRef Id="ShortcutComponent" />
|
||||
</Feature>
|
||||
</Product>
|
||||
|
|
|
@ -67,9 +67,18 @@
|
|||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SafeExamBrowser.Service\SafeExamBrowser.Service.csproj">
|
||||
<Name>SafeExamBrowser.Service</Name>
|
||||
<Project>{fa3c6692-dfed-4afa-bd58-9a3da2753c78}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Components\Application.xslt" />
|
||||
<Content Include="Components\Service.xslt" />
|
||||
<Content Include="Components\Reset.xslt" />
|
||||
<Content Include="Resources\License.rtf" />
|
||||
<Content Include="Resources\Application.ico" />
|
||||
|
@ -82,11 +91,13 @@
|
|||
</Target>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.ResetUtility\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -srd -cg ResetComponents -dr ResetDirectory -sfrag -var var.SafeExamBrowser.ResetUtility.TargetDir -out $(ProjectDir)Components\Reset.wxs -t $(ProjectDir)Components\Reset.xslt
|
||||
"$(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>
|
||||
"$(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
|
||||
"$(WIX)bin\heat.exe" dir "$(SolutionDir)SafeExamBrowser.Service\bin\$(PlatformName)\$(ConfigurationName)" -nologo -ag -g1 -srd -cg ServiceComponents -dr ServiceDirectory -sfrag -var var.SafeExamBrowser.Service.TargetDir -out $(ProjectDir)Components\Service.wxs -t $(ProjectDir)Components\Service.xslt</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>git -C $(SolutionDir) checkout -- Setup/Components/Application.wxs
|
||||
git -C $(SolutionDir) checkout -- Setup/Components/Reset.wxs</PostBuildEvent>
|
||||
git -C $(SolutionDir) checkout -- Setup/Components/Reset.wxs
|
||||
git -C $(SolutionDir) checkout -- Setup/Components/Service.wxs</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
Loading…
Reference in a new issue