diff --git a/DockerfileWindows32 b/DockerfileWindows32 new file mode 100644 index 0000000..3038aa2 --- /dev/null +++ b/DockerfileWindows32 @@ -0,0 +1,7 @@ +FROM friwidev/jcefdocker:windows32-latest + +WORKDIR C:/builder + +#Copy and launch run script +COPY scripts/run_windows.bat . +ENTRYPOINT ["run_windows.bat"] diff --git a/DockerfileWindows64 b/DockerfileWindows64 new file mode 100644 index 0000000..93a75f1 --- /dev/null +++ b/DockerfileWindows64 @@ -0,0 +1,7 @@ +FROM friwidev/jcefdocker:windows64-latest + +WORKDIR C:/builder + +#Copy and launch run script +COPY scripts/run_windows.bat . +ENTRYPOINT ["run_windows.bat"] diff --git a/compile_windows.bat b/compile_windows.bat index 6933582..39980d6 100755 --- a/compile_windows.bat +++ b/compile_windows.bat @@ -8,8 +8,11 @@ if ("%2"=="") ( ^ exit 1 ^ ) +if "%1"=="386" (set bit=32) ^ +else (set bit=64) + :: Execute build with windows Dockerfile -docker build -t jcefbuild --file DockerfileWindows . +docker build -t jcefbuild%bit% --file DockerfileWindows%bit% . :: Execute run with windows Dockerfile -docker run -v jcef:c:/jcef -v out:c:/out -e TARGETARCH=%1 -e BUILD_TYPE=%2 jcefbuild +docker run -v jcef:c:/jcef -v out:c:/out -e TARGETARCH=%1 -e BUILD_TYPE=%2 jcefbuild%bit% diff --git a/scripts/run_windows.bat b/scripts/run_windows.bat index a5dbf4c..e42a952 100644 --- a/scripts/run_windows.bat +++ b/scripts/run_windows.bat @@ -23,14 +23,14 @@ else (call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Au :: Perform build cmake -G "Ninja" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. -ninja +ninja -j4 :: Compile java classes cd ../tools -if "%TARGETARCH%"=="386" (compile.bat win32) else (compile.bat win64) +if "%TARGETARCH%"=="386" (call compile.bat win32) else (call compile.bat win64) :: Create distribution -if "%TARGETARCH%"=="386" (make_distrib.bat win32) else (make_distrib.bat win64) +if "%TARGETARCH%"=="386" (call make_distrib.bat win32) else (call make_distrib.bat win64) :: Zip results to C:\out if "%TARGETARCH%"=="386" (cd ../binary_distrib/win32) else (cd ../binary_distrib/win64)