Recent

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

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #15 on: January 15, 2007, 05:31:57 pm »
OK so I have been snooping around trying to get this bounty thing going for QT/Carbon, is there an easy way we can collect 'donations' from multiple Mac users that would like to see Lazarus running natively on OS X (versus under X11)?

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #16 on: January 15, 2007, 06:07:47 pm »
Quote from: "Hansaplast"
OK so I have been snooping around trying to get this bounty thing going for QT/Carbon, is there an easy way we can collect 'donations' from multiple Mac users that would like to see Lazarus running natively on OS X (versus under X11)?


I don't know anything about the details of how donations could be collected or how bounty payments are made. Maybe Sekel could enlighten us.

I would be willing to contribute to this collection.

Thanks.

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #17 on: January 15, 2007, 06:22:13 pm »
Same here, and my guess is that we'd all like to chip in let's say something. Just the contribution of one person would not be attractive enough to get a person going to make a native OS X version of Lazarus/FreePascal ...

I think it would be great if we really can work cross platform covering the 3 major platforms (Windows, Linux, Mac OS X) ...
(specially since more and more people switch to an Intel based Mac)

Sekel?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Lazarus on MacOsX without X11
« Reply #18 on: January 15, 2007, 06:56:41 pm »
Quote from: "Hansaplast"
Same here, and my guess is that we'd all like to chip in let's say something. Just the contribution of one person would not be attractive enough to get a person going to make a native OS X version of Lazarus/FreePascal ...


Well, then split the bounty into pieces.

Offer, for example to get working what you need for your applications (if they aren´t too complex).

And others can add more things latter. The bounties page is:

http://wiki.lazarus.freepascal.org/Bounties

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #19 on: January 15, 2007, 07:54:26 pm »
Quote from: "sekel"

Well, then split the bounty into pieces.

Offer, for example to get working what you need for your applications (if they aren´t too complex).



How does the payment transaction typically work? Via some 3rd-party service like PayPal?

Thanks.

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #20 on: January 15, 2007, 08:33:12 pm »
Sekel; to be honest I'm new to Mac OS X, and wouldn't know what it would entale to get it to run natively on Mac OS X.
I read about Carbon and QT4 - on those 2 I'm not even sure what exactly the difference is.
So specifying the exact components I'd need for my applications (miscellaneous freeware) would be quite hard.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #21 on: January 15, 2007, 09:31:39 pm »
Quote from: "Hansaplast"
Sekel; to be honest I'm new to Mac OS X, and wouldn't know what it would entale to get it to run natively on Mac OS X.
I read about Carbon and QT4 - on those 2 I'm not even sure what exactly the difference is.
So specifying the exact components I'd need for my applications (miscellaneous freeware) would be quite hard.


You would need the same components regardless of which widgetset you use.

Qt looks great and is a true native widgetset, but has two requirements: Users need Qt libraries or framework installed (or these can be included in your app's bundle) and the opensource Qt libraries can only be used for opensource apps, otherwise you need a commercial license from Trolltech. Your freeware would probably qualify for the opensource Qt libraries if you make the source available too.

Carbon widgetset only requires the Carbon.framework, which is part of OS X. However, this widgetset is only in the birthing stage (i.e., not good for anything yet, but has potential).

GTK and GTK2 widgetsets are not native because they require X11. GTK looks ugly too. GTK2 looks much nicer, but it seems rather slow compared to GTK and of course the GTK2 widgetset is not finished yet. Both require rather large libraries to be installed on your users' systems (plus X11) in order to run your apps.

To see what library dependencies your app has, use otool with -L switch on the executable file.

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #22 on: January 15, 2007, 09:44:27 pm »
Thanks for the clarification Phil :)
Much appreciated!

Just curious what Apple is using natively for their OS?
Isn't that Carbon?

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #23 on: January 16, 2007, 12:21:57 am »
Quote from: "Hansaplast"
Just curious what Apple is using natively for their OS?
Isn't that Carbon?


Yes, and Cocoa too.

If you haven't seen this, take a look at the .pdf at the bottom of this page:

http://developer.imendio.com/projects/gtk-macosx

This paper covers a lot of the OS X technologies.

This is a project where they're trying to eliminate the dependency on X11. That would be very nice. If this port is ever finished, I imagine they'll distribute it as an easy-to-install framework (in a .dmg installer). That would make it easy for your users to install the GTK2 libraries required to run your GTK2 widgetset-compiled apps.

