-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.ps1
More file actions
55 lines (44 loc) · 1.04 KB
/
build.ps1
File metadata and controls
55 lines (44 loc) · 1.04 KB
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
# get the location of this file
$scriptpath = $MyInvocation.MyCommand.Path
# get the directory path to this file
$wd = Split-Path $scriptpath
# set the working directory as this file's directory
Push-Location $wd
# build all the code and assets
. ./settings.ps1
if ($args.Count -ge 1)
{
$code_configuration = $args[0]
}
else
{
$code_configuration = 'Debug'
}
& "MSBuild.exe" /t:Build /p:Configuration=${code_configuration} "cl_dll\cl_dll.sln"
& "MSBuild.exe" /t:Build /p:Configuration=${code_configuration} "dlls\hl.sln"
Copy-Item "cl_dll\${code_configuration}\client.dll" -Destination "${moddir}\cl_dlls\"
if ($code_configuration -eq "Release")
{
Copy-Item "dlls\Release\hl.dll" -Destination "${moddir}\dlls\"
}
else
{
Copy-Item "dlls\debughl\hl.dll" -Destination "${moddir}\dlls\"
}
# compile maps
cd mapsrc
cmd /c "compile.bat Release"
cd ..
# compile models
cd modelsrc
cmd /c "compile.bat Release"
cd ..
# compile sprites
cd spritesrc
cmd /c "compile.bat Release"
cd ..
# compile wads
cd wadsrc
cmd /c "compile.bat Release"
cd ..
Pop-Location