Skip to content

Commit

Permalink
deps.windows: Add arm64 slice to dependency build scripts for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav committed Sep 19, 2023
1 parent 512f724 commit 3aaa7ca
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 26 deletions.
2 changes: 1 addition & 1 deletion deps.windows/20-freetype.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '2.13.1',
[string] $Uri = 'https://github.com/freetype/freetype.git',
[string] $Hash = 'e4586d960f339cf75e2e0b34aee30a0ed8353c0d',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/30-curl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '8.1.2',
[string] $Uri = 'https://github.com/curl/curl.git',
[string] $Hash = '7ab9d43720bc34d9aa351c7ca683c1668ebf8335',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/30-jansson.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '2.14',
[string] $Uri = 'https://github.com/akheron/jansson.git',
[string] $Hash = '684e18c927e89615c2d501737e90018f4930d6c5',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/30-rnnoise.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '2020-07-28',
[string] $Uri = 'https://github.com/xiph/rnnoise.git',
[string] $Hash = '2938bcf94a2fe3f850df542f5de3996905059c97',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/30-speexdsp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '1.2.1',
[string] $Uri = 'https://github.com/xiph/speexdsp.git',
[string] $Hash = '1b28a0f61bc31162979e1f26f3981fc3637095c8',
[array] $Targets = @('x64'),
[array] $Targets = @('x64', 'arm64'),
[array] $Patches = @(
@{
PatchFile = "${PSScriptRoot}/patches/speexdsp/0001-Add-CMakeLists.patch"
Expand Down
16 changes: 10 additions & 6 deletions deps.windows/40-detours.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@ param(
[string] $Name = 'detours',
[string] $Version = '4.0.1',
[string] $Uri = 'https://github.com/microsoft/detours.git',
[string] $Hash = 'e4bfd6b03e50de46b47abfbd1e46b384f0c5f833'
[hashtable] $Hashes = @{
x86 = 'e4bfd6b03e50de46b47abfbd1e46b384f0c5f833'
x64 = 'e4bfd6b03e50de46b47abfbd1e46b384f0c5f833'
arm64 = '734ac64899c44933151c1335f6ef54a590219221'
}
)

function Setup {
Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path
Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path -Branch main
}

function Clean {
Set-Location $Path

$Items = @(
@{ErrorAction = "SilentlyContinue"; Path = "lib.${Target}"}
@{ErrorAction = "SilentlyContinue"; Path = "bin.${Target}"}
@{ErrorAction = "SilentlyContinue"; Path = "src/obj..${Target}"}
@{ErrorAction = "SilentlyContinue"; Path = "lib.$($Target.ToUpper())"}
@{ErrorAction = "SilentlyContinue"; Path = "bin.$($Target.ToUpper())"}
@{ErrorAction = "SilentlyContinue"; Path = "src/obj.$($Target.ToUpper())"}
)

$Items | ForEach-Object {
$Item = $_
Log-Information "Clean $($Item.Path) (${Target})"
Get-ChildItem @Item | Remove-Item
Get-ChildItem @Item | Remove-Item -Recurse
}
}

Expand Down
8 changes: 6 additions & 2 deletions deps.windows/40-luajit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ param(
[string] $Name = 'luajit',
[string] $Version = '2.1',
[string] $Uri = 'https://github.com/luajit/luajit.git',
[string] $Hash = '8635cbabf3094c4d8bd00578c7d812bea87bb2d3',
[array] $Targets = @('x64')
[hashtable] $Hashes = @{
x64 = '8635cbabf3094c4d8bd00578c7d812bea87bb2d3'
arm64 = 'e897c5743f97a6b05c59852709092e7da4119914'
},
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand All @@ -19,6 +22,7 @@ function Build {
BuildPath = "src"
BuildCommand = "cmd.exe /c 'msvcbuild.bat amalg'"
Target = $Target
HostArchitecture = $Target
}

Invoke-DevShell @Params
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/50-bison-bin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '2.4.1',
[string] $Uri = 'http://downloads.sourceforge.net/gnuwin32/bison-2.4.1-bin.zip',
[string] $Hash = "${PSScriptRoot}/checksums/bison-2.4.1-bin.zip.sha256",
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/50-bison-dep.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '2.4.1',
[string] $Uri = 'http://downloads.sourceforge.net/gnuwin32/bison-2.4.1-dep.zip',
[string] $Hash = "${PSScriptRoot}/checksums/bison-2.4.1-dep.zip.sha256",
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/50-pcre.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '10.40',
[string] $Uri = 'https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.40/pcre2-10.40.zip',
[string] $Hash = "${PSScriptRoot}/checksums/pcre2-10.40.zip.sha256",
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/50-swig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '4.1.0',
[string] $Uri = 'https://github.com/swig/swig.git',
[string] $Hash = "4dd285fad736c014224ef2ad25b85e17f3dce1f9",
[array] $Targets = @('x64'),
[array] $Targets = @('x64', 'arm64'),
[array] $Patches = @(
@{
PatchFile = "${PSScriptRoot}/patches/swig/0001-add-Python-3-stable-abi.patch"
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/60-asio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '1.28.0',
[string] $Uri = 'https://github.com/chriskohlhoff/asio.git',
[string] $Hash = "c465349fa5cd91a64bb369f5131ceacab2c0c1c3",
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/60-nlohmann-json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '3.11.2',
[string] $Uri = 'https://github.com/nlohmann/json.git',
[string] $Hash = 'bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
7 changes: 4 additions & 3 deletions deps.windows/60-python.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ param(
[string] $Name = 'python',
[string] $Version = '3.1.1',
[string] $Uri = 'https://github.com/pyenv-win/pyenv-win.git',
[string] $Hash = '754a6ca877f66aaa2bd4485a29411267d0705273',
[array] $Targets = @('x64'),
[string] $Hash = '42b208627c2cdc7a55c93fe9c82a9ed4524cd9ea',
[array] $Targets = @('x64', 'arm64'),
[hashtable] $PythonVersion = @{
x64 = '3.8.10'
x64 = '3.8.10'
arm64 = '3.11.0-arm'
}
)

Expand Down
2 changes: 1 addition & 1 deletion deps.windows/60-qrcodegencpp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param(
[string] $Hash = '720f62bddb7226106071d4728c292cb1df519ceb',
[string] $UriCMake = 'https://github.com/EasyCoding/qrcodegen-cmake.git',
[string] $HashCMake = 'ea5835f7dca5bcf31dc795b1ac61bdc1f15940a7',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/60-websocketpp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '0.8.2',
[string] $Uri = 'https://github.com/zaphoyd/websocketpp.git',
[string] $Hash = '56123c87598f8b1dd471be83ca841ceae07f95ba',
[array] $Targets = @('x64'),
[array] $Targets = @('x64', 'arm64'),
[array] $Patches = @(
@{
PatchFile = "${PSScriptRoot}/patches/websocketpp/0001-update-minimum-cmake.patch"
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/60-zstd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = 'v1.5.5',
[string] $Uri = 'https://github.com/facebook/zstd.git',
[string] $Hash = '63779c798237346c2b245c546c40b72a5a5913fe',
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down
2 changes: 1 addition & 1 deletion deps.windows/90-vlc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '3.0.8',
[string] $Uri = 'https://cdn-fastly.obsproject.com/downloads/vlc.zip',
[string] $Hash = "${PSScriptRoot}/checksums/vlc.zip.sha256",
[array] $Targets = @('x64')
[array] $Targets = @('x64', 'arm64')
)

function Setup {
Expand Down

0 comments on commit 3aaa7ca

Please sign in to comment.