forked from jakibaki/beatsaber-hook
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbuild.ps1
More file actions
36 lines (26 loc) · 711 Bytes
/
build.ps1
File metadata and controls
36 lines (26 loc) · 711 Bytes
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
function Clean-Build-Folder {
if (Test-Path -Path "build")
{
remove-item build -R
new-item -Path build -ItemType Directory
} else {
new-item -Path build -ItemType Directory
}
}
$NDKPath = Get-Content $PSScriptRoot/ndkpath.txt
Clean-Build-Folder
& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DTEST_BUILD=1 . -B build
& cmake --build ./build
$ExitCode = $LastExitCode
if (-not ($ExitCode -eq 0)) {
$msg = "ExitCode: " + $ExitCode
Write-Output $msg
exit $ExitCode
}
# clean folder
Clean-Build-Folder
# build mod
& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" . -B build
& cmake --build ./build
$ExitCode = $LastExitCode
exit $ExitCode