Skip to content

Commit 3e8f2b7

Browse files
committed
Building through v81 added along with new build through volumes scheme.
Switch to volumes for storing source during build (faster commit times, resume support, and microsoft/hcsshim#708 bug work around). To resume see Readme by default will not resume builds. Moved to vs2019 support for compiling (needs cef patch cef_patch_find_vs2019_tools.diff from sample_patches)
1 parent c67f9fe commit 3e8f2b7

13 files changed

+121
-74
lines changed

AzureTemplateFile.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@
223223
},
224224
"imageReference": {
225225
"publisher": "MicrosoftWindowsServer",
226-
"offer": "WindowsServerSemiAnnual",
227-
"sku": "Datacenter-Core-1809-with-Containers-smalldisk",
226+
"offer": "WindowsServer",
227+
"sku": "Datacenter-Core-1903-with-Containers-smalldisk",
228228
"version": "latest"
229229
}
230230
},

Dockerfile_cef

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ RUN Invoke-WebRequest 'https://storage.googleapis.com/chrome-infra/depot_tools.z
55
RUN Expand-Archive C:/code/depot_tools.zip -DestinationPath "C:/code/depot_tools";
66
RUN $env:Path = 'c:/code/depot_tools/;' + $env:Path;setx /M PATH $env:Path;
77
ARG GN_DEFINES="is_debug=false"
8+
ARG GN_ARGUMENTS="--ide=vs2019 --sln=cef --filters=//cef/*"
89
ENV DEPOT_TOOLS_WIN_TOOLCHAIN 0
910
ENV CEF_USE_GN 1
10-
ENV GYP_MSVS_VERSION 2017
11+
ENV GYP_MSVS_VERSION 2019
1112
ARG DUAL_BUILD="0"
1213
ARG BINARY_EXT="zip"
1314
ARG GYP_DEFINES="target_arch=x64 "
14-
RUN setX /M DEPOT_TOOLS_WIN_TOOLCHAIN 0;setX /M GYP_MSVS_VERSION 2017;setx /M GN_DEFINES "$env:GN_DEFINES";setx /M GYP_DEFINES "$env:GYP_DEFINES";setx /M DUAL_BUILD "$env:DUAL_BUILD";
15+
ARG CEF_SAVE_SOURCES
1516
ARG CHROME_BRANCH=3239
17+
RUN setX /M DEPOT_TOOLS_WIN_TOOLCHAIN 0;setX /M GYP_MSVS_VERSION "$env:GN_DEFINES";setx /M GN_DEFINES "$env:GN_DEFINES";setx /M GN_ARGUMENTS "$env:GN_ARGUMENTS";setx /M GYP_DEFINES "$env:GYP_DEFINES";setx /M DUAL_BUILD "$env:DUAL_BUILD";setx /M BINARY_EXT "$env:BINARY_EXT";setx /M CEF_SAVE_SOURCES "$env:CEF_SAVE_SOURCES";setx /M CHROME_BRANCH "$env:CHROME_BRANCH";
18+
1619
ADD https://bitbucket.org/chromiumembedded/cef/raw/master/tools/automate/automate-git.py c:/code/automate/
1720
RUN cd c:/code/depot_tools/;update_depot_tools.bat;git checkout .\cipd.ps1;update_depot_tools.bat;
1821

1922
ADD functions.ps1 cef_build.ps1 cef_patch.ps1 cef_patch_*.diff c:/code/
2023
# Comment out the next step if you want to do it by hand, make sure to change the build args to env options like:
2124
# -e DUAL_BUILD="0" -e GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome" -e GYP_DEFINES="" -e CHROME_BRANCH="3396"
22-
ARG CEF_SAVE_SOURCES
23-
RUN c:/code/cef_build.ps1
25+
#RUN c:/code/cef_build.ps1
26+
CMD ["powershell", "c:/code/cef_build.ps1"]

