Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: KeldorKatarn on February 21, 2010, 04:59:26 pm

Title: Source
Post by: KeldorKatarn on February 21, 2010, 04:59:26 pm
Where's the source of the cross platform build located anyway?
Title: Re: Source
Post by: The E on February 21, 2010, 05:31:42 pm
What "cross-platform build"?
Title: Re: Source
Post by: blowfish on February 21, 2010, 05:59:55 pm
For the most part, Linux and Mac builds use the same source code as the windows builds.  You might find the occasional additional file or library required for these platforms in the project file folders themselves.
Title: Re: Source
Post by: chief1983 on February 22, 2010, 01:05:11 am
Well if that's the case the source is still the same.  It's all in SVN.  There are instructions stickied in the SCP threads.
Title: Re: Source
Post by: KeldorKatarn on February 22, 2010, 05:32:02 pm
so which projects/makefiles are configured for which OS? And where does the code differ. I mean the entire registry, windows creation, OS access stuff has to differ SOMEwhere.

How do you build for the other platforms?
Title: Re: Source
Post by: chief1983 on February 22, 2010, 05:37:24 pm
Well, Visual Studio is obviously for Windows :P

The Code::Blocks one is the one that threw me, seems it was originally set up for Linux but hasn't been maintained and probably needs to be updated or removed.

Xcode, again, obviously for OS X.

Linux building is done via the autotools files.  With a fresh checkout/export, run:

./autogen.sh [--enable-debug] [--enable-inferno]
make

Then you'll have fs2_open_[INF_][r, d] in your code folder.  Copy it out and run 'make clean' to clear the slate, or reconfigure it with autogen.sh.

Not sure what you mean about the 'entire registry'.  There are some files that are included in the Linux build process, and some that are only included in Windows, such as the audio files (taylor is cleaning that up though), the unix/win ini/registry stuff, etc.  That's controlled at the project include level I think, but there are also many #ifdef _WIN32 checks throughout the code, etc.  Just gotta look for it.
Title: Re: Source
Post by: The E on February 22, 2010, 05:44:51 pm
Here's a hint: Take a look at \code\osapi\.
Title: Re: Source
Post by: Iss Mneur on February 22, 2010, 06:00:46 pm
That's controlled at the project include level I think, but there are also many #ifdef _WIN32 checks throughout the code, etc.  Just gotta look for it.

The symbol is SCP_UNIX not _WIN32, but yes, all code for all platforms is in the same code base.  As noted by The E, it is mostly contained to files in osapi.
Title: Re: Source
Post by: KeldorKatarn on February 23, 2010, 07:23:35 am
That's all I wanted to know. Thanks.