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

Removed workaround for fixed PyInstaller issues. Moved mudrawbin option to config.ini.

This commit is contained in:
Tomas Groth 2014-09-02 15:07:50 +02:00
parent d4844ce03b
commit 621fde2f44
4 changed files with 20 additions and 46 deletions

View File

@ -5,6 +5,7 @@ lrelease = lrelease
diskutil = diskutil
hdiutil = hdiutil
osascript = osascript
mudrawbin = /opt/local/bin/mudraw
[paths]
branch = %(projects)s/trunk

View File

@ -34,7 +34,7 @@ Mac OS X Build Script
This script is used to build the Mac OS X app bundle and pack it into dmg file.
For this script to work out of the box, it depends on a number of things:
Python 2.6/2.7
Python 3.3/3.4
PyQt4
You should already have this installed, OpenLP doesn't work without it. The
@ -50,18 +50,9 @@ Sphinx
the same directory level as OpenLP trunk and named "documentation".
PyInstaller
PyInstaller should be a checkout of revision 1355 of trunk, and in a
directory which is configured in the openlp.cfg. The revision is very
important as there is just included a fix for builds on OS X.
To install PyInstaller, first checkout trunk from Subversion. The
easiest way is to do a
svn co http://svn.pyinstaller.org/trunk
Then you need to copy the two hook-*.py files from the "pyinstaller"
subdirectory in OpenLP's "resources" directory into PyInstaller's
"hooks" directory.
PyInstaller should be a git clone of either
https://github.com/matysek/pyinstaller branch python3 or
https://github.com/pyinstaller/pyinstaller branch python3
Bazaar
You need the command line "bzr" client installed.
@ -91,7 +82,7 @@ SQLAlchemy Migrate
MuPDF
Required for PDF support in OpenLP. Install using macports, or use the
'--mudraw-bin' option of this script to point to the mudraw binary.
mudrawbin option in the condif file to point to the mudraw binary.
MachOLib
Python library to analyze and edit Mach-O headers, the executable format
@ -239,8 +230,6 @@ class MacosxBuilder(object):
parser.add_argument('--transifex-pass', dest='transifex_pass', help='Transifex password.')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
help='Print out additional information.')
parser.add_argument('--mudraw-bin', dest='mudraw_bin', default='/opt/local/bin/mudraw',
help='Path to the mudraw binary.')
self.args = parser.parse_args()
def read_config(self):
@ -269,6 +258,7 @@ class MacosxBuilder(object):
self.diskutil = _which(self.config.get('executables', 'diskutil'))
self.hdiutil = _which(self.config.get('executables', 'hdiutil'))
self.osascript = _which(self.config.get('executables', 'osascript'))
self.mudraw_bin = _which(self.config.get('executables', 'mudrawbin'))
def setup_paths(self):
"""
@ -282,10 +272,6 @@ class MacosxBuilder(object):
self.docs_path = os.path.abspath(self.args.docs)
else:
self.docs_path = self.config.get('paths', 'documentation')
if self.args.mudraw_bin:
self.mudraw_bin = self.args.mudraw_bin
else:
self.mudraw_bin = ''
self.openlp_script = os.path.abspath(os.path.join(self.branch_path, 'openlp.py'))
self.hooks_path = os.path.abspath(os.path.join(self.branch_path, self.config.get('paths', 'hooks')))
self.mac_icon = os.path.abspath(self.config.get('paths', 'macicon'))

View File

@ -8,6 +8,7 @@ psvince = %(here)s\psvince.dll
lrelease = %(sitepackages)s\PyQt4\bin\lrelease.exe
portablelauncher = %(progfiles)s\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe
portableinstaller = %(progfiles)s\PortableApps.comInstaller\PortableApps.comInstaller.exe
mudrawbin = %(here)s\..\mupdf-1.5-windows\mudraw.exe
[paths]
branch = %(projects)s\trunk

View File

@ -34,7 +34,7 @@ Windows Build Script
This script is used to build the Windows binary and the accompanying installer.
For this script to work out of the box, it depends on a number of things:
Python 2.6/2.7
Python 3.3/3.4
PyQt4
You should already have this installed, OpenLP doesn't work without it. The
@ -56,16 +56,9 @@ HTML Help Workshop
This is used to create the help file.
PyInstaller
PyInstaller should be a checkout of revision 1470 of trunk, and in a
directory called, "pyinstaller" on the same level as OpenLP's Bazaar shared
repository directory. The revision is very important as there is currently
a major regression in HEAD.
To install PyInstaller, first checkout trunk from Subversion. The easiest
way is to install TortoiseSVN and then checkout the following URL to a
directory called "pyinstaller"::
http://svn.pyinstaller.org/trunk
PyInstaller should be a git clone of either
https://github.com/matysek/pyinstaller branch python3 or
https://github.com/pyinstaller/pyinstaller branch python3
Bazaar
You need the command line "bzr" client installed.
@ -108,8 +101,8 @@ SQLAlchemy Migrate
MuPDF
Required for PDF support in OpenLP. Download the windows build from
mupdf.com, extract it, and use the '--mudraw-bin' option of this script to
point to mudraw.exe.
mupdf.com, extract it, and set the mudrawbin option in the config file to
point to mudraw.exe
Portable App Builds
The following are required if you are planning to make a portable build of
@ -189,7 +182,6 @@ class WindowsBuilder(object):
help='Do NOT update the language translation files.')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
help='Print out additional information.')
parser.add_argument('--mudraw-bin', dest='mudraw_bin', default=None, help='Path to the mudraw binary.')
self.args = parser.parse_args()
def read_config(self):
@ -227,6 +219,7 @@ class WindowsBuilder(object):
self.psvince = os.path.abspath(self.config.get('executables', 'psvince'))
self.portableinstaller = os.path.abspath(self.config.get('executables', 'portableinstaller'))
self.portablelauncher = os.path.abspath(self.config.get('executables', 'portablelauncher'))
self.mudraw_bin = os.path.abspath(self.config.get('executables', 'mudrawbin'))
if os.path.exists(os.path.join(self.site_packages, 'PyQt4', 'bin')):
# Older versions of the PyQt4 Windows installer put their binaries
# in the "bin" directory
@ -262,10 +255,6 @@ class WindowsBuilder(object):
self.args.portable = self.portable_path
else:
self.portable_path = ''
if self.args.mudraw_bin:
self.mudraw_bin = self.args.mudraw_bin
else:
self.mudraw_bin = ''
self.openlp_script = os.path.abspath(os.path.join(branch_path, 'openlp.py'))
self.hooks_path = os.path.abspath(self.config.get('paths', 'hooks'))
self.win32_icon = os.path.abspath(self.config.get('paths', 'win32icon'))
@ -318,7 +307,6 @@ class WindowsBuilder(object):
'-i', self.win32_icon,
'-p', self.branch_path,
'-n', 'OpenLP',
'-d', '-c', # for now this is needed to make OpenLP run under windows
self.openlp_script),
stdout=PIPE)
output = pyinstaller.communicate()[0]
@ -428,17 +416,15 @@ class WindowsBuilder(object):
else:
self._print('... WARNING: mudraw.exe not found')
self._print_verbose('Tempoary workaround for needed dlls not copied by pyinstaller')
self._print_verbose('... pythoncom33.dll')
self._print_verbose('... pythoncom3X.dll')
if os.path.isfile('C:\\Python33\\Lib\\site-packages\\pywin32_system32\\pythoncom33.dll'):
copy('C:\\Python33\\Lib\\site-packages\\pywin32_system32\\pythoncom33.dll',
os.path.join(self.dist_path, 'pythoncom33.dll'))
elif os.path.isfile('C:\\Python34\\Lib\\site-packages\\pywin32_system32\\pythoncom34.dll'):
copy('C:\\Python34\\Lib\\site-packages\\pywin32_system32\\pythoncom34.dll',
os.path.join(self.dist_path, 'pythoncom34.dll'))
else:
self._print('... WARNING: pythoncom33.dll not found')
if os.path.isfile('C:\\windows\\system32\\msvcr100.dll'):
self._print_verbose('... msvcr100.dll')
copy('C:\\windows\\system32\\msvcr100.dll', os.path.join(self.dist_path, 'msvcr100.dll'))
else:
self._print('... WARNING: msvcr100.dll not found')
self._print('... WARNING: pythoncom3X.dll not found')
def update_translations(self):
"""