Dockerfile_cef_binary

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
88
RUN [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;Invoke-WebRequest 'https://github.com/cefsharp/cef-binary/archive/master.zip' -OutFile '/code/master.zip';
99
RUN Expand-Archive c:\code\master.zip -DestinationPath "C:\code\cef-binary";
1010
WORKDIR /code/cef-binary/cef-binary-master/
11-
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;
11+
RUN $env:Path = 'c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\;' + $env:Path;setx /M PATH $env:Path;
1212
RUN 'New-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0 -Name VCTargetsPath -PropertyType String -Value "`$`(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\"'
1313
ARG BINARY_EXT="zip"
14-
RUN ./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension $env:BINARY_EXT -Target vs2017;./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension $env:BINARY_EXT -Target nupkg-only;
14+
#ADD tmp_cef_bin_build.ps1 /code/cef-binary/cef-binary-master/build.ps1
15+
RUN ./build.ps1 -Verbose -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension $env:BINARY_EXT -Target vs2019;./build.ps1 -DownloadBinary local -CefBinaryDir /code/binaries/ -CefVersion auto -NoDebugBuild -Extension $env:BINARY_EXT -Target nupkg-only;
1516
RUN Compress-Archive -Path NuGet -CompressionLevel Fastest -DestinationPath C:\packages

Dockerfile_cefsharp

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ ARG CEF_VERSION_STR=auto
1414
ARG CHROME_BRANCH=3239
1515
ENV PACKAGE_SOURCE C:/code/cef-binary/cef-binary-master/NuGet
1616

17-
#This next line is not used just skipped as a check at this point
18-
ENV VS141COMNTOOLS C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build
1917
ADD cefsharp_patch_*.diff cefsharp_set_versions_and_restore.ps1 functions.ps1 cefsharp_patch.ps1 c:/code/cefsharp/
2018
RUN ./cefsharp_patch.ps1
2119
RUN ./cefsharp_set_versions_and_restore.ps1
22-
RUN [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;./build.ps1 -Target vs2017 -Version $env:CEFSHARP_VERSION -AssemblyVersion $env:CEFSHARP_VERSION;
20+
#ADD tmp_cefsharp_build.ps1 /code/cefsharp/build.ps1
21+
RUN [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;./build.ps1 -Verbose -Target vs2019 -Version $env:CEFSHARP_VERSION -AssemblyVersion $env:CEFSHARP_VERSION;
2322
RUN cp $env:PACKAGE_SOURCE/*.nupkg C:/code/cefsharp/nuget/
2423
RUN Compress-Archive -Path C:/code/cefsharp/nuget/*.nupkg -CompressionLevel Fastest -DestinationPath C:\packages_cefsharp

Dockerfile_vs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ARG BASE_DOCKER_FILE="mcr.microsoft.com/windows/servercore:1809-amd64"
2-
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
1+
ARG BASE_DOCKER_FILE="mcr.microsoft.com/windows/servercore:1903-amd64"
32
FROM $BASE_DOCKER_FILE
43
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
54

5+
ENV COMPLUS_NGenProtectedProcess_FeatureEnabled 0
66
RUN mkdir c:\code\automate;mkdir c:\temp\;mkdir c:\code\depot_tools;
77
RUN Invoke-WebRequest 'https://aka.ms/vscollect.exe' -OutFile 'C:\TEMP\collect.exe';
88
RUN Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe' -OutFile 'c:\code\depot_tools\;';
@@ -18,12 +18,12 @@ WORKDIR c:\\code\\depot_tools
1818

1919
#Not sure why the community installer doesn't instal the debugger with --all but all the same this is a quick fix.
2020
RUN Invoke-WebRequest https://go.microsoft.com/fwlink/?linkid=864422 -OutFile 'C:\code\winsdksetup.exe';
21-
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\winsdksetup.exe -ArgumentList ' /features OptionId.WindowsDesktopDebuggers /quiet /Log #"%TEMP%\\winsdksetup.log /norestart'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { throw ('Install failed with exit code 0x{0:x}' -f $ret) }
21+
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\winsdksetup.exe -ArgumentList ' /features OptionId.WindowsDesktopDebuggers /quiet /Log #"%TEMP%\\winsdksetup.log /norestart'; if (($ret = $p.ExitCode) -and ($ret -ne 3010)) { $log_path=$env:Temp; $err = 'Install ' + 'failed with exit code 0x{0:x} error logs in: ' + $log_path + '\winsdksetup.log'; throw ($err -f $ret) }
2222

2323

24-
RUN Invoke-WebRequest 'https://aka.ms/vs/15/release/vs_community.exe' -OutFile 'C:\code\vs_community.exe';
24+
RUN Invoke-WebRequest 'https://aka.ms/vs/16/release/vs_community.exe' -OutFile 'C:\code\vs_community.exe';
2525

2626
#3010 is fine, as that is just restart requested.
2727
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
28-
# 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.
29-
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 --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\'
28+
# Some of these are more needed for cefsharp like 4.5.2 and 4.6.2 (it uses both targets depending on project)
29+
RUN $p = Start-Process -Wait -PassThru -FilePath C:\code\vs_community.exe -ArgumentList ' --quiet --wait --norestart --nocache --add Microsoft.Net.Component.4.7.2.SDK --add Microsoft.VisualStudio.Component.Windows10SDK --remove Microsoft.Net.Component.4.6.1.SDK --remove Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81 --remove 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.7.2.TargetingPack --add Microsoft.Net.Component.4.6.2.SDK --add Microsoft.VisualStudio.Component.Windows10SDK.18362 --remove Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --remove Microsoft.VisualStudio.Component.Windows10SDK.17134 --add Microsoft.VisualStudio.Component.Git --remove 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;$log_path = $env:Temp;$err='Install failed with exit code 0x{0:x} error logs in: ' + $log_path + '\vslogs.zip'; throw ($err -f $ret) }; Remove-Item -Recurse -Force 'c:\ProgramData\Package Cache\'

0 commit comments

Comments
 (0)