mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
ios: concentrate build dirs
update build.sh to make all builds in build-ios to keep the git dir as clean as possible Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
fe7655155f
commit
ec0511e824
4 changed files with 51 additions and 52 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -35,11 +35,6 @@ Subsurface.app
|
||||||
!android/**/*.xml
|
!android/**/*.xml
|
||||||
build*
|
build*
|
||||||
mobile-widgets/qml/kirigami
|
mobile-widgets/qml/kirigami
|
||||||
packaging/ios/translations/
|
packaging/ios/install-root
|
||||||
packaging/ios/googlemaps*
|
|
||||||
packaging/ios/install-root*
|
|
||||||
packaging/ios/lib*
|
|
||||||
packaging/ios/kirigami
|
|
||||||
packaging/ios/breeze-icons
|
|
||||||
packaging/ios/Info.plist
|
packaging/ios/Info.plist
|
||||||
packaging/ios/Qt
|
packaging/ios/Qt
|
||||||
|
|
|
@ -109,7 +109,7 @@ LIBS += ./install-root/lib/libdivecomputer.a \
|
||||||
./install-root/lib/libgit2.a \
|
./install-root/lib/libgit2.a \
|
||||||
./install-root/lib/libzip.a \
|
./install-root/lib/libzip.a \
|
||||||
./install-root/lib/libxslt.a \
|
./install-root/lib/libxslt.a \
|
||||||
./googlemaps-build/libqtgeoservices_googlemaps.a \
|
./build-ios/googlemaps-build/libqtgeoservices_googlemaps.a \
|
||||||
-liconv \
|
-liconv \
|
||||||
-lsqlite3 \
|
-lsqlite3 \
|
||||||
-lxml2
|
-lxml2
|
||||||
|
|
|
@ -39,6 +39,9 @@ pushd ${SUBSURFACE_SOURCE}/..
|
||||||
SSRF_CLONE=$(pwd)
|
SSRF_CLONE=$(pwd)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# prepare build dir
|
||||||
|
mkdir -p build-ios
|
||||||
|
|
||||||
IOS_QT=${TOP}/Qt
|
IOS_QT=${TOP}/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//')
|
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//')
|
||||||
|
|
||||||
|
@ -84,7 +87,7 @@ for ARCH in $ARCHS; do
|
||||||
|
|
||||||
echo next building for $ARCH
|
echo next building for $ARCH
|
||||||
|
|
||||||
INSTALL_ROOT=$TOP/install-root-$ARCH
|
INSTALL_ROOT=$TOP/build-ios/install-root-$ARCH
|
||||||
mkdir -p $INSTALL_ROOT/lib $INSTALL_ROOT/bin $INSTALL_ROOT/include
|
mkdir -p $INSTALL_ROOT/lib $INSTALL_ROOT/bin $INSTALL_ROOT/include
|
||||||
PKG_CONFIG_LIBDIR=$INSTALL_ROOT/lib/pkgconfig
|
PKG_CONFIG_LIBDIR=$INSTALL_ROOT/lib/pkgconfig
|
||||||
|
|
||||||
|
@ -136,8 +139,8 @@ 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 libxslt-build-$ARCH_NAME
|
mkdir -p build-ios/libxslt-build-$ARCH_NAME
|
||||||
pushd libxslt-build-$ARCH_NAME
|
pushd build-ios/libxslt-build-$ARCH_NAME
|
||||||
${SSRF_CLONE}/libxslt/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --without-python --without-crypto --enable-static --disable-shared
|
${SSRF_CLONE}/libxslt/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --without-python --without-crypto --enable-static --disable-shared
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
@ -145,8 +148,8 @@ for ARCH in $ARCHS; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
|
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
|
||||||
mkdir -p libzip-build-$ARCH_NAME
|
mkdir -p build-ios/libzip-build-$ARCH_NAME
|
||||||
pushd libzip-build-$ARCH_NAME
|
pushd build-ios/libzip-build-$ARCH_NAME
|
||||||
${SSRF_CLONE}/libzip/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
|
${SSRF_CLONE}/libzip/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
@ -159,8 +162,8 @@ for ARCH in $ARCHS; do
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then
|
if [ ! -e $PKG_CONFIG_LIBDIR/libgit2.pc ] ; then
|
||||||
mkdir -p libgit2-build-$ARCH
|
mkdir -p build-ios/libgit2-build-$ARCH
|
||||||
pushd libgit2-build-$ARCH
|
pushd build-ios/libgit2-build-$ARCH
|
||||||
cmake ${SSRF_CLONE}/libgit2 \
|
cmake ${SSRF_CLONE}/libgit2 \
|
||||||
-G "Unix Makefiles" \
|
-G "Unix Makefiles" \
|
||||||
-DBUILD_SHARED_LIBS="OFF" \
|
-DBUILD_SHARED_LIBS="OFF" \
|
||||||
|
@ -193,16 +196,16 @@ for ARCH in $ARCHS; do
|
||||||
autoreconf --install
|
autoreconf --install
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
|
if [ ! -f build-ios/libdivecomputer-${ARCH}.SHA ] ; then
|
||||||
echo "" > libdivecomputer-${ARCH}.SHA
|
echo "" > build-ios/libdivecomputer-${ARCH}.SHA
|
||||||
fi
|
fi
|
||||||
CURRENT_SHA=$(cd ../../libdivecomputer ; git describe)
|
CURRENT_SHA=$(cd ../../libdivecomputer ; git describe)
|
||||||
PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
|
PREVIOUS_SHA=$(cat build-ios/libdivecomputer-${ARCH}.SHA)
|
||||||
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
|
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
|
||||||
echo $CURRENT_SHA > libdivecomputer-${ARCH}.SHA
|
echo $CURRENT_SHA > build-ios/libdivecomputer-${ARCH}.SHA
|
||||||
mkdir -p libdivecomputer-build-$ARCH
|
mkdir -p build-ios/libdivecomputer-build-$ARCH
|
||||||
pushd libdivecomputer-build-$ARCH
|
pushd build-ios/libdivecomputer-build-$ARCH
|
||||||
../../../libdivecomputer/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble
|
../../../../libdivecomputer/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi --enable-ble
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
popd
|
popd
|
||||||
|
@ -211,19 +214,19 @@ for ARCH in $ARCHS; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# build googlemaps
|
# build googlemaps
|
||||||
mkdir -p googlemaps-build
|
mkdir -p build-ios/googlemaps-build
|
||||||
pushd googlemaps-build
|
pushd build-ios/googlemaps-build
|
||||||
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ${SSRF_CLONE}/googlemaps/googlemaps.pro CONFIG+=release
|
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ${SSRF_CLONE}/googlemaps/googlemaps.pro CONFIG+=release
|
||||||
make
|
make
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# now combine the libraries into fat libraries
|
# now combine the libraries into fat libraries
|
||||||
rm -rf install-root
|
rm -rf install-root
|
||||||
cp -a install-root-x86_64 install-root
|
cp -a build-ios/install-root-x86_64 install-root
|
||||||
if [ "$TARGET" = "iphoneos" ] ; then
|
if [ "$TARGET" = "iphoneos" ] ; then
|
||||||
pushd install-root/lib
|
pushd install-root/lib
|
||||||
for LIB in $(find . -type f -name \*.a); do
|
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
|
lipo ../../build-ios/install-root-armv7/lib/$LIB ../../build-ios/install-root-arm64/lib/$LIB ../../build-ios/install-root-x86_64/lib/$LIB -create -output $LIB
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
@ -231,16 +234,17 @@ fi
|
||||||
pushd ${SUBSURFACE_SOURCE}/translations
|
pushd ${SUBSURFACE_SOURCE}/translations
|
||||||
SRCS=$(ls *.ts | grep -v source)
|
SRCS=$(ls *.ts | grep -v source)
|
||||||
popd
|
popd
|
||||||
mkdir -p translations
|
mkdir -p build-ios/translations
|
||||||
for src in $SRCS; do
|
for src in $SRCS; do
|
||||||
${IOS_QT}/${QT_VERSION}/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm translations/${src/.ts/.qm}
|
${IOS_QT}/${QT_VERSION}/ios/bin/lrelease ${SUBSURFACE_SOURCE}/translations/$src -qm build-ios/translations/${src/.ts/.qm}
|
||||||
done
|
done
|
||||||
|
|
||||||
# in order to be able to use xcode without going through Qt Creator
|
# in order to be able to use xcode without going through Qt Creator
|
||||||
# call qmake directly
|
# call qmake directly
|
||||||
|
|
||||||
mkdir -p build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
|
BUILDX=build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
|
||||||
cd build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE}
|
mkdir -p ${BUILDX}
|
||||||
|
cd ${BUILDX}
|
||||||
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile.pro \
|
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile.pro \
|
||||||
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG
|
-spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>translations/subsurface_bg_BG.qm</file>
|
<file>build-ios/translations/subsurface_bg_BG.qm</file>
|
||||||
<file>translations/subsurface_cs.qm</file>
|
<file>build-ios/translations/subsurface_cs.qm</file>
|
||||||
<file>translations/subsurface_da_DK.qm</file>
|
<file>build-ios/translations/subsurface_da_DK.qm</file>
|
||||||
<file>translations/subsurface_de_CH.qm</file>
|
<file>build-ios/translations/subsurface_de_CH.qm</file>
|
||||||
<file>translations/subsurface_de_DE.qm</file>
|
<file>build-ios/translations/subsurface_de_DE.qm</file>
|
||||||
<file>translations/subsurface_en_GB.qm</file>
|
<file>build-ios/translations/subsurface_en_GB.qm</file>
|
||||||
<file>translations/subsurface_en_US.qm</file>
|
<file>build-ios/translations/subsurface_en_US.qm</file>
|
||||||
<file>translations/subsurface_es_ES.qm</file>
|
<file>build-ios/translations/subsurface_es_ES.qm</file>
|
||||||
<file>translations/subsurface_et_EE.qm</file>
|
<file>build-ios/translations/subsurface_et_EE.qm</file>
|
||||||
<file>translations/subsurface_fi_FI.qm</file>
|
<file>build-ios/translations/subsurface_fi_FI.qm</file>
|
||||||
<file>translations/subsurface_fr_FR.qm</file>
|
<file>build-ios/translations/subsurface_fr_FR.qm</file>
|
||||||
<file>translations/subsurface_he.qm</file>
|
<file>build-ios/translations/subsurface_he.qm</file>
|
||||||
<file>translations/subsurface_it_IT.qm</file>
|
<file>build-ios/translations/subsurface_it_IT.qm</file>
|
||||||
<file>translations/subsurface_nb_NO.qm</file>
|
<file>build-ios/translations/subsurface_nb_NO.qm</file>
|
||||||
<file>translations/subsurface_nl_NL.qm</file>
|
<file>build-ios/translations/subsurface_nl_NL.qm</file>
|
||||||
<file>translations/subsurface_pl_PL.qm</file>
|
<file>build-ios/translations/subsurface_pl_PL.qm</file>
|
||||||
<file>translations/subsurface_pt_BR.qm</file>
|
<file>build-ios/translations/subsurface_pt_BR.qm</file>
|
||||||
<file>translations/subsurface_pt_PT.qm</file>
|
<file>build-ios/translations/subsurface_pt_PT.qm</file>
|
||||||
<file>translations/subsurface_ro_RO.qm</file>
|
<file>build-ios/translations/subsurface_ro_RO.qm</file>
|
||||||
<file>translations/subsurface_ru_RU.qm</file>
|
<file>build-ios/translations/subsurface_ru_RU.qm</file>
|
||||||
<file>translations/subsurface_sk_SK.qm</file>
|
<file>build-ios/translations/subsurface_sk_SK.qm</file>
|
||||||
<file>translations/subsurface_sv_SE.qm</file>
|
<file>build-ios/translations/subsurface_sv_SE.qm</file>
|
||||||
<file>translations/subsurface_zh_TW.qm</file>
|
<file>build-ios/translations/subsurface_zh_TW.qm</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Add table
Reference in a new issue