@@ -15,7 +15,7 @@ $latestTag = if ($isGitHubActions) {
15
15
}
16
16
17
17
# Get the latest version from tag
18
- $versionNumber = (Select-String - Pattern " \d+\.\d+\.\d+" - InputObject $latestTag ).Matches[0 ].Value
18
+ $versionNumber = (Select-String - Pattern " \d+\.\d+\.\d+" - InputObject $latestTag ).Matches[0 ].Value;
19
19
20
20
Write-Host " Building Polygon version $versionNumber " - ForegroundColor Green;
21
21
@@ -24,27 +24,27 @@ Remove-Item -Path "$cwd\build" -Recurse -Force -ErrorAction SilentlyContinue;
24
24
New-Item - Path " $cwd \build" - ItemType Directory - Force | Out-Null ;
25
25
26
26
# Download AutoHotkey
27
- $ahkFileNamePattern = " AutoHotkey_.*\.zip"
27
+ $ahkFileNamePattern = " AutoHotkey_.*\.zip" ;
28
28
$ahkLatestRelease = Invoke-RestMethod - Uri " https://api.github.com/repos/AutoHotkey/AutoHotkey/releases/latest" ;
29
- $ahkDownloadURL = ($ahkLatestRelease.assets | Where-Object { $_.name -match " $ahkFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url
29
+ $ahkDownloadURL = ($ahkLatestRelease.assets | Where-Object { $_.name -match " $ahkFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url;
30
30
Invoke-WebRequest - Uri $ahkDownloadURL - OutFile " $cwd \build\autohotkey.zip" ;
31
31
Expand-Archive - Path " $cwd \build\autohotkey.zip" - DestinationPath " $cwd \build\ahk" ;
32
32
33
33
Write-Host " Downloaded the latest release from AutoHotkey into `" $cwd \build\ahk\`" " - ForegroundColor Green;
34
34
35
35
# Download Ahk2Exe
36
- $ahk2ExeFileNamePattern = " Ahk2Exe.*\.zip"
36
+ $ahk2ExeFileNamePattern = " Ahk2Exe.*\.zip" ;
37
37
$ahk2ExeLatestRelease = Invoke-RestMethod - Uri " https://api.github.com/repos/AutoHotkey/Ahk2Exe/releases/latest" ;
38
- $ahk2ExeDownloadURL = ($ahk2ExeLatestRelease.assets | Where-Object { $_.name -match " $ahk2ExeFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url
38
+ $ahk2ExeDownloadURL = ($ahk2ExeLatestRelease.assets | Where-Object { $_.name -match " $ahk2ExeFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url;
39
39
Invoke-WebRequest - Uri $ahk2ExeDownloadURL - OutFile " $cwd \build\Ahk2exe.zip" ;
40
40
Expand-Archive - Path " $cwd \build\Ahk2exe.zip" - DestinationPath " $cwd \build\ahk" ;
41
41
42
42
Write-Host " Downloaded the latest release from Ahk2Exe into `" $cwd \build\ahk\`" " - ForegroundColor Green;
43
43
44
44
# Download upx
45
- $upxFileNamePattern = " upx-.*\-win64.zip"
45
+ $upxFileNamePattern = " upx-.*\-win64.zip" ;
46
46
$upxLatestRelease = Invoke-RestMethod - Uri " https://api.github.com/repos/upx/upx/releases/latest" ;
47
- $upxDownloadURL = ($upxLatestRelease.assets | Where-Object { $_.name -match " $upxFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url
47
+ $upxDownloadURL = ($upxLatestRelease.assets | Where-Object { $_.name -match " $upxFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url;
48
48
Invoke-WebRequest - Uri $upxDownloadURL - OutFile " $cwd \build\upx.zip" ;
49
49
Expand-Archive - Path " $cwd \build\upx.zip" - DestinationPath " $cwd \build\upx" - Force;
50
50
$sourceFolders = Get-ChildItem - Path " $cwd \build\upx\" - Directory - Filter " upx-*" ;
@@ -58,16 +58,16 @@ foreach ($folder in $sourceFolders) {
58
58
Write-Host " Downloaded the latest release from upx into `" $cwd \build\upx\`" " - ForegroundColor Green;
59
59
60
60
# Download Wix3
61
- $wixFileNamePattern = " wix311-binaries.zip"
61
+ $wixFileNamePattern = " wix311-binaries.zip" ;
62
62
$wixLatestRelease = Invoke-RestMethod - Uri " https://api.github.com/repos/wixtoolset/wix3/releases/latest" ;
63
- $wixDownloadURL = ($wixLatestRelease.assets | Where-Object { $_.name -match " $wixFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url
63
+ $wixDownloadURL = ($wixLatestRelease.assets | Where-Object { $_.name -match " $wixFileNamePattern " }) | Select-Object - ExpandProperty browser_download_url;
64
64
Invoke-WebRequest - Uri $wixDownloadURL - OutFile " $cwd \build\$wixFileNamePattern " ;
65
65
Expand-Archive - Path " $cwd \build\$wixFileNamePattern " - DestinationPath " $cwd \build\wix\" ;
66
66
67
67
Write-Host " Downloaded the latest release from Wix3 into `" $cwd \build\wix\`" " - ForegroundColor Green;
68
68
69
69
# Build polygon executables
70
- Start-Process - FilePath " $cwd \build\ahk\Ahk2Exe.exe" - NoNewWindow - Wait - ArgumentList " /in polygon.ahk /out "" $cwd \build\polygon-x86.exe"" /compress 2 /icon logo.ico /base "" $cwd \build\ahk\AutoHotkey32.exe"" "
70
+ Start-Process - FilePath " $cwd \build\ahk\Ahk2Exe.exe" - NoNewWindow - Wait - ArgumentList " /in polygon.ahk /out "" $cwd \build\polygon-x86.exe"" /compress 2 /icon logo.ico /base "" $cwd \build\ahk\AutoHotkey32.exe"" " ;
71
71
Start-Process - FilePath " $cwd \build\ahk\Ahk2Exe.exe" - NoNewWindow - Wait - ArgumentList " /in polygon.ahk /out "" $cwd \build\polygon-x64.exe"" /compress 2 /icon logo.ico /base "" $cwd \build\ahk\AutoHotkey64.exe"" " ;
72
72
73
73
Write-Host " Polygon binaries built successfully into `" $cwd \build\`" " - ForegroundColor Green;
0 commit comments