Sunday, March 05, 2006

GNUstep / Fosdem 2006

This year's Fosdem was, as usual, really cool and quite busy :-)

Here is a page with some pictures, slides and videos of the gnustep talks: http://www.xdev.org/fosdem2006. I'll upload the rest of the videos probably during the next week...

Thursday, January 26, 2006

Foundation

After some efforts, I had everything compiled -- ffcall, foundation, appkit, etc. for the nokia. But then my test program crashed :-)

Removing extra libs (hm.. ffcall.. :-/ ) I have something working though: Foundation !

[ note that I got the NXConstantString error, so it looks like library loading order matters (lobjc / lgnustep-base)... changing the ordering in the makefiles make it works though ]

Now.. I compiled gnustep-gui and gnustep-back, both with xlib and art. But the xlib backend crash (it can't find any available font on the nokia apparently..), and the art backend (after some efforts -- #ifdef XSHM to get rid of any XShm calls...) "nearly" works: with my test application (a simple info panel) it displays a window, but without any content (plain white), and complains about bad window... Yet it seems to receive events (I can click on the invisible buttons ;-) so it looks like some art display problem, perhaps just because the nokia uses a non conventional color ordering / depth.

Well I need to come back on ffcall and check if it's the culprit or not for the crashing thing -- having ffcall won't be bad for the gui :-) and try to understand what's wrong with backart... but all in all things progress ;-)

ah, I also did a very stupid mistake the other day, compiling gcc for arm-softfloat. Naively I thought you needed a soft fp implementation, as the arm doesn't have a hardware fp. But what I didn't know is that there's two kind of soft fp -- kernel and softfloat. Worse, you can't link binaries compiled with different fp emulation. And of course, the nokia is compiled with kernel fp emulation, not arm-softfloat.. So I was good for recompiling gcc ...

Though, one good thing is that with arm-softfloat ffcall didn't compile at all (seems that the asm bits of ffcall uses the fp registers for the arm platform), while now it compiles (but as I said it seemed to be the cause of the program's crash, so it's perhaps not as encouraging as it seems ^_^ -- although I need to double-check and recompile things nicely). Considering libffi closures don't work on the arm, if ffcall works that's a good thing :)

Anyway as soon as I have something working decently I'll post a full guide to cross-compile GNUstep on the nokia (and probably some binary packages too if you just want to install it on the nokia).

Wednesday, January 25, 2006

Nokia 770 + Objective-C

I finally had the time to try to do something with the Nokia 770.. and ended up with a gcc + objective-c support that can cross compile for the arm processor. I simply used crosstool with the following script:


#!/bin/sh
set -ex
TARBALLS_DIR=$HOME/downloads
RESULT_TOP=/opt/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,objc"
export GCC_LANGUAGES

# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP

# Build the toolchain. Takes a couple hours and a couple gigabytes.

#eval `cat arm-softfloat.dat gcc-3.3.3-glibc-2.3.2.dat` sh all.sh --notest
#eval `cat arm-softfloat.dat gcc-3.4.0-glibc-2.3.2.dat` sh all.sh --notest
eval `cat arm-softfloat.dat gcc-3.4.1-glibc-2.3.3.dat` sh all.sh --notest
#eval `cat arm-softfloat.dat gcc-3.4.1-glibc-20040827.dat` sh all.sh --notest

echo Done.


Compiling a simple C program and copying it on the nokia worked fine, so I wrote a simple ObjC test program.. and after copying the libobjc.* files and changing the LD_LIBRARY_PATH to point to a local lib directory, it worked too.

So far, so good !

Now I just need to compile Foundation, then AppKit, then -back ... :-)

Friday, November 25, 2005

Shiny screenshot

Well, I spent the evening fixing the ubuntu I broke.. (bad r300 driver, bad..) but then I used the occasion to pass my hoary into a dapper, and in the end (X freezed with it..) to a breezy. And finally everything works fine, _again_ ... pfiew.. (and the synaptic driver decided to work too, yeah). Well, dapper is by definition unstable, so that's my fault. Anyway, I used the occasion to try the composition features of X, and as we apprently lack good screenshots in the GNUstep world, here a shiny one:



Surprisingly with my non-accelerated ati radeon the shadows don't slow particularly the display, so I'm keeping them -- incredible how they add a proper "finished" feeling...

Now I'm just waiting for the next X release (cvs compilation of xorg froze the powerbook) to have this damn ati radeon *accelerated*, because Alex Malmberg GNUstep OpenGL backend is neat (woosh windows disappear in spinning), but.. er... unusable without a 3D acceleration, of course :-/

Thursday, November 10, 2005

Structured Edition



I have been playing since a week or so with the Text System on Cocoa/GNUstep... it's not immediately easy to understand, but it's really nice and powerful :-)
It handles automatically lots of things, you can redefine many things too (create specific layout manager to change the way the text is displayed, eg, to "flow" around an image, etc.)..

For instance, you're supposed to work with NSTextStorage, which contains the content you're editing, and which is supposedly an attributed string (a string plus related attributes -- fonts, links, attachments, etc), and you edit it via a NSTextView. But what if you want MORE than edit an attributed string ? like, say, edit some structured content ?

Well in fact,the answer is to create a subclass of NSTextStorage that will answer the base methods (just four) of NSTextStorage -- it's in fact a class cluster. So the idea is simply to have on one side your structured document (in my case, a simple array of "Section" objects, containing (optionally) a title and a content), and to have a NSTextStorage that will actually serve as a gateway between the text system (which expect a simple NSAttributedString) and your own structured model... Pretty cool :-) and that way you benefit of all the niceties of the text system..

The above screenshot is my current editor (which btw I wrote under Cocoa, and recompiled this evening on GNUstep), the button is there to define a selected text as a title.

Friday, November 04, 2005

Gorm on Windows

Gürkan posted this screenshot of Gorm on Windows :


Ok, the theme used is.. well, the default NeXT theme :-) which doesn't really fit well with the Windows GUI. But still, it's quite cool to have Gorm working on Windows like that :-) (and hopefully once I finish integrating Camaelon -gui modifs somebody will write a Windows theme using the win32 theme api !)