cefsharp / cef-binary

NuGet repackaging of the CEF binaries provided by Chromium Embedded Framework
https://cef-builds.spotifycdn.com/index.html
Other
108 stars 87 forks source link

Add support for Windows ARM64 #90

Closed kpreisser closed 3 years ago

kpreisser commented 3 years ago

Issue cefsharp/CefSharp#2944

With this change, the ARM64 libcef_dll_wrapper.lib builds successfully for me when using the v141 (VS 2017) and v142 (VS 2019) toolchains (when VC++ ARM64 build tools are installed).

Thank you!

amaitland commented 3 years ago

Let me know when you are happy and I'll merge this and tag a release, easiest way to have AppVeyor generate a build, see what happens.

kpreisser commented 3 years ago

Let me know when you are happy and I'll merge this and tag a release, easiest way to have AppVeyor generate a build, see what happens.

:+1: I think the change is good to go. If Appveyor build fails e.g. due to missing ARM64 build tools, we can probably comment-out the two added Msvs calls using arm64 for now.

Thank you!

amaitland commented 3 years ago

Build is queued

https://ci.appveyor.com/project/cefsharp/cef-binary-5r1rw/builds/37278296

kpreisser commented 3 years ago

The build failed when trying to build for x86 with v140 toolchain (but the arm64 build with v141 toolchain apparently succeeded):

C:\projects\cef-binary-5r1rw>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\..\vc\vcvarsall.bat" x86   && set  1>"C:\Users\appveyor\AppData\Local\Temp\1\tmp33BB.tmp" 
Caught an exception: The input line is too long.
    Exception Type: System.Management.Automation.RemoteException
    Stack Trace: at Invoke-BatchFile, C:\projects\cef-binary-5r1rw\build.ps1: line 118
    at Msvs, C:\projects\cef-binary-5r1rw\build.ps1: line 378
    at VSX, C:\projects\cef-binary-5r1rw\build.ps1: line 454
    at <ScriptBlock>, C:\projects\cef-binary-5r1rw\build.ps1: line 925
    at <ScriptBlock>, <No file>: line 1

This is probably the same issue as described here (Path environment variable is becoming too long as vcvarsall.bat always appends to it). In that case, maybe it will work if we cache the original value of the Path, Lib, LibPath, Include environment variables, and reset them after the Msvs call is complete. What do you think?

amaitland commented 3 years ago

The build failed when trying to build for x86 with v140 toolchain (but the arm64 build with v141 toolchain apparently succeeded):

Looks promising though 👍

In that case, maybe it will work if we cache the original value of the Path, Lib, LibPath, Include environment variables, and reset them after the Msvs call is complete. What do you think?

Happy to try that. Quick search and I see plenty of people attempting to reset the environment. We could potentially spawn a VS developer tools window for each build, they'd be isolated, lot more work involved though.