Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyvct committed Nov 8, 2022
1 parent 27d8dfc commit 5b99bbe
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,15 @@ jobs:
strategy:
fail-fast: true
matrix:
target: [x64, x86, ARM64]
target: [x64, x86, arm64]
include:
- target: x64
config: 'Release'
type: 'static'
- target: x86
config: 'Release'
type: 'static'
- target: ARM64
- target: arm64
config: 'Release'
type: 'static'
env:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
},
{
Expand Down
3 changes: 1 addition & 2 deletions Build-Dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions deps.windows/40-detours.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -34,7 +34,7 @@ function Build {
BuildPath = "src"
BuildCommand = "nmake"
Target = $Target
HostArchitecture = $Target
# HostArchitecture = $Target
}

Invoke-DevShell @Params
Expand Down
9 changes: 6 additions & 3 deletions deps.windows/40-luajit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand All @@ -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})"
Expand Down
15 changes: 10 additions & 5 deletions deps.windows/60-ntv2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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})"
Expand All @@ -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})"
Expand All @@ -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})"
Expand All @@ -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})"
Expand Down
5 changes: 5 additions & 0 deletions deps.windows/60-python.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion utils.pwsh/Invoke-DevShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
)
Expand Down
15 changes: 2 additions & 13 deletions utils.pwsh/Setup-Target.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 5b99bbe

Please sign in to comment.