simplify commands
This commit is contained in:
parent
37277400b0
commit
cb519e8585
1 changed files with 6 additions and 11 deletions
17
do.ps1
17
do.ps1
|
|
@ -215,18 +215,13 @@ switch ($command) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{($_ -eq "run") -or ($_ -eq "r")} {
|
{($_ -eq "run") -or ($_ -eq "r")} {
|
||||||
$release = $rest[0] -eq "release" -or $rest[0] -eq "fast";
|
$binary = Join-Path $OUT_DIR ($EXE_NAME + (Get-Ext $HOST_OS));
|
||||||
$binary = Join-Path $OUT_DIR ($EXE_NAME + (Get-Ext $HOST_OS));
|
if (-not (Test-Path $binary)) {
|
||||||
$cmd = "$(CompileCommand $HOST_OS $release) -o $binary";
|
$release = $rest[0] -eq "release" -or $rest[0] -eq "fast";
|
||||||
|
&"./do.ps1" build if ($release) { "release" } else { "" };
|
||||||
Write-Host (":: Compiling natively" + $(if ($release) { " (release mode)" } else { "" }));
|
|
||||||
Write-Host $cmd;
|
|
||||||
|
|
||||||
Invoke-Expression $cmd | Write-Host;
|
|
||||||
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Invoke-Expression $binary | Write-Host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Invoke-Expression $binary | Write-Host;
|
||||||
}
|
}
|
||||||
{($_ -eq "run-wasm") -or ($_ -eq "rw")} {
|
{($_ -eq "run-wasm") -or ($_ -eq "rw")} {
|
||||||
if (-not (Test-Path (Join-Path $OUT_DIR "p2601.wasm"))) {
|
if (-not (Test-Path (Join-Path $OUT_DIR "p2601.wasm"))) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue