18 lines
561 B
PowerShell
18 lines
561 B
PowerShell
param(
|
|
[ValidateSet("run","build","debug","test","clean")]
|
|
[string]$Command = "build"
|
|
)
|
|
|
|
$src = "."
|
|
$out = "bin\server.exe"
|
|
|
|
switch ($Command) {
|
|
"run" { odin run $src }
|
|
"build" { odin build $src -out:$out -o:speed }
|
|
"debug" { odin build $src -out:$out -debug }
|
|
"test" { odin test .\tests\ -all-packages }
|
|
"clean" { Remove-Item -Recurse -Force bin -ErrorAction SilentlyContinue }
|
|
"golib" { go build -buildmode=c-shared -o libgoldmark.dll parser.go }
|
|
"libc" { lib /def:libgoldmark.def /out:libgoldmark.lib /machine:x64 }
|
|
}
|