Skip to content

Commit 256729a

Browse files
committed
Many changes to support newer builds, cef patching support, only build cefsharp option
Updated for v67 and higher support. Updated notes for new hardware requirements. Add cef patch option. Add option to only build cefsharp and not cef. Added sample patch for v67 for pdf crash fix.
1 parent 817e599 commit 256729a

15 files changed

+157
-31
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
versions.ps1
22
.dockerignore
33
cefsharp_patch_*.diff
4+
cef_patch_*.diff
45
*.zip

Dockerfile_cef

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ARG CHROME_BRANCH=3239
1515
ADD https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py c:/code/automate/
1616
RUN cd c:/code/depot_tools/;update_depot_tools.bat;git checkout .\cipd.ps1;update_depot_tools.bat;
1717

18-
# Comment out the next step if you want to do it by hand
19-
ADD functions.ps1 cef_build.ps1 c:/code/
20-
RUN c:/code/cef_build.ps1
18+
ADD functions.ps1 cef_build.ps1 cef_patch.ps1 cef_patch_*.diff c:/code/
19+
# Comment out the next step if you want to do it by hand, make sure to change the build args to env options like:
20+
# -e DUAL_BUILD="0" -e GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome" -e GYP_DEFINES="" -e CHROME_BRANCH="3396"
21+
#RUN c:/code/cef_build.ps1

Dockerfile_cef_binary

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ RUN Expand-Archive c:\code\master.zip -DestinationPath "C:\code\cef-binary";
1313
WORKDIR /code/cef-binary/cef-binary-master/
1414
RUN $env:Path = 'c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\;' + $env:Path;setx /M PATH $env:Path;
1515
RUN 'New-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0 -Name VCTargetsPath -PropertyType String -Value "`$`(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\"'
16-
RUN ./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension zip -Target vs2017;./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension zip -Target nupkg-only;
16+
RUN ./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension zip -Target vs2017;./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension $env:BINARY_EXT -Target nupkg-only;
1717
RUN Compress-Archive -Path NuGet -CompressionLevel Fastest -DestinationPath C:\packages

Dockerfile_cef_create_from_binaries

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM vs
2+
Add *.zip c:/code/binaries/

Dockerfile_vs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ RUN Invoke-WebRequest 'https://aka.ms/vs/15/release/vs_community.exe' -OutFile '
2121
#3010 is fine, as that is just restart requested.
2222
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
2323
# Some of these are more needed for cefsharp, especially the older sdks (win8.1 and 4.52). Note Microsoft.Net.Component.4.6.1.SDK is needed also for cefsharp to get mscoree for some reason the 4.7.1 version does not get found. The older CEF requirements add about 3GB (possibly more removes on the Win81SDK 4.5.2 targetting and 46.2 could cut down on this.
24-
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\vs_community.exe -ArgumentList ' --quiet --wait --norestart --nocache --add Microsoft.Net.Component.4.7.1.SDK --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.Net.Component.4.6.1.SDK --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 --add Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.Net.Component.4.5.2.TargetingPack --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Git --add Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Component.Android.NDK.R12B --remove Component.Android.SDK23.Private --remove Component.MDD.Android --remove Component.Unreal.Android --remove Component.Android.NDK.R15C --remove Component.Android.SDK19 --remove Component.Android.SDK22 --remove Component.Android.SDK23 --remove Component.Android.SDK25 --remove Component.MDD.Android --remove Component.Android.NDK.R12B --remove Component.Android.NDK.R12B_3264 --remove Component.Android.NDK.R13B --remove Component.Android.NDK.R13B_3264 --remove Component.Android.NDK.R15C_3264 --remove Component.Google.Android.Emulator.API23.V2 --remove Component.Android.SDK25 --remove Component.Google.Android.Emulator.API25 --remove Component.Android.SDK23.Private --remove Component.Google.Android.Emulator.API23.Private --remove Component.Android.Emulator --remove Component.Android.NDK.R11C --remove Component.Android.NDK.R11C_3264 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator --remove Microsoft.VisualStudio.Component.Phone.Emulator.15063 --remove Component.Anaconda3.x64 --remove Component.Anaconda2.x64 --remove Component.Anaconda2.x86 --remove Component.Anaconda3.x86 --remove Microsoft.VisualStudio.Component.Unity --remove Component.UnityEngine.x64 --remove Component.UnityEngine.x86 --remove Component.Incredibuild --remove Component.IncredibuildMenu --remove Microsoft.VisualStudio.Component.Sharepoint.Tools --remove Microsoft.VisualStudio.Component.TeamOffice --remove Component.Cocos;'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { C:\TEMP\collect.exe; throw ('Install failed with exit code 0x{0:x}' -f $ret) }; Remove-Item -Recurse -Force 'c:\ProgramData\Package Cache\'
24+
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\vs_community.exe -ArgumentList ' --quiet --wait --norestart --nocache --add Microsoft.Net.Component.4.7.1.SDK --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.Net.Component.4.6.1.SDK --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 --add Microsoft.VisualStudio.Component.Windows81SDK --add Microsoft.Net.Component.4.5.2.TargetingPack --add Microsoft.Net.Component.4.6.2.TargetingPack --add Microsoft.Net.Component.4.6.2.SDK --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.17134.Desktop --add Microsoft.VisualStudio.Component.Git --add Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Component.Android.NDK.R12B --remove Component.Android.SDK23.Private --remove Component.MDD.Android --remove Component.Unreal.Android --remove Component.Android.NDK.R15C --remove Component.Android.SDK19 --remove Component.Android.SDK22 --remove Component.Android.SDK23 --remove Component.Android.SDK25 --remove Component.MDD.Android --remove Component.Android.NDK.R12B --remove Component.Android.NDK.R12B_3264 --remove Component.Android.NDK.R13B --remove Component.Android.NDK.R13B_3264 --remove Component.Android.NDK.R15C_3264 --remove Component.Google.Android.Emulator.API23.V2 --remove Component.Android.SDK25 --remove Component.Google.Android.Emulator.API25 --remove Component.Android.SDK23.Private --remove Component.Google.Android.Emulator.API23.Private --remove Component.Android.Emulator --remove Component.Android.NDK.R11C --remove Component.Android.NDK.R11C_3264 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator.15254 --remove Microsoft.VisualStudio.Component.Phone.Emulator --remove Microsoft.VisualStudio.Component.Phone.Emulator.15063 --remove Component.Anaconda3.x64 --remove Component.Anaconda2.x64 --remove Component.Anaconda2.x86 --remove Component.Anaconda3.x86 --remove Microsoft.VisualStudio.Component.Unity --remove Component.UnityEngine.x64 --remove Component.UnityEngine.x86 --remove Component.Incredibuild --remove Component.IncredibuildMenu --remove Microsoft.VisualStudio.Component.Sharepoint.Tools --remove Microsoft.VisualStudio.Component.TeamOffice --remove Component.Cocos;'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { C:\TEMP\collect.exe; throw ('Install failed with exit code 0x{0:x}' -f $ret) }; Remove-Item -Recurse -Force 'c:\ProgramData\Package Cache\'

0 commit comments

Comments
 (0)