Showing posts with label s60. Show all posts
Showing posts with label s60. Show all posts

Friday, 16 January 2009

Image for: Friday, 16 January 2009

Symbian develoment on Linux (almost native) (Part 1)

After my previous failed attempt at installing Carbide C++[1] to allow me to develop stuff for Nokia E71 (i.e. Symbian), recently I have been digging up the internet on information on how to develop directly in Linux.

After much digging and lots and lots of confusion, I actually managed to find some useful information which allowed me to install a cross compiler and the C++ SDK for my phone (S60 3rd Edition Feature Pack 1) on my MSI PR200 laptop which runs Debian Lenny (amd64). The compiler was built from source and its build arch is x86_64 linux, so it should be able to be a little bit faster than the precompiled binaries for i686.


The key of the solution was the GnuPoc project and the fork that offers support for platforms newer than S60 v2 which is avilable at:

http://www.martin.st/symbian/


Besides the GnuPoc download, you'll need to install the appropriate toolchain and compiler:

EKA1 + a modfied gcc release - for S60 v1 and v2
EKA2 + CodeSourcery's GCC (I chose the source variant) - for S60 v3 or newer and UIQ


The instruction on Martin's page are really good, so I won't repeat them here.



After this, there's the non-free part, the SDK installation which needs to be downloaded from forum.nokia.com (you need an account on forum nokia, but the download is free of charge). The installation procedure is also explained on Matrin's page and they work properly (at least they worked for me).

By the way, there are two variants of the SDKs: a full SDK (Java, C++) and one only for C++. The instructions refer to the C++ version, but I don't know if they'd work with the full version.



I did everything until this point and I haven't completed and/or tested if things work, but I'll do it and update the information.


[1] actually I needed a tool chain, but having a graphical IDE was looking really good

Friday, 14 November 2008

Image for: Friday, 14 November 2008

If you own/have access to a Nokia E71 made for Romania, please contact me

I am trying to contact an owner of a Nokia E71 who is able to input Romanian diacritics on this type of phone. This person shouldn't worry, there is nothing destructive/dangerous involving his/her phone, should he/she contact me.

