Archive for the 'Development' Category

AlephOne PSP on the official AlephOne repository

My AlephOne PSP port (both the old 1.5 kernel version and the new work in progress version) has been recently committed to the AlephOne repository. Congratulations! You now have the chance to sneak peak the new port, how cool is that?.

Not much is the answer. Development on the port has been idle for a while for two different reasons: life and a nasty bug.
Considering that  I don’t know (yet) how to fix life (but if you do, please leave a comment with your suggestions), I’m left to deal with the nasty bug that seems to be… well, very nasty.

If you, oh reader, have some kind of programming knowledge and want to give an hand, you can extract some informations on the issue from the first pages of this post on the pfhorums. But be warned, the lack of proper debugging tools on the PSP will make the experience quite unpleasant.

If you want, you can browse the source for the new port from here or do a checkout with:

svn co https://marathon.svn.sourceforge.net/svnroot/marathon/ports/psp/trunk alephone-psp

Building Symbian Qt 4.6.3 in GnuPoc 1.16 using OpenC/C++ 1.7.5

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.

A shell script to automate the workspace setup process

I usually hate doing repetitive tasks, but I know by now that this is a way of thinking that can easly lead to infinite recursion, as the definition of “repetitive task” can be very vague sometimes. Despite that, I do love wasting my time when there are pressing things to do!

This bash script attempts to setup a clean environment for your new project doing the following things:

  1. SVN repository setup in /var/svn/repos (by default)
  2. Trac environment setup /var/www/trac (by default)
  3. Setup of a password-protected virtual host in Apache linked to location /trac

It uses zenity to graphically interact with the user (so GNOME only, sorry!). Every step in the setup process, except for the SVN repository setup, can be skipped at runtime and default paths can be changed by editing the script source.

I’m releasing this script under the MIT license, before downloading keep in mind that I made this for my personal use and so I haven’t tested it with other configurations except for mine, so don’t blame me if it blows up your environment!
If it did not, I’m glad it spared you some work!

To run open your favourite terminal application and chmod +x the script file, than type:

./setwspace.sh

Download:
Set Workspace Script (1160)

A Screenshot from the script

The script in action




Partly powered by CleverPlugins.com