1414 [string ] $CefBinaryDir = " ../cefsource/chromium/src/cef/binary_distrib/" ,
1515
1616 [Parameter (Position = 3 )]
17- $CefVersion = " 86.0.20+gf2039ae +chromium-86 .0.4240.111 " ,
17+ $CefVersion = " 88.1.2+gac8e5f0 +chromium-88 .0.4324.27 " ,
1818
1919 [ValidateSet (" tar.bz2" , " zip" , " 7z" )]
2020 [Parameter (Position = 4 )]
5858 $Cef32vcx = Join-Path (Join-Path $Cef32 ' libcef_dll_wrapper' ) ' libcef_dll_wrapper.vcxproj'
5959 $Cef64 = Join-Path $WorkingDir ' cef_binary_3.y.z_windows64'
6060 $Cef64vcx = Join-Path (Join-Path $Cef64 ' libcef_dll_wrapper' ) ' libcef_dll_wrapper.vcxproj'
61+ $CefArm64 = Join-Path $WorkingDir ' cef_binary_3.y.z_windowsarm64'
62+ $CefArm64vcx = Join-Path (Join-Path $CefArm64 ' libcef_dll_wrapper' ) ' libcef_dll_wrapper.vcxproj'
6163
6264 function Write-Diagnostic
6365 {
218220 md ' cef\x64\release\VS2015' | Out-Null
219221 md ' cef\x64\release\VS2017' | Out-Null
220222 md ' cef\x64\release\VS2019' | Out-Null
223+ md ' cef\arm64' | Out-Null
224+ md ' cef\arm64\debug' | Out-Null
225+ md ' cef\arm64\debug\VS2017' | Out-Null
226+ md ' cef\arm64\debug\VS2019' | Out-Null
227+ md ' cef\arm64\release' | Out-Null
228+ md ' cef\arm64\release\VS2017' | Out-Null
229+ md ' cef\arm64\release\VS2019' | Out-Null
221230 }
222231
223232 function Msvs
232241 [string ] $Configuration ,
233242
234243 [Parameter (Position = 2 , ValueFromPipeline = $true )]
235- [ValidateSet (' x86' , ' x64' )]
244+ [ValidateSet (' x86' , ' x64' , ' arm64 ' )]
236245 [string ] $Platform
237246 )
238247
@@ -327,10 +336,21 @@ try
327336 Die ' Error unable to find any visual studio environment'
328337 }
329338
330- $CefProject = TernaryReturn ($Platform -eq ' x86' ) $Cef32vcx $Cef64vcx
331- $CefDir = TernaryReturn ($Platform -eq ' x86' ) $Cef32 $Cef64
332-
333- $Arch = TernaryReturn ($Platform -eq ' x64' ) ' x64' ' win32'
339+ $CefProject = $Cef32vcx
340+ $CefDir = $Cef32
341+ $Arch = ' win32'
342+ if ($Platform -eq ' x64' )
343+ {
344+ $CefProject = $Cef64vcx
345+ $CefDir = $Cef64
346+ $Arch = ' x64'
347+ }
348+ elseif ($Platform -eq ' arm64' )
349+ {
350+ $CefProject = $CefArm64vcx
351+ $CefDir = $CefArm64
352+ $Arch = ' arm64'
353+ }
334354
335355 $VCVarsAll = Join-Path $VXXCommonTools vcvarsall.bat
336356 if (-not (Test-Path $VCVarsAll ))
@@ -340,15 +360,22 @@ try
340360 }
341361
342362 $VCXProj = $Cef32vcx
363+ $VCVarsAllArch = ' x86'
343364 if ($Platform -eq ' x64' )
344365 {
345366 $VCXProj = $Cef64vcx
367+ $VCVarsAllArch = ' x64'
368+ }
369+ elseif ($Platform -eq ' arm64' )
370+ {
371+ $VCXProj = $CefArm64vcx
372+ $VCVarsAllArch = ' x64_arm64'
346373 }
347374
348375 # Only configure build environment once
349376 if ($env: CEFSHARP_BUILD_IS_BOOTSTRAPPED -ne " $Toolchain$Platform " )
350377 {
351- Invoke-BatchFile $VCVarsAll $Platform
378+ Invoke-BatchFile $VCVarsAll $VCVarsAllArch
352379 Write-Diagnostic " pushd $CefDir "
353380 pushd $CefDir
354381 # Remove previously generated CMake data for the different platform/toolchain
433460 }
434461 Msvs " $Toolchain " ' Release' ' x64'
435462
463+ if ($Toolchain -eq ' v141' -or $Toolchain -eq ' v142' )
464+ {
465+ if (! $NoDebugBuild )
466+ {
467+ Msvs " $Toolchain " ' Debug' ' arm64'
468+ }
469+ Msvs " $Toolchain " ' Release' ' arm64'
470+ }
471+
436472 Write-Diagnostic " Finished build targeting toolchain $Toolchain "
437473 }
438474
448484 [string ] $Configuration ,
449485
450486 [Parameter (Position = 2 , ValueFromPipeline = $true )]
451- [ValidateSet (' x86' , ' x64' )]
487+ [ValidateSet (' x86' , ' x64' , ' arm64 ' )]
452488 [string ] $Platform
453489 )
454490
476512 $VisualStudioVersion = " VS2013"
477513 }
478514
479- $Arch = TernaryReturn ($Platform -eq ' x64' ) ' x64' ' win32'
480- $CefArchDir = TernaryReturn ($Platform -eq ' x64' ) $Cef64 $Cef32
515+ $Arch = ' win32'
516+ $CefArchDir = $Cef32
517+ if ($Platform -eq ' x64' )
518+ {
519+ $Arch = ' x64'
520+ $CefArchDir = $Cef64
521+ }
522+ elseif ($Platform -eq ' arm64' )
523+ {
524+ $Arch = ' arm64'
525+ $CefArchDir = $CefArm64
526+ }
481527
482528 # cef_binary_3.y.z_windows32\out\debug\lib -> cef\win32\debug\vs2013
483529 Copy-Item $CefArchDir \libcef_dll_wrapper\$Configuration \libcef_dll_wrapper.lib $Cef \$Arch \$Configuration \$VisualStudioVersion | Out-Null
504550 . $Nuget pack nuget\cef.redist.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;Platform=x64;CPlatform=windows64;' - OutputDirectory nuget
505551 . $Nuget pack nuget\chromiumembeddedframework.runtime.win.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;Platform=x64;CPlatform=windows64;' - OutputDirectory nuget
506552
553+ # Build arm64 packages
554+ . $Nuget pack nuget\cef.redist.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;Platform=arm64;CPlatform=windowsarm64;' - OutputDirectory nuget
555+ . $Nuget pack nuget\chromiumembeddedframework.runtime.win.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;Platform=arm64;CPlatform=windowsarm64;' - OutputDirectory nuget
556+
507557 # Meta Package
508558 . $Nuget pack nuget\chromiumembeddedframework.runtime.nuspec - NoPackageAnalysis - Version $CefPackageVersion - Properties ' Configuration=Release;' - OutputDirectory nuget
509559
518568 {
519569 appveyor PushArtifact " nuget\cef.redist.x86.$CefPackageVersion .nupkg"
520570 appveyor PushArtifact " nuget\cef.redist.x64.$CefPackageVersion .nupkg"
571+ appveyor PushArtifact " nuget\cef.redist.arm64.$CefPackageVersion .nupkg"
521572 appveyor PushArtifact " nuget\chromiumembeddedframework.runtime.win-x86.$CefPackageVersion .nupkg"
522573 appveyor PushArtifact " nuget\chromiumembeddedframework.runtime.win-x64.$CefPackageVersion .nupkg"
574+ appveyor PushArtifact " nuget\chromiumembeddedframework.runtime.win-arm64.$CefPackageVersion .nupkg"
523575 appveyor PushArtifact " nuget\chromiumembeddedframework.runtime.$CefPackageVersion .nupkg"
524576 appveyor PushArtifact " nuget\cef.sdk.$CefPackageVersion .nupkg"
525577 }
@@ -551,19 +603,27 @@ try
551603 $CefBuildsJson = Invoke-WebRequest - Uri $CefBuildServerJsonPackageList | ConvertFrom-Json
552604 $CefWin32CefVersion = $CefBuildsJson.windows32.versions | Where-Object {$_.cef_version -eq $CefVersion }
553605 $CefWin64CefVersion = $CefBuildsJson.windows64.versions | Where-Object {$_.cef_version -eq $CefVersion }
606+ $CefWinArm64CefVersion = $CefBuildsJson.windowsarm64.versions | Where-Object {$_.cef_version -eq $CefVersion }
554607
555608 $Cef32FileName = ($CefWin32CefVersion.files | Where-Object {$_.type -eq " standard" }).name
556609 $Cef32FileHash = ($CefWin32CefVersion.files | Where-Object {$_.type -eq " standard" }).sha1
557610 $Cef32FileSize = (($CefWin32CefVersion.files | Where-Object {$_.type -eq " standard" }).size / 1 MB )
558611 $Cef64FileName = ($CefWin64CefVersion.files | Where-Object {$_.type -eq " standard" }).name
559612 $Cef64FileHash = ($CefWin64CefVersion.files | Where-Object {$_.type -eq " standard" }).sha1
560613 $Cef64FileSize = (($CefWin64CefVersion.files | Where-Object {$_.type -eq " standard" }).size / 1 MB )
614+ $CefArm64FileName = ($CefWinArm64CefVersion.files | Where-Object {$_.type -eq " standard" }).name
615+ $CefArm64FileHash = ($CefWinArm64CefVersion.files | Where-Object {$_.type -eq " standard" }).sha1
616+ $CefArm64FileSize = (($CefWinArm64CefVersion.files | Where-Object {$_.type -eq " standard" }).size / 1 MB )
561617
562618 # Make sure there is a 32bit and 64bit version for the specified build
563619 if ($CefWin32CefVersion.cef_version -ne $CefWin64CefVersion.cef_version )
564620 {
565621 Die ' Win32 version is $CefWin32CefVersion.cef_version and Win64 version is $CefWin64CefVersion.cef_version - both must be the same'
566622 }
623+ if ($CefWin32CefVersion.cef_version -ne $CefWinArm64CefVersion.cef_version )
624+ {
625+ Die ' Win32 version is $CefWin32CefVersion.cef_version and WinArm64 version is $CefWinArm64CefVersion.cef_version - both must be the same'
626+ }
567627
568628 set-alias sz " $env: ProgramFiles \7-Zip\7z.exe"
569629
644704 Move-Item ($Folder + ' \*' ) $Cef64 - force
645705 Remove-Item $Folder
646706 }
707+
708+ $LocalFile = Join-Path $WorkingDir $CefArm64FileName
709+
710+ if (-not (Test-Path $LocalFile ))
711+ {
712+ Write-Diagnostic " Downloading $CefArm64FileName ; this will take a while as the file is $CefArm64FileSize MB."
713+ $Client.DownloadFile ($CefBuildServerUrl + [System.Web.HttpUtility ]::UrlEncode($CefArm64FileName ), $LocalFile );
714+
715+ $CefArm64LocalFileHash = (Get-FileHash - Path $LocalFile - Algorithm SHA1).Hash
716+
717+ Write-Diagnostic " Download $CefArm64FileName complete"
718+ Write-Diagnostic " Expected SHA1 for $CefArm64FileName $CefArm64FileHash "
719+ Write-Diagnostic " Actual SHA1 for $CefArm64FileName $CefArm64LocalFileHash "
720+
721+ if ($CefArm64LocalFileHash -ne $CefArm64FileHash )
722+ {
723+ Die " SHA1 hash did not match"
724+ }
725+ }
726+
727+ if (-not (Test-Path (Join-Path $CefArm64 ' \include\cef_version.h' )))
728+ {
729+ # Extract bzip file
730+ sz e $LocalFile
731+
732+ # Extract tar file
733+ $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
734+ sz x $TarFile
735+
736+ # Sleep for a short period to allow 7z to release it's file handles
737+ sleep - m 2000
738+
739+ # Remove tar file
740+ Remove-Item $TarFile
741+
742+ $Folder = Join-Path $WorkingDir ($CefArm64FileName.Substring (0 , $CefArm64FileName.length - 8 ))
743+ Move-Item ($Folder + ' \*' ) $CefArm64 - force
744+ Remove-Item $Folder
745+ }
647746 }
648747
649748 function CopyFromLocalCefBuild ()
656755
657756 $Cef32FileName = " cef_binary_$ ( $CefVersion ) _windows32." + $Extension ;
658757 $Cef64FileName = " cef_binary_$ ( $CefVersion ) _windows64." + $Extension ;
758+ $CefArm64FileName = " cef_binary_$ ( $CefVersion ) _windowsarm64." + $Extension ;
659759
660760 set-alias sz " $env: ProgramFiles \7-Zip\7z.exe"
661761
730830 Move-Item ($Folder + ' \*' ) $Cef64 - force
731831 Remove-Item $Folder
732832 }
833+
834+ $LocalFile = Join-Path $WorkingDir $CefArm64FileName
835+
836+ if (-not (Test-Path $LocalFile ))
837+ {
838+ Write-Diagnostic " Copy $CefArm64FileName (approx 200mb)"
839+ Copy-Item ($CefBuildDir + $CefArm64FileName ) $LocalFile ;
840+ Write-Diagnostic " Copy of $CefArm64FileName complete"
841+ }
842+
843+ if (-not (Test-Path (Join-Path $CefArm64 ' \include\cef_version.h' )))
844+ {
845+ # Extract bzip file
846+ sz x $LocalFile ;
847+
848+ if ($Extension -eq " tar.bz2" )
849+ {
850+ # Extract tar file
851+ $TarFile = ($LocalFile ).Substring(0 , $LocalFile.length - 4 )
852+ sz x $TarFile
853+
854+ # Sleep for a short period to allow 7z to release it's file handles
855+ sleep - m 2000
856+
857+ # Remove tar file
858+ Remove-Item $TarFile
859+ }
860+ $Folder = Join-Path $WorkingDir ($CefArm64FileName.Substring (0 , $CefArm64FileName.length - ($Extension.Length + 1 )))
861+ Move-Item ($Folder + ' \*' ) $CefArm64 - force
862+ Remove-Item $Folder
863+ }
733864 }
734865
735866 function WriteVersionToRuntimeJson
0 commit comments