recreate a working iOS device build

The current XCode and Qt 5.15.2 (the newest version that we can use due to Kirigami
and the lack of binaries for the later open source releases of Qt 5.15) have some
issues. Work around those.

Also, don't create fat armv7/arm64 binaries anymore for iOS - there are no supported
armv7 devices anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-01-01 19:02:09 -08:00
parent de5311033c
commit b67aebd462
2 changed files with 123 additions and 105 deletions

View file

@ -419,11 +419,11 @@ ios {
Q_ENABLE_BITCODE.value = NO Q_ENABLE_BITCODE.value = NO
QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
LIBS += ../install-root/ios/lib/libdivecomputer.a \ LIBS += ../install-root/ios/$${QT_ARCH}/lib/libdivecomputer.a \
../install-root/ios/lib/libgit2.a \ ../install-root/ios/$${QT_ARCH}/lib/libgit2.a \
../install-root/ios/lib/libzip.a \ ../install-root/ios/$${QT_ARCH}/lib/libzip.a \
../install-root/ios/lib/libxslt.a \ ../install-root/ios/$${QT_ARCH}/lib/libxslt.a \
../install-root/ios/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \ ../install-root/ios/$${QT_ARCH}/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \
../googlemaps-build/libqtgeoservices_googlemaps.a \ ../googlemaps-build/libqtgeoservices_googlemaps.a \
-liconv \ -liconv \
-lsqlite3 \ -lsqlite3 \
@ -431,14 +431,14 @@ ios {
LIBS += -framework MessageUI LIBS += -framework MessageUI
INCLUDEPATH += ../install-root/ios/include/ \ INCLUDEPATH += ../install-root/ios/$${QT_ARCH}/include/ \
../install-root/lib/libzip/include \ ../install-root/ios/$${QT_ARCH}/include \
../install-root/ios/include/libxstl \ ../install-root/ios/$${QT_ARCH}/include/libxstl \
../install-root/ios/include/libexstl \ ../install-root/ios/$${QT_ARCH}/include/libexstl \
../install-root/ios/include/openssl \ ../install-root/ios/$${QT_ARCH}/include/openssl \
. \ . \
./core \ ./core \
./mobile-widgets/3rdparty/kirigami/src/libkirigami \ ./mobile-widgets/3rdparty/kirigami/src/libkirigami \
/usr/include/libxml2 ../install-root/ios/$${QT_ARCH}/include/libxml2
} }

View file

