I hate when I can’t do things. I really do, and one of the things I never managed to do is setting up a working Symbian development environment on Linux. I tried with GnuPoc several times without much of a result, so when I stumbled upon the news that Qt was ported to Symbian I really thought that things were going to get brighter. They weren’t. Well, kind of.
GnuPoc 1.16 was released some days ago adding support for the Qt SDK so I thought I had to give it another try.
To build the Qt SDK we also need OpenC/C++, the latest version of GnuPoc supports version 1.6 of OpenC/C++ and, with my luck, version 1.7.5 of OpenC/C++ was released some days later making the previous 1.6 disappear from the face of the internet. Let’s see what we can do!
Before going any further you must have a working toolchain for your SDK, read the README file in gnupoc-package-1.16/tools if you don’t know how to do it. When you are set feel free to proceed!
Download OpenC/C++ SDK Plug-In 1.7.5: s60_open_c_cpp_plug_in_v1_7_en.zip
If we try to build the current version using the old script (install_openc_16_s60 in gnupoc-package-1.16/sdks) we get:
./install_openc_16_s60 ../../qt-symbian/s60_open_c_cpp_plug_in_v1_7_en.zip ../../symbian-sdks/s60_31
Archive: ../../qt-symbian/s60_open_c_cpp_plug_in_v1_7_en.zip
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/data1.cab
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/data1.hdr
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/data2.cab
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/ISSetup.dll
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/layout.bin
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/Nokia_EULA.txt
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/NOKIA_lgpl.txt
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/README.txt
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/setup.exe
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/setup.ini
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/setup.inx
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/setup.isn
inflating: openc_temp/s60_open_c_cpp_plug_in_v1_7_en/_Setup.dll
Failed to open openc_temp/Installer/data1.cab as an InstallShield Cabinet File
Removing temporary files...
As you can see the script is trying to unshield the data1.cab but it is looking for it in the wrong place, that is:
openc_temp/Installer/data1.cab
instead of:
openc_temp/s60_open_c_cpp_plug_in_v1_7_en/data1.cab
so we need to correct this by editing lines 25,31,37,45 of install_openc_16_s60 replacing:
$TEMP/Installer/data1.cab
with:
$TEMP/s60_open_c_cpp_plug_in_v1_7_en/data1.cab
Now the script should successfully extract the needed files from the installer, but this is not enough, in fact it dies again with:
openc_temp/opencepoc32_3.1/epoc32: No such file or directory
Why? Well the script creates a temporary directory that is removed upon completion (or error) where all the files are extracted and is looking for the directory openc_temp/opencepoc32_3.1/epoc32 but the real directory is located at openc_temp/opencepoc32_3.1/EPOC32. I think the script tries to rename all files to lowercase by calling the lowercase perl script on the path, but for some strange reason it isn’t doing the job right so we need to resort to the oldest of hacks: manual editing!
To do so we need to prevent the script from deleting the temporary directory when it fails so that we can correct the directory name and re-execute the installer script. To achieve this simply comment out line 17 of install_openc_16_s60:
from:
trap "echo Removing temporary files...; rm -rf $TEMP" EXIT
to:
#trap "echo Removing temporary files...; rm -rf $TEMP" EXIT
When you have done this execute the script and when it dies manually browse to the location specified and rename the EPOC32 directory to epoc32 and re-execute the script (if it asks if you want to replace existing files select [N]one).
The error should popup 2 or 3 times for different paths and you should repeat the same steps every time.
This should be enough to get OpenC/C++ 1.7.5 installed in your GnuPoc environment!
Now download Qt libraries 4.6.3 for Symbian (210 MB): qt-symbian-opensource-4.6.3.exe
Next you simply need to follow the instructions in READEME.qt (found in gnupoc-package-1.16/sdks) by running:
./install_qt qt-symbian-opensource-4.6.3.exe -qt ~/symbian-sdks/qt_4.6.3 -sdk ~/symbian-sdks/s60_31
For me it all went ok except that the script failed near the end (line 92:1) with a syntax error (maybe some issues with my sh version?) so I had to manually run:
../tools/compile_qt_cross_tools ~/symbian-sdks/qt_4.6.3
This are quick and dirty hacks indeed, but they seem to work at the moment.
Let’s hope for a GnuPoc bugfix soon!
I really don’t understand why Nokia doesn’t provide an official SDK for linux. I know there are porting costs, but isn’t it always the case? I think this is even more absurd now that they released a Qt SDK for linux without an official toolchain! Do they seriously think that the remote compiler service can be a practical solution?
Once again, even if I appreciate the small steps toward the linux community, I’m left with the old impression that Nokia’s way of supporting development for their platform is messy and that it suffers from severe lack of organization.
I think they don’t understand (unlike Apple) that the success of their platform is heavily linked to the applications supporting it. They can do all the Ovi Store they want but without a proper set of development tools it will always be populated only by huge company developed apps (read Skype or Opera Mini), and I don’t know you, but I don’t think this is the real purpose of an app store.
Recent Comments