diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2f4ec265..9ea9921c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -460,7 +460,7 @@ jobs: strategy: fail-fast: true matrix: - target: [x64, x86, ARM64] + target: [x64, x86, arm64] include: - target: x64 config: 'Release' @@ -468,7 +468,7 @@ jobs: - target: x86 config: 'Release' type: 'static' - - target: ARM64 + - target: arm64 config: 'Release' type: 'static' env: diff --git a/.vscode/launch.json b/.vscode/launch.json index adaf24f5c..6551a4f0a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -16,7 +16,7 @@ "type": "PowerShell", "request": "launch", "script": "${workspaceFolder}/Build-Dependencies.ps1", - "args": ["-Configuration Release -Target ARM64 -Debug"], + "args": ["-Configuration Release -Target arm64 -Debug detours"], "cwd": "${cwd}" }, { diff --git a/Build-Dependencies.ps1 b/Build-Dependencies.ps1 index b9c8c05a6..8d2ff4f2d 100644 --- a/Build-Dependencies.ps1 +++ b/Build-Dependencies.ps1 @@ -3,7 +3,7 @@ param( [ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')] [string] $Configuration = 'Release', [string[]] $Dependencies, - [ValidateSet('x86', 'x64', 'ARM64')] + [ValidateSet('x86', 'x64', 'arm64')] [string] $Target, [switch] $Clean, [switch] $Quiet, @@ -200,7 +200,6 @@ function Build-Main { } else { $DependencyFiles = $Dependencies | ForEach-Object { $Item = $_ - Write-Output $Item # TODO: wtf is happening here? try { Get-ChildItem $PSScriptRoot/${SubDir}/*$Item.ps1 } catch { diff --git a/deps.windows/40-detours.ps1 b/deps.windows/40-detours.ps1 index 45173388b..af9613fd2 100644 --- a/deps.windows/40-detours.ps1 +++ b/deps.windows/40-detours.ps1 @@ -2,7 +2,7 @@ param( [string] $Name = 'detours', [string] $Version = '4.0.1', [string] $Uri = 'https://github.com/microsoft/detours.git', - [string] $Hash = 'e4bfd6b03e50de46b47abfbd1e46b384f0c5f833' + [string] $Hash = '734ac64899c44933151c1335f6ef54a590219221' ) function Setup { @@ -34,7 +34,7 @@ function Build { BuildPath = "src" BuildCommand = "nmake" Target = $Target - HostArchitecture = $Target + # HostArchitecture = $Target } Invoke-DevShell @Params diff --git a/deps.windows/40-luajit.ps1 b/deps.windows/40-luajit.ps1 index da23b5a81..e2d122c5e 100644 --- a/deps.windows/40-luajit.ps1 +++ b/deps.windows/40-luajit.ps1 @@ -6,16 +6,18 @@ param( ) function Setup { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Setup ${Name} for Windows ARM64" + return } Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path } function Build { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Build ${Name} for Windows ARM64" + return } Log-Information "Build (${Target})" @@ -32,8 +34,9 @@ function Build { } function Install { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Install ${Name} for Windows ARM64" + return } Log-Information "Install (${Target})" diff --git a/deps.windows/60-ntv2.ps1 b/deps.windows/60-ntv2.ps1 index cf25640eb..80ef80cd1 100644 --- a/deps.windows/60-ntv2.ps1 +++ b/deps.windows/60-ntv2.ps1 @@ -7,8 +7,9 @@ param( ) function Setup { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Setup ${Name} for Windows ARM64" + return } Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path @@ -24,8 +25,9 @@ function Clean { } function Configure { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Configure ${Name} for Windows ARM64" + return } Log-Information "Configure (${Target})" @@ -51,8 +53,9 @@ function Configure { } function Build { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Build ${Name} for Windows ARM64" + return } Log-Information "Build (${Target})" @@ -71,8 +74,9 @@ function Build { } function Install { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Install ${Name} for Windows ARM64" + return } Log-Information "Install (${Target})" @@ -91,8 +95,9 @@ function Install { } function Fixup { - if (${Target} -eq "ARM64") { + if (${Target} -eq "arm64") { Log-Information "Skipping Fixup ${Name} for Windows ARM64" + return } Log-Information "Fixup (${Target})" diff --git a/deps.windows/60-python.ps1 b/deps.windows/60-python.ps1 index 97115e93f..43bc2743e 100644 --- a/deps.windows/60-python.ps1 +++ b/deps.windows/60-python.ps1 @@ -39,6 +39,11 @@ function Disable-PyEnv { } function Setup { + if (${Target} -eq "arm64") { + Log-Information "Skipping Setup ${Name} for Windows ARM64" + return + } + Setup-Dependency -Uri $Uri -Hash $Hash -DestinationPath $Path } diff --git a/utils.pwsh/Invoke-DevShell.ps1 b/utils.pwsh/Invoke-DevShell.ps1 index e6ee74f79..8f015ed95 100644 --- a/utils.pwsh/Invoke-DevShell.ps1 +++ b/utils.pwsh/Invoke-DevShell.ps1 @@ -20,7 +20,7 @@ function Invoke-DevShell { [Parameter(Mandatory)] [string] $BuildCommand, [Parameter(Mandatory)] - [ValidateSet('x86', 'x64', 'ARM64')] + [ValidateSet('x86', 'x64', 'arm64')] [string] $Target, [string] $HostArchitecture = ( 'x86', 'x64' )[ [System.Environment]::Is64BitOperatingSystem ] ) diff --git a/utils.pwsh/Setup-Target.ps1 b/utils.pwsh/Setup-Target.ps1 index 2dd55b312..72c78c2b9 100644 --- a/utils.pwsh/Setup-Target.ps1 +++ b/utils.pwsh/Setup-Target.ps1 @@ -3,21 +3,10 @@ function Setup-Target { . $PSScriptRoot/Logger.ps1 } - # TODO: add ARM64 here, reimplement as switch clause - # $Target64Bit = ( $script:Target -eq 'x64' ) - - # $script:ConfigData = @{ - # Arch = ('x86', 'x64')[$Target64Bit] - # UnixArch = ('x86', 'x86_64')[$Target64Bit] - # CmakeArch = ('Win32', 'x64')[$Target64Bit] - # Bitness = ('32', '64')[$Target64Bit] - # OutputPath = "${script:ProjectRoot}\windows\obs-${script:PackageName}-${script:Target}" - # } - $script:ConfigData = switch ($script:Target) { - 'ARM64' { + 'arm64' { @{ - Arch = 'ARM64' + Arch = 'arm64' UnixArch = 'aarch64' CmakeArch = 'ARM64' Bitness = '64'