mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Qt: Update b.sh to support Qt/Symbian.
This commit is contained in:
parent
7298a4d8c3
commit
027aca960b
@ -72,9 +72,9 @@ script:
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Android" ]; then
|
||||
pushd android && ./ab.sh && popd;
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Blackberry" ]; then
|
||||
./b.sh --no-package;
|
||||
./b.sh --release --no-package;
|
||||
- elif [ "$PPSSPP_BUILD_TYPE" == "Symbian" ]; then
|
||||
pushd Qt && qmake -spec symbian-sbsv2 PPSSPPQt.pro && make release-gcce -j4 && make sis && popd;
|
||||
./b.sh --release --no-package;
|
||||
fi
|
||||
|
||||
after_success:
|
||||
|
@ -1,5 +1,4 @@
|
||||
INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis
|
||||
DEFINES += "BOOST_COMPILER_CONFIG=\"$$EPOCROOT/epoc32/include/stdapis/boost/mpl/aux_/config/gcc.hpp\"" SYMBIAN_OGLES_DLL_EXPORTS
|
||||
DEFINES += "BOOST_COMPILER_CONFIG=\"boost/mpl/aux_/config/gcc.hpp\""
|
||||
QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment -Wno-unused-local-typedefs
|
||||
|
||||
!contains(CONFIG, staticlib) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
VERSION = 0.9.9
|
||||
DEFINES += USING_QT_UI USE_FFMPEG
|
||||
|
||||
# Global specific
|
||||
win32:CONFIG(release, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/release)
|
||||
else:win32:CONFIG(debug, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/debug)
|
||||
@ -8,7 +7,8 @@ else:CONFIG_DIR=$$OUT_PWD
|
||||
OBJECTS_DIR = $$CONFIG_DIR/.obj/$$TARGET
|
||||
MOC_DIR = $$CONFIG_DIR/.moc/$$TARGET
|
||||
UI_DIR = $$CONFIG_DIR/.ui/$$TARGET
|
||||
QMAKE_CLEAN += -r $$MOC_DIR $$UI_DIR $$OBJECTS_DIR $$TARGET
|
||||
RCC_DIR = $$CONFIG_DIR/.rcc/$$TARGET
|
||||
QMAKE_CLEAN += -r $$CONFIG_DIR/.obj $$CONFIG_DIR/.ui $$CONFIG_DIR/.moc $$CONFIG_DIR/.rcc $$TARGET
|
||||
P = $$_PRO_FILE_PWD_/..
|
||||
INCLUDEPATH += $$P/ext/zlib $$P/Common
|
||||
|
||||
@ -43,12 +43,12 @@ win32-msvc* {
|
||||
QMAKE_ALLFLAGS_RELEASE += /O2 /fp:fast
|
||||
} else {
|
||||
DEFINES += __STDC_CONSTANT_MACROS
|
||||
QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers
|
||||
QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers
|
||||
greaterThan(QT_MAJOR_VERSION,4): CONFIG+=c++11
|
||||
else: QMAKE_CXXFLAGS += -std=c++11
|
||||
QMAKE_CFLAGS_RELEASE ~= s/-O.*/
|
||||
QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/
|
||||
QMAKE_ALLFLAGS_RELEASE += -O3 -ffast-math -fno-strict-aliasing
|
||||
QMAKE_ALLFLAGS_RELEASE += -O3 -ffast-math
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, opengles.) {
|
||||
|
81
b.sh
81
b.sh
@ -1,31 +1,58 @@
|
||||
#!/bin/bash
|
||||
CMAKE=1
|
||||
# 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 ${QNX_CONFIGURATION}/../debugtoken.bar"
|
||||
BB_PACKAGE=1
|
||||
PACKAGE=1
|
||||
TARGET_OS=Blackberry
|
||||
fi
|
||||
|
||||
# Check Symbian NDK
|
||||
if [ ! -z "$EPOCROOT" ]; then
|
||||
QMAKE_ARGS="-spec symbian-sbsv2"
|
||||
CMAKE=0
|
||||
PACKAGE=1
|
||||
MAKE_OPT="release-gcce ${MAKE_OPT}"
|
||||
TARGET_OS=Symbian
|
||||
fi
|
||||
|
||||
# Check arguments
|
||||
while test $# -gt 0
|
||||
do
|
||||
case "$1" in
|
||||
--qt) echo "Qt enabled"
|
||||
CMAKE=0
|
||||
;;
|
||||
--ios) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=ios/ios.toolchain.cmake -GXcode ${CMAKE_ARGS}"
|
||||
TARGET_OS=iOS
|
||||
;;
|
||||
--android) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=android/android.toolchain.cmake ${CMAKE_ARGS}"
|
||||
TARGET_OS="Android"
|
||||
;;
|
||||
--simulator) echo "Simulator mode enabled"
|
||||
CMAKE_ARGS="-DSIMULATOR=ON ${CMAKE_ARGS}"
|
||||
;;
|
||||
--release)
|
||||
if [ "$CMAKE" == "1" ]; then
|
||||
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release ${CMAKE_ARGS}"
|
||||
else
|
||||
QMAKE_ARGS="CONFIG+=release ${QMAKE_ARGS}"
|
||||
fi
|
||||
;;
|
||||
--debug)
|
||||
if [ "$CMAKE" == "1" ]; then
|
||||
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug ${CMAKE_ARGS}"
|
||||
else
|
||||
QMAKE_ARGS="CONFIG+=debug ${QMAKE_ARGS}"
|
||||
fi
|
||||
;;
|
||||
--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
|
||||
--no-package) echo "Packaging disabled"
|
||||
PACKAGE=0
|
||||
;;
|
||||
--release-package) echo "Blackberry release package enabled"
|
||||
if [ ! -f "Blackberry/build.txt" ]; then
|
||||
@ -33,9 +60,6 @@ do
|
||||
fi
|
||||
DEBUG_ARGS="-buildId ../Blackberry/build.txt"
|
||||
;;
|
||||
--simulator) echo "Simulator mode enabled"
|
||||
CMAKE_ARGS="-DSIMULATOR=ON ${CMAKE_ARGS}"
|
||||
;;
|
||||
--*) echo "Bad option: $1"
|
||||
exit 1
|
||||
;;
|
||||
@ -45,25 +69,38 @@ do
|
||||
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}"
|
||||
if [ ! -z "$TARGET_OS" ]; then
|
||||
echo "Building for $TARGET_OS"
|
||||
BUILD_DIR="$(tr [A-Z] [a-z] <<< build-"$TARGET_OS")"
|
||||
// HACK (doesn't like shadowed dir)
|
||||
if [ "$TARGET_OS" == "Symbian" ]; then
|
||||
BUILD_DIR="Qt"
|
||||
fi
|
||||
else
|
||||
echo "Building for native host."
|
||||
BUILD_DIR="build"
|
||||
fi
|
||||
|
||||
# Strict errors. Any non-zero return exits this script
|
||||
set -e
|
||||
|
||||
mkdir -p build${BUILD_EXT}
|
||||
pushd build${BUILD_EXT}
|
||||
mkdir -p ${BUILD_DIR}
|
||||
pushd ${BUILD_DIR}
|
||||
|
||||
if [ "$CMAKE" == "1" ]; then
|
||||
cmake $HEADLESS $CMAKE_ARGS .. | (grep -v "^-- " || true)
|
||||
else
|
||||
qmake $QMAKE_ARGS ../Qt/PPSSPPQt.pro
|
||||
fi
|
||||
|
||||
make -j4 $MAKE_OPT
|
||||
if [ "$BB_PACKAGE" == "1" ]; then
|
||||
|
||||
if [ "$PACKAGE" == "1" ]; then
|
||||
if [ "$OS" == "Blackberry" ]; then
|
||||
cp ../Blackberry/bar-descriptor.xml .
|
||||
blackberry-nativepackager -package PPSSPP.bar bar-descriptor.xml $DEBUG_ARGS
|
||||
elif [ "$OS" == "Symbian" ]; then
|
||||
make sis
|
||||
fi
|
||||
fi
|
||||
popd
|
||||
|
Loading…
Reference in New Issue
Block a user