(Skip up to the "second approach" paragraph, if you don't care for the technical details or my story.)


Some time ago, during my latest blog silence period, I bought a white Nokia E71 phone from a Cosmote dealer.

I am really satisfied with it, except for two or three small issues[0], but the most annoying is that my phone was not made for the Romanian market, so I can't type Romanian diacritics[1].


Why does this matter? Because since I bought this phone I managed to do some translation work on the E71, on the daily commute to work. Still, the lack of diacritics forces me to go through another hop to add diacritics to my .po files when I get home.


So I was thinking on ways to fix this issue. After some google-ing I came up with the following possible fixes:
Since my phone was made for Singapore and I want to change to a Romanian product code, I have to wait for an update to be visible for Romania. Although the firmware update arrived for Singapore products, for phones made for Romania the firmware update is unavailable, so I am stuck on the first front.



Enter the second approach and my request for help.

I have looked into the files of my phone and I think I have found the files which define the keyboard layouts available on my phone. I haven't made out the details of the files, but, as a first step, I thought that I should try to replace one of those layout files I don't need with a Romanian layout file.

The problem is that I don't have a copy of such a file, but on a phone that works this file should be present and should be easily accessible. For short, I would need a copy of the firmware that is running on the phone, so I can try to replace on my phone the relevant files.



If you own a Nokia E71 and you're able to input Romanian diacritics on it, please contact me via a comment on my blog, or an email at eddy.petrisor+e71@gmail.com. Thanks in advance!


[0] the phone is really close to perfection on my scoreboard
[1] the correct "s comma" and "t comma" are not visible in any font present in the phone, but as long as they are correctly encoded I am fine with that. Surely with a proper font and an external editor I can fix that problem.

Friday, 18 May 2007

Image for: Friday, 18 May 2007

(Not) Getting Carbide C++ to run on your amd64 Debian Etch. But you get CodeWarrior!

A while ago I decided I wanted to make a couple of nice little apps for my Nokia 6600.
  • Bluetooth AutoOff - disable Bluetooth and/or hide it after a configurable period of time
  • PicGodfather - automatically change the template by which photos are named in the camera app, based on date (I can't think of another reasonable schema)
After my successful adventure with pys60 I decided/realized that the Python API does not contain appropriate functions for what I need in my apps, so I decided to setup the development environment for C++ with Carbide C/C++ (the recommended IDE for S60 development for Nokia).

Of course, the IDE is a Windows application and the reason for which Nokia doesn't provide an IDE for Linux (is expected since they are developing maemo and are so into OS) eludes me.
On top of that, I have an Debian Etch amd64 installation[1], so that's more fun.

Fortunately, thanks to Robert Millan and Ove Kaaven, wine is installable from unstable on amd64 and a chroot is not needed[2] anymore.


Now let's see the dependency tree:
  • Carbide
    • ActivePerl
      • ScriptHost
        • mfc42.dll
    • correct mix of native and built-in dlls in wine configuration
Yes, that is all ... summarized. And you can imagine I went though leaps and bounds and wasted a night with this to find out the hard way.

If you don't care about the reasons/story, you can skip to the paragraph where I ran into license issues.

So, first Carbide needs Active Perl. Not any version, but ActivePerl-5.6.1.635. You will find out after you install Carbide c++.

Active Perl, by default, will refuse to install in wine. It relies on some Script Host support.
Good news: it is available on Microsoft's support pages. Bad news: the file is not provided until you go through some crazy scheme[3] to certify you have a genuine Windows installation.

Of course, the genuine stuff failed to work in wine, duh, but having a windows XP OS in qemu was really useful... to try to go further.

Now that I mentioned the Windows XP machine in qemu you might be wondering 'why didn't you installed Carbide c++ in there and start hacking in qemu?' . Well, I wish it was that simple! Believe it or not, the installation in the Windows virtual machine failed in a muuuuch earlier stage it initially did in Wine! It failed in the unpacking phase of the installation, while in Wine that part worked without problems (default config is for Windows XP emulation). Talk about irony!

After a while of trying, I took the risky path (maybe I should install an antivirus, as suggested by wine) and downloaded the kit for the script host stuff from some site on the net (shhh!). Good. I don't remember if I used cabextract or if it worked quite straight forward, but the special configuration entry in Wine Configurator suggests otherwise.

Back to Active-Perl. Now we can try again to install it.

wine msiexec ActivePerl-5.6.1.635-MSWin32-x86.msi

Guess what? The installation failed now, too. After some time of poking, I realised the bastard was looking for mfc42.dll in the installation. There was no word about that in the error message, only in the wine logs there were some hints. No wonder Windows users learn very early to ignore error messages (the error message was plain uninformative).

Where to get mfc42.dll from? The virtual machine! I tried to send them via email, but the link was too slow. Now I realised I could have used winscp, but I didn't thought of that at the time.

The rescue did come this time from M$, but with some effort. It appears that mfc42.dll is by default present on XP, so you only find it for download in some kit (vc6redistsetup_enu.exe) for Windows 9x. That works (lost some time to figure that out, too) since the kit contains a mix of 9x, NT and independent dlls. I think this installation didn't work and I had to cabextract the files by hand and copy them in system32. I registered the mfc42.dll module, after copying it in windows/system32.

wine msiexec /y mfc42.dll

Well, now I have everything installed Carbide should start... Well, no! License issues! I got a message about not having a license for the installation. Ain't that great? I just installed the thing and is the free/handicapped version. What gives? Well, in Carbide C++ 1.2, the Express part of the kit is broken and doesn't install the license file.

So, I installed the professional version since it had a longer trial period, hoping that now I'll be able to see the IDE and start working.

After this, I tried several times to start Carbide itself, but it failed at different points in time. I "just"[4] configured wine for this app to set the order to 'native,builtin' for msvcrt, ole32, oleacc and shdocw and got further.

Hopeless attempts follow....

At this point I got stuck. There was still some error from ole32.dll (apparently), but I couldn't go further.

I tried to install the 1.1 trial version. Got stuck. In any way I couldn't start Carbide c++ :-(( .

GRAND FINALE!

In the end, I also tried the deprecated CodeWarior. Guess what? It installed and ran immediately. Although I am not sure if any of the previous poking had anything to do with it.



[1] I have some packages from unstable
[2] although I had one, I wanted to get rid of it, since gnash started to perform better in the latest versions - still not satisfactory, but OK
[3] some browser plugin WPGInstall.exe, iirc and some app which should send your privat^W^W^Wanalise your system to generate some code that should identify your system as genuine
[4] this also took me some time... start, identify the dll, change the order, restart...