1
0
Fork 0
mirror of https://github.com/dancojocaru2000/ai-project-idastar.git synced 2025-02-22 08:29:35 +02:00

Add OS detection to build script

This commit is contained in:
Kenneth Bruen 2021-12-06 16:27:05 +02:00
parent 274c9b0d42
commit 64301e95a6
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1

View file

@ -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