You will need this tools:
-Visual Studio 6.0 (1998)
-Service Pack 5 for VS6.0
-Processor Pack 5 for VS6.0
and of course
-leaked Half-Life 2 source code (BA ftp: "/(Source) Games/PC/Half-Life 2 [source].rar")
To run compiled binaries you will also need some resources, scripts etc. from Half-Life 2 Anon Leak.
1) Install Visual Studio 6.0
Under Vista/7 run setup as administrator and ignore compatibility warnings - it will work fine.
2) Install Service Pack 5.0 for VS6.0
There is problem with SP5 setup under Vista/7... so expand "VS6sp5.exe" and open "sp598ent.stf", then go to line 29 and change:
Code: Select all
13 Group 28 36 38 29 30 32 26 27 14 25 16 17 20 18 19 15 39 21 22 24 23 43
Code: Select all
13 Group 28 38 29 30 32 26 27 14 25 16 17 20 18 19 15 39 21 22 24 23 43
3) Install Processor Pack 5 for VS6.0
4) Fix "mshtml.h" file:
There is bug in one VS6.0 header file. Open "<VS60_Install_path>\VC98\include\mshtml.h" and go to line 13616 and change def. "__RPC_VAR" to "__RPC_FAR".
So, function IHTMLStyleSheet_put_title_Stub() should look like this:
Code: Select all
void __RPC_STUB IHTMLStyleSheet_put_title_Stub(
IRpcStubBuffer *This,
IRpcChannelBuffer *_pRpcChannelBuffer,
PRPC_MESSAGE _pRpcMessage,
DWORD *_pdwStubPhase);
/* [id][propget] */ HRESULT STDMETHODCALLTYPE IHTMLStyleSheet_get_title_Proxy(
IHTMLStyleSheet __RPC_FAR * This,
/* [out][retval] */ BSTR __RPC_FAR *p);
5) Unpack Half-life 2 source
6) Build source code
To build all simply run "dev_build_all.bat" (Use "debug" or "d" parameter for debug build). Under Vista/7 few compatibility warnings will popup again...
If you get errors like "msdev is not a recognized command" or "vcvars32 is not a recognized command" you must add VC6.0 to your PATH sys. variable.
To (re)build single part of engine (i.e VGUI) run corresponding bat file (i.e. build_vgui2_dependents.bat) or open & build project file (i.e. vgui2\src\vgui_dll.dsp) in VS6.0.
7) Copy or create res. files
Copy resource, scripts etc. form Half-Life 2 Anon Leak (be careful: source code is outdated and do not support v.37 models! So you will need to update model loader code or "downgrade" leaked models.)
I have "minimum res. package" to run engine and load simple map (I don't have Leak on this computer so i will update tutorial later, or write another tut. about resources etc.).
8) Program, debug, program, debug...sleep
...BTW if you get something like this:
you need to (re)build shaders.
And here is very old screen of my Source2K3 project:
This is not final version of tutorial I definitely forgot something...
GOOD LUCK!