@ -1,13 +1,15 @@
#!/bin/bash #!/bin/bash
# shellcheck disable=SC2155
# #
# show what you are doing and stop when things break # show what you are doing and stop when things break
set -x set -x
set -e set -e
DEBUGRELEASE="Release" DEBUGRELEASE="Release"
ARCHS="armv7 arm64 x86_64" ARCH="arm64"
TARGET="iphoneos" TARGET="iphoneos"
TARGET2="Device" TARGET2="Device"
# deal with all the command line arguments # deal with all the command line arguments
while [[ $# -gt 0 ]] ; do while [[ $# -gt 0 ]] ; do
arg="$1" arg="$1"
@ -23,10 +25,14 @@ while [[ $# -gt 0 ]] ; do
;; ;;
-simulator) -simulator)
# build for the simulator instead of for a device # build for the simulator instead of for a device
ARCHS="x86_64" ARCH="x86_64"
TARGET="iphonesimulator" TARGET="iphonesimulator"
TARGET2="simulator" TARGET2="simulator"
;; ;;
-device)
# build for device instead of for the simulator
ARCH="arm64"
;;
-all) -all)
# build both debug and release for all devices # build both debug and release for all devices
DEBUGRELEASE="All" DEBUGRELEASE="All"
@ -49,17 +55,30 @@ cd ..
export PARENT_DIR=$PWD export PARENT_DIR=$PWD
popd popd
IOS_QT=~/Qt IOS_QT=${IOS_QT:-~/Qt}
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//') if [ -z "$QT_VERSION" ] ; then
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//')
if [ -z $QT_VERSION ] ; then fi
if [ -z "$QT_VERSION" ] ; then
echo "Couldn't determine Qt version; giving up" echo "Couldn't determine Qt version; giving up"
exit 1 exit 1
fi fi
# Xcode / SDK 14 and later trigger a bug in Qt 5.15
QMAKE="${IOS_QT}/${QT_VERSION}/ios/bin/qmake"
if [[ $QT_VERSION = 5.15* ]] ; then
QMAKEARG=" -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib"
# also, one Python script in Qt 5.15 still references the unversioned Python interpreter;
# let's fix that...
if ! grep -q /usr/bin/python3 "${IOS_QT}/${QT_VERSION}/ios/mkspecs/features/uikit/devices.py" ; then
sed -i.bak 's/\/usr\/bin\/python/\/usr\/bin\/python3/' "${IOS_QT}/${QT_VERSION}/ios/mkspecs/features/uikit/devices.py"
fi
fi
# set up the Subsurface versions by hand # set up the Subsurface versions by hand
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12) GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12)
CANONICALVERSION=$(echo $GITVERSION | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./') CANONICALVERSION=$(echo "$GITVERSION" | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2) MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2)
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
@ -72,6 +91,7 @@ fi
pushd "$SUBSURFACE_SOURCE"/packaging/ios pushd "$SUBSURFACE_SOURCE"/packaging/ios
# create Info.plist with the correct versions # create Info.plist with the correct versions
# shellcheck disable=SC2002
cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist
popd popd
@ -79,9 +99,6 @@ if [ "$versionOnly" = "1" ] ; then
exit 0 exit 0
fi fi
# Build Subsurface-mobile by default
SUBSURFACE_MOBILE=1
pushd "$SUBSURFACE_SOURCE" pushd "$SUBSURFACE_SOURCE"
bash scripts/mobilecomponents.sh bash scripts/mobilecomponents.sh
popd popd
@ -94,13 +111,11 @@ popd
if [ "$QUICK" != "1" ] ; then if [ "$QUICK" != "1" ] ; then
for ARCH in $ARCHS; do echo "building dependencies for $ARCH"
echo next building for $ARCH INSTALL_ROOT="${PARENT_DIR}/install-root/ios/${ARCH}"
mkdir -p "${INSTALL_ROOT}/lib" "${INSTALL_ROOT}/bin" "${INSTALL_ROOT}/include"
INSTALL_ROOT=$PARENT_DIR/install-root/ios/$ARCH PKG_CONFIG_LIBDIR="${INSTALL_ROOT}/lib/pkgconfig"
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 PKG_CONFIG_PATH=$PKG_CONFIG_LIBDIR
declare -x PREFIX=$INSTALL_ROOT declare -x PREFIX=$INSTALL_ROOT
@ -129,15 +144,23 @@ for ARCH in $ARCHS; do
declare -x LDFLAGS="$CFLAGS -lsqlite3 -lpthread -lc++ -L$SDK_DIR/usr/lib -fembed-bitcode" declare -x LDFLAGS="$CFLAGS -lsqlite3 -lpthread -lc++ -L$SDK_DIR/usr/lib -fembed-bitcode"
# openssl build stuff. # openssl build stuff.
export DEVELOPER=$(xcode-select --print-path)\ export DEVELOPER=$(xcode-select --print-path)
export IPHONEOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version) export IPHONEOS_DEPLOYMENT_VERSION="12.0"
export IPHONEOS_DEPLOYMENT_VERSION="6.0" if [ "$ARCH" = "arm64" ] ; then
export IPHONEOS_PLATFORM=$(xcrun --sdk iphoneos --show-sdk-platform-path) export IPHONEOS_SDK_VERSION=$(xcrun --sdk iphoneos --show-sdk-version)
export IPHONEOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path) export IPHONEOS_PLATFORM=$(xcrun --sdk iphoneos --show-sdk-platform-path)
export IPHONESIMULATOR_PLATFORM=$(xcrun --sdk iphonesimulator --show-sdk-platform-path) export IPHONEOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)
export IPHONESIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path) export IPHONESIMULATOR_PLATFORM=""
export IPHONESIMULATOR_SDK=""
else
export IPHONEOS_SDK_VERSION=""
export IPHONEOS_PLATFORM=""
export IPHONEOS_SDK=""
export IPHONESIMULATOR_PLATFORM=$(xcrun --sdk iphonesimulator --show-sdk-platform-path)
export IPHONESIMULATOR_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
fi
export OSX_SDK_VERSION=$(xcrun --sdk macosx --show-sdk-version) export OSX_SDK_VERSION=$(xcrun --sdk macosx --show-sdk-version)
export OSX_DEPLOYMENT_VERSION="10.8" export OSX_DEPLOYMENT_VERSION="11.0"
export OSX_PLATFORM=$(xcrun --sdk macosx --show-sdk-platform-path) export OSX_PLATFORM=$(xcrun --sdk macosx --show-sdk-platform-path)
export OSX_SDK=$(xcrun --sdk macosx --show-sdk-path) export OSX_SDK=$(xcrun --sdk macosx --show-sdk-path)
@ -153,7 +176,7 @@ for ARCH in $ARCHS; do
"$PARENT_DIR"/libxml2/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --without-lzma --without-python --without-iconv --enable-static --disable-shared "$PARENT_DIR"/libxml2/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --without-lzma --without-python --without-iconv --enable-static --disable-shared
perl -pi -e 's/runtest\$\(EXEEXT\)//' Makefile perl -pi -e 's/runtest\$\(EXEEXT\)//' Makefile
perl -pi -e 's/testrecurse\$\(EXEEXT\)//' Makefile perl -pi -e 's/testrecurse\$\(EXEEXT\)//' Makefile
make make -j
make install make install
popd popd
fi fi
@ -163,10 +186,10 @@ for ARCH in $ARCHS; do
autoreconf --install autoreconf --install
popd popd
if [ ! -e "$PKG_CONFIG_LIBDIR"/libxslt.pc ] ; then if [ ! -e "$PKG_CONFIG_LIBDIR"/libxslt.pc ] ; then
mkdir -p "$PARENT_DIR"/libxslt-build-$ARCH mkdir -p "${PARENT_DIR}/libxslt-build-${ARCH}"
pushd "$PARENT_DIR"/libxslt-build-$ARCH pushd "${PARENT_DIR}/libxslt-build-${ARCH}"
"$PARENT_DIR"/libxslt/configure --host=$BUILDCHAIN --prefix="$PREFIX" --with-libxml-include-prefix="$INSTALL_ROOT"/include/libxml2 --without-python --without-crypto --enable-static --disable-shared "$PARENT_DIR"/libxslt/configure --host=$BUILDCHAIN --prefix="$PREFIX" --with-libxml-include-prefix="$INSTALL_ROOT"/include/libxml2 --without-python --without-crypto --enable-static --disable-shared
make make -j
make install make install
popd popd
fi fi
@ -175,8 +198,8 @@ for ARCH in $ARCHS; do
pushd "$PARENT_DIR"/libzip pushd "$PARENT_DIR"/libzip
# don't waste time on building command line tools, examples, manual, and regression tests - and don't build the BZIP2 support we don't need # don't waste time on building command line tools, examples, manual, and regression tests - and don't build the BZIP2 support we don't need
sed -i.bak 's/ADD_SUBDIRECTORY(src)//;s/ADD_SUBDIRECTORY(examples)//;s/ADD_SUBDIRECTORY(man)//;s/ADD_SUBDIRECTORY(regress)//' CMakeLists.txt sed -i.bak 's/ADD_SUBDIRECTORY(src)//;s/ADD_SUBDIRECTORY(examples)//;s/ADD_SUBDIRECTORY(man)//;s/ADD_SUBDIRECTORY(regress)//' CMakeLists.txt
mkdir -p "$PARENT_DIR"/libzip-build-$ARCH mkdir -p "${PARENT_DIR}/libzip-build-${ARCH}"
pushd "$PARENT_DIR"/libzip-build-$ARCH pushd "${PARENT_DIR}/libzip-build-${ARCH}"
cmake -DBUILD_SHARED_LIBS="OFF" \ cmake -DBUILD_SHARED_LIBS="OFF" \
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \ -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \ -DCMAKE_INSTALL_PREFIX="$PREFIX" \
@ -184,10 +207,10 @@ for ARCH in $ARCHS; do
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \ -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE \
-DENABLE_OPENSSL=FALSE \ -DENABLE_OPENSSL=FALSE \
-DENABLE_GNUTLS=FALSE \ -DENABLE_GNUTLS=FALSE \
"$PARENT_DIR"/libzip "${PARENT_DIR}/libzip"
# quiet the super noise warnings # quiet the super noise warnings
sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' lib/CMakeFiles/zip.dir/flags.make sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' lib/CMakeFiles/zip.dir/flags.make
make make -j
make install make install
popd popd
mv CMakeLists.txt.bak CMakeLists.txt mv CMakeLists.txt.bak CMakeLists.txt
@ -199,10 +222,10 @@ for ARCH in $ARCHS; do
sed -i.bak 's/ADD_C_FLAG_IF_SUPPORTED(-W/# ADD_C_FLAG_IF_SUPPORTED(-W/' CMakeLists.txt sed -i.bak 's/ADD_C_FLAG_IF_SUPPORTED(-W/# ADD_C_FLAG_IF_SUPPORTED(-W/' CMakeLists.txt
popd popd
if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then if [ ! -e "${PKG_CONFIG_LIBDIR}/libgit2.pc" ] ; then
mkdir -p "$PARENT_DIR"/libgit2-build-$ARCH mkdir -p "${PARENT_DIR}/libgit2-build-${ARCH}"
pushd "$PARENT_DIR"/libgit2-build-$ARCH pushd "${PARENT_DIR}/libgit2-build-${ARCH}"
cmake "$PARENT_DIR"/libgit2 \ cmake "${PARENT_DIR}/libgit2" \
-G "Unix Makefiles" \ -G "Unix Makefiles" \
-DBUILD_SHARED_LIBS="OFF" \ -DBUILD_SHARED_LIBS="OFF" \
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \ -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN_FILE" \
@ -212,16 +235,16 @@ for ARCH in $ARCHS; do
-DCMAKE_PREFIX_PATH="$PREFIX" \ -DCMAKE_PREFIX_PATH="$PREFIX" \
-DCURL=OFF \ -DCURL=OFF \
-DUSE_SSH=OFF \ -DUSE_SSH=OFF \
"$PARENT_DIR"/libgit2/ "${PARENT_DIR}/libgit2/"
sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' src/CMakeFiles/git2.dir/flags.make sed -i.bak 's/C_FLAGS = /C_FLAGS = -Wno-nullability-completeness -Wno-expansion-to-defined /' src/CMakeFiles/git2.dir/flags.make
make make -j
make install make install
# Patch away pkg-config dependency to zlib, its there, i promise # 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 perl -pi -e 's/^(Requires.private:.*)zlib(.*)$/$1 $2/' "${PKG_CONFIG_LIBDIR}/libgit2.pc"
popd popd
fi fi
# build libdivecomputer # build libdivecomputer
if [ ! -d "$SUBSURFACE_SOURCE"/libdivecomputer/src ] ; then if [ ! -d "$SUBSURFACE_SOURCE"/libdivecomputer/src ] ; then
pushd "$SUBSURFACE_SOURCE" pushd "$SUBSURFACE_SOURCE"
git submodule init git submodule init
@ -234,69 +257,63 @@ for ARCH in $ARCHS; do
autoreconf --install autoreconf --install
popd popd
fi fi
mkdir -p "$PARENT_DIR"/libdivecomputer-build-$ARCH mkdir -p "${PARENT_DIR}/libdivecomputer-build-${ARCH}"
if [ ! -f "$PARENT_DIR"/libdivecomputer-build-$ARCH/git.SHA ] ; then if [ ! -f "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA" ] ; then
echo "" > "$PARENT_DIR"/libdivecomputer-build-$ARCH/git.SHA echo "" > "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA"
fi fi
CURRENT_SHA=$(cd "$SUBSURFACE_SOURCE"/libdivecomputer ; git describe) CURRENT_SHA=$(cd "${SUBSURFACE_SOURCE}/libdivecomputer" ; git describe)
PREVIOUS_SHA=$(cat "$PARENT_DIR"/libdivecomputer-build-$ARCH/git.SHA) PREVIOUS_SHA=$(cat "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA")
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
echo $CURRENT_SHA > "$PARENT_DIR"/libdivecomputer-build-$ARCH/git.SHA echo "$CURRENT_SHA" > "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA"
pushd "$PARENT_DIR"/libdivecomputer-build-$ARCH pushd "${PARENT_DIR}/libdivecomputer-build-${ARCH}"
${SUBSURFACE_SOURCE}/libdivecomputer/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble "${SUBSURFACE_SOURCE}/libdivecomputer/configure" --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi
make make -j
make install make install
popd popd
fi fi
done
# build googlemaps # build googlemaps
mkdir -p "$PARENT_DIR"/googlemaps-build mkdir -p "$PARENT_DIR"/googlemaps-build
pushd "$PARENT_DIR"/googlemaps-build pushd "$PARENT_DIR"/googlemaps-build
"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$PARENT_DIR"/googlemaps/googlemaps.pro CONFIG+=release # yes, shellcheck will complain that we don't enclose QMAKEARG in quotes when we use it
make # that's intentional so that the command line argument actually works
if [ "$DEBUGRELEASE" != "Release" ] ; then # shellcheck disable=SC2086
"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$PARENT_DIR"/googlemaps/googlemaps.pro CONFIG+=debug "$QMAKE" $QMAKEARG "$PARENT_DIR"/googlemaps/googlemaps.pro \
make clean -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=release
make make
fi if [ "$DEBUGRELEASE" != "Release" ] ; then
popd # shellcheck disable=SC2086
"$QMAKE" $QMAKEARG "$PARENT_DIR"/googlemaps/googlemaps.pro \
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=debug
make clean
make -j
fi
popd
# build Kirigami # build Kirigami
mkdir -p "$PARENT_DIR"/kirigami-release-build mkdir -p "$PARENT_DIR"/kirigami-release-build
pushd "$PARENT_DIR"/kirigami-release-build pushd "$PARENT_DIR"/kirigami-release-build
"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro CONFIG+=release # shellcheck disable=SC2086
make "$QMAKE" $QMAKEARG "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro \
# since the install prefix for qmake is rather weirdly implemented, let's copy things by hand into the multiarch destination -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=release
mkdir -p "$INSTALL_ROOT"/../lib/qml/ make -j
cp -a org "$INSTALL_ROOT"/../lib/qml/
popd
if [ "$DEBUGRELEASE" != "Release" ] ; then
mkdir -p "$PARENT_DIR"/kirigami-debug-build
pushd "$PARENT_DIR"/kirigami-debug-build
"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro CONFIG+=debug
make
# since the install prefix for qmake is rather weirdly implemented, let's copy things by hand into the multiarch destination # since the install prefix for qmake is rather weirdly implemented, let's copy things by hand into the multiarch destination
mkdir -p "$INSTALL_ROOT"/../lib/qml/ mkdir -p "$INSTALL_ROOT"/lib/qml/
cp -a org "$INSTALL_ROOT"/../lib/qml/ cp -a org "$INSTALL_ROOT"/lib/qml/
popd popd
fi if [ "$DEBUGRELEASE" != "Release" ] ; then
mkdir -p "$PARENT_DIR"/kirigami-debug-build
# now combine the libraries into fat libraries pushd "$PARENT_DIR"/kirigami-debug-build
ARCH_ROOT=$PARENT_DIR/install-root/ios # shellcheck disable=SC2086
cp -a "$ARCH_ROOT"/x86_64/* "$ARCH_ROOT" "$QMAKE" $QMAKEARG "$SUBSURFACE_SOURCE"/mobile-widgets/3rdparty/kirigami/kirigami.pro \
if [ "$TARGET" = "iphoneos" ] ; then -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=debug
pushd "$ARCH_ROOT"/lib make -j
for LIB in $(find . -type f -name \*.a); do # since the install prefix for qmake is rather weirdly implemented, let's copy things by hand into the multiarch destination
# libkirigamiplugin is already a fat library mkdir -p "$INSTALL_ROOT"/lib/qml/
if grep -v -q "kirigami" <<< "$LIB" ; then cp -a org "$INSTALL_ROOT"/lib/qml/
lipo "$ARCH_ROOT"/armv7/lib/"$LIB" "$ARCH_ROOT"/arm64/lib/"$LIB" "$ARCH_ROOT"/x86_64/lib/"$LIB" -create -output "$LIB" popd
fi fi
done
popd
fi
fi fi
pushd "$SUBSURFACE_SOURCE"/translations pushd "$SUBSURFACE_SOURCE"/translations
@ -328,9 +345,10 @@ for BUILD_NOW in $BUILD_LOOP; do
pushd "$BUILDX" pushd "$BUILDX"
rm -f ssrf-version.h rm -f ssrf-version.h
ln -s "$SUBSURFACE_SOURCE"/ssrf-version.h . ln -s "$SUBSURFACE_SOURCE"/ssrf-version.h .
"$IOS_QT"/"$QT_VERSION"/ios/bin/qmake "$SUBSURFACE_SOURCE"/Subsurface-mobile.pro \ # shellcheck disable=SC2086
"$QMAKE" $QMAKEARG "$SUBSURFACE_SOURCE"/Subsurface-mobile.pro \
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG
make make -j
popd popd
done done