Skip to content

Commit da25615

Browse files
committed
Fixed ARG calls.
Pull base file separately for better timing Fixed docker cp call. Added note that jumbo does seem to be fine with media codecs. Added some sleeps for windows docker issues.
1 parent 8369761 commit da25615

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Dockerfile_cefsharp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ RUN MKDIR c:/code/cefsharp
33
WORKDIR c:/code/cefsharp
44
RUN $env:Path = 'c:/Program Files/Git/bin/;' + $env:Path;setx /M PATH $env:Path;
55
RUN git clone https://github.com/cefsharp/CefSharp.git .
6-
ARG CEFSHARP_BRANCH cefsharp/63
6+
ARG CEFSHARP_BRANCH="cefsharp/63"
77
#This line and the one two below are due to waiting to use the new vs2017 compat build script
88
RUN cp build.ps1 ../
99
RUN git checkout $env:CEFSHARP_BRANCH;
1010
RUN cp ../build.ps1 .
11-
ARG CEFSHARP_VERSION 63.0.90
12-
ARG CEF_VERSION_STR auto
13-
ARG CHROME_BRANCH 3239
11+
ARG CEFSHARP_VERSION=63.0.90
12+
ARG CEF_VERSION_STR=auto
13+
ARG CHROME_BRANCH=3239
1414
ENV PACKAGE_SOURCE C:/code/cef-binary/cef-binary-master/NuGet
1515
ADD cefsharp_set_versions_and_restore.ps1 c:/code/cefsharp
1616
RUN ./cefsharp_set_versions_and_restore.ps1

Dockerfile_vs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARGS BASE_DOCKER_FILE="microsoft/dotnet-framework:4.7.1-windowsservercore-1709"
1+
ARG BASE_DOCKER_FILE="microsoft/dotnet-framework:4.7.1-windowsservercore-1709"
22
FROM $BASE_DOCKER_FILE
33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

@@ -22,7 +22,3 @@ RUN Invoke-WebRequest 'https://aka.ms/vs/15/release/vs_community.exe' -OutFile '
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.
2424
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\'
25-
26-
27-
$p = Start-Process -Wait -PassThru -FilePath C:\code\vs_community.exe -ArgumentList ' --quiet --wait --norestart --nocache --add Microsoft.Component.NetFX.Core.Runtime';
28-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In part we use the latest version of several installers/build tools if they chan
3737
The following requirements are for chrome 63 and the current vs_2017 installer, they may change over time. Compiling is largely CPU bound but linking is largely IO bound.
3838

3939
- At least 32GB of ram dedicated to this would recommend 40GB total with page file to make sure you don't run out. You can have any amount of that 32/40GB as a page file, just beware the less actual ram the much slower linking will be.
40-
- At least 250GB of space (300G is safer).
40+
- At least 250GB of space.
4141

4242

4343
## Server Setup

build.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ echo packages_cefsharp.zip | out .dockerignore
4444
echo binaries.zip | out .dockerignore -Append
4545
if (! (Test-Path ./binaries.zip -PathType Leaf) -or $NoSkip){
4646
TimerNow("Starting");
47+
RunProc -proc "docker" -opts "pull $VAR_BASE_DOCKER_FILE";
48+
TimerNow("Pull base file");
4749
RunProc -proc "docker" -opts "build --build-arg BASE_DOCKER_FILE=`"$VAR_BASE_DOCKER_FILE`" -f Dockerfile_vs -t vs ."
4850
TimerNow("VSBuild");
4951
RunProc -proc "docker" -opts "build --build-arg DUAL_BUILD=`"$VAR_DUAL_BUILD`" --build-arg GN_DEFINES=`"$VAR_GN_DEFINES`" --build-arg GYP_DEFINES=`"$VAR_GYP_DEFINES`" --build-arg CHROME_BRANCH=`"$VAR_CHROME_BRANCH`" -f Dockerfile_cef -t cef ."
5052
TimerNow("CEF Build");
51-
docker rm cef
53+
docker rm cef;
54+
Start-Sleep -s 3; #sometimes we are too fast, file in use error
5255
RunProc -proc "docker" -opts "run --name cef cef cmd /C echo CopyVer"
5356
RunProc -proc "docker" -opts "cp cef:/binaries.zip ."
5457
TimerNow("Copy CEF Binary Local (1GB+)");
@@ -63,6 +66,7 @@ RunProc -proc "docker" -opts "build -f Dockerfile_cef_binary -t cef_binary ."
6366
TimerNow("CEF Binary compile");
6467
RunProc -proc "docker" -opts "build --build-arg CEFSHARP_BRANCH=`"$VAR_CEFSHARP_BRANCH`" --build-arg CEFSHARP_VERSION=`"$VAR_CEFSHARP_VERSION`" --build-arg CEF_VERSION_STR=`"$VAR_CEF_VERSION_STR`" --build-arg CHROME_BRANCH=`"$VAR_CHROME_BRANCH`" -f Dockerfile_cefsharp -t cefsharp ."
6568
TimerNow("CEFSharp compile");
66-
docker rm cefsharp
69+
docker rm cefsharp;
70+
Start-Sleep -s 3; #sometimes we are too fast, file in use error
6771
RunProc -proc "docker" -opts "run --name cefsharp cefsharp cmd /C echo CopyVer"
68-
RunProc -proc "docker" -opts "docker cp cefsharp:/packages_cefsharp.zip ."
72+
RunProc -proc "docker" -opts "cp cefsharp:/packages_cefsharp.zip ."

versions_src.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ $VAR_CEFSHARP_BRANCH="cefsharp/63";
44
$VAR_BASE_DOCKER_FILE="microsoft/dotnet-framework:4.7.1-windowsservercore"; #microsoft/dotnet-framework:4.7.1-windowsservercore-1709
55
$VAR_DUAL_BUILD="0"; #set to 1 to build x86 and x64 together, mainly to speed up linking which is single threaded, note may need excess ram.
66
$VAR_GN_DEFINES="";
7-
$VAR_GYP_DEFINES=""; #use_jumbo_build=true see http://magpcss.org/ceforum/viewtopic.php?p=37293 about enabling this if you are doing proprietary_codecs as well
7+
$VAR_GYP_DEFINES=""; #use_jumbo_build=true see http://magpcss.org/ceforum/viewtopic.php?p=37293 about enabling this if you are doing proprietary_codecs as well, note this does not seem to actually cause a problem however in the builds we tested.
88
$VAR_CEF_VERSION_STR="auto"; #can set to "3.3239.1723" or similar if you have multiple binaries that Docker_cefsharp might find

0 commit comments

Comments
 (0)