mirror of
https://github.com/jcefmaven/jcefbuild.git
synced 2025-12-25 07:55:55 +08:00
Initial commit
This commit is contained in:
45
scripts/run_linux.sh
Normal file
45
scripts/run_linux.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Determine architecture
|
||||
MACHINE_TYPE=`uname -m`
|
||||
echo "Building for architecture $MACHINE_TYPE"
|
||||
|
||||
if [ ! -f "/jcef/README.md" ]; then
|
||||
echo "Did not find existing files to build - cloning..."
|
||||
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
|
||||
|
||||
# Linux: Generate 32/64-bit Unix Makefiles.
|
||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ..
|
||||
# Build native part using ninja.
|
||||
ninja -j4
|
||||
|
||||
#Compile JCEF java classes
|
||||
cd ../tools
|
||||
chmod +x compile.sh
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
./compile.sh linux64
|
||||
else
|
||||
./compile.sh linux32
|
||||
fi
|
||||
|
||||
#Generate distribution
|
||||
chmod +x make_distrib.sh
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
./make_distrib.sh linux64
|
||||
else
|
||||
./make_distrib.sh linux32
|
||||
fi
|
||||
|
||||
|
||||
29
scripts/run_windows.bat
Normal file
29
scripts/run_windows.bat
Normal file
@@ -0,0 +1,29 @@
|
||||
@echo off
|
||||
|
||||
if "%1"=="32" (echo "Building 32-bit version") ^
|
||||
else (echo "Building 64-bit version")
|
||||
|
||||
#Check residency of workdir
|
||||
cd C:
|
||||
if exists jcef/README.md (echo "Found existing files to build") ^
|
||||
else (echo "Did not find files to build - cloning..." && git clone https://bitbucket.org/chromiumembedded/java-cef jcef)
|
||||
cd jcef
|
||||
|
||||
#Prepare build dir
|
||||
#rmdir /S /Q jcef_build
|
||||
mkdir jcef_build && cd jcef_build
|
||||
|
||||
#Load vcvars
|
||||
if "%1"=="32" ("C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat") ^
|
||||
else ("C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat")
|
||||
|
||||
#Perform build
|
||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug ..
|
||||
ninja
|
||||
|
||||
#Compile java classes
|
||||
cd ../tools
|
||||
if "%1"=="32" (compile.bat win32) else (compile.bat win64)
|
||||
|
||||
#Create distribution
|
||||
if "%1"=="32" (make_distrib.bat win32) else (make_distrib.bat win64)
|
||||
Reference in New Issue
Block a user