Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Stéphane-M

macrumors newbie
Original poster
Jan 11, 2011
2
0
My flight simulation club is working on the development on an opensource flight simulator (Fly! Legacy) under GPL license.
http://sourceforge.net/projects/flylegacy/

Currently, only a Windows version of this software is available and so, one or several people would be necessary to help us to convert this Windows application to a Mac application.
The application was developed in C++ and was compiled with Visual Studio 2008.
About the librairies included in the project, I don't know all because I'm not developer of the project but I can tell you that uses:
_ OpenGL
_ OpenAL
_ FreeImage
_ OPAL-ODE
_ Glew
_ PThread
_ STLport (not sure)
Could you help us ?
Thank you for your cooperation.
 

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
It depends on how the application was designed. It could be a bit of work, or it could be lots of work. Mac supports C++ and OpenGL. So that's covered. But any part of the code that deals with the non-OpenGL user interface and/or integrates with Windows will probably have to be re-written. Probably in Objective-C because that's the language used by all of the Mac libraries.

This might be an opportunity to redesign the application to abstract out the game logic from the presentation logic. In other words, move toward an MVC design which is recommend in all of the Apple docs. :)
 

Stéphane-M

macrumors newbie
Original poster
Jan 11, 2011
2
0
It depends on how the application was designed. It could be a bit of work, or it could be lots of work. Mac supports C++ and OpenGL. So that's covered. But any part of the code that deals with the non-OpenGL user interface and/or integrates with Windows will probably have to be re-written. Probably in Objective-C because that's the language used by all of the Mac libraries.

This might be an opportunity to redesign the application to abstract out the game logic from the presentation logic. In other words, move toward an MVC design which is recommend in all of the Apple docs. :)

I don't know if the non-OpenGL parts which interact with Windows are numerous or not, so I won't be able to tell you if the amount of code to be re-written is important or not.

For Dejo:
In summary, we would like to find someone who will accept to download the code source of our project, setup in a Mac development environment and try to compile it (rewrite code if necessary, but I ignore if it is a huge work or not) to get an executable for the Mac platforms.
Our final objective is of course to offer on our website a Windows, Mac and Linux version of our software.
 
Last edited:

gnasher729

Suspended
Nov 25, 2005
17,980
5,565
It depends on how the application was designed. It could be a bit of work, or it could be lots of work. Mac supports C++ and OpenGL. So that's covered. But any part of the code that deals with the non-OpenGL user interface and/or integrates with Windows will probably have to be re-written. Probably in Objective-C because that's the language used by all of the Mac libraries.

This might be an opportunity to redesign the application to abstract out the game logic from the presentation logic. In other words, move toward an MVC design which is recommend in all of the Apple docs. :)

Also supports standard Posix pthreads, and the C++ STL library. Plus good support for all kinds of image files, good support for Audio, no idea what Glew and OPAL-ODE would be doing.
 

Blakeasd

macrumors 6502a
Dec 29, 2009
643
0
1. Create a new C++ project in Xcode.
2. Get the C++ source itself (.cpp) not the Visual Studio Project File
3.Import the code into Xcode
4. You will have to import some Frameworks
=====NOTE=====
This might not work. It depends on the functions you are using. For example
windows.h does not exist on the mac. If you get an error it might be because you are using Windows only functions. Be sure to google to errors and look for Mac equivalents.
 

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
Just for the fun of it, I tried importing this code into an Xcode project just to see what would happen. Even after adding the frameworks I felt were probably needed, the initial compile tried compiling 162 files for a grand total of 77535 errors and 2993 warnings.

It looks like the UI is written using GLUT and various libraries that depend on GLUT. Unfortunately, GLUT is not included with Mac. But it does appear there is a DarwinPorts version of it. So all is not lost. It may be possible to port this with enough effort.

I'm guessing the way to get this to work is to try and get the GLUT stuff (and this app) to work under X11. It wouldn't be a "native" Cocoa app. Creating a Cocoa version would require re-writing pretty much the entire project.
 

Cromulent

macrumors 604
Oct 2, 2006
6,802
1,096
The Land of Hope and Glory
It looks like the UI is written using GLUT and various libraries that depend on GLUT. Unfortunately, GLUT is not included with Mac. But it does appear there is a DarwinPorts version of it. So all is not lost. It may be possible to port this with enough effort.

Yes it is. Add GLUT.framework. You'll probably need to change the includes from glut.h to GLUT/glut.h though.

Edit: Balls didn't read the post directly above mine :).
 

mfram

Contributor
Jan 23, 2010
1,307
343
San Diego, CA USA
Wow, I don't know how I missed that. Looks like it might be possible. The Fly program also uses PLIB. The website for that indicates that Mac OS X is "reasonably well supported". So that may take care of a large part of the stuff I couldn't compile since I didn't compile and build that whole library.

There was some Windows startup code in the program which would obviously have to be re-done. But it's looking like with correct libraries installed, it might not be too hard to get this thing working on Mac after all.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.