User:Backslash
As I figure out the whole wiki making thing, I'm going to write things temporarily on my page.
I'm going to write some notes on compiling fs2_open for Windows with Visual Studio 2003 and/or 2005. Hopefully this will be useful for other people with similar problems, or those who always wanted to try but couldn't figure it out.
Really, it's less complicated than it sounds once you've got everything together :-P PM me on the hard-light forums if you have questions.
I did 2003 first and it was easier. Yeah, I know, this version is not so widely used. Well I don't have a full version of 2005, just the Express Edition. So, first, Visual Studio 2003:
- At this point, almost all of the needed libraries and stuff are included in the CVS checkout. This is convenient for us Windows users (but a bit silly for everyone else). All you need is the Platform SDK, and maybe the DirectX SDK (but that I'm not sure you need all of any more).
- Once you download the CVS (pending article), open the projects folder. There you'll find a MSVC_2003 folder, which has some of what we need, but the project hasn't been updated in some time. I'm hoping to get this fixed.
- For now, the best solution is to copy the project files from the MSVC_6 folder. Then open the workspace. It should work right away after a wizarded conversion. Awesome.
Now for Visual C++ 2005 Express Edition:
I dunno if this is the "right" way -- the way I did the dependencies might end up requiring anyone else to whom you give a compiled build needing some extra DLLs. but eh, it works for me. (Corrections welcome, please!) I think it's gotten easier with some changes they made in the May 15 version of the MSVC_6, so what I did was:
- make sure my Tools->Options->Projects and Solutions->VC++ Directories properly points to where I have my Platform SDK and DirectX SDK (do this for Include files and Library files at least)
- erase what's in the MSVC_2005 folder
- copy the contents of MSVC_6 to MSVC_2005
- open the Freespace2.dsw and go through the default conversion steps
- switch to Release configuration
- in Properties of the Freespace2 project, go to Linker, inside it: Input.
- add to Ignore Specific Library: libci.lib
- added to Additional Dependencies: ole32.lib advapi32.lib gdi32.lib user32.lib
And hopefully that should do it. oh there might be some complaints about an undeclared i variable inside a for loop... change "for (i=0 "... to "for (int i=0 "... but you should be familiar with this sort of thing. Ideally, I can later replace the project in the folder on CVS, if it works for more than just me :D
optional (speeds compiling up)
- in Properties of the Freespace2 project, go to C/C++
- inside Browse Information, change Enable Browse Information to None. Do this for all the projects: Freespace2, code, Fred2.
- inside Code Generation, Enable Minimal Rebuild.
extra optional (just in case, try compiling first... later mess with this stuff. and do it to Release not Debug)
- inside Optimization, tweak as you like. I turned on a bunch of optimizations, including 'Optimize For Processor' to Pentium 4 and above (/G7).
- inside Code Generation, experiment with 'Enable Enhanced Instruction Set' depending on your processor. [me, I have an Athlon XP, which supports SSE but actually runs faster without it if /G7 is on.]