Removing all gps features

Dirk Hohndel dirk at hohndel.org
Sun Sep 12 13:09:21 PDT 2021


Ahh yes... the usual experience... time for my rant of how much I hate maintaining all these builds....
I honestly try to keep things working with the GitHub actions, but it's just so unbelievably frustrating and tedious.
So, let's see, how do I currently build Subsurface-mobile for iOS...

git clone git://github <git://github>.com/subsurface/subsurface
ln -s PATHTOQTFORIOS ./Qt

Then run essentially the following in as a script:

QT_PATH="$(cd Qt ; ls -d 5.*/ios/include/QtCore/5* | tr '.' '_')"
QT_VERSION=${QT_PATH##*/}

if [ ! -d build-Subsurface-mobile-Qt_${QT_VERSION}_for_iOS-Release ] ; then
        echo "cannot find the build folder build-Subsurface-mobile-Qt_${QT_VERSION}_for_iOS-Release"
        echo "creating a new one"
fi
mkdir -p build-Subsurface-mobile-Qt_${QT_VERSION}_for_iOS-Release

TOP=$(pwd)
cd subsurface
bash packaging/ios/build.sh

Now start Xcode and open the Xcode project in build-Subsurface-mobile-Qt_${QT_VERSION}_for_iOS-Release/Subsurface-mobile.xcodeproj
You should be able to build and run that on your device.

I do this on macOS 10.15 because macOS 11 is a pile of bovine excrement and breaks so many things it's not even funny.
And of course I do this on an Intel mac, not an m1 one.
None of this is to say that this wouldn't work with macOS 11 or with an m1 mac, it's just that  can't tell you one way or the other.

> On Sep 12, 2021, at 7:34 AM, Robert.Helling <robert at neu.atdotde.de> wrote:
> I had a Sunday afternoon free, so I wanted to give it a shot. Addiert the capability to receive files based on mime-type from other apps seems not to require greater magic according to 
> 
> https://www.qt.io/blog/2018/02/06/sharing-files-android-ios-qt-app-part-3 <https://www.qt.io/blog/2018/02/06/sharing-files-android-ios-qt-app-part-3>
Yes, all of these things are super easy and if the blog post you follow is older than approximately 6 weeks the likelihood of this still working as documented is similar to correctly predicting the Lotto numbers.
Since February 2018 our iOS build broke four times IIRC. Which is better than Android where absolutely everything changed and broke and nothing from 2018 is even remotely related to the way things need to be done today.
Also, both stores have dramatically tightened their rules for absolutely everything since then...

So, yeah, sure, this might work. In my experience it will be weeks of trial and error and googling before it works in reality. And that thing will be broken within a year.

But hey, that's just my cheerful outlook on the joy of how we support our mobile platforms :)

> To get started I had to get to the point again at which I am able to compile for my phone. I have done this in the past. I was always painful to get to this state.

Yup.

> Today I sunk 2,5 hours into this attempt with no success. Of course, the old build directory where it worked a couple of months ago does not work anymore. I have no clue which of the updates I have installed in the meantime broke it.
> 
> So I created a new directory, checked out a fresh subsurface from GitHub.
> 
> And failed.
> 
> Yes, I overcame some obstacles, reinstalled and updated a number of things. But now I am stuck. 
> 
> By now, I can produce a binary for mobile on desktop. But that doesn’t start complaining 
> 
> th-nb-tmpmbp05-6766:build-mobile Helling$ Subsurface-mobile.app/Contents/MacOS/Subsurface-mobile 
> Execution of PAC script at "%250A" failed: The operation couldn’t be completed. (NSURLErrorDomain error -1002.)
> can't find Subsurface localization for locale "en-DE"
> INFO: Populating font family aliases took 425 ms. Replace uses of missing font family "Roboto" with one that exists to avoid this cost. 
> INFO: QQmlApplicationEngine failed to load component
> INFO: qrc:/qml/main.qml:960 Type Export unavailable
> qrc:/qml/Export.qml:15 Type FileDialog unavailable
> file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:49 <file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:49> module "Qt.labs.settings" is not installed
> file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48 <file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48> module "Qt.labs.folderlistmodel" is not installed
> file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:49 <file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:49> module "Qt.labs.settings" is not installed
> file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48 <file:///Users/Helling/mobile4/subsurface/build-mobile/Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:48> module "Qt.labs.folderlistmodel" is not installed
> 
> INFO: loaded main.qml
> can't create window object
> 

Oh, so you are talking about building mobile-on-desktop? That's a different can of worms.

rule #1 on macOS - you always, always need to run make install - it sometimes magically works without it, but usually it fails with weird errors.
rule #2 - random dependencies don't get installed anyway because, well, reasons

I think you can fix the above by copying Qt5.15.?/5.15.?/clang_64/qml to Subsurface-mobile.app/Contents/Resources/qml

> I have seen these errors in the past but forgot how to get around them. Possibly copying some QML files to some directories in the Subsurface-mobile.app directory structure. But as the thing I am interested in (sharing files between apps) will not work in mobile on desktop, there is no point right now to investigate this.

Agreed. But the above should fix it, anyway.

> Rather cd to packaging/ios and run ./build.sh from there.
> 
> I am at a point where this fails with the kirigami libraries:
> 
> + /Users/Helling/Qt/5.14.0/ios/bin/qmake /Users/Helling/mobile4/subsurface/mobile-widgets/3rdparty/kirigami/kirigami.pro CONFIG+=release
> Info: creating stash file /Users/Helling/mobile4/kirigami-build/.qmake.stash
> Project ERROR: Cannot run target compiler '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Output:

From the error it seems to simply be confused. Try following the steps above. Before you do that, make sure that you have the current Xcode and that you started it at least once to make sure you clicked on all the accept buttons that it throws at you.

/D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20210912/8985c3b9/attachment.htm>


More information about the subsurface mailing list