提交 d5119c48 编写于 作者: N NickMRamirez 提交者: Alexis Campailla

Added firewall exception for Redis service

上级 733dd88d
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
<!--
32-bit installer
......@@ -60,9 +61,10 @@
The following component installs Redis as a Windows service.
-->
<Component Id="cmp_redis_server" Guid="*">
<File Source="$(var.RedisServer.TargetDir)redis-server.exe" />
<File Id="file_redis_server" Source="$(var.RedisServer.TargetDir)redis-server.exe" />
<ServiceInstall Id="redisService" Name="Redis" DisplayName="Redis" Description="This service runs the Redis server" Start="auto" ErrorControl="normal" Type="ownProcess" Arguments="--service-run [CONFIG] --loglevel [LOGLEVEL]" Account="[WIX_ACCOUNT_NETWORKSERVICE]" />
<ServiceControl Id="redisServiceControl" Name="Redis" Start="install" Stop="both" Remove="uninstall" Wait="yes" />
<fw:FirewallException Id="fw_redis_server" Program="[#file_redis_server]" Description="Exception for Redis server" Name="Redis" Scope="any" />
</Component>
<!--
......
......@@ -8,11 +8,9 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Redis-Windows-x64</OutputName>
<OutputType>Package</OutputType>
<WixToolPath>$(MSBuildProjectDirectory)\lib\wix39-binaries\</WixToolPath>
<WixTargetsPath>$(WixToolPath)wix.targets</WixTargetsPath>
<WixTasksPath>$(WixToolPath)WixTasks.dll</WixTasksPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
......@@ -73,6 +71,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixFirewallExtension">
<HintPath>..\..\..\..\..\..\Program Files (x86)\WiX Toolset v3.9\bin\WixFirewallExtension.dll</HintPath>
<Name>WixFirewallExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
......
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
<!--
32-bit installer
......@@ -60,9 +61,10 @@
The following component installs Redis as a Windows service.
-->
<Component Id="cmp_redis_server" Guid="*">
<File Source="$(var.RedisServer.TargetDir)redis-server.exe" />
<File Id="file_redis_server" Source="$(var.RedisServer.TargetDir)redis-server.exe" />
<ServiceInstall Id="redisService" Name="Redis" DisplayName="Redis" Description="This service runs the Redis server" Start="auto" ErrorControl="normal" Type="ownProcess" Arguments="--service-run [CONFIG] --loglevel [LOGLEVEL]" Account="[WIX_ACCOUNT_NETWORKSERVICE]" />
<ServiceControl Id="redisServiceControl" Name="Redis" Start="install" Stop="both" Remove="uninstall" Wait="yes" />
<fw:FirewallException Id="fw_redis_server" Program="[#file_redis_server]" Description="Exception for Redis server" Name="Redis" Scope="any" />
</Component>
<!--
......
......@@ -8,11 +8,9 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Redis-Windows-x86</OutputName>
<OutputType>Package</OutputType>
<WixToolPath>$(MSBuildProjectDirectory)\lib\wix39-binaries\</WixToolPath>
<WixTargetsPath>$(WixToolPath)wix.targets</WixTargetsPath>
<WixTasksPath>$(WixToolPath)WixTasks.dll</WixTasksPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
......@@ -71,6 +69,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixFirewallExtension">
<HintPath>..\..\..\..\..\..\Program Files (x86)\WiX Toolset v3.9\bin\WixFirewallExtension.dll</HintPath>
<Name>WixFirewallExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册