Craft/Android: Difference between revisions
< Craft
(Update to not use deprecated android-sdk docker image) |
|||
Line 1: | Line 1: | ||
== Preparations == | == Preparations == | ||
Get the | Get the KDE Android docker image: | ||
docker pull kdeorg/android- | docker pull kdeorg/android-qt515 | ||
== | == Install Craft == | ||
For the initial setup, run the following command: | For the initial setup, run the following command: | ||
mkdir -p <your persistent craft path> | mkdir -p <your persistent craft path> | ||
docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android- | docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android-qt515 bash | ||
python3 -c "$(curl https://raw.githubusercontent.com/KDE/craft/master/setup/CraftBootstrap.py)" --prefix ~/CraftRoot | |||
source ~/CraftRoot/craft/craftenv.sh | |||
This will ask you for which architecture you want to build and then set up Craft accordingly. | This will ask you for which architecture you want to build and then set up Craft accordingly. | ||
Line 18: | Line 20: | ||
== Using Craft == | == Using Craft == | ||
First you need to enter the docker container and set up the craft environment: | |||
docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android- | docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android-qt515 bash | ||
source ~/CraftRoot/craft/craftenv.sh | |||
In this shell, now Craft is usable like on any other platform, e.g. to build KTrip with all dependencies; | |||
craft ktrip | |||
And package it as APK: | |||
craft --package ktrip |
Revision as of 20:46, 9 November 2022
Preparations
Get the KDE Android docker image:
docker pull kdeorg/android-qt515
Install Craft
For the initial setup, run the following command:
mkdir -p <your persistent craft path> docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android-qt515 bash python3 -c "$(curl https://raw.githubusercontent.com/KDE/craft/master/setup/CraftBootstrap.py)" --prefix ~/CraftRoot source ~/CraftRoot/craft/craftenv.sh
This will ask you for which architecture you want to build and then set up Craft accordingly. Replace <your persistent craft path> with an empty local folder that will hold all the source code, build results and final packages produces by Craft.
Using Craft
First you need to enter the docker container and set up the craft environment:
docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android-qt515 bash source ~/CraftRoot/craft/craftenv.sh
In this shell, now Craft is usable like on any other platform, e.g. to build KTrip with all dependencies;
craft ktrip
And package it as APK:
craft --package ktrip