It does seem a bit odd, but the arch command actually doesn't
return a reasonable architecture on macOS. So let's use the
uname -m command to get the right answer that makes this script
work both on an m1 and an Intel Mac.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As some Linux distros start to ship both Qt5 and Qt6, it actually makes more
sense to build only against Qt6 when the user explicitly asks for it. Having it
preferred over Qt5 seems completely wrong in hind sight.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I couldn't make this to work as a single pass build, so we again do a dual pass
and manually assemble the dylib. This is then copied to a sane spot which
required another attempt to copy it in the CMakeLists.txt - which I added
comments to in order to make sense of the weirdness.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a flag to explicitly enable a build against maps, which is
only needed for Qt6 (as we always assume that Qt5 has maps installed).
It also includes a quick fix to fail gracefully if libmtp was already
patched.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As of today, GitHub no longer allows the 'git://' protocol, so we need to
switch the submodule and our other references to cloning git repos to
'https://' instead.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This has bugged me forever. The existing file creates a warning on every single
compiler invocation. I really need to figure out if I can get this fixed
upstream. But while I'm at it, I submitted it here to make it easier to spot
warnings in the build output.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we are building our own version of libusb, let's build a current one
(because current libmtp relies on that).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the CMAKE_PREFIX_PATH is a multi element path the old code failed
in very predictable ways. So instead simply fall back on the PATH to
find qmake.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This cleans up the script a little and makes it more flexible to add other
output formats; and adds Markdown as one such format.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Asciidoc appears to insert './images' references when using the admonitionblock.
Clean that up in the post processing of the user manual for HTML.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When trying to build on Big Sur, the xcode command-line tools
install are installed in /Library/Developer/CommandLineTools/SDKs,
and as of Xcode 12.5, it does not include a 10.x version
of SDK.
This changes it to search in the location of the command-line tools SDK
for a 10.x version, and if it can't find a 10.x version it will
find an explicit 11.x version of the SDK to use because it is
conceivable that in the near future Apple will stop installing any
10.x SDK's as part of the command-line tool installer.
If the SDK can't be found, the build script will exit now instead
of continuing with an unset BASESDK version that causes a later failure.
Signed-off-by: Ryan Gardner <ryan.gardner@coxautoinc.com>
Android and iOS use qmake, so add the code to the .pro file.
This also removes all remnants of QCharts includes and uses and all the
references to QCharts in our various build systems.
That was a brief but extremely useful detour.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When calling build.sh with no args asking for a specific build type, that
should be equivalent with calling it with the -desktop arg.
Reported-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We now require qmake to be found much earlier in the script so we can simply
use that to get the right prefix path.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update to Qt 5.12.10, latest OpenSSL, add QtChart, add other missing packages.
Also switch to gcc-7 as our statistics code requires better C++17 support than
what gcc-6 can offer.
This then creates trusty-qt512:1.1
Signed-off-by: Subsurface CI <dirk@hohndel.org>
This is just adding the third option and then untangles some of the 'there are
only two options' based code.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the OS has an older one installed, that is found first and the
build fails. This way we know that ours is used.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Having them as commits like this should make it easier to migrate them
as we update the underlying Kirigami version.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of relying on this being available as a system resource, treat it
the same way as we treat Kirigami and the Breeze icons.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Our half-assed manual build of Kirigami was becoming completely unmaintainable.
So let's try to use the build method that the Kirigami team recommends. Which
unfortunately requires us to have access to the KDE extra cmake modules (ECM).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adjusts the docker setup to create a container with the correct
NDK, SDK, tools, Qt version, etc, and updates the helper scripts that
are needed in order to do that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This installs the required versions for most components, switches us to
Qt 5.15, current SDK, NDK, and the current OpenSSL version.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This used to work, and still works with Qt 5.15 on the desktop, but on
Android we get a fatal error trying to open the app. So let's just add
another hack on top of all the other hacks we already have.
Eventually we need to bite the bullet and update Kirigami. I just wish
that wasn't such a pain.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We still only require v0.26 from an API perspective, but it seems
backwards to build that version when building from source as we do for
macOS or Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we are building our own dependencies (usually only for release builds), we
now also need to build libmtp.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should allow us to then do both 32 and 64 bit Windows builds in our CI/CD
and of course for our releases.
In order to still be able to use this container in a GitHub action, aggressively
remove things that we won't need during the build. Since we use the experimental
-squash argument during docker build, this should get us a much smaller container
image in the end.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We previously tried to build the MXE Docker container on GitHub using
an Action, but that really didn't work well and was a lot more trouble
than it was worth.
So this goes back to an offline build mechanism where I simply create
an updated Docker image when needed and push that to Docker Hub.
But this nearly hides the most interesting change here - we are finally
switching to using 64bit binaries on Windows. It's 2020 and fewer than
1% of our users use 32bit Windows machines. We'll need to expand this
to be able to have both a 32bit and a 64bit version of Subsurface for
Windows. But for now, this solves the problem for 99% of our users.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is barely scratching the surface (no put intended), and of course the
container needs to be updated, first, to have a 64bit version of MXE installed,
but this seems to help make libmtp build correctly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>