-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun-dev.ps1
More file actions
29 lines (23 loc) · 708 Bytes
/
Copy pathrun-dev.ps1
File metadata and controls
29 lines (23 loc) · 708 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
param(
[ValidateRange(320, 7680)]
[int]$Width = 1280,
[ValidateRange(240, 4320)]
[int]$Height = 800,
[ValidateRange(0, 8)]
[int]$Module = 1,
[string]$Msys2Bin = ''
)
$executable = Join-Path $PSScriptRoot 'build\pegasusg_by_roc.exe'
if (-not (Test-Path -LiteralPath $executable -PathType Leaf)) {
throw "PegasusG by ROC is not built: $executable"
}
$candidates = @(
$Msys2Bin,
$env:PEGASUSG_MSYS2_BIN,
'C:\msys64\ucrt64\bin',
'D:\Program Files\MSYS2\ucrt64\bin'
) | Where-Object { $_ -and (Test-Path -LiteralPath $_ -PathType Container) }
if ($candidates.Count -gt 0) {
$env:PATH = "$($candidates[0]);$env:PATH"
}
& $executable --width $Width --height $Height --module $Module