mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-11-10 11:13:45 +08:00
Refactor to support dynamic repositories
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
@echo off
|
||||
|
||||
if ("%2"=="") ( ^
|
||||
echo "Usage: compile_windows.bat <architecture> <buildType>" && ^
|
||||
echo "Usage: compile_windows.bat <architecture> <buildType> [<gitrepo> <gitref>]" && ^
|
||||
echo "" && ^
|
||||
echo "architecture: the target architecture to build for. Architectures are either 386 or amd64." && ^
|
||||
echo "architecture: the target architecture to build for. Architectures are either arm64, 386 or amd64." && ^
|
||||
echo "buildType: either Release or Debug" && ^
|
||||
echo "gitrepo: git repository url to clone" && ^
|
||||
echo "gitref: the git commit id to pull" && ^
|
||||
exit 1 ^
|
||||
)
|
||||
|
||||
::Determine repository and ref to pull from
|
||||
if ("%3"=="") (set "REPO=https://bitbucket.org/chromiumembedded/java-cef.git") ^
|
||||
else (set "REPO=%3")
|
||||
if ("%4"=="") (set "REF=master") ^
|
||||
else (set "REF=%4")
|
||||
|
||||
:: Execute build with windows Dockerfile
|
||||
docker build -t jcefbuild --file DockerfileWindows .
|
||||
|
||||
@@ -15,5 +23,5 @@ docker build -t jcefbuild --file DockerfileWindows .
|
||||
if not exist "jcef" mkdir "jcef"
|
||||
rmdir /S /Q out
|
||||
mkdir "out"
|
||||
docker run --name jcefbuild -v jcef:"C:\jcef" -e TARGETARCH=%1 -e BUILD_TYPE=%2 jcefbuild
|
||||
docker run --name jcefbuild -v jcef:"C:\jcef" -e TARGETARCH=%1 -e BUILD_TYPE=%2 -e REPO=%REPO% -e REF=%REF% jcefbuild
|
||||
docker cp jcefbuild:/out/binary_distrib.tar.gz out/binary_distrib.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user