Craft/Android: Difference between revisions

From KDE Community Wiki
(Add proposed deletion notice)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Proposed_deletion|reason=This page has moved to https://develop.kde.org/docs/packaging/android/building_applications/ for a while now, and these instructions are incredibly out of date.}}
== Preparations ==
== Preparations ==


Get the [[Android/Environment via Container|KDE Android Docker SDK]]:
Get the KDE Android docker image:


   docker pull kdeorg/android-sdk
   docker pull kdeorg/android-qt515


== Setup Craft ==
== Install Craft ==


For the initial setup, run the following command:
For the initial setup, run the following command:


   docker run -ti --rm -v <your persistent craft path>:/home/user/CraftRoot kdeorg/android-sdk craft-bootstrap
  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.
This will ask you for which architecture you want to build and then set up Craft accordingly.
Line 17: Line 22:
== Using Craft ==
== Using Craft ==


You can issue Craft commands as follows now:
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


   docker run -ti --rm -v  <your persistent craft path>:/home/user/CraftRoot kdeorg/android-sdk craft -p ktrip
In this shell, now Craft is usable like on any other platform, e.g. to build KTrip with all dependencies;
   craft ktrip


To not type this every time you probably want to define an alias for the docker part of this command. Craft can then be used like on any other platform.
And package it as APK:
  craft --package ktrip

Latest revision as of 22:51, 17 November 2023

Proposed for Deletion

This page has been proposed for deletion for the following reason:

This page has moved to https://develop.kde.org/docs/packaging/android/building_applications/ for a while now, and these instructions are incredibly out of date.

Please use the discussion section of this page to voice your opinion on this.

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