>> Something like a "Creating and using MacOS frameworks in 21 days" >> type guide >> would be nice, though ;) > > Straight from the horses mouth: > > http://developer.apple.com/documentation/MacOSX/Conceptual/ > BPFrameworks/index.html >
Thanks for the link. However, it seems to be rather Apple specific and not really suited specific for the things I want to do. So perhaps I have to start from the basics and woork from there on. I have an open source application (a game which depend on SDL, not in Gentoo, yet). I have a working libSDL, libSDL_ttf, libSDL_image aso from Gentoo-OSX, installed into /usr prefix (/usr/lib, /usr/include) The game compiles and runs fine if started from the console. As a good Apple developer and user ;) I would like to create an application folder in order to be able to start the application from inside the finder, without having to resort to the CLI. I have managed a basic app folder, mostly by manually copying the necessary files into the needed places. The game runs from the finder. Next step would be to create a standalone application, suitable for distribution. This means including the used libs into the app folder structure. If I check the actual executable with otool -L, I see that the exe is still linked against /usr/lib/libSDL-X.Y.Z.dylib (including other libs and system frameworks) >From what I see, basically I have two choices. a) copy the needed libs to a app folder local sub folder and do some hacks with DYLD_LIBRARY_PATH. The actual starting program of my application is a Unix shell script, so this could be even possible b) learn to build frameworks from inside Gentoo, so that I can link against the framework. I have the idea that I can distribute the framework as part of my app folder and it is fetched automatically. >From what I have seen in the link you gave, framework creation is done in XCode / ProjectBuilder only. I did not found any example about how to do this in a portage like environment (I found a DarwinPorts script for creating a libSDL framework, but this uses .pbx scripts, too) After a framework is created (which I think is the problematic part), I assume that using the framework just is replacing a gcc CFLAGS main.c -o main.o gcc LFLAGS main main.o with CFLAGS=-I/usr/include LDFLAGS=-L/usr/lib -lSDL by a CFLAGS=-framework SDL LDFLAGS=-framework SDL and for deployment just copy the files from the framework (or a subset from them?) into my app folder? Regards Dirk -- [email protected] mailing list
