diff --git a/builders/windows-builder.py b/builders/windows-builder.py index 4f2bce8..80e7df0 100644 --- a/builders/windows-builder.py +++ b/builders/windows-builder.py @@ -157,11 +157,24 @@ class WindowsBuilder(Builder): file_id = 'file_{source_id}'.format(source_id=source_id) component_id = 'cmp_{source_id}'.format(source_id=source_id) 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') 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='*') + 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) components.append(component) diff --git a/windows/OpenLP-base.wxs b/windows/OpenLP-base.wxs index 4633ce6..f8ea96e 100644 --- a/windows/OpenLP-base.wxs +++ b/windows/OpenLP-base.wxs @@ -1,6 +1,7 @@ + xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" + xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">