1
0
Fork 0
mirror of https://github.com/dancojocaru2000/ai-project-idastar.git synced 2025-02-23 00:49:34 +02:00

Added build script

This commit is contained in:
Kenneth Bruen 2021-12-04 14:53:20 +02:00
parent ead914fdbe
commit 7fdd5032d5
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1

31
build-exe.ps1 Executable file
View file

@ -0,0 +1,31 @@
#! /usr/bin/env pwsh
$options = @("&Windows", "&Linux")
$choice = $host.UI.PromptForChoice(
"Compile exe",
"What OS to compile the executable for?",
$options,
-1
)
$platform = $null
switch ($choice) {
0 { $platform = "win-x64" }
1 { $platform = "linux-x64" }
Default {
Write-Host "No OS chosen, exiting."
Exit
}
}
$sc = $null
switch ($host.UI.PromptForChoice(
"Self Contained",
"Should the executable be runnable without installing .NET Runtime?",
@("&Yes", "&No"),
0)) {
0 { $sc = "true" }
1 { $sc = "false" }
}
dotnet publish -r $platform --self-contained $sc