[Qbs] setup-android, no --system?

Richard Weickelt richard at weickelt.de
Fri May 15 15:46:43 CEST 2020

> Thanks for the detailed explanation, i've been looking at your scripts
> and docker files recently (and have adopted your install-qt.sh! ;))
> I think we don't have the same use case, you need to build and test
> qbs, i need to build and test a android+qt+qbs container that works
> "out of the box" whichever way it is used (CI or developers).

Yes, that is almost what this container is about:
except that we do not install Qbs in it which is one line to add.

We don't build Qbs in this image, but only run the Android autotests. Qbs is
built in another container and we only mount the build results into this
container. We don't do the qbs-setup-android stuff during image creation for
that particular reason.

> Basically my ultimate test is: build and sign an hello world APK with
> this android+qt+qbs container, that depends on all the Qt modules i
> want to be available to developers.
> My goal is: just run "qbs build" in the right container and you'll get
> a signed APK.

Yes, that sounds neat and should just work with above image, except that it
misses the setup-android step, but that is only a few lines to add. Have a
look at:

That's all.

> I was just surprised that --system is supported by all qbs
> setup/config tools but qbs-setup-android. I don't see any compelling
> reason for that, do you?
> Maybe it was simply never needed, hence never implemented.

Probably. It's a valid suggestion though. Wanna submit a patch?

> As a side note, i don't install Android the same way. I use what i
> believe is the new approach: install commandline-tools first, and run
> sdk manager with a package requirement file, here is mine right now:
> build-tools;28.0.3
> ndk;21.0.6113669
> patcher;v4
> platform-tools
> platforms;android-28

Ah thanks. That looks helpful. We should do the same. It would be nice if
you could post a more comprehensive code snippet once you are done.

> Digression: I wish Qbs was in the list of tools i can install with
> install-qt.sh ...

We don't supply stand-alone binary packages yet, but you can install
qtcreator which is only a few hundred MB overhead ;-)

        ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version

Feel free to strip some folders from the installation.

More information about the Qbs mailing list