Building ioquake3 on Windows - Visual Studio 2005
Return to Building ioquake3
This is based off of these instructions: http://www.ioquake.org/forums/viewtopic.php?f=12&t=55
Credit goes to DevHC, ensiform, GreyGhost, benmachine, kevlarman, zinx, and the rest of the ioquake3 IRC krew. Word! Represent!
This should work for Win2K, XP, and Vista. Tested on Win2K and WinXP but it will probably work on Vista.
- 1 Win2K only prerequisite:
- 2 Installing Visual Studio 2005:
- 3 Installing Windows SDK (XP, Vista) or Platform SDK (Win2K)
- 4 Setting up your compilin' environment:
- 5 Compiling the sucker:
- 6 Common problems:
- 7 Using your compiled files:
- 8 Microsoft hid/moved all VS 2005 Express stuff from their "Express" site. Here are the direct links in case anyone wanders in here and is curious about the other editions:
Win2K only prerequisite:
1) download GDIPlus.dll from Microsoft: http://www.microsoft.com/downloads/details.aspx?FamilyId=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en and put it into c:\temp\
2) run the installer and extract the files into c:\temp\ (it will want to put it somewhere stupid by default)
3) copy GDIPlus.dll into your c:\winnt\system32\ (or c:\windows\system32\) folder, wherever you have your \system32\
4) you need this file for the SVN program ONLY on a Win2K machine--XP and Vista machines DO NOT NEED THIS FILE.
5) you can only COMPILE on Win2K, you cannot PLAY YOUR COMPILED BINARIES on Win2K. Well you can with some tweaking, but check the ipv6 section of the ioquake3 readme for the reason why you can't play on Win2K by default, just compile. The binaries/.exe files you make on a Win2K system will work just fine on WinXP and Vista, though.
Installing Visual Studio 2005:
1) download "Visual C++ 2005 Express Edition", either the ISO or the IMG (you can rename the .img to .iso and it works just the same) from http://go.microsoft.com/fwlink/?linkid=57034 into c:\temp\vs2005exp\
2) follow the instructions on the page to install the program--I mounted the ISO in a virtual CD and installed from there, but you can burn it to a CD-R or extract the files like the instructions say, whatever floats your boat.
3) run the installer, all you need is the "graphical IDE" and nothing else; install to default directories, etc.
4) download Visual C++ 2005 Express SP1 from: http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/vs80sp1-kb926748-x86-intl.exe into c:\temp\vs2005exp\
4a) if you're running Vista, also download Visual Studio 2005 SP1 Update for Windows Vista from: http://www.microsoft.com/downloads/details.aspx?familyid=90e2942d-3ad1-4873-a2ee-4acc0aace5b6 into c:\temp\vs2005exp\
5) install SP1; if you have Vista, additionally install the SP1 update for Vista after you install the normal SP1. Reboot your computer when it tells you to.
6) download http://libsdl.org/release/SDL-devel-1.2.13-VC8.zip to c:\temp\sdl\
7) extract SDL-devel-1.2.13-VC8.zip into c:\temp\sdl\
8) copy *.lib from C:\temp\SDL-1.2.13\lib to C:\Program Files\Microsoft Visual Studio 8\VC\lib (should be SDL.lib and SDLmain.lib)
9) download http://tortoisesvn.net/downloads into c:\temp\svn\
10) run the installer with all the defaults, reboot when it tells you to
11) go to http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 and download the latest installer; it should be near the top of the list and named something like "Setup-Subversion-1.5.3.msi"
12) run the installer with all the defaults
13) make the folder c:\ioq3-vs2005
14) right-click that folder and choose "TortoiseSVN" and then "Settings", under the General section click on the Edit button (lower middle right). This will pop up a config file to edit.
15) search for "enable-auto-props"; it is near the bottom of the config. Uncomment that line. Make sure there is no leading whitespace for the line you uncomment or SVN freaks out.
16) also uncomment all the lines in the "[auto-props]" section, the last section of the config file. Save the config file and then hit the Ok button to close the Settings window.
17) right-click the "ioq3-vs2005" folder again and choose "SVN Checkout", use the URL of repository to be svn://svn.icculus.org/quake3/trunk
18) leave everything else as default and click the OK button; you should start getting source unless svn is down/broken
19) alternatively, you can use the command-line version of svn by opening a command prompt, navigating to c:\ and then running the following command: "svn co svn://svn.icculus.org/quake3/trunk ioq3-vs2005".
Installing Windows SDK (XP, Vista) or Platform SDK (Win2K)
1) for Windows 2000, you will need the Platform SDK; for Windows XP or Vista, you will need the Windows SDK.
2) Win2K, download Windows® Server 2003 R2 Platform SDK ISO: http://www.microsoft.com/downloads/details.aspx?FamilyId=E15438AC-60BE-41BD-AA14-7F1E0F19CA0D&displaylang=en (click the Validate button and then click the Download button that appears in its place after you validate)
3) for the Platform SDK, just do the defaults for installation
4) follow the instructions starting at Step 3 at http://www.microsoft.com/express/2005/platformsdk/default.aspx
5) here's a hint for Step 3: Tools>Options>VC++ Directories: drop-down menu in upper-right chooses the "type" of directory and the yellow folder icon between the checkmark and the x will create a new entry.
6) WinXP/Vista, download Windows SDK for Windows Server 2008 and .NET Framework 3.5 ISO: http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en (click the Validate button and then click the Download button that appears in its place after you validate)
7) for the Windows SDK, just do the defaults install folders
8) you do not need to install the Documentation, Samples, or Mobile Tools. Really... it takes 2.2 GB to install everything or "only" 500 MB to install just the headers, libraries, compilers, and regular development tools.
9) follow the instructions for Step 3 and Step 5 (the Windows SDK installer seems to do Step 4 for you) at http://www.microsoft.com/express/2005/platformsdk/default.aspx
10) here's a hint for Step 3: Tools>Options>VC++ Directories: drop-down menu in upper-right chooses the "type" of directory and the yellow folder icon between the checkmark and the x will create a new entry.
11) here's another hint for Step 3: these instructions are for the Platform SDK and you just installed the Windows SDK; you'll need to change your paths appropriately. My default install had the following folders:
C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin
C:\Program Files\Microsoft SDKs\Windows\v6.1\Include
C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib
12) Windows SDK (but not Platform SDK) will install some Visual Studio 9.0 files and leave them littered in your C:\ root. They will all have the same timestamp of 11/7/2007. Feel free to delete these. For reference, the ones I got rid of were:
Setting up your compilin' environment:
1) Load VS2005, go to File and choose Open and then Project/Solution... and select C:\ioq3-vs2005\misc\msvc\ioq3.sln
2) Once your "solution" has loaded, go to Build and choose Configuration Manager... and make sure the drop-down menu says "Release"; mine was defaulted to "Debug TA".
3) Close VS2005 to make sure everything is saved before you start messing things up.
Compiling the sucker:
1) Load VS2005, go to File and choose Open and then Project/Solution... and select C:\ioq3-vs2005\misc\msvc\ioq3.sln
2) Once your "solution" has loaded, right-click on "Solution 'ioq3'" in the upper-left Solution Explorer window and select "Build". If you want to rebuild things fresh, select "Rebuild".
3) You should get warnings in your Output window, but the only really important part is the last line which should look something like
========== Rebuild All: 5 succeeded, 0 failed, 0 skipped ==========
4) compiling depends on how much RAM you have and how fast your computer is. So it could go quickly or take forever.
5) when you're done compiling, you should have the compiled files in:
1) Speex files generate a ton of warnings. The main speex project disables these specifically, though you may or may not want to. If you want to disable these warnings specifically, open up the properties of the "quake3" project, go to Configuration Properties, then to C/C++, then to Advanced, and in the Disable Specific Warnings field, type: 4244;4305;4311;4100;4127 When done, apply this to save it and you should get less chatter. I went from 550 warnings down to 73 warnings. Since the speex people themselves don't care about these warnings (else I assume they'd have fixed them), they probably aren't too important. You can also add ones that are related to the JPEG code as well, such as 4245, 4389, 4706 or even 4201 for some warnings from the Platform SDK. Again, the more warnings you exclude, the more errors or bugs might make their way into your code because you're suppressing the compiler telling you about them, but it might make finding major errors/bugs easier.
2) Instead of dynamically linking the microsoft libraries, we are going to statically link them. When compiling, you will get warnings about LIBCMT and OleAcc.dll, but the binary will build fine and should work on systems without requiring the microsoft DLLs to be included as well. You can research /NODEFAULTLIB: and other things if those LINK warnings bother you, but the resulting binary seems to work fine.
3) If you get failures like these:
c:\ioq3-vs2005\code\libspeex\arch.h(65) : fatal error C1189: #error : You now need to define either FIXED_POINT or FLOATING_POINT
c:\ioq3-vs2005\code\renderer\qgl.h(32) : fatal error C1083: Cannot open include file: 'SDL_opengl.h': No such file or directory
c:\ioq3-vs2005\code\client\cl_curl.h(44) : fatal error C1083: Cannot open include file: 'curl/curl.h': No such file or directory
c:\ioq3-vs2005\code\sdl\sdl_snd.c(29) : fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
...then make sure the drop-down menu says "Release"; mine was defaulted to "Debug TA".
Using your compiled files:
1) I installed Quake 3 into, say, c:\program files\quake3, then installed the latest patches. I then installed ioquake3 into that same folder. I copied the whole install from c:\program files\quake3 to something like c:\program files\devquake3 so I could mess around and not ruin my regular game install.
2) since the needed SDL and OpenAL .dll files were already installed with ioquake3, all you need to copy over are the .exe and new .dll files when you want to test them in your \devquake3 install.
3) in case you're wondering, for the devquake3 example:
c:\Program Files\devquake3\ <--- put the .exe here
c:\Program Files\devquake3\baseq3 <--- put the .dll files here
c:\Program Files\devquake3\missionpack <--- put the .dll files here
4) if you opted to dynamically link the VS2005 libraries instead of statically linking them and want to give the resulting binary to someone who doesn't have VS2005 installed, you may need to have that machine or user install "Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)" if they are getting errors when trying to run the program you compiled. If you have some users who get the errors and some who don't, the ones who don't probably had another program already install this silently and just never informed the user. You can find this at: http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en
Visual Web Developer 2005 Express Edition (449,848 KB)
- IMG File (http://go.microsoft.com/fwlink/?linkid=54763)
- ISO File (http://go.microsoft.com/fwlink/?linkid=57037)
Visual Basic 2005 Express Edition (445,282 KB)
- IMG File (http://go.microsoft.com/fwlink/?linkid=54764)
- ISO File (http://go.microsoft.com/fwlink/?linkid=57033)
Visual C# 2005 Express Edition (445,282 KB)
- IMG File (http://go.microsoft.com/fwlink/?linkid=54765)
- ISO File (http://go.microsoft.com/fwlink/?linkid=57035)
Visual C++ 2005 Express Edition (474,686 KB)
- IMG File (http://go.microsoft.com/fwlink/?linkid=54766)
- ISO File (http://go.microsoft.com/fwlink/?linkid=57034)
Visual J# 2005 Express Edition (448,702 KB)