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

More fixes

This commit is contained in:
Tomas Groth 2019-04-10 20:36:12 +02:00
parent b3d31418ff
commit 85ead230a4
2 changed files with 19 additions and 10 deletions

View File

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
############################################################################### ###############################################################################
# OpenLP - Open Source Lyrics Projection # # OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# Copyright (c) 2004-2016 OpenLP Developers # # Copyright (c) OpenLP Developers #
# --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it # # This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free # # under the terms of the GNU General Public License as published by the Free #
@ -36,6 +36,10 @@ PyEnchant
This script expects the precompiled, installable version of PyEnchant to be This script expects the precompiled, installable version of PyEnchant to be
installed. You can find this on the PyEnchant site. installed. You can find this on the PyEnchant site.
WiX Toolset
The toolset should be installed into "C:\\%PROGRAMFILES%\\WiX Toolset v3.11"
or similar.
Sphinx Sphinx
This is used to build the documentation. The documentation trunk must be at This is used to build the documentation. The documentation trunk must be at
the same directory level as OpenLP trunk and named "documentation". the same directory level as OpenLP trunk and named "documentation".
@ -148,9 +152,9 @@ class WindowsBuilder(Builder):
parent_dir['__dir__'].append(element) parent_dir['__dir__'].append(element)
for fname in files: for fname in files:
source = os.path.join(path, fname) if path else fname source = os.path.join(path, fname) if path else fname
source = source.replace('-', '_').replace(os.sep, '_') source_id = source.replace('-', '_').replace(os.sep, '_')
file_id = 'file_{source}'.format(source=source) file_id = 'file_{source_id}'.format(source_id=source_id)
component_id = 'cmp_{source}'.format(source=source) component_id = 'cmp_{source_id}'.format(source_id=source_id)
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='*')
element.append(component) element.append(component)
@ -171,8 +175,9 @@ class WindowsBuilder(Builder):
with open(os.path.join(config_dir, 'OpenLP-base.wxs'), 'rt') as base_file: with open(os.path.join(config_dir, 'OpenLP-base.wxs'), 'rt') as base_file:
xml = base_file.read() xml = base_file.read()
xml = xml % dict(dialog=os.path.join(config_dir, 'WizardMain.bmp'), xml = xml % dict(dialog=os.path.join(config_dir, 'WizardMain.bmp'),
banner=os.path.join(config_dir, 'WizardBanner.bmp')) banner=os.path.join(config_dir, 'WizardBanner.bmp'),
tree = fromstring(xml) platform=self.arch)
tree = fromstring(xml.encode('utf8'))
self._print_verbose('Creating XML fragments from files and directories') self._print_verbose('Creating XML fragments from files and directories')
fragments = self._get_fragments_from_files(self.dist_path) fragments = self._get_fragments_from_files(self.dist_path)
self._print_verbose('Inserting XML fragments into base WiX file') self._print_verbose('Inserting XML fragments into base WiX file')

View File

@ -5,7 +5,7 @@
UpgradeCode="{8C5881AC-8F1E-4937-BB99-B823FABF18F0}" Language="1033" Codepage="1252" Version="2.5.0"> UpgradeCode="{8C5881AC-8F1E-4937-BB99-B823FABF18F0}" Language="1033" Codepage="1252" Version="2.5.0">
<Package Id="*" Keywords="Installer" Description="Free open source church worship presentation software" <Package Id="*" Keywords="Installer" Description="Free open source church worship presentation software"
Comments="OpenLP is open source under the GNU General Public License" Manufacturer="OpenLP Developers" Comments="OpenLP is open source under the GNU General Public License" Manufacturer="OpenLP Developers"
InstallerVersion="251" Languages="1033" Compressed="yes" SummaryCodepage="1252"/> InstallerVersion="251" Languages="1033" Compressed="yes" SummaryCodepage="1252" Platform="%(platform)s"/>
<Condition Message="You need to be an administrator to install this product.">Privileged</Condition> <Condition Message="You need to be an administrator to install this product.">Privileged</Condition>
<Media Id="1" Cabinet="openlp.cab" EmbedCab="yes"/> <Media Id="1" Cabinet="openlp.cab" EmbedCab="yes"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
@ -24,8 +24,12 @@
<WixVariable Id="WixUIDialogBmp" Value="%(dialog)s" /> <WixVariable Id="WixUIDialogBmp" Value="%(dialog)s" />
<WixVariable Id="WixUIBannerBmp" Value="%(banner)s" /> <WixVariable Id="WixUIBannerBmp" Value="%(banner)s" />
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder"> <?if "%(platform)s"="x64"?>
<Directory Id="INSTALLDIR" Name="OpenLP"/> <Directory Id="ProgramFiles64Folder">
<?else?>
<Directory Id="ProgramFilesFolder">
<?endif?>
<Directory Id="INSTALLDIR" Name="OpenLP"/>
</Directory> </Directory>
<Directory Id="ProgramMenuFolder" Name="Programs"> <Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="OpenLP"> <Directory Id="ProgramMenuDir" Name="OpenLP">