Archive for November, 2007

International Input Support on X – SDK 0.41.17.9

Sunday, November 25th, 2007

After all this struggle to get SCIM working, I could finally implement the international input support.

Ecere Communicator now includes the new runtime library and supports international input as well.

The Linux SDK now also properly supports X keysyms to follow the correct keyboard layout.

I believe the X clipboard operations should be fixed for good this time. (I tested and was able to copy to and from FireFox and between two Ecere IDEs.)

The X bitmap rendering features some additional support.

Two small samples were added, a transparent clock, and a utility to take a screen shot of the X desktop.

A smal fix was made to desktop-level transparent windows using OpenGL. The IDE and Debugger had some minor improvements done as well.

An issue was resolved on Windows, whereas internal resources could not be accessed when a executable was inside a path containing non-ASCII characters. The last installer itself would not work when ran from such a path.

With the Windows taskbar autohiding, the Ecere applications do not resize anymore (it was causing a “jumping” effect) .

The runtime now prompts for reestablishing Windows network connections.

Download Ecere SDK 0.41.17.9 for: Windows or Linux

Download Ecere Communicator 0.02 for Linux

Upgrading to glibc-2.7, Setting up SCIM

Sunday, November 25th, 2007

In order to implement and test international input on Linux, I had to get an input method such as SCIM working.

It turned out my locales were not installed, so I decided to upgrade my GNU libc while I was at it, and that didn’t go too smoothly. I’m running on Ecere Linux which has been my self-built Linux distribution for many years. Here’s a few hints to those trying to build their libc (I upgraded to 2.7).

If you get something like /bin/sh: no: command not found, it seems this is just a tactics from the configure script to fail, and “no” here is a placeholder for some tools not recent enough. Upgrading gettext was the solution to that one.

Make sure march is set or you might get something like undefined reference to `__sync_bool_compare_and_swap_4′.

For some other unknown reason, I had undefined reference to `__stack_chk_guard’ while trying to build the nscd directory. I had to manually edit the Makefile and add -lssp to that line LDLIBS-nscd = $(selinux-LIBS) -lssp .

My working configure line was the following:

export CHOST=”i686-pc-linux-gnu”; export CFLAGS=”-O2 -march=i686″; ../glibc-2.7/configure –enable-shared –prefix=/usr –enable-profile=no –enable-add-ons –enable-kernel=2.6.0

I was quite relieved to see “Your new glibc installation seems to be ok.” come up on the screen.

After make install, I couldn’t couldn’t login remotely or from the console, su would jam on a send.
Upgrading the coreutils and/or restarting my syslogd seemed to resolve that.

Then to install the locales I did: make localedata/install-locales

With locales in place, SCIM was more likely to work. I installed scim, anthy & scim-anthy for japanese support, kasumi which is a dictionary editing tool which you can use with anthy, as well as scim-pinyin for writing chinese in pinyin.

In order to make SCIM work with XIM, the following environment variable should be set: XMODIFIERS=@im=SCIM

SCIM should also be initialized on X startup with: scim -d

I tested with Firefox, but Firefox 2 would crash if my locale was set to Japanese. I tried Firefox 3 beta 1 and I could finally type my first japanese characters in Linux!

New SDK Release for Windows & Linux (0.41.17.7), Ecere Communicator for Linux

Saturday, November 17th, 2007

I’m pleased to announce a new release of the SDK for both Windows & Linux, supporting Unicode and all recent improvements which have been going on in the last 3 months. (The Windows SDK was somewhat outdated, from August). The Linux version features a number of bug fixes and improvements. Quite a few samples have been added as well to showcase the power of the SDK, all released under the BSD license.

Ecere Communicator is now available for Linux. It is an instant messaging client under development supporting AIM/ICQ, MSN and Jabber/XMPP protocols. Basic messaging and contact list functionality (sorry, cannot add contacts yet) are fully working.

A very tiny sample to take a screen shot of the X desktop has been included (code follows) as I’ve found this to be a tedious task to do on my self-built Ecere Linux distribution. It proved itself especially useful while trying to take the attached screen shot with xcompmgr running, somehow the usual xwd, xwdtopnm, pnmtopng utilities didn’t know what to do with the extra alpha channel.

import “ecere”

class ShotApp : GuiApplication
{
Window window { };
bool Init()
{
Bitmap bitmap { };
desktop.Grab(bitmap, null, false);
bitmap.Save(“shot00.png”, null, null);
delete bitmap;
window.Destroy(0);
return true;
}
}

