Mac binary application package and installer for OpenLP out!

Today I created a binary application package for an Python application on the OS X platform. As I had a no success with [http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html py2app] despite [http://aralbalkan.com/1675 good tutorials] [http://raoulsnyman.co.za/ Raoul] pointed me to [http://www.pyinstaller.org/ PyInstaller] and that the SVN version has support for Mac.

I checked out PyInstaller and built it with something like that:
{{{
svn co http://svn.pyinstaller.org/trunk pyinstaller
cd pyinstaller/source/linux
python ./Make.py
make
cd ../..
python Configure.py
}}}

[http://raoulsnyman.co.za/ Raoul] gave me a few hook files for hidden imports, these look like following
{{{
hiddenimports = ['lxml.etree']
}}}

Then I issued following command to build a spec file for [http://openlp.org OpenLP 2.0 (a free program to empower churches for displaying songs and presentations during a service)]
{{{
python Makespec.py --onefile /Users/matthiashub/openlp/trunk/openlp.pyw
}}}

And then added to the created [http://www.pyinstaller.org/export/latest/trunk/doc/Manual.html?format=ra... spec file] following snippet
{{{
import sys
if sys.platform.startswith("darwin"):
app = BUNDLE(exe,
appname='OpenLP 2.0 ALPHA',
version='741')
}}}

and added the [http://www.pyinstaller.org/export/latest/trunk/doc/Manual.html?format=ra... hookspath] parameter
{{{
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(HOMEPATH,'support/useUnicode.py'), '/Users/matthiashub/openlp/trunk/openlp.pyw'],
pathex=['/Users/matthiashub/openlp/pyinstaller'], hookspath=['/Users/matthiashub/Matthias/openlp/trunk/resources/pyinstaller'])

}}}

And finally the [http://www.pyinstaller.org/export/latest/trunk/doc/Manual.html?format=ra... build step]
{{{
python Build.py openlp/openlp.spec
}}}

Some errors occured, but the bug tracking system had already workarounds ready for it:
* [http://www.pyinstaller.org/ticket/155 Missing files]
* [http://www.pyinstaller.org/ticket/156 Missing icon and menu]
* [http://www.pyinstaller.org/ticket/157 Missing qt_menu.nib]
* For openlp you also need to copy the available plugins manually into the plugins directory

Building a dmg (a disk image) out of it was an easy job, [http://mac101.net/content/how-to/how-to-create-dmg-art-for-fancy-applica... that tutorial on mac101.net] guided me through the whole process.

With that link you can download the [http://matthiashub.de/tmp/openlp/OpenLP%202.0%20ALPHA%20Installer.dmg OpenLP 2.0 Pre-Alpha Installer]

Comments

Thanks for all the work you put into this Matthias!

I got one of our Mac users to try it out, and apart from one or two small issues, everything worked! This is great!

Raoul.

as i'm in the uk i may not get the official alpha release on time for tomorrow, to use on our new imac... is there any reason why i can't get the ppt controller and media options to work on this one? they are active.

maybe i'll just have to wait for the official!

Great to hear that you tried OpenLP! The alpha releases are AFAIK already built and just need to be linked on the site. Regarding the presentations and media support: yes there are still some issues with that (the biggest one seems to be uno - the OpenOffice bridge - for python on Mac), but we are working on that. You can out the testers mailing list of OpenLP to get notifications about test builds.

Greets, Matthias

User login

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
3 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Powered by Drupal