Re: [Flightgear-devel] Mac #ifdef clean-ups

2008-07-30 Thread Frederic Bouvier
Hi Tat,

- Tatsuhiro Nishioka [EMAIL PROTECTED] a écrit :

 Anyway, could someone apply his (and my) patches and commit to cvs?

 
 RCS file: /var/cvs/FlightGear-0.9/source/src/Main/fg_init.cxx,v
 retrieving revision 1.201
 diff -u -r1.201 fg_init.cxx

  
1.201 is a bit old. Current revision is 1.213 and includes these lines.


 --- src/Main/fg_init.cxx13 Jun 2008 10:52:47 -  1.201
 +++ src/Main/fg_init.cxx29 Jul 2008 18:59:47 -
 @@ -42,6 +42,10 @@
 #  define getcwd _getcwd
 #endif
 
 +#if defined(__APPLE__)
 +#  include CoreFoundation/CoreFoundation.h
 +#endif
 +
 // work around a stdc++ lib bug in some versions of linux, but
 doesn't
 // seem to hurt to have this here for all versions of Linux.
 #ifdef linux


-Fred

-- 
Frédéric Bouvier
http://my.fotolia.com/frfoto/  Photo gallery - album photo
http://fgsd.sourceforge.net/   FlightGear Scenery Designer


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Mac #ifdef clean-ups

2008-07-30 Thread Tatsuhiro Nishioka
Hi Fred,

On Tue, Jul 29, 2008 at 11:30 PM, Frederic Bouvier [EMAIL PROTECTED] wrote:
 Hi Tat,

 - Tatsuhiro Nishioka [EMAIL PROTECTED] a écrit :

 Anyway, could someone apply his (and my) patches and commit to cvs?


 RCS file: /var/cvs/FlightGear-0.9/source/src/Main/fg_init.cxx,v
 retrieving revision 1.201
 diff -u -r1.201 fg_init.cxx

  
 1.201 is a bit old. Current revision is 1.213 and includes these lines.

Ah I see. I couldn't update cvs yesterday since the server was down.
Sorry for making you confused.

Tat

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Mac #ifdef clean-ups

2008-07-29 Thread Tatsuhiro Nishioka
Hi James,

Thanks for your clean-ups.
I was about to eliminate obsolete APIs so this is a really great help.

I applied your patches and it seems working properly so far on my environment 
(cvs/osg as of several days back). However, I needed the following additional 
patch for avoiding compilation errors.

Anyway, could someone apply his (and my) patches and commit to cvs?

Cheers,

Tat

-

RCS file: /var/cvs/FlightGear-0.9/source/src/Main/fg_init.cxx,v
retrieving revision 1.201
diff -u -r1.201 fg_init.cxx
--- src/Main/fg_init.cxx13 Jun 2008 10:52:47 -  1.201
+++ src/Main/fg_init.cxx29 Jul 2008 18:59:47 -
@@ -42,6 +42,10 @@
#  define getcwd _getcwd
#endif

+#if defined(__APPLE__)
+#  include CoreFoundation/CoreFoundation.h
+#endif
+
// work around a stdc++ lib bug in some versions of linux, but doesn't
// seem to hurt to have this here for all versions of Linux.
#ifdef linux



On Jul 25, 2008, at 1:00 AM, James Turner wrote:

 Some Mac / __APPLE___ cleanups for someone to (hopefully) commit:

   - remove the OSX_BUNDLE crap *I* introduced years ago - we're always a 
 a bundle on Mac now.

   - fix up the default fg-root on Mac to be 
 FlightGear.app/Contents/Resources/data - i.e the location used by the 
 macflightgear.org distro, and indeed the obvious 'correct' location. Not sure 
 why I didn't use that in the first place, back in the day.

   - remove the CPSForegroundEnable hack. For one thing, we're a bundle 
 and don't need it, and for another, osgViewer on Mac does the same logic 
 using a newer, public API rather than a hack into the OS.

   - remove the strange logic for doing fgOSInit 'early' (in bootstrap 
 rather than main) when running from the command line on Mac; again this is 
 obsolete, and no one seems to know why it was ever necessary. I guess it was 
 an interaction with SDL when running without a bundle.

   - (not Mac related) remove obsolete code bracketed by 
 ENABLE_PLIB_JOYSTICK and USE_GLIDE (neither of which are ever set, even from 
 config.h that I can see) in main.cxx

 There's also a Simgear diff that removes the workaround for the C++ / 
 stdlibary bug which existed aeons ago on Mac.

 fg-no-old-apple.patchsg-no-cxx-hack.patch

 Regards,
 James
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Mac #ifdef clean-ups

2008-07-29 Thread James Turner

On 29 Jul 2008, at 20:41, Tatsuhiro Nishioka wrote:

 I applied your patches and it seems working properly so far on my  
 environment (cvs/osg as of several days back). However, I needed the  
 following additional patch for avoiding compilation errors.

 Anyway, could someone apply his (and my) patches and commit to cvs?

 Cheers,

 Tat

 -

 RCS file: /var/cvs/FlightGear-0.9/source/src/Main/fg_init.cxx,v
 retrieving revision 1.201
 diff -u -r1.201 fg_init.cxx
 --- src/Main/fg_init.cxx13 Jun 2008 10:52:47 -  1.201
 +++ src/Main/fg_init.cxx29 Jul 2008 18:59:47 -
 @@ -42,6 +42,10 @@
 #  define getcwd _getcwd
 #endif

 +#if defined(__APPLE__)
 +#  include CoreFoundation/CoreFoundation.h
 +#endif
 +
 // work around a stdc++ lib bug in some versions of linux, but doesn't
 // seem to hurt to have this here for all versions of Linux.
 #ifdef linux

Weird, I know about that change - I thought it was in the diffs I sent  
to Erik.

Hmmm.

James

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Mac #ifdef clean-ups

2008-07-25 Thread James Turner

Some Mac / __APPLE___ cleanups for someone to (hopefully) commit:

	- remove the OSX_BUNDLE crap *I* introduced years ago - we're always  
a a bundle on Mac now.


	- fix up the default fg-root on Mac to be FlightGear.app/Contents/ 
Resources/data - i.e the location used by the macflightgear.org  
distro, and indeed the obvious 'correct' location. Not sure why I  
didn't use that in the first place, back in the day.


	- remove the CPSForegroundEnable hack. For one thing, we're a bundle  
and don't need it, and for another, osgViewer on Mac does the same  
logic using a newer, public API rather than a hack into the OS.


	- remove the strange logic for doing fgOSInit 'early' (in bootstrap  
rather than main) when running from the command line on Mac; again  
this is obsolete, and no one seems to know why it was ever necessary.  
I guess it was an interaction with SDL when running without a bundle.


	- (not Mac related) remove obsolete code bracketed by  
ENABLE_PLIB_JOYSTICK and USE_GLIDE (neither of which are ever set,  
even from config.h that I can see) in main.cxx


There's also a Simgear diff that removes the workaround for the C++ /  
stdlibary bug which existed aeons ago on Mac.




fg-no-old-apple.patch
Description: Binary data


sg-no-cxx-hack.patch
Description: Binary data



Regards,
James
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel