Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: WMCoolmon on April 25, 2004, 04:45:58 pm

Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on April 25, 2004, 04:45:58 pm
NOTE: These are written with the assumption you have a copy of the current CVS source files on your hard drive somewhere.

Installation instructions
1) Download and install the VC++ .NET 2003 Toolkit (http://msdn.microsoft.com/visualc/vctoolkit2003/). This contains the compiler, linker, etc etc. If you have trouble installing it, check that you have the .NET framework installed - it's available through Windows Update. You must have Windows 2000 or XP to install it.
2) Download and install the DirectX SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=4E825A37-0C94-4421-9EC8-156E52525D11).
3) Download and install the Platform SDK (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/) (the core module); make sure you register the environment variables. (This is somewhere on the page that shows up after you download it.)
4) Download and extract Cvtres1.exe (http://support.microsoft.com/default.aspx?scid=kb;en-us;q187280) to a temp directory, then move cvtres.exe into the "bin" directory of the toolkit.
5) Download build.bat (http://fs2source.warpcore.org/build.bat) and place it in the "code" directory of fs2_open.
6) Open vcvars32.bat in a text editor, such as notepad.  Replace the three SET lines at the beginning of the file with these:
Quote
Set PATH=C:\Program Files\Microsoft SDK\bin;%PATH%
Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%

Set INCLUDE=C:\DXSDK\include;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft SDK\include\;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft SDK\include\win64\atl;%INCLUDE%
Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE%

Set LIB=C:\DXSDK\lib;%LIB%
Set LIB=C:\Program Files\Microsoft SDK\lib;%LIB%
Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB%
You may need to change the paths, but make sure all the above lines are included in some form.
8) Fire up the toolkit command line, browse to the code directory, and type in build.

Command line arguments for "build"


So if you updated irc.cpp, you'd want to enter
Code: [Select]
build file irc/irc.cpp
build link


Edits: minor changes, clarifications, etc etc.

Edit: Newest DirectX SDK for Windows 2000 (Link above updated)
Quote
Originally posted by WMCoolmon
I found a list of the DX9.0 SDK updates. Here's the latest one that supports Windows 2000 (December 2004):

Description on Microsoft Site (http://www.microsoft.com/downloads/details.aspx?FamilyId=4E825A37-0C94-4421-9EC8-156E52525D11)
Direct Download (Skips Windows Validation) (http://download.microsoft.com/download/f/6/0/f6087536-6544-47c7-9ca8-efdcc18feb57/dxsdk_dec2004.exe)
Title: Free compiler for the FSSCP: The answer
Post by: JarC on April 25, 2004, 05:56:29 pm
:yikes: won't this make fs2_open dependant on the .NET framework to be installed if redistributed? :eek2: but otherwise that is a great find :D at least something to play with without resorting to shadyware...
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on April 25, 2004, 06:57:13 pm
I don't think so...
Title: Free compiler for the FSSCP: The answer
Post by: ChronoReverse on April 25, 2004, 07:36:41 pm
Nope, you don't have to compile to .NET bytecode.  VC++ .Net is perfectly capable of compiling proper exes.
Title: Free compiler for the FSSCP: The answer
Post by: JarC on April 25, 2004, 08:03:21 pm
cool!
Title: Free compiler for the FSSCP: The answer
Post by: Turambar on April 25, 2004, 08:21:31 pm
I have no idea what this means but it seems to be really good!
Title: Free compiler for the FSSCP: The answer
Post by: JarC on April 29, 2004, 03:08:48 am
What parts of the PSDK are absolutely required and which parts are optional? the new PSDK installer works likes Windows Update, so it is possible to select only the parts you really need...(hefty download otherwise)

and once compiled, is there a PXO server alternative or is this stricly a LAN build?

also, there's a 'hardcoded' path in build.bat referring to a speech sdk...do I need to download this SDK separately, change the path or just remove it...?
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on April 29, 2004, 03:29:25 am
Once compiled it will have the same features as fs2_open...I think there is a PXO alternative but I am not sure.

You don't need to do anything if you don't want to use the speech functions of FS2...if you do, then you'll need to install the SDK and switch it to the path where the speech SDK is installed on your computer.
Title: Free compiler for the FSSCP: The answer
Post by: kasperl on April 29, 2004, 03:40:17 am
PXO: When Kazan run's his server again or when Inq sets his up.
Title: Free compiler for the FSSCP: The answer
Post by: Inquisitor on April 29, 2004, 11:12:06 am
Which is in process ;)
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on May 24, 2004, 11:42:57 pm
CVS has been updated and should work with VC++ 7.

You'll probably have to set it to ignore libci.lib if you build it. I'm not sure what's causing this.
Title: Free compiler for the FSSCP: The answer
Post by: Skippy on July 10, 2004, 05:01:07 pm
build.bat file not found :p
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on July 10, 2004, 05:05:17 pm
Link fixed in first post. -- Goober5000
Title: Free compiler for the FSSCP: The answer
Post by: Skippy on July 10, 2004, 05:19:25 pm
Thanks ;)

BTW is there a version of that file for fred2 open ?
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on July 15, 2004, 06:54:01 pm
Unfortunately, not at the moment...
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on July 19, 2004, 04:14:02 pm
The files in the CVS have been updated to work with this compiler...first post updated.
Title: Free compiler for the FSSCP: The answer
Post by: FireCrack on August 10, 2004, 08:03:28 pm
silly me frogot to backup his old vcvars32.bat. Would anyone be kind enough to provide the original set lines?

Oh and also does anyone have a tutorial or a link to a tutorial on compiling? i'm kinda lost by looking at all the bat files, aditionaly they dont seem to work for me.
Title: Free compiler for the FSSCP: The answer
Post by: Goober5000 on August 10, 2004, 09:17:02 pm
The tutorial is in the first post.  If you have a question, ask.

Sorry, I don't have the original .bat file (and I doubt anyone else does either).  You'll have to reinstall the Toolkit to get it back.  You shouldn't need the original, though; the new one should work fine.
Title: Free compiler for the FSSCP: The answer
Post by: FireCrack on August 10, 2004, 11:09:14 pm
Oh ok, i missed step 8, that's why i was screwing up. Anyways, noob question, but i got all my .obj files and it refuses to link, gives me problems with movie.obj, big long nasty problems about unresolved external symbols.

I also get 2 errors when compiling, one with 'xMouse.cpp', unable to locate SDL.h. And one more with 'atlbase.h'. atlbase.h is supposed to be in the win64 folder of my MS VC++ toolkit but i have no win64 dir there, the error is that it cant find 'shwapi.h', i have no idea what this has to do with atlbase (as it doesnt exist on my system). the atlbase error comes when compiling 'winmidi.cpp'.

I also get a whackload of warnings when compiling, this may be normal for an open source project like this, but i dont know.


Anyways, sorry for the noob question, i know how annoying they are, but i did search before this and nothing came up.
Title: Free compiler for the FSSCP: The answer
Post by: Goober5000 on August 11, 2004, 08:13:08 am
Make sure you have all the SDKs installed and all the SET lines configured correctly.  You might need to change the folder paths.

As for shlwapi.h (you forgot the L), download the attachment and put it in your C:\Program Files\Microsoft Visual C++ Toolkit 2003/include directory.  This should also fix the atlbase.h problem.
Title: Free compiler for the FSSCP: The answer
Post by: FireCrack on August 12, 2004, 04:49:54 pm
Ah thanks, even though xmouse still gives me an SDL.h not found it compiles

Thanks for your help.
Title: Free compiler for the FSSCP: The answer
Post by: Overlord on August 27, 2004, 11:43:45 am
I can't download the core sdk because it says i need msxml3.0, but i have both 3.0 and 4.0.
Can someone help?

[Edit] Now I know why. I have to download the full sdk, but it is not on the MS-servers (404) :mad:.
Someone know where i can download them (not from MS)?
Title: Free compiler for the FSSCP: The answer
Post by: Goober5000 on August 27, 2004, 06:36:54 pm
I don't think so.  You need to run some sort of online install program, similar to Windows Update, that only runs from the website.

Are you using Internet Explorer?
Title: Free compiler for the FSSCP: The answer
Post by: Overlord on August 28, 2004, 07:19:24 am
Quote
Originally posted by Microsoft
Error: “An earlier version of msxml3.dll has been detected on your system....” SDK Update requires Msxml3.dll SP2 or greater on your system. Unfortunately, Msxml3.dll SP2 is no longer available for download and SDK Update does not work with Msxml3 SP4, which is the version currently available for download. Until this issue is resolved, the work around is to use the full download option for SDK Update:


That is my problem, but the full download is not available.
And yes i use the latest IE6.

[Edit] Now i see the problem (stupid Microsoft) with the full download,
there were an "NA" in the links which should be "3790.0". :mad:
Title: Free compiler for the FSSCP: The answer
Post by: Taristin on September 19, 2004, 03:11:42 pm
Even better; MS has a beta of Visual C++ online. It's a compiler and a coding environment in one...  Not bad, it is.
Title: Free compiler for the FSSCP: The answer
Post by: Overlord on September 19, 2004, 03:15:13 pm
I have got it (VC++ 2005 Express Edition Beta) since it came out, but it doesn't work for me. I get 4 or 5 errors. :(
Title: Free compiler for the FSSCP: The answer
Post by: Chronus on November 03, 2004, 12:05:25 pm
VS .Net is allows us to develop in both native and .Net bytecode. That's due to the fact that through C++, we can write unmanaged code and managed code (C++ extensions).

BTW, I'll introduce myself.

I'm (obviously) Chronus :) , I'm a software developer who doesn't (at the moment) have much free time to spend but will (soon) have a little bit of it.

I've been working with .Net, mostly VB . Net, C#, C++ and, outside of the MS pantheon, I have done a few apps with Java 2.

I've played Freespace 2, twice, enjoyed it, and would like to know some links (for the SC, tools, patches already done, etc).

Chronus
Title: Free compiler for the FSSCP: The answer
Post by: Overlord on November 05, 2004, 09:25:28 am
Hi,

look in the WiKi (http://dynamic4.gamespy.com/~freespace/fsdoc/),
the SCP Source is here: http://www.3dactionplanet.com/hlp/hosted/scp/dev/gettingstarted.shtml
Title: Free compiler for the FSSCP: The answer
Post by: Goober5000 on November 05, 2004, 12:41:55 pm
Hey, welcome Chronus. :)

:welcome:

Standard welcome speech:
[wiki]Chronus[/wiki]
[scp]Chronus[/scp]

You can also check out http://fs2source.warpcore.org for a summary and link dump.  When you get some free time, we'd love to have you on board. :)
Title: Free compiler for the FSSCP: The answer
Post by: Chronus on November 05, 2004, 01:26:44 pm
Quote
Originally posted by Overlord
Hi,

look in the WiKi (http://dynamic4.gamespy.com/~freespace/fsdoc/),
the SCP Source is here: http://www.3dactionplanet.com/hlp/hosted/scp/dev/gettingstarted.shtml


Thanks, Overlord!

Will look into it ASAP.

Chronus
Title: Free compiler for the FSSCP: The answer
Post by: Chronus on November 05, 2004, 01:29:19 pm
Quote
Originally posted by Goober5000
Hey, welcome Chronus. :)

:welcome:

Standard welcome speech:
[wiki]Chronus[/wiki]
[scp]Chronus[/scp]

You can also check out http://fs2source.warpcore.org for a summary and link dump.  When you get some free time, we'd love to have you on board. :)


:)

Goober5000 , thanks for the welcoming!

I'll take a look at the link you provided above. Guaranteed, as soon as I have some spare time, I'll drop a post  here or PM you guys..

Thanks once again! :)

Chronus
Title: Free compiler for the FSSCP: The answer
Post by: Inquisitor on November 09, 2004, 08:51:17 am
Anyone have the cpp files that WM created? Or did those get committed to CVS?
Title: Free compiler for the FSSCP: The answer
Post by: Goober5000 on November 09, 2004, 11:05:17 am
They're in CVS, I think.
Title: Free compiler for the FSSCP: The answer
Post by: Inquisitor on November 09, 2004, 12:57:08 pm
Ok, I'll check. Duckman had a copy just in case, i will assume they are ifdef'd in the code for now, and if not, I can try to do that later :)
Title: Free compiler for the FSSCP: The answer
Post by: Fry_Day on November 09, 2004, 01:28:30 pm
D'oh, someone posted about 2005 express before me. Oh well, I guess my first point of order will be getting the scp to work with 2005, once the blasted platform SDK finishes downloading (hence, at least tomorrow), and I config my system properly.
Title: Free compiler for the FSSCP: The answer
Post by: Taristin on December 29, 2004, 09:47:53 pm
bump


Should update the links to the code, since you've moved hosts.
Title: Free compiler for the FSSCP: The answer
Post by: taylor on February 07, 2005, 12:42:29 pm
With the Linux merge complete the code in CVS is Visual C++ 2005 Express friendly now.  I'll commit the finished project files to CVS tonight.  They are going to be under a new directory though: projects/MSVC2005.  The project files were modified to work from there so don't move them unless you want to do a lot of editing.

Besides the project files you will need the OGG Vorbis SDK (don't have to URL handy) and the libjpeg SDK which you can get here: http://icculus.org/~taylor/misc/libjpeg-sdk.zip
Title: Free compiler for the FSSCP: The answer
Post by: LordAnubis on September 26, 2005, 11:02:23 am
*Bump*

It would appear that the first link, the one to http://fs2source.warpcore.org/temp/code (http://fs2source.warpcore.org/temp/code)  is now out of date and broken.  Any chance of an update on where the files that were there moved to?:)
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on September 26, 2005, 01:09:11 pm
It's no longer needed.

I compiled 3.6.7 using the VC++ 2005 Toolkit compiler straight from CVS (Well, I had to move one 'i' variable) so you shouldn't need special files anymore.
Title: Free compiler for the FSSCP: The answer
Post by: LordAnubis on September 26, 2005, 01:19:53 pm
Gotcha, thanks :)
Title: Free compiler for the FSSCP: The answer
Post by: WMCoolmon on September 26, 2005, 11:41:53 pm
I uploaded the updated copy of the batch file. For 3.6.7 I added in speech API stuff, and the OGG stuff. It will generate mapfiles, but apparently it's not setup properly to be of any use.

You can also run in debug mode by adding 'debug' to the end (eg 'build all debug')
Title: Re: Free compiler for the FSSCP: The answer
Post by: Ordog163 on November 16, 2005, 07:57:10 pm
Looking in this thread, I see several things about using the free Visual C++ Toolkit 2003, but nothing about using an IDE to develop using this compiler.

If anyone's looking for a free option, I suggest Code::Blocks (http://www.codeblocks.org/).  It comes with VC++ Toolkit 2003 support and can open VS .vcproj files so it might make things easier for those who are looking for something other than compiling through a batch file.

I'm not sure if it will work, but I don't have any reason to think otherwise.
Title: Re: Free compiler for the FSSCP: The answer
Post by: Goober5000 on November 17, 2005, 11:25:35 am
Here's another option, and this one has an IDE:
http://www.hard-light.net/forums/index.php?topic=36885.0