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!
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
Install everything using a single command:
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.
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:
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...
Application running with pid 1134.
And the application should install and open directly on your phone🙂 Enjoy!