2015-12-20 14:03:05 +00:00
|
|
|
#!/bin/bash
|
2016-03-07 01:49:35 +00:00
|
|
|
#
|
|
|
|
# show what you are doing and stop when things break
|
2016-03-06 14:41:11 +00:00
|
|
|
set -x
|
2016-03-06 23:10:54 +00:00
|
|
|
set -e
|
2015-12-20 14:03:05 +00:00
|
|
|
|
2018-05-10 15:55:09 +00:00
|
|
|
doVersion=$1
|
2018-04-24 05:07:44 +00:00
|
|
|
DEBUGRELEASE="Release"
|
|
|
|
DRCONFIG="release"
|
|
|
|
ARCHS="armv7 arm64 x86_64"
|
|
|
|
TARGET="iphoneos"
|
|
|
|
TARGET2="Device"
|
|
|
|
# deal with all the command line arguments
|
|
|
|
while [[ $# -gt 0 ]] ; do
|
|
|
|
arg="$1"
|
|
|
|
case $arg in
|
|
|
|
-debug)
|
|
|
|
# build for debugging
|
|
|
|
DEBUGRELEASE="Debug"
|
|
|
|
DRCONFIG="qml_debug"
|
|
|
|
;;
|
|
|
|
-simulator)
|
|
|
|
# build for the simulator instead of for a device
|
|
|
|
ARCHS="x86_64"
|
|
|
|
TARGET="iphonesimulator"
|
|
|
|
TARGET2="simulator"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unknown command line argument $arg"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
2018-04-23 16:27:04 +00:00
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
# set up easy to use variables with the important paths
|
2015-12-20 21:53:53 +00:00
|
|
|
TOP=$(pwd)
|
2016-03-06 14:41:11 +00:00
|
|
|
SUBSURFACE_SOURCE=${TOP}/../../../subsurface
|
2015-12-20 21:53:53 +00:00
|
|
|
IOS_QT=${TOP}/Qt
|
2017-12-06 12:46:10 +00:00
|
|
|
QT_VERSION=$(cd ${IOS_QT}; ls -d [1-9]* | awk -F. '{ printf("%02d.%02d.%02d\n", $1,$2,$3); }' | sort -n | tail -1 | sed -e 's/\.0/\./g;s/^0//')
|
2017-12-06 03:38:42 +00:00
|
|
|
|
|
|
|
if [ -z $QT_VERSION ] ; then
|
|
|
|
echo "Couldn't determine Qt version; giving up"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-12-20 21:53:53 +00:00
|
|
|
|
2015-12-20 14:03:05 +00:00
|
|
|
# Which versions are we building against?
|
2015-12-20 14:32:55 +00:00
|
|
|
SQLITE_VERSION=3090200
|
2016-03-06 14:41:11 +00:00
|
|
|
LIBXML2_VERSION=2.9.2
|
2015-12-20 14:03:05 +00:00
|
|
|
LIBXSLT_VERSION=1.1.28
|
|
|
|
LIBZIP_VERSION=0.11.2
|
2017-11-29 05:46:34 +00:00
|
|
|
LIBGIT2_VERSION=0.26.0
|
2016-03-07 01:49:35 +00:00
|
|
|
|
|
|
|
# not on iOS so far, but kept here for completeness
|
|
|
|
LIBUSB_VERSION=1.0.19
|
2015-12-20 14:03:05 +00:00
|
|
|
LIBFTDI_VERSION=1.2
|
|
|
|
|
2018-05-09 04:53:11 +00:00
|
|
|
# NOTE: NOT IDENTICAL TO OTHER PLATFORMS
|
|
|
|
# in order not to make "technical version" bumps
|
|
|
|
# script/build.sh contains:
|
|
|
|
#
|
|
|
|
# CURRENT_LIBZIP="1.2.0" (very different)
|
|
|
|
# CURRENT_HIDAPI="hidapi-0.7.0" (not used)
|
|
|
|
# CURRENT_LIBCURL="curl-7_54_1" (not used)
|
|
|
|
# CURRENT_LIBUSB="v1.0.21" (different but not used)
|
|
|
|
# CURRENT_OPENSSL="OpenSSL_1_1_0f" (not used)
|
|
|
|
# CURRENT_LIBSSH2="libssh2-1.8.0" (not used)
|
|
|
|
# CURRENT_LIBGIT2="v0.26.0" (different, remark the v, which is the branch name)
|
|
|
|
#
|
|
|
|
# SQLITE, LIBXSLT and LIBXML2 are only used on this platform
|
|
|
|
#
|
|
|
|
# LIBXML2 states a version number, but the repo, does not contain a branch pr release
|
|
|
|
# so master is used.
|
|
|
|
|
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
# set up the Subsurface versions by hand
|
2017-11-29 05:45:58 +00:00
|
|
|
GITVERSION=$(git describe --abbrev=12)
|
|
|
|
CANONICALVERSION=$(git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
|
2016-03-07 01:49:35 +00:00
|
|
|
MOBILEVERSION=$(grep MOBILE ../../cmake/Modules/version.cmake | cut -d\" -f 2)
|
2016-03-14 13:33:47 +00:00
|
|
|
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > subsurface-mobile/ssrf-version.h
|
|
|
|
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> subsurface-mobile/ssrf-version.h
|
|
|
|
echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> subsurface-mobile/ssrf-version.h
|
2016-03-07 01:49:35 +00:00
|
|
|
|
2018-05-10 15:55:09 +00:00
|
|
|
BUNDLE=org.subsurface-divelog.subsurface-mobile
|
|
|
|
if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then
|
|
|
|
BUNDLE=${IOS_BUNDLE_PRODUCT_IDENTIFIER}
|
|
|
|
fi
|
|
|
|
|
2016-03-14 13:59:04 +00:00
|
|
|
# create Info.plist with the correct versions
|
2018-05-10 15:55:09 +00:00
|
|
|
cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist
|
2016-03-14 13:59:04 +00:00
|
|
|
|
2018-05-10 15:55:09 +00:00
|
|
|
if [ "$doVersion" = "version" ] ; then
|
2017-11-30 05:53:11 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
# Build Subsurface-mobile by default
|
|
|
|
SUBSURFACE_MOBILE=1
|
|
|
|
|
2016-08-14 22:48:48 +00:00
|
|
|
pushd ${SUBSURFACE_SOURCE}
|
|
|
|
bash scripts/mobilecomponents.sh
|
|
|
|
popd
|
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
|
|
|
|
# now build all the dependencies for the three relevant architectures (x86_64 is for the simulator)
|
|
|
|
|
2018-04-24 05:07:44 +00:00
|
|
|
for ARCH in $ARCHS; do
|
2016-03-07 01:49:35 +00:00
|
|
|
|
|
|
|
echo next building for $ARCH
|
|
|
|
|
|
|
|
INSTALL_ROOT=$TOP/install-root-$ARCH
|
|
|
|
mkdir -p $INSTALL_ROOT/lib $INSTALL_ROOT/bin $INSTALL_ROOT/include
|
|
|
|
PKG_CONFIG_LIBDIR=$INSTALL_ROOT/lib/pkgconfig
|
|
|
|
|
|
|
|
declare -x PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
|
|
|
|
declare -x PREFIX=$INSTALL_ROOT
|
|
|
|
|
|
|
|
if [ "$ARCH" = "x86_64" ] ; then
|
|
|
|
declare -x SDK_NAME="iphonesimulator"
|
|
|
|
declare -x TOOLCHAIN_FILE="${TOP}/iPhoneSimulatorCMakeToolchain"
|
|
|
|
declare -x IOS_PLATFORM=SIMULATOR64
|
|
|
|
declare -x BUILDCHAIN=x86_64-apple-darwin
|
2016-03-06 23:10:54 +00:00
|
|
|
else
|
2016-03-07 01:49:35 +00:00
|
|
|
declare -x SDK_NAME="iphoneos"
|
|
|
|
declare -x TOOLCHAIN_FILE="${TOP}/iPhoneDeviceCMakeToolchain"
|
|
|
|
declare -x IOS_PLATFORM=OS
|
|
|
|
declare -x BUILDCHAIN=arm-apple-darwin
|
|
|
|
fi
|
|
|
|
declare -x ARCH_NAME=$ARCH
|
|
|
|
declare -x SDK=$SDK_NAME
|
|
|
|
declare -x SDK_DIR=`xcrun --sdk $SDK_NAME --show-sdk-path`
|
|
|
|
declare -x PLATFORM_DIR=`xcrun --sdk $SDK_NAME --show-sdk-platform-path`
|
|
|
|
|
|
|
|
declare -x CC=`xcrun -sdk $SDK_NAME -find clang`
|
|
|
|
declare -x CXX=`xcrun -sdk $SDK_NAME -find clang++`
|
|
|
|
declare -x LD=`xcrun -sdk $SDK_NAME -find ld`
|
2017-04-08 00:07:21 +00:00
|
|
|
declare -x CFLAGS="-arch $ARCH_NAME -isysroot $SDK_DIR -miphoneos-version-min=6.0 -I$SDK_DIR/usr/include -fembed-bitcode"
|
2016-03-07 01:49:35 +00:00
|
|
|
declare -x CXXFLAGS="$CFLAGS"
|
2017-04-08 00:07:21 +00:00
|
|
|
declare -x LDFLAGS="$CFLAGS -lpthread -lc++ -L$SDK_DIR/usr/lib -fembed-bitcode"
|
2016-03-07 01:49:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
# openssl build stuff.
|
|
|
|
export DEVELOPER=$(xcode-select --print-path)\
|
|
|
|
export IPHONEOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
|
|
|
|
export IPHONEOS_DEPLOYMENT_VERSION="6.0"
|
|
|
|
export IPHONEOS_PLATFORM=$(xcrun --sdk iphoneos --show-sdk-platform-path)
|
|
|
|
export IPHONEOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)
|
|
|
|
export IPHONESIMULATOR_PLATFORM=$(xcrun --sdk iphonesimulator --show-sdk-platform-path)
|
|
|
|
export IPHONESIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
|
|
|
|
export OSX_SDK_VERSION=$(xcrun --sdk macosx --show-sdk-version)
|
|
|
|
export OSX_DEPLOYMENT_VERSION="10.8"
|
|
|
|
export OSX_PLATFORM=$(xcrun --sdk macosx --show-sdk-platform-path)
|
|
|
|
export OSX_SDK=$(xcrun --sdk macosx --show-sdk-path)
|
|
|
|
|
|
|
|
target=$ARCH
|
|
|
|
hosttarget=$ARCH
|
|
|
|
|
|
|
|
if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then
|
|
|
|
curl -O http://www.sqlite.org/2015/sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
|
|
|
fi
|
|
|
|
if [ ! -e sqlite-autoconf-${SQLITE_VERSION} ] ; then
|
|
|
|
tar -zxf sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
|
|
|
fi
|
|
|
|
if [ ! -e $PKG_CONFIG_LIBDIR/sqlite3.pc ] ; then
|
|
|
|
mkdir -p sqlite-build-$ARCH_NAME
|
|
|
|
pushd sqlite-build-$ARCH_NAME
|
|
|
|
CFLAGS="${CFLAGS} -DSQLITE_ENABLE_LOCKING_STYLE=0"
|
|
|
|
|
|
|
|
../sqlite-autoconf-${SQLITE_VERSION}/configure \
|
|
|
|
--prefix="$PREFIX" \
|
|
|
|
--host="$BUILDCHAIN" \
|
|
|
|
--enable-static \
|
|
|
|
--disable-shared \
|
|
|
|
--disable-readline \
|
|
|
|
--disable-dynamic-extensions
|
|
|
|
|
|
|
|
# running make tries to build the command line executable which fails
|
|
|
|
# so let's hack around that
|
|
|
|
make libsqlite3.la
|
|
|
|
touch sqlite3
|
2018-02-12 20:13:14 +00:00
|
|
|
make install-libLTLIBRARIES install-pkgconfigDATA
|
2016-03-07 01:49:35 +00:00
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
2018-05-09 04:53:11 +00:00
|
|
|
if [ ! -d libxml2 ] ; then
|
|
|
|
git clone https://github.com/GNOME/libxml2.git libxml2
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
pushd libxml2
|
|
|
|
if ! git checkout v$LIBXML2_VERSION ; then
|
|
|
|
echo "Can't find the right tag in libxml2 - giving up"
|
|
|
|
exit 1
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
autoreconf --install
|
|
|
|
popd
|
2016-03-07 01:49:35 +00:00
|
|
|
if [ ! -e $PKG_CONFIG_LIBDIR/libxml-2.0.pc ] ; then
|
|
|
|
mkdir -p libxml2-build-$ARCH
|
|
|
|
pushd libxml2-build-$ARCH
|
|
|
|
if [ "$ARCH_NAME" == "x86_64" ]; then
|
2018-05-09 04:53:11 +00:00
|
|
|
../libxml2/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --without-python --without-iconv --enable-static --disable-shared
|
2016-03-07 01:49:35 +00:00
|
|
|
else
|
2018-05-09 04:53:11 +00:00
|
|
|
../libxml2/configure --host=arm-apple-darwin --prefix=${PREFIX} --without-python --without-iconv --enable-static --disable-shared
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
|
|
|
perl -pi -e 's/runtest\$\(EXEEXT\)//' Makefile
|
|
|
|
perl -pi -e 's/testrecurse\$\(EXEEXT\)//' Makefile
|
|
|
|
make
|
|
|
|
make install
|
2018-05-09 04:53:11 +00:00
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
2018-05-09 04:53:11 +00:00
|
|
|
if [ ! -d libxslt ] ; then
|
|
|
|
git clone https://github.com/GNOME/libxslt.git libxslt
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
# libxslt have too old config.sub
|
|
|
|
cp libxml2/config.sub libxslt
|
|
|
|
pushd libxslt
|
|
|
|
if ! git checkout v$LIBXSLT_VERSION ; then
|
|
|
|
echo "Can't find the right tag in libxslt - giving up"
|
|
|
|
exit 1
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
autoreconf --install
|
|
|
|
popd
|
2016-03-07 01:49:35 +00:00
|
|
|
if [ ! -e $PKG_CONFIG_LIBDIR/libxslt.pc ] ; then
|
|
|
|
mkdir -p libxslt-build-$ARCH_NAME
|
|
|
|
pushd libxslt-build-$ARCH_NAME
|
2018-05-09 04:53:11 +00:00
|
|
|
../libxslt/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --with-libxml-prefix=${PREFIX} --without-python --without-crypto --enable-static --disable-shared
|
2016-03-07 01:49:35 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e libzip-${LIBZIP_VERSION}.tar.gz ] ; then
|
2018-05-09 04:53:11 +00:00
|
|
|
curl -O https://libzip.org/download/libzip-${LIBZIP_VERSION}.tar.gz
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
|
|
|
if [ ! -e libzip-${LIBZIP_VERSION} ] ; then
|
|
|
|
tar -zxf libzip-${LIBZIP_VERSION}.tar.gz
|
|
|
|
fi
|
|
|
|
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
|
|
|
|
mkdir -p libzip-build-$ARCH_NAME
|
|
|
|
pushd libzip-build-$ARCH_NAME
|
|
|
|
../libzip-${LIBZIP_VERSION}/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
2018-05-09 04:53:11 +00:00
|
|
|
if [ ! -d libgit2 ] ; then
|
|
|
|
git clone https://github.com/libgit2/libgit2.git
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
pushd libgit2
|
|
|
|
git fetch origin
|
|
|
|
if ! git checkout v$LIBGIT2_VERSION ; then
|
|
|
|
echo "Can't find the right tag in libgit2 - giving up"
|
|
|
|
exit 1
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-05-09 04:53:11 +00:00
|
|
|
# libgit2 with -Wall on iOS creates megabytes of warnings...
|
|
|
|
sed -i.bak 's/ADD_C_FLAG_IF_SUPPORTED(-W/# ADD_C_FLAG_IF_SUPPORTED(-W/' CMakeLists.txt
|
|
|
|
popd
|
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then
|
|
|
|
mkdir -p libgit2-build-$ARCH
|
|
|
|
pushd libgit2-build-$ARCH
|
2018-05-09 04:53:11 +00:00
|
|
|
cmake ../libgit2 \
|
2016-03-07 01:49:35 +00:00
|
|
|
-G "Unix Makefiles" \
|
|
|
|
-DBUILD_SHARED_LIBS="OFF" \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
|
|
|
|
-DSHA1_TYPE=builtin \
|
|
|
|
-DBUILD_CLAR=OFF \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
|
|
|
|
-DCMAKE_PREFIX_PATH=${PREFIX} \
|
|
|
|
-DCURL=OFF \
|
2017-10-11 12:17:40 +00:00
|
|
|
-DUSE_SSH=OFF \
|
2018-05-09 04:53:11 +00:00
|
|
|
../libgit2/
|
2018-04-23 13:14:39 +00:00
|
|
|
sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' CMakeFiles/git2.dir/flags.make
|
2016-03-07 01:49:35 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
# Patch away pkg-config dependency to zlib, its there, i promise
|
|
|
|
perl -pi -e 's/^(Requires.private:.*)zlib(.*)$/$1 $2/' $PKG_CONFIG_LIBDIR/libgit2.pc
|
|
|
|
popd
|
2016-03-06 23:10:54 +00:00
|
|
|
fi
|
2015-12-20 21:53:53 +00:00
|
|
|
|
2016-03-06 14:41:11 +00:00
|
|
|
# build libdivecomputer
|
2017-12-04 20:53:43 +00:00
|
|
|
if [ ! -d ../../libdivecomputer/src ] ; then
|
|
|
|
pushd ../..
|
|
|
|
git submodule init
|
2017-12-03 20:58:56 +00:00
|
|
|
git submodule update --recursive
|
|
|
|
pushd libdivecomputer
|
|
|
|
autoreconf --install
|
2016-03-07 01:49:35 +00:00
|
|
|
autoreconf --install
|
2017-12-03 20:58:56 +00:00
|
|
|
popd
|
|
|
|
popd
|
2016-03-07 01:49:35 +00:00
|
|
|
fi
|
2018-02-12 20:02:14 +00:00
|
|
|
if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
|
|
|
|
echo "" > libdivecomputer-${ARCH}.SHA
|
|
|
|
fi
|
|
|
|
git submodule update --recursive
|
|
|
|
CURRENT_SHA=$(cd ../../libdivecomputer ; git describe)
|
|
|
|
PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
|
|
|
|
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
|
|
|
|
echo $CURRENT_SHA > libdivecomputer-${ARCH}.SHA
|
2016-03-07 01:49:35 +00:00
|
|
|
mkdir -p libdivecomputer-build-$ARCH
|
|
|
|
pushd libdivecomputer-build-$ARCH
|
2017-12-04 20:55:57 +00:00
|
|
|
../../../libdivecomputer/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble
|
2016-03-07 01:49:35 +00:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
fi
|
2018-03-13 01:25:12 +00:00
|
|
|
|
2016-03-07 01:49:35 +00:00
|
|
|
done
|
|
|
|
|
2018-04-06 16:38:15 +00:00
|
|
|
# build googlemaps
|
|
|
|
if [ ! -d googlemaps ] ; then
|
|
|
|
git clone git://github.com/subsurface-divelog/googlemaps
|
|
|
|
fi
|
|
|
|
mkdir -p googlemaps-build
|
|
|
|
pushd googlemaps-build
|
|
|
|
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../googlemaps/googlemaps.pro CONFIG+=release
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
|
2018-04-24 05:07:44 +00:00
|
|
|
# now combine the libraries into fat libraries
|
2016-08-14 22:48:48 +00:00
|
|
|
rm -rf install-root
|
2018-04-24 05:07:44 +00:00
|
|
|
cp -a install-root-x86_64 install-root
|
2018-04-27 18:47:28 +00:00
|
|
|
if [ "$TARGET" = "iphoneos" ] ; then
|
2018-04-24 05:07:44 +00:00
|
|
|
pushd install-root/lib
|
|
|
|
for LIB in $(find . -type f -name \*.a); do
|
|
|
|
lipo ../../install-root-armv7/lib/$LIB ../../install-root-arm64/lib/$LIB ../../install-root-x86_64/lib/$LIB -create -output $LIB
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
fi
|
2016-05-04 20:55:14 +00:00
|
|
|
|
|
|
|
pushd ${SUBSURFACE_SOURCE}/translations
|
|
|
|
SRCS=$(ls *.ts | grep -v source)
|
|
|
|
popd
|
|
|
|
pushd Subsurface-mobile
|
|
|
|
mkdir -p translations
|
|
|
|
for src in $SRCS; do
|
2016-06-17 11:06:51 +00:00
|
|
|
${IOS_QT}/${QT_VERSION}/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm translations/${src/.ts/.qm}
|
2016-05-04 20:55:14 +00:00
|
|
|
done
|
|
|
|
popd
|
2017-11-29 14:45:47 +00:00
|
|
|
|
|
|
|
# in order to be able to use xcode without going through Qt Creator
|
|
|
|
# call qmake directly
|
2018-04-24 05:07:44 +00:00
|
|
|
|
|
|
|
mkdir -p build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
|
|
|
|
cd build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
|
|
|
|
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile/Subsurface-mobile.pro \
|
|
|
|
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG
|
|
|
|
|
2017-11-29 14:45:47 +00:00
|
|
|
make qmake_all
|