Testing:Mac OS X Testing Environment
From OpenLP
Python comes installed on Mac OS X by default, but unfortunately on 10.5 and earlier, it was version 2.4 or 2.5. The recommended way to set up the installation is via mac ports.
The recommended version of Python is version 2.6 or 2.7
Contents |
Install X Code
From http://developer.apple.com/xcode or from your Mac OS X Install DVD install a version for your OS X environment (for 10.5 it is 3.1.4, for 10.6 it is 3.2.6). The version 4 (4.1) of X Code is required only for Mac OS X Lion (10.7) and it can be downloaded from the app store for free.
X Code contains gcc (C/C++ compiler) and other development tools necessary to set up the testing environment via mac ports.
Install MacPorts
Install MacPorts from http://www.macports.org/install.php
Settings for universal binaries
It is recommended to set up mac ports to install always 32bit and 64bit binaries of packages. By default macports installs 32bit for Mac OS X 10.5 and 64bit for 10.6 and 10.7
Open the following file in a text editor
/opt/local/etc/macports/variants.conf
and add at the end line
+universal
Other wise you can always install mac port packages by command:
sudo port install package_name +universal
Install Python
We are now able to use MacPorts to install the python and the libraries, this is done with the following command:
sudo port install python27
Make it the default python
sudo port select --set python python27
Install Libraries
First install phonon so pyqt4 package could detect it and use it:
sudo port install phonon
Now you cat install other libraries. This will take a lot of time (several hours), especially because of compiling Qt4 libraries. To complete run following:
sudo port install py27-pyqt4 +phonon py27-sqlalchemy py27-sqlalchemy-migrate py27-lxml py27-chardet py27-enchant py27-beautifulsoup py27-mako py27-mysql py27-psycopg2
If you want to use python26 use the py26-* naming.
Install Dictionaries
Install all the aspell dictionaries:
sudo port install aspell-dict-*
Verify Installation
To verify the installation checkout the source code of OpenLP and run the following script:
python OPENLP_SRC/scripts/check_dependencies.py
The output should be similar to the following:
Python >= 2.6 ... 2.7.2.final.0 Checking for modules... PyQt4... OK PyQt4.QtCore... OK PyQt4.QtGui... OK PyQt4.QtNetwork... OK PyQt4.QtOpenGL... OK PyQt4.QtSvg... OK PyQt4.QtTest... OK PyQt4.QtWebKit... OK PyQt4.phonon... OK sqlalchemy... OK sqlite3... OK lxml... OK chardet... OK enchant... OK BeautifulSoup... OK mako... OK Checking for optional modules... sqlite (SQLite 2 support)... FAIL MySQLdb (MySQL support)... FAIL psycopg2 (PostgreSQL support)... FAIL Verifying version of modules... PyQt4 >= 4.6 ... 4.8.3 Qt4 >= 4.6 ... 4.7.3 sqlalchemy >= 0.5 ... 0.7.1 enchant >= 1.3 ... 1.6.5 Qt4 image formats... read: bmp, gif, ico, jpeg, jpg, mng, pbm, pgm, png, ppm, svg, svgz, tif, tiff, xbm, xpm write: bmp, ico, jpeg, jpg, png, ppm, tif, tiff, xbm, xpm Enchant... available backends: aspell, ispell, myspell available languages: ru
Getting rid of session error
After installation of dbus package, it requires to run the following commands:
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist sudo launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
Otherwise OpenLP won't start correctly!
Getting the newest versions
From time to time newer library versions are available, to install them do first a
sudo port selfupdate
to update MacPorts itself, then run
sudo port upgrade outdated
to upgrade the existing libraries
Hints
The OpenLP log file is at /Users/USERNAME/Library/Application Support/openlp/openlp.log
Installing Bazaar
Go to the Bazaar download page, and download and install the version of Bazaar for your version of Mac OS X.
Configuring SSH
See the instructions on setting up SSH on Linux and Mac OS X.
And we're done!