Its alife…

Posted by ALB42 on 13. September 2014No Comments

Today I brought back the LCL for i386-aros to life, I started from zero, just checked out the lazarus svn trunk, and tried to compile.
of course it does not work at the first try.
I would not believe what was the most difficult step… it was the makefile creation. :O I had same problems… but good that I implemented the environment variables so I can use them to force the fpcmake to work.
The next point are the UTF8 function for file handling. And when I look into the source one could get in rage… seems the bad behaviour

{$ifdef win}
  Winthings
{$else}
  Unixthings
{$endif}

become the usual way to do it!
There are platforms out there which are NOT Unix and NOT Windows, Aros for example 🙂
Why not:

{$ifdef win}
  Winthings
{$endif}
{$ifdef unix}
  Unixthings
{$endif}

or even better: 😉

{$undef ThingsImplemented}
{$ifdef win}
  {$define ThingsImplemented}
  Winthings
{$endif}
{$ifdef unix}
  {$define ThingsImplemented}
  Unixthings
{$endif}
{$ifndef ThingsImplemented}
  {$FATAL Things not implemented}
{$undef}

I will never understand that, it is really trouble and makes the implementation harder than it have to be… because sometimes you get error messages from unix, sometimes from windows implementation, or it just compiles but gives completely non-sense results (mostly path things). And then you have to track back where this was included and why it tries to use the windows/linux things.
the good thing is in LCL seems not such things.. so it seems to be really platform independant, but the lazutils is horrible.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert