[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep <-> Cocoa compatibility

From: Andreas Höschler
Subject: Re: GNUstep <-> Cocoa compatibility
Date: Sun, 4 Jan 2004 18:23:26 +0100

I have just discarded ProjectBuilderWO.app makefiles and am using GNUstep make on MacOSX, Linux and Solaris now to build stuff from the same source tree and make files. It took me some time to get everything working. The compilers on the Mac and on Solaris behave differently especially with regard to frameworks (-framework option). So you need some make file tweaking here. But finally everything works like a charm. I really recommend GNUstep make for cross platform development, especially since GNUSTEP_BUILD_DIR is available now, which is pretty important for this kind of usage. Thanks to Nicola for his work on GNUstep make!!!



expected. Even better, if you write your Application with Renaissance,
than it is protable right from the start.
If you on the other hand want to use the GNUstep GUI on top of MacOSX
there are still some problems to be expected.

i rather want the following: develop an application in GNU environment
until i'm satisfied with it, checkout it from cvs onto MacOSX machine
and build it to run on MacOS.

the source tree will contain c/objective-c sources and GNUmakefile and some images, will i need something else to make it build and integrate
itself into MacOS?

Here you need an answer from Nicola.

The way I do it (which is not necessarily the only way, and not
necessarily the right one) is - I use gnustep-make to build on both
GNUstep and Apple. On Apple, gnustep-make is only used to build; once you
have built your frameworks (or applications), you don't need it to run
them - you can install and use them as native Apple

In practice, to build you have GNUmakefiles; once you know they work on
GNUstep, they should work on Apple too.

The source code is the same on both platforms; but you really need to try it out on both platforms periodically to make sure it still works on both.

I use Renaissance to build the GUI, and I also take advantage of the
RELEASE / ASSIGN macros defined in Renaissance (these are GNUstep-only
macros otherwise, but I find ASSIGN() *really* useful to prevent memory
allocation mistakes). Generally I use separate menu .gsmarkup files for the two platforms, so that they feel really native in the choice, location and naming of the menu entries; I use the same .gsmarkup files on the two platforms for all windows and widgets (that depends on taste, if you have
enough time and taste, you might want to have different ones on the two

If you look at the Renaissance examples, stuff like
Examples/Applications/Finger, you should get a clear idea of what I mean.

You can build an application on GNUstep using those tools, and if you
don't do exceptionally weird things ;-) it should not be difficult to have
it run on Apple too, building from exactly the same sources and files.
Of course if, from the very beginning, you periodically try it out on
Apple you'd spot out Apple problems sooner and would probably get a more
stable and robust application on Apple.  But porting later is an option

In any case, in theory yes you can use the same source code, the same
makefiles, the same images, the same .gsmarkup files, in practice yes this all works for me at least :-) but I recommend testing on both platforms to
get a good product. :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]