Difference between revisions of "HowTo:VCPP Compiling"
m (→Visual C++ 8.0 (2005 Express): more recent sdk link) |
(→Visual C++ 8.0 (2005 Express): A few small VC8 corrections) |
||
Line 58: | Line 58: | ||
#* Download the "manual install" (from a CD image): http://msdn.microsoft.com/vstudio/express/support/install/ (seems to be an ISO image, but looks like it doesn't require registration...) | #* Download the "manual install" (from a CD image): http://msdn.microsoft.com/vstudio/express/support/install/ (seems to be an ISO image, but looks like it doesn't require registration...) | ||
# Install the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en#filelist| Windows Platform SDK] ([http://msdn.microsoft.com/library/default.asp?url=/library/EN-US/sdkintro/sdkintro/installing_the_platform_sdk_with_visual_studio.asp Instructions] - [http://www.microsoft.com/downloads/info.aspx?na=47&p=3&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&u=details.aspx%3ffamilyid%3dD8EECD75-1FC4-49E5-BC66-9DA2B03D9B92%26displaylang%3den FULL ISO version(395MB)]). A [http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en more recent SDK] for Windows XP SP2 exists, but it has not been tested with VS (yet.) | # Install the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en#filelist| Windows Platform SDK] ([http://msdn.microsoft.com/library/default.asp?url=/library/EN-US/sdkintro/sdkintro/installing_the_platform_sdk_with_visual_studio.asp Instructions] - [http://www.microsoft.com/downloads/info.aspx?na=47&p=3&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&u=details.aspx%3ffamilyid%3dD8EECD75-1FC4-49E5-BC66-9DA2B03D9B92%26displaylang%3den FULL ISO version(395MB)]). A [http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en more recent SDK] for Windows XP SP2 exists, but it has not been tested with VS (yet.) | ||
− | # | + | # You should not need the [http://www.microsoft.com/downloads/details.aspx?FamilyID=EDB98FFA-A59C-4C23-9B92-BA304F188314&displaylang=en DirectX SDK] (337MB) to compile VS, but it may be required to compile OGRE in the future. |
# Disable Intellisense: Microsoft provides no GUI for this, but it is recommended unless you want to eat up twice the RAM and wait 10-20 seconds between saving each file. | # Disable Intellisense: Microsoft provides no GUI for this, but it is recommended unless you want to eat up twice the RAM and wait 10-20 seconds between saving each file. | ||
#* Browse to your VC8 install. | #* Browse to your VC8 install. | ||
Line 65: | Line 65: | ||
# Open the "vega-vc8" project using the IDE. | # Open the "vega-vc8" project using the IDE. | ||
# The compilation should go for the most part smoothly. If you encounter any problems, please tell us in the [http://vegastrike.sourceforge.net/forums/ forum] or specifically on [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=6251 this thread]. | # The compilation should go for the most part smoothly. If you encounter any problems, please tell us in the [http://vegastrike.sourceforge.net/forums/ forum] or specifically on [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=6251 this thread]. | ||
+ | #* Note that Debug versions will be very slow (I get 5 frames/second on my Pentium3 1GHz machine using debug VS). | ||
==Visual Studio 7.x== | ==Visual Studio 7.x== |
Revision as of 04:59, 14 July 2006
Checkout CVS | HowTos | Cygwin Compiling |
Contents
Compiling under Visual C++
First, check out the CVS modules.
When using another module (e.g. vegastrike
, vssetup
), they should be placed in the directory above vega-proj
in the directory tree.
For example, when you want to checkout Vegastrike, you may make a Vegastrike
directory and from there, checkout vega-proj
(or vega-vc7
for "dot-NET" or vega-vc8
for Express users), vegastrike
, data
and then vssetup
ALL from this directory.
-
vegastrike/
- base directory. -
vegastrike/vegastrike/
- The stuff from the vegastrike module (the actual code) -
vegastrike/vega-proj/
- The project files. (VISUAL C++ 6.x) -
vegastrike/vega-vc7/
- The project files. (VISUAL C++ 7.x) -
vegastrike/vega-vc8/
- The project files. (VISUAL C++ 8.0) -
vegastrike/vssetup/
- the vssetup module directory. -
vegastrike/texturizer/
- If you want to compile the texturizer. -
vegastrike/data4.x
- The newer version of data. Does not need -kb Binaries will be compiled into the bin directory, so it should be here in the tree if you do not want to edit project settings.
module data
(the old data module) is the one exception to this rule. Can be put anywhere on your hard drive. DATA (NOT data4.x
, only data
) MUST BE CHECKED OUT WITH THE -kb
PARAMETER (=BINARY MODE) The data
module is for really old data only (up to version 3.9).
Here is a list of every project included for CVS compilation:
- AsterGet (
AsterGen.exe
) - Not used - mission (
Mission Launcher.exe
) - Not used - savegame (
Launcher.exe
) - Not required but still used for selecting missions - texturizer (
Texturizer.exe
) - Not used- REQUIRES texturizer module
- TriSort (
TriSort.exe
) - Not used? - vsacctserver (
accountserver.exe
) - Soon to be functional in Windows - vegastrike (
Vegastrike.exe
) - used - VegaStrike binary - vsserver (
vegaserver.exe
) - Soon to be functional in Windows - vssetup (
Setup.exe
) - used- REQUIRES
vssetup
module
- REQUIRES
Visual C++ 6.0 (deprecated)
As of the end of December, 2005, VegaStrike has dropped compatibility for VC 6 because of the new OGRE rendering engine.
Until mid-January, VC 6 users may still be able to get it to compile under the Debug Boost 129/Release Boost 129 project settings (Do not use the standard Debug and Release).
This is not to say that it won't completely work... if you have a lot of experience in C++, you may be able to kludge OGRE to get it to compile and maybe run.
VC 6 users can grab a free copy of VC 8 (Visual Studio 2005 Express) off the Microsoft site, and follow the directions below to compile.
Visual C++ 8.0 (2005 Express)
Warning: VC8 requires a big download off Microsoft's site.
Until November 6, 2006, Microsoft seems to be offering a non-expiring version of VC8. After November 2006 we will find another way to compile Vegastrike on Windows.
This will work on Windows 2000 or XP (Not sure about 98,95...).
- You have two download choices:
- Download the standard install: http://msdn.microsoft.com/vstudio/express/visualc/download/ and register (free but requires an E-mail and filling in a form)
- Download the "manual install" (from a CD image): http://msdn.microsoft.com/vstudio/express/support/install/ (seems to be an ISO image, but looks like it doesn't require registration...)
- Install the Windows Platform SDK (Instructions - FULL ISO version(395MB)). A more recent SDK for Windows XP SP2 exists, but it has not been tested with VS (yet.)
- You should not need the DirectX SDK (337MB) to compile VS, but it may be required to compile OGRE in the future.
- Disable Intellisense: Microsoft provides no GUI for this, but it is recommended unless you want to eat up twice the RAM and wait 10-20 seconds between saving each file.
- Browse to your VC8 install.
- Go to the VC/vcpackages folders and rename the "feacp" DLL file to anything else like "feacp_backup.dll". This should not break anything... it will only disable IntelliSense.
- Checkout the Vegastrike project as described earlier.
- Open the "vega-vc8" project using the IDE.
- The compilation should go for the most part smoothly. If you encounter any problems, please tell us in the forum or specifically on this thread.
- Note that Debug versions will be very slow (I get 5 frames/second on my Pentium3 1GHz machine using debug VS).
Visual Studio 7.x
Compiling from the command line with Visual Studio
Here is a batch file that could be used to checkout everything and then compile all projects (copy and paste in makeall.bat
), if you were going somewhere for a few hours and wanted to get a working project when you got back:
@echo off mkdir vegastrike cd vegastrike echo ***** Type in {ENTER} for password when asked ***** cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike login cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vega-vc7 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vegastrike cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co vssetup cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co texturizer cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike co data4.x cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vegastrike logout cd vega-vc7 echo Building project... "C:\VC7\Common7\IDE\devenv.exe" vegastrike.sln /BUILD Debug cd .. cd ..
NOTE: You must replace the "C:\vc7
" with the directory where you installed visual c++ 7 and replace the "Debug
" on the same line with "Release
" if you want a release build.
Compiling with the Visual Studio GUI
(This is written with Visual C++ .NET Standard in mind)
Once you have checked out the vegastrike and vega-vc7 modules from CVS, use Visual Studio to open vegastrike.sln, found in the vega-vc7 directory. When compiling for release, select "Release Boost 131" from the drop-down menu on the toolbar. Right-click on the "vegastrike" project in the "solution explorer" sidebar, and then select "Build".
Visual C++ Toolkit 2003
This is a free download from Microsoft, and is the same compiler and linker as Visual Studio 2003.
Note, you must have Windows XP or 2000 in order to install the toolkit. (formerly said only Windows XP, but this is not true according to their download page)
Downloads
- Install the Visual C++ Toolkit 2003 from the Microsoft web site.
- Install the Windows Platform SDK from the Microsoft web site. You can take any of the 3 versions available.
- Install the Code::Blocks (alternative download site on Sourceforge). You can take the full version or the core only, since we will use the VS 2003 TK.
Configuring Code::Blocks
- Run CodeBlocks. The first time you install it, you will be listed with a set of compilers. Select Microsoft Visual C++ Toolkit, and click Set As Default.
- For configuration you have to include the location of the Windows Platform SDK. Go to Settings -> Compiler in the menu. Click the Directories tab. Add the directory "
C:\Program Files\Microsoft SDK\bin
" to the Resource Compiler tab.
Compiling with Code::Blocks and Visual C++ Toolkit
Once you have checked out the vegastrike and vega-vc7 modules from CVS, import the vegastrike.sln file, found in the vega-vc7 directory into Code::Blocks using Project->Import->MS Visual Studio Solution in the menu.
Note (CVS version as of 14 Nov 2005
Using the most recent CVS versions (and 2003/Runtime versions from Microsoft) I had to remove /W from the build options Project Build Options > Compiler Options > Other Options
See Also
Checkout CVS | HowTos | Cygwin Compiling |