# Read please official guide for linux and android build first.
Make sure to have
~120gb free for 2 independment build directories.
# Don't forget to copy /res images and .qrc files to \krita\data\splash and \krita\
pics\svg .
# You should run build scripts and cmake after that, just follow the steps below:
# android build
-----------------------------------------------------------------------------------
-
# First make sure you have Docker installed: sudo apt install [Link]
# stop docker, and remove outdated images and setup paths for images according
official buld guide, and start again
# setup perestiques according official buld guide (this need only first time): sudo
apt install python3 python3-venv
# Please take it into account that Krita’s build system currently supports Python
3.10.x only. The usage of a newer version of Python can cause issues (patches to
fix that are welcome!).
git clone [Link] krita-auto-android
cd krita-auto-android
git checkout -b my-android-clipping-build a86f1177 #(May 26, 2025) NDK
r27c
# or
git checkout -b my-android-clipping-build 7b462613 #Jul 24, 2025 Use new docker
images as the base << i used this
mkdir persistent
git clone [Link] persistent/krita
cd persistent/krita
git checkout -b my-clipping-build 9d4fcc7 #(Jule 6 2025) July 6, 2025 (9d4fcc7) -
expects NDK r27c
first time
git checkout -b my-android-clipping-build 9d4fcc7
after if you want to reset
git checkout my-android-clipping-build
git reset --hard 9d4fcc7
add changes to plugins/[Link]
from
[Link]
7c08
# This somehow breaks packaging the Qt platform plugin on Android
if (NOT ANDROID)
add_subdirectory( platforms )
endif()
git clone [Link]
cd krita-deps-management
git checkout -b my-android-clipping-build 20995e2d #"[boost] Add support for
NDK r27d". ??? July 21, 2025 (20995e2d)
git clone [Link] ci-utilities
cd ci-utilities
git checkout -b my-android-clipping-build 9645b0cc #July 2025 commit (find one
close to the deps-management date)
# you need these: for persistent/krita/krita-deps-management/ci-utilities 20995e2d
and persistent/krita/krita-deps-management/ci-utilities 9645b0cc be sure you are at
correct state (use git log to check both directories)
# return to main directory krita-auto-android and setup env variables
export DEPS_REPO_BRANCH_NAME_ANDROID=my-android-clipping-build
export DEPS_BRANCH_NAME_ANDROID=my-android-clipping-build
rm -rf ./persistent/deps/ #optional
# change ./bin/[Link] to be sure it will checkout correct commits
states of repos. Default script always download latest and it can brings errors and
corrupted build
# you need these: for persistent/deps/krita-deps-management/ci-utilities 20995e2d
and persistent/deps/krita-deps-management/ci-utilities 9645b0cc be sure you are at
correct state (use git log to check both directories)
# build docker image. rebuild if something were changed or after your build doesn't
start after your changes. usually happens when add new resources
# cmake should know about new resources, so repeat both next steps after these
changes
./bin/[Link] --android=arm64-v8a
./bin/build_image --android
./bin/run_container
# enter the container
./bin/enter
# android build is very sensetive to any changes in deps, repos.
# if you feel that something wrong with builded apl or it won't start - remove all
docker images and restart [Link] and build images
# set ABI you are building for
export KDECI_ANDROID_ABI=arm64-v8a
export KDECI_WORKDIR_PATH=/home/appimage/appimage-workspace
export KDECI_SHARED_INSTALL_PATH=/home/appimage/appimage-workspace/deps/usr
export KRITACI_SKIP_UPLOAD_NIGHTLY_PACKAGE=True
mkdir -p /home/appimage/appimage-workspace/krita/_build
cd /home/appimage/appimage-workspace/krita/_build
# android build is very sensetive to changes, so clean image and previous build
artifacts too
# clean the CMake build directory
rm -rf /home/appimage/appimage-workspace/krita/_build/*
# clean any existing packaging artifacts
rm -rf /home/appimage/appimage-workspace/krita/_packaging/
# clean Gradle cache if it exists
rm -rf ~/.gradle/caches/
rm -rf /home/appimage/appimage-workspace/krita/_build/*
rm -rf /home/appimage/appimage-workspace/krita/_packaging/
rm -rf ~/.gradle/caches/
rm -rf ~/.gradle/
./gradlew --stop
# clean all Gradle caches and daemon
rm -rf ~/.gradle/
./gradlew --stop # Stop any running Gradle daemons
# Then rebuild
cd /home/appimage/appimage-workspace/krita/_build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DHIDE_SAFE_ASSERTS=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX=~/appimage-workspace/deps/usr/ \
-DCMAKE_TOOLCHAIN_FILE=~/persistent/krita/krita-deps-management/tools/
[Link] \
-DANDROID_ENABLE_STDIO_FORWARDING=ON \
~/persistent/krita/
export KRITACI_SKIP_UPLOAD_NIGHTLY_PACKAGE=True
# build app
make clean
make -j8 install
# build apk
python ~/persistent/krita/build-tools/ci-scripts/[Link]
-------------------------------linux build with container
# First make sure you have Docker installed: sudo apt install [Link]
# stop docker, and remove outdated images and setup paths for images according
official buld guide, and start again
# setup perestiques according official buld guide (this need only first time): sudo
apt install python3 python3-venv
# Please take it into account that Krita’s build system currently supports Python
3.10.x only. The usage of a newer version of Python can cause issues (patches to
fix that are welcome!).
git clone [Link] krita-auto-linux
cd krita-auto-linux
git checkout -b my-linux-clipping-build 7b462613 #Jul 24, 2025 Use new docker
images as the base
mkdir persistent
git clone [Link] persistent/krita
cd persistent/krita
first time
git checkout -b my-linux-clipping-build 9d4fcc7
after if you want to reset
git checkout my-linux-clipping-build
git reset --hard 9d4fcc7
# here patch diffs
git apply --verbose diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
# return to main directory krita-auto-linux
# change ./bin/[Link] to be sure it will checkout correct commits
states of repos. Default script always download latest and it can brings errors and
corrupted build
# you need these: for persistent/deps/krita-deps-management/ci-utilities 20995e2d
and persistent/deps/krita-deps-management/ci-utilities 9645b0cc be sure you are at
correct state (use git log to check both directories)
# build docker image. rebuild if something were changed or after your build doesn't
start after your changes. usually happens when add new resources
# cmake should know about new resources, so repeat both next steps after these
changes
./bin/[Link]
./bin/build_image
./bin/run_container
rm -rf ./persistent/deps/_install //optional
rm -rf ./persistent/deps/ //optional
./bin/enter
#inside container:
# build Krita as usual
# you should be in ~/appimage-workspace/krita-build/
~/bin/run_cmake.sh ~/persistent/krita
make -j8 install
# start Krita
../[Link]/usr/bin/krita
#disable build upload to kde
export KRITACI_SKIP_UPLOAD_NIGHTLY_PACKAGE=True
~/bin/build_krita_appimage.sh
~/bin/build_krita_appimage.sh --debug (with debug)
------ how to patch diffs
# Test without actually applying (dry run)
git apply --check diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
# See what changes would be made
git apply --stat diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
git apply --stat diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
# preview the actual changes
git apply --verbose diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
# apply changes to working directory without committing
git apply --stat diff_5-3_0_9d4fcc7_clipping_8_06_2025_18.diff
# review the changes
git diff
# if satisfied, commit the changes (optional) to your local branch
git add .
git commit -m "Applied patch: description of changes"