Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for using ponyup on Windows #213

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .release-notes/213.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Support Ponyup on Windows

To support ponyup on Windows, updated corral to be able to run `X.bat` files when given `X` as a command to run. Also changes to the Windows `make.ps1` script to make sure it still works with ponyup on Windows.
4 changes: 4 additions & 0 deletions corral/util/action.pony
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class val Program
ifdef windows then
let bin_bare = FilePath.from(bd, name)?
if bin_bare.exists() then return bin_bare end
let bin_bat = FilePath.from(bd, name + ".bat")?
if bin_bat.exists() then return bin_bat end
let bin_ps1 = FilePath.from(bd, name + ".ps1")?
if bin_ps1.exists() then return bin_ps1 end
let bin_exe = FilePath.from(bd, name + ".exe")?
if bin_exe.exists() then return bin_exe end
else
Expand Down
6 changes: 3 additions & 3 deletions make.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Param(
[Parameter(Position=0, Mandatory=$true, HelpMessage="The action to take (build, test, install, package, clean).")]
[Parameter(Position=0, HelpMessage="The action to take (build, test, install, package, clean).")]
[string]
$Command,
$Command = 'build',

[Parameter(HelpMessage="The build configuration (Release, Debug).")]
[string]
Expand Down Expand Up @@ -84,7 +84,7 @@ function BuildCorral
{
if ($binaryTimestamp -lt $file.LastWriteTimeUtc)
{
ponyc.exe "$configFlag" --cpu "$Arch" --output "$buildDir" "$srcDir"
ponyc "$configFlag" --cpu "$Arch" --output "$buildDir" "$srcDir"
break buildFiles
}
}
Expand Down