mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-19 07:04:45 +00:00
Turn b.sh in to a centralised CMake builder for Native(Linux/BSD), Android, iOS and Blackberry.
This commit is contained in:
parent
7b4759384f
commit
68e5dbf517
@ -64,7 +64,7 @@ script:
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Android" ]; then
|
||||
pushd android && ./ab.sh && popd;
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Blackberry" ]; then
|
||||
pushd Blackberry && ./build.sh --no-package && popd;
|
||||
./b.sh --no-package;
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Symbian" ]; then
|
||||
pushd Qt && qmake -spec symbian-sbsv2 PPSSPPQt.pro && make release-gcce -j4 && make sis && popd;
|
||||
fi
|
||||
|
@ -1,23 +0,0 @@
|
||||
# Check Blackberry NDK
|
||||
BB_OS=`cat ${QNX_TARGET}/etc/qversion 2>/dev/null`
|
||||
if [ -z "$BB_OS" ]; then
|
||||
echo "Could not find your Blackberry NDK. Please source bbndk-env.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Strict errors. Any non-zero return exits this script
|
||||
set -e
|
||||
echo "Building for Blackberry ${BB_OS}"
|
||||
|
||||
if [[ "$1" == "--simulator" ]]; then
|
||||
SIM="-DSIMULATOR=ON"
|
||||
fi
|
||||
|
||||
cmake ${SIM} -DCMAKE_TOOLCHAIN_FILE=bb.toolchain.cmake -DBLACKBERRY=${BB_OS} .. | (grep -v "^-- " || true)
|
||||
|
||||
# Compile and create unsigned PPSSPP.bar with debugtoken
|
||||
make -j4
|
||||
if [[ "$1" != "--no-package" ]]; then
|
||||
DEBUG="-devMode -debugToken ${HOME}/debugtoken.bar"
|
||||
blackberry-nativepackager -package PPSSPP.bar bar-descriptor.xml $DEBUG
|
||||
fi
|
66
b.sh
66
b.sh
@ -1,14 +1,62 @@
|
||||
#!/bin/bash
|
||||
# Check Blackberry NDK
|
||||
BB_OS=`cat ${QNX_TARGET}/etc/qversion 2>/dev/null`
|
||||
if [ ! -z "$BB_OS" ]; then
|
||||
CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=Blackberry/bb.toolchain.cmake -DBLACKBERRY=${BB_OS} ${CMAKE_ARGS}"
|
||||
BUILD_EXT="-bb"
|
||||
DEBUG_ARGS="-devMode -debugToken ${HOME}/debugtoken.bar"
|
||||
BB_PACKAGE=1
|
||||
fi
|
||||
|
||||
# Check arguments
|
||||
while test $# -gt 0
|
||||
do
|
||||
case "$1" in
|
||||
--headless) echo "Headless mode enabled"
|
||||
CMAKE_ARGS="-DHEADLESS=ON ${CMAKE_ARGS}"
|
||||
;;
|
||||
--ios) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=ios/ios.toolchain.cmake -GXcode ${CMAKE_ARGS}"
|
||||
BUILD_EXT="-ios"
|
||||
;;
|
||||
--android) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=android/android.toolchain.cmake ${CMAKE_ARGS}"
|
||||
BUILD_EXT="-android"
|
||||
;;
|
||||
--no-package) echo "Blackberry packaging disabled"
|
||||
BB_PACKAGE=0
|
||||
;;
|
||||
--release-package) echo "Blackberry release package enabled"
|
||||
DEBUG_ARGS=""
|
||||
;;
|
||||
--simulator) echo "Simulator mode enabled"
|
||||
CMAKE_ARGS="-DSIMULATOR=ON ${CMAKE_ARGS}"
|
||||
;;
|
||||
--*) echo "Bad option: $1"
|
||||
exit 1
|
||||
;;
|
||||
*) MAKE_OPT="$1 ${MAKE_OPT}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$BUILD_EXT" == "-ios" ]; then
|
||||
echo "Building for iOS"
|
||||
elif [ "$BUILD_EXT" == "-android" ]; then
|
||||
echo "Building for Android"
|
||||
elif [ "$BUILD_EXT" == "-bb" ]; then
|
||||
echo "Building for Blackberry ${BB_OS}"
|
||||
else
|
||||
echo "Building for native host."
|
||||
fi
|
||||
|
||||
# Strict errors. Any non-zero return exits this script
|
||||
set -e
|
||||
|
||||
cp -r android/assets .
|
||||
mkdir -p build
|
||||
if [[ "$1" == "--headless" ]]; then
|
||||
HEADLESS="-DHEADLESS=ON"
|
||||
else
|
||||
MAKE_OPT="$1"
|
||||
fi
|
||||
pushd build
|
||||
cmake $HEADLESS .. | (grep -v "^-- " || true)
|
||||
mkdir -p build${BUILD_EXT}
|
||||
pushd build${BUILD_EXT}
|
||||
cmake $HEADLESS $CMAKE_ARGS .. | (grep -v "^-- " || true)
|
||||
make -j4 $MAKE_OPT
|
||||
if [ $BB_PACKAGE -eq 1 ]; then
|
||||
blackberry-nativepackager -package PPSSPP.bar ../Blackberry/bar-descriptor.xml $DEBUG_ARGS
|
||||
fi
|
||||
popd
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 9e5df6028ad08d796a4656a30fa532058aa9466d
|
||||
Subproject commit 1fbab7d728b1a83398ef7a41131a0541d3f9f6a0
|
Loading…
x
Reference in New Issue
Block a user