Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -BuildArches to specify what platforms to build for (ie "x86 arm64") #100

Merged

Conversation

mitchcapper
Copy link
Contributor

Removed much of the platform specific code redundancy
Fixes #98.

Most is pretty straightforward but a few specific notes:

-- Added -Wno-dev to cmake calls, this suppresses some warnings that were dumping to screen but not causing an issue for the build. The flag is only for author of the CMakeLists.txt per https://cmake.org/cmake/help/latest/manual/cmake.1.html#manual:cmake(1) I believe we are using the generator to do this and not ourselves.

-- In the current build.ps1 there is a step that # Make sure there is a 32bit and 64bit version for the specified build and that they are the same version. It still does this check but it does it as it goes so will start downloading versions and only stop once it detects there is a mismatch. Done this way to just save an extra loop and because I couldn't think of any harm coming of it.

-- The way I am building the nuspec for the runtime is a bit sloppy with hardcoded strings in the build.ps1 script. Using an actual templating engine would be better, but as this is powershell it seemed easiest to do this small replacement in this fashion.

    Removed much of the platform specific code redundancy
@amaitland amaitland merged commit 62b46a3 into cefsharp:master Oct 12, 2021
@amaitland
Copy link
Member

Sorry for the delay.

I was thinking of rewriting the script and now seems like the time, I needed to do testing anyway.

Commit 26010a5 is a major overhaul. It should be compatible with your changes.

The x64, x86, arm64 arguments for -BuildArches will still work, so will win-x86, win-x64, win-arm64, just in case at some point we get around to adding the ability to package Linux/mac runtimes (#95)

In the current build.ps1 there is a step that # Make sure there is a 32bit and 64bit version for the specified build and that they are the same version. It still does this check but it does it as it goes so will start downloading versions and only stop once it detects there is a mismatch. Done this way to just save an extra loop and because I couldn't think of any harm coming of it.

Builds will now fail if unable to download the file for a given architecture. This is effectively what happened previously, just now there's a clearer message.

I've still like to do a little more refactoring here, ideally we'd check that all files can be downloaded before we start extracting them, this should be pretty straight forward now.

The way I am building the nuspec for the runtime is a bit sloppy with hardcoded strings in the build.ps1 script. Using an actual templating engine would be better, but as this is powershell it seemed easiest to do this small replacement in this fashion.

I've actually reverted this, I have some other changes planned in the near future. I've be creating a new chromiumembeddedframework.runtime.resources package so I can deprecate the cef.redist packages (#93). I've gone with the low tech option of creating the folders on disk and having empty ones in the package.

As swiftshader is being replaced by SwANGLE we'll be able to get rid of arch specific dlls. The new SwANGLE files don't need to be in a subfolder.

I need to triple check though I believe the locales aren't architecture specific, they're currently duplicated, so I'll switch to having just a single copy (assuming they all hash the same across a few versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build.ps1 - Add option to package a subset of the support architectures
2 participants