On Monday, November 3, 2003, at 04:57 PM, Olivier ABILLON wrote:


Here are a few comments about making a standalone application for Mac OS X:

I do not think that putting all data stuff (scenery, ...) in the application bundle is a good idea: users will no be able to edit preferences files, aircraft files, and so on, without a special menu function in FG or with the terminal.
On my Mac, I put the data folder in the same folder where FG application is.
I just add an "APPLE" case in the funtion "bool fgInitFGRoot ( int argc, char **argv )" in the fg_int.cxx file:

I think the correct solution is to allow the base files to be packaged inside the bundle, but search the application support locations and preference support locations. That's pretty easy using FSFindFolder and the various domain and folder flags. However, many places in Flighgear currently only support a single location, rather than a list of paths to search, so this can't be done right now.


it's simpler than using Apple's functions...
I don't think that's a big problem, the Apple functions are pretty verbose, but I'm happy to stick them in a separate source file, and they're a bit more robust than mangling the paths by hand.


There is another problem: the Finder adds an argument in the argument list argv: "-psn:xxx".
It must be removed. The Apple version of GLUT removes this funky argument; so a call to GlutInit must be done before parsing options.
Another method is to trap this argument in the fgParseArgs function (file options.cxx):


<snip>
Isn't it safer to move glutInit? We don't know what behaviours glutInit is relying on, so passing it the raw command line seems more likely to work if things change in the future.


I also added the following code at the beginning of the fgMainInit function in the file main.cxx:

#if defined( __APPLE__ )
    freopen ("/Users/'your_login'/stdout.txt", "w", stdout );
    freopen ("/Users/'your_login'/stderr.txt", "w", stderr );
#endif

this way I can see what happens without using the console or the terminal (very useful for debugging)


I noted that from version 0.9, FlightGear is slower (about 5 fps)(I have a 500 MHz G3 iMac, with an ATI rage pro graphic card - 16 Mo only). Disabling the drawing of objects does not speed the rendering. Reducing the size of the textures can enhance greatly the fps: up to 15 to 20.

I haven't got FG running on my powerbook yet, but i'm hoping that with a 64mb radeon 9600, it will be usable (it wasn't, on my ibook). Still waiting on panther, alas.


H&H
James
--
They are laughing with me, not at me.


_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to