11[CmdletBinding ()]
22param (
3- [ValidateSet (' x64' )]
3+ [ValidateSet (' x64' , ' arm64 ' )]
44 [string ] $Target = ' x64' ,
55 [ValidateSet (' Debug' , ' RelWithDebInfo' , ' Release' , ' MinSizeRel' )]
66 [string ] $Configuration = ' RelWithDebInfo' ,
@@ -69,7 +69,8 @@ function Package {
6969 Remove-Item @RemoveArgs
7070
7171 $ReleasePath = " ${ProjectRoot} /release/${Configuration} "
72- $NewBinPath = " ${ReleasePath} /${ProductName} /bin/64bit"
72+ $BinDirName = if ($Target -eq ' arm64' ) { ' arm64' } else { ' 64bit' }
73+ $NewBinPath = " ${ReleasePath} /${ProductName} /bin/${BinDirName} "
7374 $NewDataPath = " ${ReleasePath} /${ProductName} /data"
7475 $CIWindowsDir = " ${ProjectRoot} /build-aux/CI/windows"
7576
@@ -80,7 +81,7 @@ function Package {
8081 New-Item - ItemType Directory - Force - Path $RecStaging | Out-Null
8182 Copy-Item - Path " ${CIWindowsDir} /README.txt" - Destination " ${RecStaging} /README.txt"
8283 if ( Test-Path - Path $NewBinPath ) {
83- $RecBinPath = " ${RecStaging} /${ProductName} /bin/64bit "
84+ $RecBinPath = " ${RecStaging} /${ProductName} /bin/${BinDirName} "
8485 New-Item - ItemType Directory - Force - Path $RecBinPath | Out-Null
8586 Copy-Item - Path " ${NewBinPath} /*" - Destination $RecBinPath - Recurse - Force
8687 }
@@ -102,7 +103,7 @@ function Package {
102103 New-Item - ItemType Directory - Force - Path $PortableStaging | Out-Null
103104 Copy-Item - Path " ${CIWindowsDir} /README-portable.txt" - Destination " ${PortableStaging} /README.txt"
104105 if ( Test-Path - Path $NewBinPath ) {
105- $PortableBinPath = " ${PortableStaging} /obs-plugins/64bit "
106+ $PortableBinPath = " ${PortableStaging} /obs-plugins/${BinDirName} "
106107 New-Item - ItemType Directory - Force - Path $PortableBinPath | Out-Null
107108 Copy-Item - Path " ${NewBinPath} /*" - Destination $PortableBinPath - Recurse - Force
108109 }
@@ -136,10 +137,10 @@ function Package {
136137 Copy-Item - Path " ${Configuration} /*" - Destination $PkgRec - Recurse - Force
137138
138139 # Legacy layout (for OBS installation directory)
139- if ( Test-Path " ${Configuration} /${ProductName} /bin/64bit " ) {
140- $PkgLegBin = " Package/portable/obs-plugins/64bit "
140+ if ( Test-Path " ${Configuration} /${ProductName} /bin/${BinDirName} " ) {
141+ $PkgLegBin = " Package/portable/obs-plugins/${BinDirName} "
141142 New-Item - ItemType Directory - Force - Path $PkgLegBin | Out-Null
142- Copy-Item - Path " ${Configuration} /${ProductName} /bin/64bit /*" - Destination $PkgLegBin - Recurse - Force
143+ Copy-Item - Path " ${Configuration} /${ProductName} /bin/${BinDirName} /*" - Destination $PkgLegBin - Recurse - Force
143144 }
144145 if ( Test-Path " ${Configuration} /${ProductName} /data" ) {
145146 $PkgLegData = " Package/portable/data/obs-plugins/${ProductName} "
0 commit comments