mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-25 11:14:08 +00:00
Add file association
This commit is contained in:
parent
b4bd034d2f
commit
6dd78d9b40
@ -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)
|
||||
|
||||
|
10
windows/file-associations.xml
Normal file
10
windows/file-associations.xml
Normal 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=""%1"" />
|
||||
<MIME Advertise="yes" ContentType="application/-x-openlp-service" Default="yes" />
|
||||
</Extension>
|
||||
<Extension Id="oszl">
|
||||
<Verb Id="Open" Command="Open" Argument=""%1"" />
|
||||
<MIME Advertise="yes" ContentType="application/-x-openlp-service-lite" Default="yes" />
|
||||
</Extension>
|
||||
</ProgId>
|
BIN
windows/service-file.ico
Normal file
BIN
windows/service-file.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user