Browse Source

Add OS detection to build script

master
Kenneth Bruen 3 years ago
parent
commit
64301e95a6
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 13
      build-exe.ps1

13
build-exe.ps1

@ -1,11 +1,22 @@
#! /usr/bin/env pwsh
$platform = [System.Environment]::OSVersion.platform
if ($platform -eq 4) {
$default = 1
}
elseif ($platform -le 2) {
$default = 0
}
else {
$default = -1
}
$options = @("&Windows", "&Linux")
$choice = $host.UI.PromptForChoice(
"Compile exe",
"What OS to compile the executable for?",
$options,
-1
$default
)
$platform = $null

Loading…
Cancel
Save