Add file association

This commit is contained in:
Raoul Snyman 2019-04-30 22:23:38 -07:00
parent b4bd034d2f
commit 6dd78d9b40
3 changed files with 15 additions and 1 deletions

View File

@ -102,7 +102,7 @@ from distutils import dir_util
from hashlib import md5
from shutil import copy, move, rmtree
from lxml.etree import fromstring, tostring
from lxml.etree import fromstring, parse, tostring
from lxml.builder import E, ElementMaker
from builder import Builder
@ -173,6 +173,10 @@ class WindowsBuilder(Builder):
component.append(FxE.FirewallException(Id='OpenLP_UDP', Name='OpenLP',
Description=description, IgnoreFailure='yes',
Program=program, Protocol='udp', Scope='any'))
# Add the file association XML
with open(os.path.join(self.config_dir, 'file_associations.xml')) as assoc_file:
file_assoc = parse(assoc_file)
component.append(file_assoc.getroot())
element.append(component)
components.append(component)

View File

@ -0,0 +1,10 @@
<ProgId Id="OpenLP.Service" Description="OpenLP Service File" Icon="[APPLICATIONFOLDER]service-file.ico" Advertise="yes">
<Extension Id="osz">
<Verb Id="Open" Command="Open" Argument="&quot;%1&quot;" />
<MIME Advertise="yes" ContentType="application/-x-openlp-service" Default="yes" />
</Extension>
<Extension Id="oszl">
<Verb Id="Open" Command="Open" Argument="&quot;%1&quot;" />
<MIME Advertise="yes" ContentType="application/-x-openlp-service-lite" Default="yes" />
</Extension>
</ProgId>

BIN
windows/service-file.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB