Recent

Author Topic: Lazarus on MacOsX without X11  (Read 35062 times)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #30 on: January 16, 2007, 06:56:11 pm »
Quote from: "sekel"
I don´t think it´s much more then 300. One only needs to substitute X11 calls on gtk2 widgetset with carbon calls, make sure all ifdefs are darwin prepared, do lot´s of testing and create a tutorial about how to get lazarus working with native gtk2.


Is there anybody out there willing to get started on this for $300?

Did anyone ever get the native GTK2 libraries to link successfully with Lazarus?

Note that a fix over the weekend now allows switches to be passed to the OS X ld linker (with FPC -k) to be longer than a total of 255 chars. This means that if necessary you can use the ld -dylib_file switch to make substitutions for libraries that are in different locations or have different names than what is expected. You can also put these -k switches in an FPC .cfg file now regardless of how many you have.

At runtime, if necessary, you can use a shell file (.sh) to launch an app after setting (export) the DYLD_LIBRARY_PATH environment in case the GTK2 libraries are installed in a location different from what the executable's dependencies (otool -L) or the libraries' dependencies expect.

With GTK2, it appears as though it's also necessary to export a bunch of env. variables that GTK2 needs, hence the use of a .sh file to launch the app:

export "PANGO_RC_FILE=
export "FONTCONFIG_PATH=
export "GTK_IM_MODULE_FILE=
export "GDK_PIXBUF_MODULE_FILE=
export "GTK_DATA_PREFIX=
export "GTK_EXE_PREFIX=

A .framework file that includes the native GTK2 libraries would be great to have. That way the location of the libraries will be in a standard place (/Libraries/Frameworks). To see an example of a script that creates a framework for libraries, download the mac_qt4pas_x.xx.zip from:

http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html

See create_framework_mac.sh in the .zip.

Thanks.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Lazarus on MacOsX without X11
« Reply #31 on: January 17, 2007, 01:59:17 pm »
Quote from: "Phil"
Is there anybody out there willing to get started on this for $300?


I am =) .......

but I don´t have access to a machine with Mac OS X.

They are quite uncommon on Brazil, to the extent I rarely even see one, much less be able to use it to develop.

Maybe on germany I will see more of them.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #32 on: January 22, 2007, 10:39:06 pm »
Quote from: "sekel"
Quote from: "Phil"
Is there anybody out there willing to get started on this for $300?


I am =) .......

but I don´t have access to a machine with Mac OS X.

They are quite uncommon on Brazil, to the extent I rarely even see one, much less be able to use it to develop.

Maybe on germany I will see more of them.


What would be ideal for you would be a Mac Mini. It's relatively inexpensive as Macs go and since you use your own monitor, keyboard and mouse with it, it's very small and good for travel if you're going out of the country.

Now if we can just find someone who can loan or send you one!

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
Lazarus on MacOsX without X11
« Reply #33 on: January 25, 2007, 04:54:03 pm »
anyway, I already started adapting keyboard handling of gtk2 to be gtk2 native. In that process I plan to remove (or ifdef) all X depenencies so gtk2 can be compiled on OSX or on windows
I've no ide how complete the OSX gtk2 implementation is (also didn't try to commpile it yet)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #34 on: January 26, 2007, 11:28:36 pm »
Quote from: "Marc"
anyway, I already started adapting keyboard handling of gtk2 to be gtk2 native. In that process I plan to remove (or ifdef) all X depenencies so gtk2 can be compiled on OSX or on windows
I've no ide how complete the OSX gtk2 implementation is (also didn't try to commpile it yet)


Sounds great!

5.6 million Macs sold in calendar year 2006. That's a lot of potential users of Lazarus and the desktop software it creates.

Thanks.

Hansaplast

  • Hero Member
  • *****
  • Posts: 569
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #35 on: January 27, 2007, 03:32:43 am »
I guess more and more Windows users go for Apple hardware - since they run Windows great and gives them access to a new OS: Mac OS X. I'm one of those people - I bought a MacBook Pro and run part-time Windows and part-time Mac OS X. Since I have both platforms available, I'd like to spend my time developing for both (and Linux of course) with out too much effort.

XCode, RealBasic, Revolution, etc. it probably works for some, but just not for me - I'm too much hooked on Delphi/Lazarus :)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #36 on: January 27, 2007, 04:23:53 pm »
Quote from: "Hansaplast"
XCode, RealBasic, Revolution, etc. it probably works for some, but just not for me - I'm too much hooked on Delphi/Lazarus :)


XCode serves as a gentle introduction to creating app bundles, resources, etc. on OS X, but it wants you to program in Objective C which, like XCode itself, is not cross-platform. Lazarus is a better choice as a general-purpose programming tool.

It would be nice if Apple could one day link to Lazarus 1.0 from their Web site the way they do other open source apps like Gimp:

http://www.apple.com/downloads/macosx/unix_open_source/gimpapp.html

And many other open source apps:

http://www.apple.com/downloads/macosx/unix_open_source/

An Intel Mac is also a great computer for developing for multiple platforms since you can run both Windows and Linux in a window on the desktop using Parallels, which Apple also endorses:

http://www.parallels.com/