Game Development Community

V 1.3.0 Codebase different for Windows and Mac?

by Andrei Nadin · in Technical Issues · 10/25/2005 (1:46 pm) · 4 replies

Hi,

This is quite important for me as I work using a PC Desktop and a Mac laptop and need my code to compile accross both. I recently started modifying the engine source code, then copied the entire contents of the TGE SDK directory from my Mac to my PC.

Guess what ... it wouldn't compile! Lots of errors - closer inspection reveals that the files I have are actually different. The 'out-of-the-box' PC version of the SDK contains source code files that have (small) differences to the 'out-of-the-box' Mac version of the SDK (and yes I am talking prior to my modifications).

Is this intended or am I doing something really gammy?

#1
10/27/2005 (2:06 pm)
I'm not sure if you're supposed to copy the directory just like that. Use the PC version on your PC, because there are some binaries and other files that come with it, if I'm not mistaken. eg. bin/nasm/nasmw.exe, or getdxver.exe. Also, the Linux version is slightly different from the PC version (as far as files in the directory tree), so I assume that each platform for the SDK will be needed to be downloaded seperately.

I'm sure the source code differences are at such a low level, that it won't affect anything that directly interfaces with the gameplay code. You probably don't have to worry about changing the source files you have added or modified, unless you wrote some OS specific code in them. Just keep track of all the files you have modified or added in Mac, and only copy those files over to the PC for when you're ready to start porting (altough, I would test this regularly to make sure things are working).

Or you may be able to setup your own private CVS server on your network to check in/out files if you are working on both platforms simultaneously. But I guess not if the soruce code is slightly different on each platform. Probably the most compatible cross-platform code would be in the stable branch of the CVS tree, as the installer versions of the SDK are slightly OS specific.
#2
10/27/2005 (9:58 pm)
Actually, it's possible to get both versions under one tree. It's not hard at all.

I have Windows and Mac compiling separately, with 100% shared code (I'd like to use a share across my network, but VC++ doesn't like it). I usually work on my Mac, so just check something in, then update the Windows box for a test.

Sweet.
#3
10/28/2005 (12:28 am)
I actually compile on 3 machines WindowsXP, MacOSX and Ubuntu Linux. What I did was partitioned my Subversion repository this way

/trunk
+-----/crossroads
+-----/macOSX
+-----/windows
+-----/linux

So in the example/ direcoty of macOSX/, windows/ and linux/ ... I made an "external link" to the crossroads/ directory which only contains the shared game assets and scripts. It is not full-proof but it does work.

r/Alex
#4
10/29/2005 (9:19 am)
Interesting my solution to the problem has been to store the project files for Windows and Mac (the pbproj and VC7 files) on my SVN along with my Custom code directory. Basically, no files from the engine are ever modified however a directory called Custom is placed under the VC7 / pbproj directories is added. All custom code is placed there, and the files added to the build files.

If an engine file is altered - it is first copied to the Custom directory and then the project files are updated - the original file is removed from the project file and the custom one added. Hopefully this will make it easier in the future if we make the desicion to take our code onto v 1.4 of the engine or seomthing.