Fix rmdir error

This commit is contained in:
FriwiDev 2021-10-25 15:15:02 +02:00
parent bfd16c094c
commit 390d89d6cb
4 changed files with 65 additions and 4 deletions

View File

@ -4,7 +4,7 @@ if [ ! $# -eq 2 ]
then then
echo "Usage: ./compile_linux.sh <architecture> <buildType>" echo "Usage: ./compile_linux.sh <architecture> <buildType>"
echo "" echo ""
echo "architecture: the target architecture to build for. Architectures are the docker architectures (e.g. 386 or amd64)." echo "architecture: the target architecture to build for. Architectures are either 386 or amd64."
echo "buildType: either Release or Debug" echo "buildType: either Release or Debug"
exit 1 exit 1
fi fi

52
compile_macosx.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
set -e
if [ ! $# -eq 2 ]
then
echo "Usage: ./compile_macosx.sh <architecture> <buildType>"
echo ""
echo "architecture: the target architecture to build for. Architectures are either amd64 or arm64."
echo "buildType: either Release or Debug"
exit 1
fi
TARGETARCH=$1
BUILD_TYPE=$2
# Determine architecture
echo "Building for architecture $TARGETARCH"
if [ ! -f "jcef/README.md" ]; then
echo "Did not find existing files to build - cloning..."
rm -rf jcef
git clone https://bitbucket.org/chromiumembedded/java-cef.git jcef
else
echo "Found existing files to build"
fi
# Enter the JCEF source code directory.
cd jcef
# Create and enter the `jcef_build` directory.
# The `jcef_build` directory name is required by other JCEF tooling
# and should not be changed.
mkdir jcef_build && cd jcef_build
# MacOS: Generate amd64/arm64 Makefiles.
if [ ${TARGETARCH} == 'amd64' ]; then
cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
else
cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
fi
# Build native part using ninja.
ninja -j4
#Generate distribution
cd ../tools
chmod +x make_distrib.sh
./make_distrib.sh macosx64
#Pack binary_distrib
cd ../binary_distrib/macosx64
mkdir ../../out
tar -czvf ../../out/binary_distrib.tar.gz *

View File

@ -3,7 +3,7 @@
if ("%2"=="") ( ^ if ("%2"=="") ( ^
echo "Usage: compile_windows.bat <architecture> <buildType>" && ^ echo "Usage: compile_windows.bat <architecture> <buildType>" && ^
echo "" && ^ echo "" && ^
echo "architecture: the target architecture to build for. Architectures are the docker architectures (e.g. 386 or amd64)." && ^ echo "architecture: the target architecture to build for. Architectures are either 386 or amd64." && ^
echo "buildType: either Release or Debug" && ^ echo "buildType: either Release or Debug" && ^
exit 1 ^ exit 1 ^
) )

View File

@ -1,4 +1,4 @@
@echo off @echo on
if "%TARGETARCH%"=="386" (echo "Building 32-bit version") ^ if "%TARGETARCH%"=="386" (echo "Building 32-bit version") ^
else (echo "Building 64-bit version") else (echo "Building 64-bit version")
@ -6,7 +6,9 @@ else (echo "Building 64-bit version")
#Check residency of workdir #Check residency of workdir
cd C: cd C:
if exist "jcef\README.md" (echo "Found existing files to build") ^ if exist "jcef\README.md" (echo "Found existing files to build") ^
else (echo "Did not find files to build - cloning..." && rmdir /S /Q jcef && git clone https://bitbucket.org/chromiumembedded/java-cef jcef) else (echo "Did not find files to build - cloning..." && GOTO :CLONE)
:BUILD
cd jcef cd jcef
#Prepare build dir #Prepare build dir
@ -31,3 +33,10 @@ if "%TARGETARCH%"=="386" (make_distrib.bat win32) else (make_distrib.bat win64)
if "%TARGETARCH%"=="386" (cd ../binary_distrib/win32) else (cd ../binary_distrib/win64) if "%TARGETARCH%"=="386" (cd ../binary_distrib/win32) else (cd ../binary_distrib/win64)
del /F C:\out\binary_distrib.tar.gz del /F C:\out\binary_distrib.tar.gz
tar -czvf C:\out\binary_distrib.tar.gz * tar -czvf C:\out\binary_distrib.tar.gz *
GOTO :EOF
:CLONE
if exist jcef rmdir /S /Q jcef
git clone https://bitbucket.org/chromiumembedded/java-cef jcef
GOTO :BUILD