-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompiling_on_windows.txt
69 lines (52 loc) · 3.52 KB
/
compiling_on_windows.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Compiling ezQuake sources on Windows: (updated 2008-08-12)
---------------------------------------------------------------------------------------------------------
*** Sources are compilable with Microsoft Visual Studio 8 (2005). Older versions (6, 7, 7.1) may have problems in project files ***
Instructions:
--------------------
1) Grab sources from the ezQuake git repository
- direct zip archive download link:
https://github.com/ezQuake/ezquake-source/zipball/master
- alternatively, use a git client, for Windows we recommend "msysgit" - http://code.google.com/p/msysgit/
- it's a command-line tool, use this command to obtain ezquake source code:
- git clone git://github.com/ezQuake/ezquake-source.git
2) Get Microsoft Visual Studio 8 and install it.
Instead of the expensive MSVS8 you can install Visual C++ 2008 Express Edition which is free.
- http://www.microsoft.com/Express/Download/
- Just follow the instructions (you don't need SQL server).
3) Download all dependancies and tools needed for the build process (ml.exe and gas2masm.exe):
- Run ezquake/make/download_dependencies_x32.bat
- this downloads both the ml.exe and gas2mas.exe tools, and also all the libraries required for building
4) Open ezquake_msvs_90.sln located in ezquake-source/make/msvs2008
5) Select GLDebug configuration and press "Build".
- Note, to use the game files in your normal quake dir do the following in Visual studio:
1. Click "Project -> ezquake properties"
2. Choose "All configurations" from the Configuration drop down box at the top.
3. Go to "Configuration properties -> Debugging"
4. In "Working directory" enter the path to your quake dir.
5. In "Command arguments" add any additional commandline switches. I always use -window when debugging.
Microsoft Visual Studio 8 and .s (asm) files:
---------------------------------------------------------------------
- Requirements:
There are no special requirements, we include everything in the git repository, you just need cl.exe
which is a part of MS VS 8 package
- We use Custom Build Tool to compile asm .s files in MS VS 8.
- Visual Studio reads all instructions from qasm.rules
- That file is included in the project file (ezquake_msvs_80.vcproj)
- Instructions are named 'qasm' and are applied on *.s files
- Visual Studio 8 doesn't have ml.exe (known as masm32) so we have ml.exe in masm32 dir (binary in git)
- We dont include gas2masm in ezquake solution
- gas2masm.exe is stored in our git repository
- How custom build works:
1) cl (optimizer), input is .s file, output is .spp (optimized) file
2) gas2masm, input is .spp file, output is .asm file
3) ml, input .asm file, output is .obj file
4) intermediate .spp and .asm files are deleted
5) .obj file is then used by the linker
Troubleshooting:
---------------------------
- If you get "unresolved external symbol __imp__" linker errors, you need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads: AdditionalDependencies="kernel32.lib" to AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
It's also good to read this: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
Developer notes:
---------------------------
Debugger detected:
- Error warning that MS VS gives you when you try to run debug build in your quake dir. Solution: move ezquake-security.dll out of your quake dir