I would like to emphasize the very small footprint of the Ecere SDK (libecere.so is all an application needs to run and is only 1.5 MB) and small number of dependencies required to use it. With full functionality, Ecere only requires standard graphic formats, X, GL and core system libraries. It aims to be an alternative to GTK, Qt, GNOME, KDE and therefore doesn’t require any of those. If you ever tried to build them for your LFS (Linux From Scratch), you know how heavy, dependent and long to compile they are. Yet, Ecere already provides a very appealing level of comparable functionality and is still far from what it intends to become.

Download Ecere SDK 0.41.17.7 for: Windows or Linux (obsolete)

Download Ecere Communicator for: Windows or Linux

Windowless Desktop Toys, Chess & New SDK for Linux (0.41.17.5)

Wednesday, November 14th, 2007

After much wrestling with X, XRender, XShape & GLX, here they are: the Linux versions of the desktop toys.

Here is a screen shot of them in action:

Linux Toys Shot

The Linux Ecere SDK now supports alpha blending window contents through the “bool alphaBlend” property of the window class. When set to true, the window has its own alpha channel which a proper composite manager such as xcompmgr will happily use to make parts of the window translucent or completely transparent. The SDK will also automatically redefine the input region through the XShape extension so that clicks in transparent areas will click through on the underneath windows.

To render non opaque contents on the window, use a value smaller than 255 for the surface’s foreground and background while calling drawing methods (Proper support through both XRender and OpenGL in this release). You can also use a value between 0 and 1.0 (exclusively) for the window’s opacity to automatically have a translucent background drawn for you.

A few fixes were also done to the X OpenGL driver and it should now properly run anti-aliased if possible. Here is a binary version of Chess for those who do not yet wish to install the SDK.

Feel free to let me know if you get these running nicely on your system, and I’ll appreciate if you send me nice screen shots of those in action on your own favorite Linux desktop environment. The above screenshot is lacking hiragana characters on the cube as a CJK enabled Unicode font was not found by fontconfig. Ensure you have one of those (see previous post) if you wish to see them.

Download Ecere SDK 0.41.17.5 for Linux (obsolete)

Download Ecere Chess for Linux

Download Windowless Hiragana Cube and Color Spheres for Linux

Linux SDK: New support for fonts, alpha blending, scaling (0.41.17.4)

Thursday, November 8th, 2007

Fonts on LinuxThe Ecere SDK finally supports all those things in the world of the penguins.Thanks go to Keith Packard for all his work on the Xrender extension which the SDK now makes use of.The runtime library now also supports fontconfig (new dependency for the standard libecere.so, also fontconfig requires libexpat.so.1 for parsing the XML config file), so it is no longer necessary to set the environment variable ECERE_FONTS.fontconfig will be used both with the X and the OpenGL driver.I tested with the default fonts.conf from latest X.org release 7.3, and the following free fonts:

Download

X.org, Ecere Chess, Linux release patch (0.41.17.3)

Thursday, November 1st, 2007

Yesterday I finally got around to building and installing the latest stable release of X.org (X11R7.3). They somehow decided that everything was to be split in many little packages. It discouraged me last time and made me choose to keep using XFree86. But since everyone seems to be moving to X.org, this time I went through the tedious task of downloading every packages. They don’t come with any makefiles or scripts with the proper make order either, and they have a lot of dependencies on other stuff as well (fontconfig, expat, …). I therefore had to figure out the proper build older and all this made me miss the simplicity of XFree86’s make world.

I had to call invoke X with “xinit — -ignoreABI” for my nVidia driver to work. Supposedly nVidia will come up with a new driver to fix that.

There was an issue with the ButtonPress/ButtonRelease mouse events which would cause multiple ButtonDown to be generated in Ecere applications. I addressed this issue, and went on to figure out why the Chess AI was taking so long to play his move. I learned that usleep in Linux will make the entire process sleep, not only the thread. I also reworked the X event loop to use select on the X display socket.

This should make Ecere Chess a lot more playable on Linux. I played a few games, I had a rook and a knight and he managed to fork my rook with his only knight for a stalemate :( Another game, he had a terrible start moving his king all around, all the way to my side of the board (I was going right for his king courageously with a lone pawn to pester him). I still ended up checkmate. My chess skills definitely need sharpening.

Download