PySide 1.0.0~beta1 binaries released for Ubuntu December 7, 2010
Posted by lizardo in Debian/Ubuntu, Linux.Tags: Linux, pyside, python, qt
add a comment
Didier ‘OdyX’ Raboud once again borrowed his great Debian packaging/integration skills to the PySide project, and created packages for the latest Ubuntu releases (including the development one, codenamed “natty”). They are available on the official repository. See the download instructions page for more details. See also the original announcement.
Qt 4.7.0 for Symbian on Linux (now with Qt Creator support!) October 11, 2010
Posted by lizardo in Linux.Tags: Linux, qt, S60, symbian
34 comments
It’s been some time since my last update on the Qt for Symbian Linux installer. My colleague Bruno Abinader did a great job in the meantime, by releasing his own modified “all-in-one” script that installed gnupoc, Qt, Qt Mobility and Smart Installer
.
From now on, I’ll follow Bruno’s idea and provide a single script that installs everything you need for Qt for Symbian development on Linux. This version will install just gnupoc and Qt, but next ones should support Qt Mobility and Smart Installer as well. I also temporarily disabled support for S60 3.1 SDK, so for now there is only S60 5.0 SDK support.
Some of you might have noticed that the official Qt 4.7.0 documentation has some experimental installation instructions for Linux. Unfortunately, it requires compiling Qt from sources, which might take long time and currently requires the non-free ARM RVCT compiler. The instructions on this post are my attempt on creating a usable setup in a user-friendly way.
So, enough explanations, let’s go to the instructions!
Preparation
Download all required files to a single directory (e.g. “~/downloads”):
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.17.tar.gz (8.6 MB): tools and patches to run Symbian SDK on Linux
- qt-symbian-opensource-4.7.0-s60.exe (262 MB): Qt for Open Source C++ development on Symbian
- S60_5th_Edition_SDK_v1_0_en.zip (622MB): S60 SDK for Symbian OS (click on the “Download S60 and Symbian SDKs” button)
- s60_open_c_cpp_plug_in_v1_7_en.zip (31 MB): Open C/C++ Plug-ins (under “Plug-ins for the Symbian SDKs” section)
- qt_for_symbian_4.7.0_linux_installer_v4.sh: Unofficial Qt for Symbian installer for Linux
For building the native tools from gnupoc, you will need:
- the GCC C/C++ compilers
- development files for zlib
- development files for openssl
On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev
Installation
Install everything using a single command:
./qt_for_symbian_4.7.0_linux_installer_v4.sh \
<download-dir> \
<install-dir>
Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <install-dir> with the destination directory (e.g. “~/gnupoc”). Note that both directories must have absolute paths.
If installation was successful, you should see the message “Installation has finished!” followed by some instructions. Follow those to setup Qt Creator and/or command line.
Device setup
Install Qt on the phone, by copying and installing the <install-dir>/qt_4.7.0/qt_installer.sis package. This single SIS file has all necessary dependencies for running Qt applications.
Additionally, if you plan to use Qt Creator, I suggest installing s60_5_0_app_trk_3_2_7.sisx. It will allow quickly testing your application directly on the device through bluetooth. Also make sure your desktop and phone are paired, then run these commands:
sdptool browse local | grep -q "Service Name: Serial Port" \
|| sdptool add SP
sudo rfcomm listen rfcomm0
The first command makes sure the Serial Port service is only added once, and the second one creates the /dev/rfcomm0 device. You should see output like:
Serial Port service registered
Waiting for connection on channel 1
On the phone, open App TRK (It should be under the “RnD Tools” directory). It will show “Status: Not connected”. Go to Options -> Settings, and make sure “Connection” is set to “Bluetooth”. Next, go to Options -> Connect and select your desktop from the Bluetooth devices shown. On the phone, you should see:
Status: Connected
BT Dev Name: <your_computer_name>
BT Port number: 1
While on your desktop console:
...
Connection from XX:XX:XX:XX:XX:XX to /dev/rfcomm0
Press CTRL-C for hangup
Now, when you click “Run” on Qt Creator, you should see something like this on its “Console Window”:
Executable file: /home/lizardo/gnupoc/sdk_5.0/epoc32/release/$(PLATFORM)/$(TARGET)/animatedtiles.exe
Package: 117288 2010-10-11T11:43:23 /home/lizardo/NokiaQtSDK/Examples/4.6/animation/animatedtiles/animatedtiles.sis
Deploying application to 'Bluetooth device (/dev/rfcomm0)'...
Copying installation file...
Installing application...
Starting application...
Application running with pid 1134.
And the application should install and open directly on your phone
Enjoy!
Installing Qt for Symbian SDK 4.6.2 on Linux February 18, 2010
Posted by lizardo in Linux.Tags: Linux, qt, S60, symbian
48 comments
Qt 4.6.2 was released last Monday, so I took some time to update the GnuPoc and Qt installer scripts I previously released for 4.6.1.
Besides the upgrade to Qt 4.6.2, there are other minor changes:
- Both installers now check MD5 signatures of the necessary files, to make sure they are not corrupted.
- The GnuPoc installer now supports the 3.1 SDK (see updated instructions below).
- Added “unset QMAKESPEC” command to setup instructions (at least Gentoo sets it globally, which affects qmake).
The instructions are basically the same as the previous ones, but I will post the full instructions here for completeness.
Preparation
Download all required files to a single directory (e.g. “~/downloads”):
- S60_5th_Edition_SDK_v1_0_en.zip (623MB) or S60-SDK-200634-3.1-Cpp-f.1090b.zip (355MB): S60 SDK for Symbian OS (be sure to click on the “Download all-in-one S60 SDKs” button for 5th edition, or “Download S60 SDKs for C++” for 3rd edition, FP1)
- s60_open_c_cpp_plug_in_v1_6_en.zip (35MB): Open C/C++ Plug-in
- qt-symbian-opensource-4.6.2.exe (201MB): Qt for Open Source C++ development on Symbian
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.15.tar.gz (6.2MB): tools and patches to run Symbian SDK on Linux
- gnupoc_1.15_installer_v2.sh: Unofficial GnuPoc installer (supports 3.1 and 5.0 SDKs)
- qt_for_symbian_4.6.2_linux_installer_v3.sh: Unofficial Qt for Symbian installer for Linux
For building the native tools from gnupoc, you will need:
- the GCC C/C++ compilers
- development files for zlib
- development files for openssl
On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev
Installation
First, install GnuPoc + S60 SDK + the Open C/C++ plugin:
./gnupoc_1.15_installer_v2.sh \
<download-dir> \
<gnupoc-dir>\
<x.y>
Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”) and <x.y> with the SDK version you want to install (e.g. “3.1″ or “5.0″). Note that both directories must have absolute paths.
If installation was successful, you should see an output like:
Installation has finished. Before using the GnuPoc SDK, run these commands on the console:
export PATH=<gnupoc-dir>/bin:$PATH
export EPOCROOT=<gnupoc-dir>/symbian-sdks/5.0/ # trailing "/" is required!
(These commands must be run again every time a new console is opened.)
Run the commands as instructed on the message. Next, install Qt for Symbian:
./qt_for_symbian_4.6.2_linux_installer_v3.sh \
<download-dir> \
<qt-s60-dir>
Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <qt-s60-dir> with the destination directory for the Qt files (e.g. “~/gnupoc/qt-4.6.2″). Note that both directories must have absolute paths.
If installation was successful, you should see an output like:
Installation has finished. Before using the Qt for Symbian SDK, run this command on the console:
export PATH=<qt-s60-dir>/bin:$PATH
unset QMAKESPEC # make sure there is no QMAKESPEC variable set
(This command must be run again every time a new console is opened.)
Before using Qt for Symbian, you should run the command as instructed on the message above.
Usage example
To test the installation, I will describe how to build the “colliding mice” example.
- cd into the example source:
- Now build the example and generate the SIS file
cd <qt-s60-dir>/examples/graphicsview/collidingmice/
qmake
make debug-gcce
make sis
A few notes:
- Make sure Qt is installed on the device before installing Qt applications. The easiest way to install it is to copy the “qt_installer.sis” package found under <qt-s60-dir> over bluetooth and open the received message to begin the installation.
- Only the “debug-gcce” (if you are using the GCCE toolchain AKA “CodeSourcery toolchain”) or “debug-armv5″ (if you are using RVCT) will work, because the current Qt releases only ship debug versions of the libraries
Installing Qt for Symbian SDK 4.6.1 on Linux January 21, 2010
Posted by lizardo in Linux.Tags: Linux, qt, S60, symbian
45 comments
***For Qt 4.6.2 and S60 3.1 SDK support, be sure to read the updated post***
Update (2010-01-27): New version of Qt installer (v2).
Qt 4.6.1 was released last Tuesday, so I took some time to update my Linux support patches for Qt (which are now merged in qt-s60 tree and hopefully will be in main Qt tree at some point) and GnuPoc (which, thanks to Martin, are now integrated into the latest release).
I had a couple of previous posts detailing instructions on how to install the SDK on Linux, but after some time, it became too boring to run those commands manually, and some people asked for a script. So, from now on, I will provide two installers to make the process much more automated and simple: one installer for GnuPoc + Open C/C++ plugin, and another for the Qt for Symbian SDK.
Note that currently the GnuPoc installer handles only the S60 5.0 SDK. If someone is interested on a 3.1 SDK installer let me know so I can add support for it too.
Preparation
Download all required files to a single directory (e.g. “~/downloads”):
- S60_5th_Edition_SDK_v1_0_en.zip (623MB): S60 5th Edition SDK for Symbian OS (be sure to click on the “Download all-in-one SDKs” button on that page)
- s60_open_c_cpp_plug_in_v1_6_en.zip (35MB): Open C/C++ Plug-in
- qt-symbian-opensource-4.6.1.exe (209MB): Qt for Open Source C++ development on Symbian
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.15.tar.gz (6.2MB): tools and patches to run Symbian SDK on Linux
- gnupoc_1.15_S60_5.0_installer_v1.sh: Unofficial GnuPoc installer (currently supports only 5.0 SDK)
- qt_for_symbian_4.6.1_linux_installer_v2.sh: Unofficial Qt 4.6.1 for Symbian installer for Linux
For building the native tools from gnupoc, you will need:
- the GCC C/C++ compilers
- development files for zlib
- development files for openssl
On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev
Installation
First, install GnuPoc + S60 5.0 SDK + the Open C/C++ plugin:
./gnupoc_1.15_S60_5.0_installer_v1.sh \
<download-dir> \
<gnupoc-dir>
Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <gnupoc-dir> with the destination directory for GnuPoc and the SDK files (e.g. “~/gnupoc”). Note that both directories must have absolute paths.
If installation was successful, you should see an output like:
Installation has finished. Before using the GnuPoc SDK, run these commands on the console:
export PATH=<gnupoc-dir>/bin:$PATH
export EPOCROOT=<gnupoc-dir>/symbian-sdks/5.0/ # trailing "/" is required!
(These commands must be run again every time a new console is opened.)
Run the commands as instructed on the message. Next, install Qt for Symbian:
./qt_for_symbian_4.6.1_linux_installer_v2.sh \
<download-dir> \
<qt-s60-dir>
Replace <download-dir> with the location of all files downloaded in previous section (e.g. “~/downloads”), and <qt-s60-dir> with the destination directory for the Qt files (e.g. “~/gnupoc/qt-4.6.1″). Note that both directories must have absolute paths.
If installation was successful, you should see an output like:
Installation has finished. Before using the Qt for Symbian SDK, run this command on the console:
export PATH=<qt-s60-dir>/bin:$PATH
(This command must be run again every time a new console is opened.)
Before using Qt for Symbian, you should run the command as instructed on the message above.
Usage example
To test the installation, I will describe how to build the “colliding mice” example.
- cd into the example source:
- Open collidingmice.pro and replace these two lines:
- Now build the example and generate the SIS file
cd <qt-s60-dir>/examples/graphicsview/collidingmice/
TARGET.UID3 = 0xA000A643
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
with:
TARGET.UID3 = 0xE000A643
In other words: replace the UID3 “0xA000A643″ with “0xE000A643″ and remove (or comment out) the “include(…)” line. This will allow to sign the built SIS file using a self-signed certificate, otherwise you would need a R&D certificate.
qmake
make debug-gcce
make sis
A few notes:
- Only the “debug-gcce” (if you are using the GCCE toolchain AKA “CodeSourcery toolchain”) or “debug-armv5″ (if you are using RVCT) will work, because the 4.6.1 release only ships debug versions of the libraries
- Make sure you do similar changes as described above if you want to try compiling other Qt examples. Otherwise, you will receive errors like “Unable to install” while trying to install the SIS file on the phone.
Installing Qt for Symbian on Linux September 24, 2009
Posted by lizardo in General.Tags: Linux, qt, S60, symbian
9 comments
*** These instructions have been superseded by the GnuPoc and Qt for Symbian unofficial installers, described in this post***
Update (2009-09-24): Add workaround for GCCE issue.
Update (2009-10-05): Update gnupoc patch to apply against 20091005 snapshot. Remove workarounds from “Known Issues” sections that are already integrated into new patch.
Update (2009-10-07): Add instruction for installing gnupoc build dependencies.
Update (2009-10-23): New patch version (v9), that now applies cleanly to latest snapshots.
Update (2009-11-17): New patch version (v10), now applies against the 4.6.0 RC1 release.
In a previous post, I provided instructions on running Qt for Symbian (the “Tower” release) on Linux. However, for those who want to play with the bleeding edge Qt for Symbian development, you might want to try out the latest 4.6 development code from Qt GIT. I put some instructions for compiling Qt for Symbian from GIT on Linux as well, but unfortunately it requires the RVCT compiler to build.
Fortunately, today espenr announced daily snapshots, that will allow those who don’t have access to RVCT to try out the latest 4.6 development as well
. So how to get this thing running on Linux? The snapshots so far consist only of the Windows installer and a .zip containing the source code.
By “merging” information from my two previous posts, I will describe below how to install the Qt for Symbian daily snapshots on Linux. Even if you have a previous installation of the Symbian SDK, you will need to follow the full instructions again (sorry), as these instructions contain a bunch of bug fixes to the Symbian SDK. Hopefully this requirement will go away at some point, when all Symbian SDK portability issues are addressed.
These instructions also work for the just released 4.6.0 RC1.
These instructions were tested only in the following environment:
- Host: x86 32-bits (running Ubuntu 8.10)
- Device and SDK: S60 5.0 (N97 and 5800)
Preparation
Download all required files:
- S60_5th_Edition_SDK_v1_0_en.zip (623MB): S60 Platform SDK for Symbian OS, for C++
- s60_open_c_cpp_plug_in_v1_6_en.zip (35MB): Open C/C++ Plugin
- qt-symbian-opensource-4.6.0-snapshot-YYYYMMDD.exe or qt-symbian-opensource-4.6.0-rc1.exe: Qt for Symbian latest daily snapshot (you need only the .exe for running the SDK). Last tested version: 4.6.0 RC1
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.13.tar.gz (6.2MB): scripts and patches to run Symbian SDK on Linux
- qt_s60_gnupoc_v10.patch: patch for gnupoc, adding support for Qt for Symbian installation and various bug fixes
(many thanks to Francisco Keppler for hosting this last file on his web site!)
For building the native tools from gnupoc, you will need:
- the GCC C/C++ compilers
- development files for zlib
- development files for openssl
On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev
Installation
- First, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
- Install ARM toolchain:
- Unpack gnupoc sources and apply the patch that adds Qt for Symbian support:
- Install Symbian SDK:
- Install gnupoc wrappers and native tools:
- Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
- Initialize the Symbian SDK environment (you will need to do this every time you close the current shell session):
- Install OpenC:
- Install Qt for Symbian (it will take some time because some tools need to be compiled for Linux):
- Create a “qt_s60_env.sh” script to be used to setup Qt for Symbian environment, by running this command:
- Initialize the Qt for Symbian environment (you will need to do this every time you close the current shell session):
- Install the following SIS files on your device:
- $EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
- $EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
- $EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
- $QT_S60_DIR/qt_selfsigned.sis
- Unset all temporary variables we used earlier:
# root directory where all SDK files will be installed
GNUPOC_ROOT=$HOME/gnupoc
# toolchain directory
TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
# Symbian SDK directory
S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/5.0
# Qt SDK directory
QT_S60_DIR=$GNUPOC_ROOT/qt_s60
# wrapper directory (used by gnupoc)
WRAPPER_DIR=$GNUPOC_ROOT/bin
# where all downloaded files are located
SRC_DIR=$HOME/downloads
mkdir -p $TOOLCHAIN_DIR
tar -C $TOOLCHAIN_DIR -xvjf \
$SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
cd gnupoc-package-1.13
patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v10.patch
cd sdks
./install_gnupoc_s60_50 \
$SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
$S60_SDK_DIR
./install_wrapper $WRAPPER_DIR
cd ../tools
./install_eka2_tools $TOOLCHAIN_DIR
# adjust EKA2TOOLS variable to point to correct location
sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
$WRAPPER_DIR/gnupoc-common.sh
cat > $GNUPOC_ROOT/gnupoc_env.sh << EOF
export PATH=$WRAPPER_DIR:\$PATH
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)
. $GNUPOC_ROOT/gnupoc_env.sh
cd ../sdks
chmod +x install_openc_16_s60
./install_openc_16_s60 \
$SRC_DIR/s60_open_c_cpp_plug_in_v1_6_en.zip \
$S60_SDK_DIR
chmod +x install_qt_s60
./install_qt_s60 \
$SRC_DIR/qt-symbian-opensource-<version>.exe \
$S60_SDK_DIR \
$QT_S60_DIR
If installation went well, you should see the following:
...
Qt is now configured for building. To start the build run:make debug-winscw|debug-armv5|release-armv5.
To reconfigure, run 'make confclean' and configure.
Of course, you do not want to build Qt, so just ignore it and proceed with the next step.
cat > $GNUPOC_ROOT/qt_s60_env.sh << EOF
export PATH=$QT_S60_DIR/bin:\$PATH
export QMAKESPEC=symbian-abld
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)
. $GNUPOC_ROOT/qt_s60_env.sh
unset GNUPOC_ROOT TOOLCHAIN_DIR S60_SDK_DIR \
QT_S60_DIR WRAPPER_DIR SRC_DIR
Usage
You need to setup the environment, so tools like qmake, bldmake, abld, makesis etc. are found (not necessary if you just did the installation, unless you closed the shell session):
. /path/to/gnupoc_env.sh
. /path/to/qt_s60_env.sh
Note the “.” (dot) before the gnupoc_env.sh. It says that the contents of the gnupoc_env.sh file will be run in the current shell session, as if you typed them by hand.
To actually build some Qt code, use these commands:
cd path/to/source
qmake # assuming the code already has a .pro file
make debug-gcce # or make debug-armv5 (if using RVCT)
make sis # to generate .sis file
And to clean the source:
make distclean
Notes:
- Be sure to use qmake from Qt for Symbian. Otherwise the generated Makefiles will be for your host system
- The trailing slash on the EPOCROOT variable is important (this is assumed in many places on Symbian SDK scripts)
Known Issues
- The snapshots contain only the the “debug” libraries. Therefore, only the debug targets will work, i.e. use only “make debug-gcce” (if using GCCE compiler) or “make debug-armv5″ (if using RVCT)
See also the more general known issues related to Qt for Symbian.
Ideas for improvements and TODO items
- Add Symbian support to Qt configure script, eliminating the need to compile configure.bin
- Create a nice GUI installer for Linux
- Allow to easily upgrade Qt for Symbian SDK installation, without requiring to reinstall the entire Symbian SDK
- Itegration with Qt Creator, KDevelop or some other IDE
Feel free to contribute with your ideas or even better, help implementing them
Compiling Qt for S60 (from GIT) on Linux September 5, 2009
Posted by lizardo in General.Tags: Linux, qt, S60, symbian
3 comments
Update (2009-09-06): Add instructions for generating the .sis file
Update (2009-09-16): Rebase GIT clone against 4.6 branch; update gnupoc patch (V3); add instructions for patch_capabilities.pl
Update (2009-09-17): A few textual fixes; fixes added to the GIT tree; new gnupoc patch (V4); added instructions for testing the built Qt
Update (2009-09-18): fix GIT instructions
Update (2009-09-21): Use RVCT 2.2 (build 686); small changes to the hello example
Currently it is only possible to build Qt for S60 on Windows and using the proprietary RVCT compiler from ARM.
Windows is needed because the Symbian support code contains calls to the Win32 API, Windows style paths (using backslashes), a few calls to .bat and .exe tools, and inconsistent case for path names (a real issue for Unix based systems).
RVCT is needed due to limitations in GCCE (the GCC Symbian port). From the Qt/S60 README:
The current version of GCCE cannot compile the Qt libraries themselves as it has issues with global static data in DLLs. [...]. For more information on this issue see: http://www3.symbian.com/faq.nsf/0/B8542F039C193CCC802573DA0011DFA7
Thanks to the community effort around the gnupoc project (and further modifications made by Martin Storsjö for supporting the newer S60 SDK releases) we are able to build regular S60 applications on Linux. To allow also building Qt applications for S60, it was necessary to port the Symbian support from Qt sources to Linux, and a few more changes to the Symbian SDK scripts to improve Linux support.
You will find below instructions for building Qt for S60 on Linux, using sources from GIT, plus the Linux host support from my own clone.
The RVCT requirement is still necessary, but fortunately there is a Linux version of RVCT available on ARM site (it is paid, but there is a 30-day evaluation version).
Preparation
Although I had previously blogged about installing the S60 SDK on Linux together with the Qt 4.5.2 “tower” release, I will again describe the installation instructions here. Even if you have the S60 SDK already installed, you will need to install it again. This is necessary because gnupoc needs more fixes for building Qt.
That said, download the necessary files:
- S60_5th_Edition_SDK_v1_0_en.zip (623MB): S60 Platform SDK for Symbian OS, for C++ (5th Edition)
- s60_open_c_cpp_plug_in_v1_6_en.zip (35MB): Open C/C++ Plugin
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.13.tar.gz (6.2MB): scripts and patches to run S60 SDK on Linux
- qt_s60_gnupoc_v4.patch (40KB): gnupoc fixes/extensions for supporting Qt for S60 builds (4th version of the patch)
For building the native tools from gnupoc, you will need:
- the GCC C/C++ compilers
- development files for zlib
- development files for openssl
On Ubuntu, you can install these using the following command:
sudo apt-get install build-essential zlib1g-dev libssl-dev
For building Qt itself, you will also need:
- RVCT 2.2 (build 686) for Linux installed and accessible on PATH. Run armcc --vsn and you should see:
- WINE. A few tools from S60 SDK (elftran, genstubs and getexports) are only available for Windows. Fortunately, recent versions of WINE are able to run these tools just fine.
- A copy of Qt GIT tree containing support for Linux host from my tree clone. If you do not have Qt GIT tree downloaded, you get it by running:
ARM/Thumb C/C++ Compiler, RVCT2.2 [Build 686]
git clone git://gitorious.org/qt/qt.git
Next, add a remote for my clone and create a local “s60_linux” branch that will be used to track changes for Linux host support:
git remote add -f -t s60_linux \
qt_s60_linux git://gitorious.org/~lizardo/qt/lizardos-qts60.git
git checkout -b s60_linux qt_s60_linux/s60_linux
If at some point you need to update the tree (and don’t have any local changes), you can run:
git checkout s60_linux
git fetch qt_s60_linux
git reset --hard qt_s60_linux/s60_linux
S60 SDK Installation (5.0 only)
- First, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
- Install ARM toolchain:
- Unpack gnupoc sources and apply the patch that adds Qt for S60 support:
- Install gnupoc:
- Install gnupoc wrappers and native tools:
- Install OpenC (now necessary even for 5.0 SDK):
- Add support for RVCT to the SDK:
- Create a “gnupoc_env.sh” script to be used for gnupoc environment setup, by running this command:
- Unset all temporary variables we used earlier:
- Finally, initialize environment by running:
# root directory where all SDK files will be installed
GNUPOC_ROOT=$HOME/gnupoc
# toolchain directory
TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
# S60 SDK directory
S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/5.0
# wrapper directory (used by gnupoc)
WRAPPER_DIR=$GNUPOC_ROOT/bin
# where all downloaded files are located
SRC_DIR=$HOME/downloads
mkdir -p $TOOLCHAIN_DIR
tar -C $TOOLCHAIN_DIR -xvjf \
$SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
cd gnupoc-package-1.13
patch -p1 -i $SRC_DIR/qt_s60_gnupoc_v4.patch
cd sdks
./install_gnupoc_s60_50 \
$SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
$S60_SDK_DIR
./install_wrapper $WRAPPER_DIR
cd ../tools
./install_eka2_tools $TOOLCHAIN_DIR
sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
$WRAPPER_DIR/gnupoc-common.sh
cd ../sdks
chmod +x install_openc_16_s60
./install_openc_16_s60 \
$SRC_DIR/s60_open_c_cpp_plug_in_v1_6_en.zip \
$S60_SDK_DIR
chmod +x install_rvct_support
./install_rvct_support $S60_SDK_DIR
cd $GNUPOC_ROOT
cat > gnupoc_env.sh << EOF
export PATH=$WRAPPER_DIR:\$PATH
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “gnupoc_env.sh” file in $GNUPOC_ROOT.)
unset TOOLCHAIN_DIR S60_SDK_DIR WRAPPER_DIR SRC_DIR
(Note: GNUPOC_ROOT is not unset because it will be used later on when creating the environment script for Qt.)
. gnupoc_env.sh
(Note the “.” (dot) before gnupoc_env.sh. This command will run the commands listed in gnupoc_env.sh on the current shell session, as if you typed them by hand.)
Building Qt for S60
The current configure shell script used for Linux builds does not contain a full support for Symbian. Therefore the configure.exe source was ported to Linux. Here it is called “configure.bin”, and is generated by the autogen.sh script.
- Compile configure.bin:
- Configure Qt sources:
- Compile Qt:
- Create a “qt_s60_env.sh” script to be used for Qt/S60 environment setup, by running this command:
- Finally, initialize environment by running:
./autogen.sh
./configure.bin \
-opensource \
-confirm-license \
-platform linux-g++ \
-xplatform symbian-abld \
-no-webkit \
-no-phonon
make release-armv5
cat > $GNUPOC_ROOT/qt_s60_env.sh << EOF
export PATH=$PWD/bin:\$PATH
export QMAKESPEC=symbian-abld
EOF
(Note: the “cat << EOF … EOF” snippet above will generate a “qt_s60_env.sh” file in $GNUPOC_ROOT.)
. $GNUPOC_ROOT/qt_s60_env.sh
(Note the “.” (dot) before qt_s60_env.sh. This command will run the commands listed in qt_s60_env.sh on the current shell session, as if you typed them by hand.)
Reducing Symbian capabilities for Qt
By default, Qt for S60 requires high Symbian capabilities. It does not use all those capabilities itself, but this is done so that the generated SIS does not limit capabilities for Qt applications that need them. Unless you have access to certificates that can sign with high capabilities, you will need to “patch” the generated binaries so that it only requests the set of capabilities accessible through Open Signed Online or by using self-signed certificates.
Fortunately, there is a script under Qt sources called “patch_capabilities.pl” that does just that. I also modified it so that it “patches” the Secure ID and UID3 to match the range used for development purposes (see this page for more details about Symbian UIDs). To be able to self-sign the generated .sis for Qt, run this command:
perl ./bin/patch_capabilities.pl \
src/s60installs/Qt_for_S60_template.pkg \
release-armv5
Note this must be done AFTER building Qt, because it modifies some files generated by the build.
Creating the SIS file
To create the final .sis file for Qt, run this command:
make -C src/s60installs/ sis
You should see output similar to:
Processing qt_for_s60_release-armv5.pkg...
Created qt_for_s60_release-armv5_unsigned.sis
Successfully created qt_for_s60_release-armv5.sis using certificate Self Signed!
You will find the generated qt_for_s60_release-armv5.sis under “src/s60installs/”.
Testing the built Qt: hello world!
The Qt source has many examples and demos, but a simple “hello world” is very suitable for checking whether Qt was built correctly and if the environment is properly setup.
First, set the environment for gnupoc and Qt/S60, unless you already run these commands on the current terminal session:
. $GNUPOC_ROOT/gnupoc_env.sh
. $GNUPOC_ROOT/qt_s60_env.sh
Next, create a directory that will contain the hello project:
mkdir hello
cd hello
Now create a “main.cpp” file with the following code:
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello, World!");
QObject::connect(&hello, SIGNAL(clicked()),
&app, SLOT(quit()));
hello.show();
return app.exec();
}
Create the .pro file by running:
qmake -project
Now create the Makefile (and a couple of S60 specific files):
qmake
Finally, build the project and generate a (self-signed) SIS file for it:
make release-gcce # or release-armv5, if using RVCT
make sis
The SIS file will be created on the current directory with the name “<project>_release-<platform>.sis”, where <project> is the project name and <platform> is the S60 platform (either gcce or armv5).
TODO
- Test the compiled Qt on the device
Running Qt for S60 SDK on Linux July 29, 2009
Posted by lizardo in General.Tags: Linux, qt, S60, symbian
comments closed
*** These instructions have been superseded by the GnuPoc and Qt for Symbian unofficial installers, described in this post***
Update (2009-08-04): fixed qt_s60_gnupoc.patch (thanks grego), plus a few text additions.
Update (2009-08-21): update instructions to support S60 5.0 too.
A while ago I started playing with S60 programming. After downloading rather big SDK files and following instructions from http://www.martin.st/symbian/, I was able to build simple “hello world” applications written in C++, on Linux.
Then I remembered reading about an experimental Qt port to S60. I wanted to try it, given that I also began playing with Qt a while ago. To my surprise, I could not find any actual instructions on how to do that on Linux, although I found a few requests for it in comments from Qt Labs blog posts.
So, without further delay, I describe below the steps I followed to build Qt applications for S60 devices on Linux. These instructions are provided as an extension to those on Martin’s page, so be sure to read it too. But given that some patches are needed on top of Martin’s tools, I will show the full instructions here.
Note: these instructions were tested only in the following environment:
- x86 32-bits
- Ubuntu 8.04
- S60 3.1 (N95) and S60 5.0 (5800 Xpress Music)
I tried making it work for my 3.0 MR based device, but it seems that I need to recompile all Qt using the proprietary ARM RVCT compiler. If someday I make it work, I’ll post instructions for it too.
Preparation
Download all required files:
- S60-SDK-200634-3.1-Cpp-f.1090b.zip (355MB) or S60_5th_Edition_SDK_v1_0_en.zip (623MB): S60 Platform SDK for Symbian OS, for C++
- OpenC-1.5.5b-beta.zip (29MB): Open C/C++ Plug-ins for S60 3rd Edition (already present on S60 5.0 SDK, only needed for 3.1)
- qt-embedded-s60-preview-4.5.2-tower.exe (127MB): Qt for S60 “Tower” pre-release
- gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2 (11MB): CodeSourcery’s ARM toolchain for Symbian
- gnupoc-package-1.13.tar.gz (6.2MB): scripts and patches to run S60 SDK on Linux
- qt_s60_gnupoc.patch (12KB): patch for gnupoc to also support Qt S60 installation
- qt-s60-extra-files.tar.gz (80KB): files from Qt S60 GIT tree that are missing for a Linux build (needed to compile Qt tools natively for Linux)
(many thanks to Francisco Keppler for hosting the last two files on his web site!)
Installation
- First, set some environment variables to be used on the following steps (feel free to modify them to install the SDK on some other location). NOTE: these variables are not necessary after installation.
- Install ARM toolchain:
- Unpack gnupoc sources and apply the patch that adds Qt/S60 support:
- Install gnupoc:
- For S60 3.1:
- For S60 5.0:
- Install gnupoc wrappers and native tools:
- Install OpenC (skip this step if using S60 5.0):
- Finally, install Qt/S60 (it will take some time because some tools need to be compiled for Linux):
# root directory where all SDK files will be installed
GNUPOC_ROOT=$HOME/gnupoc
# toolchain directory
TOOLCHAIN_DIR=$GNUPOC_ROOT/csl_gcc
# S60 SDK directory (replace "3.1" with "5.0"
# for S60 5.0)
S60_SDK_DIR=$GNUPOC_ROOT/symbian-sdks/3.1
# Qt SDK directory
QT_S60_DIR=$GNUPOC_ROOT/qt_s60
# wrapper directory (used by gnupoc)
WRAPPER_DIR=$GNUPOC_ROOT/bin
# where all downloaded files are located
SRC_DIR=$HOME/downloads
mkdir -p $TOOLCHAIN_DIR
tar -C $TOOLCHAIN_DIR -xvjf \
$SRC_DIR/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2
tar -xvzf $SRC_DIR/gnupoc-package-1.13.tar.gz
cd gnupoc-package-1.13
patch -p1 -i $SRC_DIR/qt_s60_gnupoc.patch
cd sdks
./install_gnupoc_s60_31 \
$SRC_DIR/S60-SDK-200634-3.1-Cpp-f.1090b.zip \
$S60_SDK_DIR
cd sdks
./install_gnupoc_s60_50 \
$SRC_DIR/S60_5th_Edition_SDK_v1_0_en.zip \
$S60_SDK_DIR
./install_wrapper $WRAPPER_DIR
cd ../tools
./install_eka2_tools $TOOLCHAIN_DIR
# adjust EKA2TOOLS variable to point to correct location
sed -i "s,EKA2TOOLS=.*,EKA2TOOLS=$TOOLCHAIN_DIR/bin," \
$WRAPPER_DIR/gnupoc-common.sh
cd ../sdks
chmod +x install_openc.sh
./install_openc.sh \
$SRC_DIR/OpenC-1.5.5b-beta.zip \
$S60_SDK_DIR
chmod +x install_qt_s60.sh
./install_qt_s60.sh \
$SRC_DIR/qt-embedded-s60-preview-4.5.2-tower.exe \
$S60_SDK_DIR \
$QT_S60_DIR \
$SRC_DIR/qt-s60-extra-files.tar.gz
Usage
After installation is completed, the usage is very simple. You need to setup a few environment variables, so tools like qmake, bldmake, abld, makesis etc. are found:
export PATH=$WRAPPER_DIR:$QT_S60_DIR/bin:$PATH
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
export QMAKESPEC=$QT_S60_DIR/mkspecs/symbian-abld
Optionally, you can create a gnupoc_env.sh file with the lines above, using this command:
cat > $GNUPOC_ROOT/gnupoc_env.sh << EOF
export PATH=$WRAPPER_DIR:$QT_S60_DIR/bin:\$PATH
export EPOCROOT=$S60_SDK_DIR/ # trailing "/" is required!
export QMAKESPEC=$QT_S60_DIR/mkspecs/symbian-abld
EOF
Then, every time you need to set the variables, you could simply use:
. $GNUPOC_ROOT/gnupoc_env.sh
Note the “.” (dot) before the gnupoc_env.sh. It says that the contents of the gnupoc_env.sh file will be run in the current shell session, as if you typed them by hand.
To actually build some Qt code, use these commands:
cd path/to/source
qmake # assuming the code already has a .pro file
make DEL_FILE=rm ABLD=abld release-gcce
makesis -c <project>_gcce_urel.pkg <project>.sis
And to clean the source:
make DEL_FILE=rm ABLD=abld distclean
Notes:
- Be sure to use qmake from Qt/S60. Otherwise the generated Makefiles will be for your host system
- The trailing slash on the EPOCROOT variable is important
Known issue and workaround
The .sis file generated by the instructions above, although installable on the device, does not actually work (clicking on the application icon makes the phone “hang” for a while, but then it returns to the Symbian menu). The workaround is to compile and link some files from Qt/S60 sources directly into the application. For that, just add a “qts60main.pri” file to your application’s source directory, with the following content:
QT_SOURCE_TREE = $$QMAKE_INCDIR_QT/..
DEPENDPATH += $$QT_SOURCE_TREE/src/s60main
HEADERS += \
qts60mainapplication.h \
qts60mainappui.h \
qts60maindocument.h
SOURCES += \
qts60mainapplication.cpp \
qts60mainappui.cpp \
qts60main.cpp \
qts60maindocument.cpp \
qts60main_mcrt0.cpp
LIBS -= qtmain
QMAKE_LIBS -= qtmain
MMP_RULES += \
"SOURCEPATH $$QT_SOURCE_TREE/src/s60main" \
"START RESOURCE s60main.rss" \
"HEADER" \
"TARGETPATH /resource/apps" \
"END"
Edit the .pro file and add this line:
include(qts60main.pri)
Then try again the sequence of commands listed on the previous section (qmake; bldmake …). I’m not sure why this happens, and I need to check whether this is an issue specific to Linux.
TODO
- Remove need to set “DEL_FILE=rm ABLD=abld” when calling make distclean/relase-*
- Send patches to Martin’s gnupoc and Qt/S60
- Investigate issue with s60main static library not working
- Compile Qt/S60 from sources on Linux
- Make it work with S60 3.0 too (although Qt/S60 does not support it officially)
- Make Symbian emulator (epoc.exe) work under Linux (currently it crashes under WINE)