13
13
14
14
[Parameter (HelpMessage = " Architecture (native, x64)." )]
15
15
[string ]
16
- $ZipArch = [System.Runtime.InteropServices.RuntimeInformation ]::OSArchitecture,
16
+ $Arch = [System.Runtime.InteropServices.RuntimeInformation ]::OSArchitecture,
17
17
18
18
[Parameter (HelpMessage = " Directory to install to." )]
19
19
[string ]
@@ -22,13 +22,13 @@ Param(
22
22
23
23
$ErrorActionPreference = " Stop"
24
24
25
- if ($ZipArch -ieq ' x64' )
25
+ if ($Arch -ieq ' x64' )
26
26
{
27
- $ZipArch = ' x86-64'
27
+ $Arch = ' x86-64'
28
28
}
29
- elseif ($ZipArch -ieq ' arm64' )
29
+ elseif ($Arch -ieq ' arm64' )
30
30
{
31
- $ZipArch = ' arm64'
31
+ $Arch = ' arm64'
32
32
}
33
33
34
34
$target = " ponyup" # The name of the target executable.
@@ -104,8 +104,8 @@ function BuildTarget
104
104
{
105
105
if ($binaryTimestamp -lt $file.LastWriteTimeUtc )
106
106
{
107
- Write-Host " corral run -- ponyc $configFlag $ponyArgs --output `" $buildDir `" --bin-name `" $target `" `" $srcDir `" "
108
- $output = (corral run -- ponyc $configFlag $ponyArgs -- output " $buildDir " -- bin- name " $target " " $srcDir " )
107
+ Write-Host " corral run -- ponyc $configFlag $ponyArgs --cpu `" $Arch `" -- output `" $buildDir `" --bin-name `" $target `" `" $srcDir `" "
108
+ $output = (corral run -- ponyc $configFlag $ponyArgs -- cpu `" $Arch `" -- output " $buildDir " -- bin- name " $target " " $srcDir " )
109
109
$output | ForEach-Object { Write-Host $_ }
110
110
if ($LastExitCode -ne 0 ) { throw " Error" }
111
111
break buildFiles
@@ -216,7 +216,7 @@ switch ($Command.ToLower())
216
216
if (-not $isLibrary )
217
217
{
218
218
$binDir = Join-Path - Path $Destdir - ChildPath " bin"
219
- $package = " $target -$ZipArch -pc-windows-msvc.zip"
219
+ $package = " $target -$Arch -pc-windows-msvc.zip"
220
220
Write-Host " Creating $package ..."
221
221
222
222
Compress-Archive - Path $binDir - DestinationPath " $buildDir \..\$package " - Force
0 commit comments