However, having a native of GTK2 probably won't speed it up much and does require a fairly large set of libraries to be installed. For example, the GTK2 version 2.6 libraries I have installed take up about 65MB. Of course, I have the universal binaries installed, so they're about 2x what they need to be since both the PowerPC and Intel code is included in the libraries, but also I'm a couple versions back from the current stable version, which adds a lot more I would expect.

ovidius

  • New Member
  • *
  • Posts: 21
Lazarus on MacOsX without X11
« Reply #24 on: January 16, 2007, 12:24:58 am »
Quote
Just curious what Apple is using natively for their OS?
Isn't that Carbon?


Well, technically, yes and no. The native interface is either Cocoa or Carbon. The latter is actually for compatibility and easy transition of old Mac OS 9 applications, but is still in widespread use.

Let me add, that there is a native port of gtk2 to Mac OS X Tiger, but lazarus is not compatible with it yet. The port is going to be be part of the next gtk2 version IIRC. So there might be a change of another way to use lazarus without X11.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Lazarus on MacOsX without X11
« Reply #25 on: January 16, 2007, 02:30:13 am »
Quote from: "Phil"
How does the payment transaction typically work? Via some 3rd-party service like PayPal?


On my last bounty I received a bank payment order, but there is no standarized way to do this.

PayPal isn´t good for people in Brazil, because we can´t get cash from it, only use the received money to buy things using paypal. I think this applies to many other countries too.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Lazarus on MacOsX without X11
« Reply #26 on: January 16, 2007, 02:34:07 am »
One idea I just has is to instead of creating a bounty for Carbon or Qt, why not create a bounty to make Lazarus compatible with Gtk 2 for Mac OS X?

This should be easy enougth for a reasonably small amount of money (something like 300 dolars). And I also think Lazarus has the best shot of working natively on Mac OS X with Gtk 2. Because Qt has license restrictions and Carbon still needs years of development.

Hansaplast

  • Hero Member
  • *****
  • Posts: 570
  • Tweaking4All.com
    • Tweaking4All
Lazarus on MacOsX without X11
« Reply #27 on: January 16, 2007, 03:29:52 am »
I see :)

And just to think that all I wanted is a development tool that runs natively in Mac OS X and is capable of creating applications that can be used natively (no X11 or any other "extras") on Mac OS X ... ;)

I'm a little surprised that Apple doesn't support ventures like FreePascal/Lazarus - they would greatly benefit from it (availability of applications).

Anyway, for now I'm stuck developing with either Lazarus or Delphi (7) on a Windows machine ... just wish I could use powerful tools like Lazarus to create the same applications for Linux and Mac OS X as well :)

Thanks guys for the great info! And if someone decides to start a collection of donations to achieve this: Count me in!

Phil

  • Hero Member
  • *****
  • Posts: 2750
Lazarus on MacOsX without X11
« Reply #28 on: January 16, 2007, 03:42:34 am »
Quote from: "sekel"
One idea I just has is to instead of creating a bounty for Carbon or Qt, why not create a bounty to make Lazarus compatible with Gtk 2 for Mac OS X?


I assume you mean the native GTK2 port for OS X, since the X11-based GTK2 already works on OS X with Lazarus.

A few things to keep in mind about this:

- GTK2 widgetset itself is still not finished. I got some pretty weird crashes with GTK2-compiled apps on both Linux and OS X.

- It looks like the native GTK2 port is only targeted at OS X 10.4. That would exclude all of us still running 10 (or force us and users to upgrade).

- It's still not clear how native-looking the GTK2 native port will be. It sounds as though decisions about some things like menus and common dialogs have not been made yet. Although the common dialogs for the X11-based GTK2 libraries look good, they just don't look like OS X native common dialogs.

But I agree that this might be a much faster approach than waiting for the native Carbon widgetset. However, I wonder if it might cost more than $300?

Thanks.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Lazarus on MacOsX without X11
« Reply #29 on: January 16, 2007, 11:57:43 am »
Quote from: "Phil"
I assume you mean the native GTK2 port for OS X, since the X11-based GTK2 already works on OS X with Lazarus.


Of course

Quote
- It looks like the native GTK2 port is only targeted at OS X 10.4. That would exclude all of us still running 10 (or force us and users to upgrade).

- It's still not clear how native-looking the GTK2 native port will be. It sounds as though decisions about some things like menus and common dialogs have not been made yet. Although the common dialogs for the X11-based GTK2 libraries look good, they just don't look like OS X native common dialogs.


Didn´t know about this part.

Quote
But I agree that this might be a much faster approach than waiting for the native Carbon widgetset. However, I wonder if it might cost more than $300?


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.

Even better would be a snapshot with pre-compiled native gtk2.