Getting started – WordPress for Maemo5
Building the WordPress app for Maemo5 requires some environment-tweaking so we assume that you feel somehow familiar with the stuff presented here. Otherwise it might be too challenging. If you just want to administrate your blog, please grab and install the binaries instead.
1. Install Linux, if you don’t already have one
To be able to develop for Maemo5 platform you’ll need Linux operating system. We assume that you’re using Ubuntu, but some other distributions may work as well.
The easiest is to install Linux to a virtual machine, like Sun VirtualBox or similar.
2. Download and install Maemo SDK
You can find Maemo SDK download link from this Nokia Forum page. Make sure you install the version “GUI installer()”. Follow the instructions provided by Nokia.
From the download link you will get a Python script that takes you through the installation process. The script downloads the required packages and other resources needed.
3. Download Qt SDK
This is not absolutely necessarily needed, but makes things slightly easier in the future. Go to http://qt.nokia.com/downloads and download&install Qt SDK for Linux/X11.
4. Install Qt libraries into Scratchbox
Start by logging in into scrathbox
> /scratchbox/login
After logging in into Scratchbox, edit repository list located at
/etc/apt/sources.list
Add the following lines to the sources.list:
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
deb-src http://repository.maemo.org/extras-devel/ fremantle free
After adding the repositories update the package lists and install Qt development libraries:
> apt-get update
> apt-get install libqt4-maemo5-dev
Now you have the emulator packages installed but you may want to perform couple of more steps to enable building to the actual device.
5. Install Qt libraries to ARMEL target
Start by activating the target ARMEL:
> sb-menu
Choose Select -> FREMANTLE_ARMEL from the menu that opens up.
Add the repositories also to ARMEL target architecture:
/etc/apt/sources.list
Add the following lines to the sources.list:
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
deb-src http://repository.maemo.org/extras-devel/ fremantle free
After adding the repositories, update the package lists and install Qt development libraries:
> apt-get update
> apt-get install libqt4-maemo5-dev
Now qmake is most probably pointing to an older version, so we’ll need to point it to the newly installed qmake (installed with Qt development libraries). Here we’re using a simple and straightforward way, but more advanced guys out there can use e.g. alternatives. Do this also in ARMEL target.
> cd /usr/bin
> mv qmake qmake-old
> ln -s /opt/qt4-maemo5/bin/qmake qmake
Gongratulations! You have now the environment ready for building WordPress for N900.
Now it is a good time to switch back to X86 target
6. Checkout/update the sources from our svn
Make sure to use a folder inside the home folder of Scratchbox, that is something like
/scratchbox/users/yourname/home/yourname/
7. Compile and run the client for emulator
Navigate to the source directory (one containing the source code files). Shout the following commands:
> qmake
> make clean
> make
An executable named “WordPress” will appear in that directory.
Now start the emulator (there’s an icon “Maemo5 SDK” on your desktop). After emulator has launched, type in the following:
> run-standalone.sh ./WordPress
You should now see WordPress client starting up in the emulator.
8. Preparing the package for device
The process for building to actual device needs still some streamlining. Currently we follow the procedures explained here: http://wiki.maemo.org/Packaging_a_Qt_application
The debian package containing most of the modifications can be checked out from
http://nokia.svn.wordpress.org/debian
Remember to svn export the files to avoid unnecessary hidden subversion files in the package.
9. Create .deb -package
Now you can create the installable .deb -package:
scratchbox> dpkg-buildpackage -rfaketroot -sa