1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 13:02:50 +00:00

Add Firewall exception to Windows installer

This commit is contained in:
Raoul Snyman 2019-04-25 14:10:53 -07:00
parent 51f0385ba7
commit 19ef167ca9
2 changed files with 17 additions and 3 deletions

View File

@ -157,11 +157,24 @@ class WindowsBuilder(Builder):
file_id = 'file_{source_id}'.format(source_id=source_id) file_id = 'file_{source_id}'.format(source_id=source_id)
component_id = 'cmp_{source_id}'.format(source_id=source_id) component_id = 'cmp_{source_id}'.format(source_id=source_id)
if self.arch == 'x64': if self.arch == 'x64':
file_ = E.File(Id=file_id, KeyPath="yes", Source=source, ProcessorArchitecture='x64') file_ = E.File(Id=file_id, KeyPath='yes', Source=source, ProcessorArchitecture='x64')
component = E.Component(file_, Id=component_id, Guid='*', Win64='yes') component = E.Component(file_, Id=component_id, Guid='*', Win64='yes')
else: else:
file_ = E.File(Id=file_id, KeyPath="yes", Source=source) file_ = E.File(Id=file_id, KeyPath='yes', Source=source)
component = E.Component(file_, Id=component_id, Guid='*') component = E.Component(file_, Id=component_id, Guid='*')
if 'OpenLP.exe' in source:
description = 'Firewall exception for OpenLP\'s remote interface (UDP)'
program = '[#file_e368869eb54b01e2288a3359b1cf51f8]'
namespace = 'http://schemas.microsoft.com/wix/FirewallExtension'
nsmap = {'fx': namespace}
component.append(E.FirewallException(Id='1797D56F-0AD4-81A6-6011-F8AE0B7CFB4F', Name='OpenLP',
Description=description, IgnoreFailure='yes',
Program=program, Protocol='tcp', Scope='any',
namespace=namespace, nsmap=nsmap))
component.append(E.FirewallException(Id='183115E6-A080-964D-4A4F-43880083F189', Name='OpenLP',
Description=description, IgnoreFailure='yes',
Program=program, Protocol='udp', Scope='any',
namespace=namespace, nsmap=nsmap))
element.append(component) element.append(component)
components.append(component) components.append(component)

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"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
<?define ProductName="OpenLP"?> <?define ProductName="OpenLP"?>
<?define ProductCode="*"?> <?define ProductCode="*"?>
<?define ProductVersion="%(version)s"?> <?define ProductVersion="%(version)s"?>