View Full Version : Patch for ClanLib 0.9 svn 368 (Linux compatibility)

05-09-2007, 01:07 PM
Attached is my "work in progress" patch to get ClanLib 0.9 to compile using Linux.

To do:
ClanGL, ClanMikMod and ClanSound.

(These can be disabled in configure.ac - remove dnl in:
dnl CLANLIB_DISABLE_MODULE(clanMikMod, [ clanMikMod requires fixing ] )
dnl CLANLIB_DISABLE_MODULE(clanGL, [ clanGL requires fixing ] )
dnl CLANLIB_DISABLE_MODULE(clanVorbis, [ clanVorbis requires fixing ] )

Mark Page.

05-10-2007, 08:45 AM
Ignore this patch ... it is currently being applied with an updated patch :)

clanMikmod and clanGL both compile. However i created a new file: Sources/GL/GLX/display_message_queue_unix.(cpp and h) that contains stubs ... so clanGL will not work.

(clanVorbis did not require modifications)

For interest, the patch is attached here (someone else is applying it, assuming that it is okay).

Please note, my previous patches were incorrect, all tabs were replaced by spaces in the diff file (i copied and pasted the kdesvn diff output into a text editor, loosing the tabs. I should have used the command line svn diff )

Also, the current svn ClanLib-0.9/Sources/GL/GLX/opengl_window_provider_glx.cpp contains duplicated source code, the entire source code appears twice in the same source code file.
This is also the same in ClanLib-0.9/Sources/GL/GLX/input_device_x11keyboard.cpp
My patch removes the duplicated source code

05-11-2007, 04:00 AM
Thanks for the great work Mark. You are putting presure on us now to soon stabilize this version of clanlib. :)

05-11-2007, 09:44 AM
Just to make it clear, that patch only fixes the build system, so that ClanLib0.9 compiles, it does not fix all the problems with Linux ClanLib.

Note, the patch that was applied, did not include the "display_message_queue_unix.*" stubs ... that is okay, as i am going to have a look at them today.

05-11-2007, 12:54 PM
Well i had a look, and I got the Basic2D example to display a blue screen :)

I am taking a couple of days off, back on Monday.

I have attached a patch to the latest ClanLib 0.9 svn - if anyone else wants to have a look at it over the weekend to fix the programs.

Also if someone can get Basic2D to fully work (in Windows), i would be very grateful :D (The version of Basic2D in my patch contains a couple of fixme's.)

05-14-2007, 11:07 AM
I have now got Basic2D, and GLCube, GLFog to run on the Windows platform.
I also have got mikmod example working on linux

The shadowofthebeast, Basic2D, GLCube all work on linux if i comment out the keyboard reading functions.

This fault is caused by:
void CL_OpenGLWindowProvider_GLX::create_new_window(con st CL_DisplayWindowDescription &desc), not calling get_ic()->add_keyboard()

Note: a couple of source code files contained CTRL-M characters, this has been fixed.

My latest work in progress patch is attached here (to replace patch5.zip)

05-15-2007, 12:40 PM
This is my latest patch to get ClanLib0.9 working on Linux

Basic2D, GlCube, ShadowofTheBeast, MikMod fully work on Linux (I think!)

This patch replaces all the other patches (that have NOT been applied)

(shadow of the beast demo, there is a transparency problem, but i will ignore that for now ;)

05-16-2007, 08:02 AM
Patch has been applied. Thanks