forked from advancedfx/advancedfx-prop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhow_to_build.txt
231 lines (200 loc) · 9.39 KB
/
how_to_build.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
Hint:
In case some of the required downloads are not reachable, we have a backup
here:
https://cloud.gmx.net/ngcloud/external?locale=de&guestToken=OHS9FADDSUqEBYNOQ8SSig&loginName=programmer99@gmx.de
Notice:
We recommend using GIT Bash of https://git-scm.com/ to obtain the HLAE source
code and also for applying the .patch files to libraries where neccessary.
[X] Download and install Microsoft Visual Studio 2015 Community, which you can
obtain for free from http://www.microsoft.com .
You need to adjust the installer to install Visual C++ and all sub-options
(okay you don't really need MFC, but it won't hurt that much I guess).
[X] Download the Half-Life SDK from
http://github.com/ValveSoftware/halflife
and install it into C:\Libraries\halflife
[ ] This step is currently not required!
Obtain freetype 2.6 from http://freetype.org/ and extract it into
C:\Libraries\freetype-2.6.
Then build the freetye project in
C:\Libraries\freetype-2.6\builds\windows\vc2010\freetype.sln in
Configuration=Release Multithreaded.
[X] Obtain and install CMAKE from http://www.cmake.org/
We currently use "cmake-3.5.2-win32-x86.msi".
[ ] This step is currently not required!
Obtain the stable version of libRocket from
https://github.com/libRocket/libRocket/tree/stable and extract it into
C:\Libraries\libRocket
[ ] This step is currently not required!
Build libRocket solutions using cmake:
Enter C:\Libraries\libRocket\Build directory and execute
cmake . "-DFREETYPE_LIBRARY=C:\Libraries\freetype-2.6\objs\vc2010\Win32\freetype26MT.lib" "-DFREETYPE_INCLUDE_DIRS=C:\Libraries\freetype-2.6\include"
[ ] This step is currently not required!
Open the libRocket.sln created in step 11 and build RocketCore,
RocketControls and RockedDebugger in
Configuration=Release
[X] Obtain the HLAE source code from http://advancedfx.org and extract it into a
folder you like, we'll call it <HLAESRC> from now on (by that I mean
extract it so that you end up with the files like mdt.sln and directories
in C:\<HLAESRC>\advancedfx folder).
We recommend using the GIT Bash to obtain the source code, so you can
easily fetch and merge updates from the advancedfx repository.
[X] Obtain the following files from http://openexr.com/ :
ilmbase-2.2.0.tar.gz, openexr-2.2.0.tar.gz and extract their contents
into "C:\Libraries"
[X] Obtain zlib-1.2.8.tar.gz from http://zlib.net and extract it into
"C:\Libraries"
[X] Open the GIT Bash we recommended above in order to apply the patches
for the ilmbase library:
cd /c/Libraries/ilmbase-2.2.0/
patch CMakeLists.txt /c/<HLAESRC>/advancedfx/patches/ilmbase-2.2.0/CMakeLists.txt.patch
[X] Build ilmbase solutions using cmake:
Enter the "C:\Libraries\ilmbase-2.2.0" directory and execute
setlocal
del /f CMakeCache.txt
cmake "-DCMAKE_INSTALL_PREFIX=C:\<HLAESRC>\ilmbase-build" -G "Visual Studio 14 2015" -T "v140_xp"
[X] Open the C:\Libraries\ilmbase-2.2.0\ilmbase.sln created in the previous step
Select the Release configuration.
Then build the Solution.
After that build the INSTALL project in the solution.
[X] Open the GIT Bash we recommended above in order to apply the patches
for the zlib library:
cd /c/Libraries/zlib-1.2.8/win32/
patch Makefile.msc /c/<HLAESRC>/advancedfx/patches/zlib-1.2.8/win32/Makefile.msc.patch
[X] Build zlib using nmake:
Open the Developer Command Prompt for VS2015 and enter the
"C:\Libraries\zlib-1.2.8" directory and execute
nmake -f win32/Makefile.msc zlib1.dll
nmake -f win32/Makefile.msc example_d.exe
example_d.exe (To see if the zlib1.dll is okay.)
[X] Open the GIT Bash we recommended above in order to apply the patches
for the openexr library:
cd /c/Libraries/openexr-2.2.0/
patch CMakeLists.txt /c/<HLAESRC>/advancedfx/patches/openexr-2.2.0/CMakeLists.txt.patch
[X] Build openexr solutions using cmake:
Enter the "C:\Libraries\openexr-2.2.0" directory and execute
setlocal
del /f CMakeCache.txt
cmake "-DZLIB_ROOT=C:\Libraries\zlib-1.2.8" "-DILMBASE_PACKAGE_PREFIX=C:\<HLAESRC>\ilmbase-build" "-DCMAKE_INSTALL_PREFIX=C:\<HLAESRC>\openexr-build" -G "Visual Studio 14 2015" -T "v140_xp"
[X] Open the C:\Libraries\openexr-2.2.0\openexr.sln created in the previous step
Select the Release configuration.
Build the projects b44ExpLogTable and dwaLookups.
Then copy the .dll files in "C:\<HLAESRC>\ilmbase-build\lib"
to "C:\Libraries\openexr-2.2.0\IlmImf\Release"!
Then build the Solution.
After that build the INSTALL project in the solution.
If you want to use the .exe files in "C:\<HLAESRC>\openexr-build\bin",
then you need to copy all DLL files from
"C:\<HLAESRC>\ilmbase-build\lib", "C:\<HLAESRC>\openexr-build\lib" and
"C:\Libraries\zlib-1.2.8" there.
[ ] This step is currently not required!
Obtain the SharpDX SDK 2.6.3 from
https://github.com/sharpdx/SharpDX/releases/tag/2.6.3
and extract it into a folder named "SharpDX" in the same folder where the
HLAE source code folder is located.
[ ] This step is currently not required!
Compile and run the ShaderBuilder project (requires the SharpDX SDK) and
compile the following Shaders to the "shaders\build" folder:
- shaders\afxHook_splinerope_ps2x.fxc:
- to afxHook_splinerope_ps20 (profile ps_2_0)
- to afxHook_splinerope_ps20b (profile ps_2_b)
- shaders\afxHook_splinecard_vsxx.fxc:
- to afxHook_splinecard_vs20 (profile vs_2_0)
- shaders\afxHook_spritecard_vsxx.fxc:
- to afxHook_spritecard_vs20 (profile vs_2_0)
- shaders\afxHook_spritecard_ps2x.fxc:
- to afxHook_spritecard_ps20 (profile ps_2_0)
- to afxHook_spritecard_ps20b (profile ps_2_b)
- shaders\afxHook_vertexlit_and_unlit_generic_ps2x.fxc:
- to afxHook_vertexlit_and_unlit_generic_ps20 (profile ps_2_0)
- to afxHook_vertexlit_and_unlit_generic_ps20b (profile ps_2_b)
- to afxHook_vertexlit_and_unlit_generic_ps30 (profile ps_3_0)
The .h and .acs files build this way are required by the AfxHookSource
project.
[X] AfxHook\recompile.bat, move AfxHook.dat into build\Release\bin\
[X] Open mdt.sln in the HLAE source code ("C:\<HLAESRC>\advancedfx" folder)
and Build (Configuration=Release) in this order:
AfxHookGoldSrc, AfxHookSource, AfxCppCli, AfxGui
[X] Use "C:\<HLAESRC>\advancedfx\copy_resources_release.bat""
to copy required files and folders to the
"C:\<HLAESRC>\advancedfx\build\Release\bin" folder.
[X] Copy all files
form "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x86"
to "C:\<HLAESRC>\advancedfx\build\Release\bin"
[X] Copy all files
form "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT"
to "C:\<HLAESRC>\advancedfx\build\Release\bin"
[X] Copy all DLL files from
"C:\<HLAESRC>\ilmbase-build\lib",
"C:\source<HLAESRC>\openexr-build\lib" (except "IlmImfUtil-2_2.dll") and
"C:\Libraries\zlib-1.2.8"
to "C:\<HLAESRC>\advancedfx\build\Release\bin"
[ ] This step is currently not required!
Copy RocketCore.dll, RocketControls.dll from
C:\Libraries\libRocket\Build\Release
to "C:\<HLAESRC>\advancedfx\build\Release\bin"
[X] You currently need to package the following files and folders in the final
.ZIP file:
resources, (You can currently leave out *.acs files in resources\AfxHookSource\shaders)
advancedfx.org.url,
AfxCppCli.dll,
AfxHook.dat,
AfxHookGoldSrc.dll,
AfxHookGoldSrc_changelog.xml,
AfxHookSource.dll,
AfxHookSource_changelog.xml,
api-ms-win-core-console-l1-1-0.dll,
api-ms-win-core-datetime-l1-1-0.dll,
api-ms-win-core-debug-l1-1-0.dll,
api-ms-win-core-errorhandling-l1-1-0.dll,
api-ms-win-core-file-l1-1-0.dll,
api-ms-win-core-file-l1-2-0.dll,
api-ms-win-core-file-l2-1-0.dll,
api-ms-win-core-handle-l1-1-0.dll,
api-ms-win-core-heap-l1-1-0.dll,
api-ms-win-core-interlocked-l1-1-0.dll,
api-ms-win-core-libraryloader-l1-1-0.dll,
api-ms-win-core-localization-l1-2-0.dll,
api-ms-win-core-memory-l1-1-0.dll,
api-ms-win-core-namedpipe-l1-1-0.dll,
api-ms-win-core-processenvironment-l1-1-0.dll,
api-ms-win-core-processthreads-l1-1-0.dll,
api-ms-win-core-processthreads-l1-1-1.dll,
api-ms-win-core-profile-l1-1-0.dll,
api-ms-win-core-rtlsupport-l1-1-0.dll,
api-ms-win-core-string-l1-1-0.dll,
api-ms-win-core-synch-l1-1-0.dll,
api-ms-win-core-synch-l1-2-0.dll,
api-ms-win-core-sysinfo-l1-1-0.dll,
api-ms-win-core-timezone-l1-1-0.dll,
api-ms-win-core-util-l1-1-0.dll,
api-ms-win-crt-conio-l1-1-0.dll,
api-ms-win-crt-convert-l1-1-0.dll,
api-ms-win-crt-environment-l1-1-0.dll,
api-ms-win-crt-filesystem-l1-1-0.dll,
api-ms-win-crt-heap-l1-1-0.dll,
api-ms-win-crt-locale-l1-1-0.dll,
api-ms-win-crt-math-l1-1-0.dll,
api-ms-win-crt-multibyte-l1-1-0.dll,
api-ms-win-crt-private-l1-1-0.dll,
api-ms-win-crt-process-l1-1-0.dll,
api-ms-win-crt-runtime-l1-1-0.dll,
api-ms-win-crt-stdio-l1-1-0.dll,
api-ms-win-crt-string-l1-1-0.dll,
api-ms-win-crt-time-l1-1-0.dll,
api-ms-win-crt-utility-l1-1-0.dll,
changelog.xml,
changelog.xsl,
concrt140.dll
Half.dll,
HLAE.exe,
Iex-2_2.dll,
IexMath-2_2.dll,
IlmImf-2_2.dll,
IlmThread-2_2.dll,
Imath-2_2.dll,
msvcp140.dll,
readme.txt,
ucrtbase.dll,
vccorlib140.dll,
vcruntime140.dll,
zlib1.dll