remove the kivy gui
We now use the qml gui on Android, and haven't been maintaining the kivy GUI for a while.
This commit is contained in:
@@ -19,13 +19,9 @@ export PYTHONHASHSEED := $(SOURCE_DATE_EPOCH)
|
||||
export BUILD_DATE := $(shell LC_ALL=C TZ=UTC date +'%b %e %Y' -d @$(SOURCE_DATE_EPOCH))
|
||||
export BUILD_TIME := $(shell LC_ALL=C TZ=UTC date +'%H:%M:%S' -d @$(SOURCE_DATE_EPOCH))
|
||||
|
||||
# needs kivy installed or in PYTHONPATH
|
||||
|
||||
.PHONY: theming apk clean
|
||||
.PHONY: apk clean
|
||||
|
||||
theming:
|
||||
#bash -c 'for i in network lightning; do convert -background none theming/light/$i.{svg,png}; done'
|
||||
$(PYTHON) -m kivy.atlas ../../electrum/gui/kivy/theming/atlas/light 1024 ../../electrum/gui/kivy/theming/light/*.png
|
||||
prepare:
|
||||
# running pre build setup
|
||||
# copy electrum to main.py
|
||||
|
||||
@@ -107,12 +107,6 @@ sudo apt-get install qtvirtualkeyboard-plugin
|
||||
|
||||
Run electrum with the `-g` switch: `electrum -g qml`
|
||||
|
||||
### The Kivy GUI can be run directly on Linux Desktop. How?
|
||||
Install Kivy.
|
||||
|
||||
Build atlas: `(cd contrib/android/; make theming)`
|
||||
|
||||
Run electrum with the `-g` switch: `electrum -g kivy`
|
||||
|
||||
### debug vs release build
|
||||
If you just follow the instructions above, you will build the apk
|
||||
|
||||
@@ -17,12 +17,12 @@ BUILD_UID=$(/usr/bin/stat -c %u "$PROJECT_ROOT")
|
||||
|
||||
# check arguments
|
||||
if [[ -n "$3" \
|
||||
&& ( "$1" == "kivy" || "$1" == "qml" ) \
|
||||
&& ( "$1" == "qml" ) \
|
||||
&& ( "$2" == "all" || "$2" == "armeabi-v7a" || "$2" == "arm64-v8a" || "$2" == "x86" || "$2" == "x86_64" ) \
|
||||
&& ( "$3" == "debug" || "$3" == "release" || "$3" == "release-unsigned" ) ]] ; then
|
||||
info "arguments $*"
|
||||
else
|
||||
fail "usage: build.sh <kivy|qml> <arm64-v8a|armeabi-v7a|x86|x86_64|all> <debug|release|release-unsigned>"
|
||||
fail "usage: build.sh <qml|...> <arm64-v8a|armeabi-v7a|x86|x86_64|all> <debug|release|release-unsigned>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
[app]
|
||||
|
||||
# (str) Title of your application
|
||||
title = Electrum
|
||||
|
||||
# (str) Package name
|
||||
package.name = Electrum
|
||||
|
||||
# (str) Package domain (needed for android/ios packaging)
|
||||
package.domain = org.electrum
|
||||
|
||||
# (str) Source code where the main.py live
|
||||
source.dir = .
|
||||
|
||||
# (list) Source files to include (let empty to include all the files)
|
||||
source.include_exts = py,png,jpg,kv,atlas,ttf,txt,gif,pem,mo,vs,fs,json,csv
|
||||
|
||||
# (list) Source files to exclude (let empty to not exclude anything)
|
||||
source.exclude_exts = spec
|
||||
|
||||
# (list) List of directory to exclude (let empty to not exclude anything)
|
||||
source.exclude_dirs = bin, build, dist, contrib,
|
||||
electrum/tests,
|
||||
electrum/gui/qt,
|
||||
electrum/gui/kivy/theming/light,
|
||||
packages/qdarkstyle,
|
||||
packages/qtpy
|
||||
# (list) List of exclusions using pattern matching
|
||||
source.exclude_patterns = Makefile,setup*,
|
||||
# not reproducible:
|
||||
packages/aiohttp-*.dist-info/*,
|
||||
packages/frozenlist-*.dist-info/*
|
||||
|
||||
# (str) Application versioning (method 1)
|
||||
version.regex = APK_VERSION = '(.*)'
|
||||
version.filename = %(source.dir)s/electrum/version.py
|
||||
|
||||
# (str) Application versioning (method 2)
|
||||
#version = 1.9.8
|
||||
|
||||
# (list) Application requirements
|
||||
# note: versions and hashes are pinned in ./p4a_recipes/*
|
||||
requirements =
|
||||
hostpython3,
|
||||
python3,
|
||||
android,
|
||||
openssl,
|
||||
plyer,
|
||||
kivy,
|
||||
libffi,
|
||||
libsecp256k1,
|
||||
cryptography
|
||||
|
||||
# (str) Presplash of the application
|
||||
#presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png
|
||||
presplash.filename = %(source.dir)s/electrum/gui/icons/electrum_presplash.png
|
||||
|
||||
# (str) Icon of the application
|
||||
icon.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_legacy.png
|
||||
icon.adaptive_foreground.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_foreground.png
|
||||
icon.adaptive_background.filename = %(source.dir)s/electrum/gui/icons/android_electrum_icon_background.png
|
||||
|
||||
# (str) Supported orientation (one of landscape, portrait or all)
|
||||
orientation = portrait
|
||||
|
||||
# (bool) Indicate if the application should be fullscreen or not
|
||||
fullscreen = False
|
||||
|
||||
|
||||
#
|
||||
# Android specific
|
||||
#
|
||||
|
||||
# (list) Permissions
|
||||
android.permissions = INTERNET, CAMERA, WRITE_EXTERNAL_STORAGE
|
||||
|
||||
# (int) Android API to use (compileSdkVersion)
|
||||
# note: when changing, Dockerfile also needs to be changed to install corresponding build tools
|
||||
android.api = 30
|
||||
|
||||
# (int) Android targetSdkVersion
|
||||
android.target_sdk_version = 31
|
||||
|
||||
# (int) Minimum API required. You will need to set the android.ndk_api to be as low as this value.
|
||||
android.minapi = 21
|
||||
|
||||
# (str) Android NDK version to use
|
||||
android.ndk = 22b
|
||||
|
||||
# (int) Android NDK API to use (optional). This is the minimum API your app will support.
|
||||
android.ndk_api = 21
|
||||
|
||||
# (bool) Use --private data storage (True) or --dir public storage (False)
|
||||
android.private_storage = True
|
||||
|
||||
# (str) Android NDK directory (if empty, it will be automatically downloaded.)
|
||||
android.ndk_path = /opt/android/android-ndk
|
||||
|
||||
# (str) Android SDK directory (if empty, it will be automatically downloaded.)
|
||||
android.sdk_path = /opt/android/android-sdk
|
||||
|
||||
# (str) ANT directory (if empty, it will be automatically downloaded.)
|
||||
android.ant_path = /opt/android/apache-ant
|
||||
|
||||
# (bool) If True, then skip trying to update the Android sdk
|
||||
# This can be useful to avoid excess Internet downloads or save time
|
||||
# when an update is due and you just want to test/build your package
|
||||
# note(ghost43): probably needed for reproducibility. versions pinned in Dockerfile.
|
||||
android.skip_update = True
|
||||
|
||||
# (bool) If True, then automatically accept SDK license
|
||||
# agreements. This is intended for automation only. If set to False,
|
||||
# the default, you will be shown the license when first running
|
||||
# buildozer.
|
||||
android.accept_sdk_license = True
|
||||
|
||||
# (str) Android entry point, default is ok for Kivy-based app
|
||||
#android.entrypoint = org.renpy.android.PythonActivity
|
||||
|
||||
# (list) List of Java .jar files to add to the libs so that pyjnius can access
|
||||
# their classes. Don't add jars that you do not need, since extra jars can slow
|
||||
# down the build process. Allows wildcards matching, for example:
|
||||
# OUYA-ODK/libs/*.jar
|
||||
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar
|
||||
#android.add_jars = lib/android/zbar.jar
|
||||
|
||||
# (list) List of Java files to add to the android project (can be java or a
|
||||
# directory containing the files)
|
||||
android.add_src = electrum/gui/kivy/data/java-classes/
|
||||
|
||||
android.gradle_dependencies = me.dm7.barcodescanner:zxing:1.9.8
|
||||
|
||||
android.add_activities = org.electrum.qr.SimpleScannerActivity
|
||||
|
||||
# (str) python-for-android branch to use, if not master, useful to try
|
||||
# not yet merged features.
|
||||
#android.branch = master
|
||||
|
||||
# (str) OUYA Console category. Should be one of GAME or APP
|
||||
# If you leave this blank, OUYA support will not be enabled
|
||||
#android.ouya.category = GAME
|
||||
|
||||
# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
|
||||
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
|
||||
|
||||
# (str) XML file to include as an intent filters in <activity> tag
|
||||
android.manifest.intent_filters = contrib/android/bitcoin_intent.xml
|
||||
|
||||
# (str) launchMode to set for the main activity
|
||||
android.manifest.launch_mode = singleTask
|
||||
|
||||
# (list) Android additionnal libraries to copy into libs/armeabi
|
||||
#android.add_libs_armeabi = lib/android/*.so
|
||||
|
||||
# (bool) Indicate whether the screen should stay on
|
||||
# Don't forget to add the WAKE_LOCK permission if you set this to True
|
||||
#android.wakelock = False
|
||||
|
||||
# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
|
||||
# note: can be overwritten by APP_ANDROID_ARCH env var
|
||||
#android.arch = armeabi-v7a
|
||||
|
||||
# (int) overrides automatic versionCode computation (used in build.gradle)
|
||||
# this is not the same as app version and should only be edited if you know what you're doing
|
||||
# android.numeric_version = 1
|
||||
|
||||
# (list) Android application meta-data to set (key=value format)
|
||||
#android.meta_data =
|
||||
|
||||
# (list) Android library project to add (will be added in the
|
||||
# project.properties automatically.)
|
||||
#android.library_references =
|
||||
|
||||
android.whitelist = lib-dynload/_csv.so
|
||||
|
||||
# (bool) enables Android auto backup feature (Android API >=23)
|
||||
android.allow_backup = False
|
||||
|
||||
#
|
||||
# Python for android (p4a) specific
|
||||
#
|
||||
|
||||
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
||||
p4a.source_dir = /opt/python-for-android
|
||||
|
||||
# (str) The directory in which python-for-android should look for your own build recipes (if any)
|
||||
p4a.local_recipes = %(source.dir)s/contrib/android/p4a_recipes/
|
||||
|
||||
# (str) Filename to the hook for p4a
|
||||
#p4a.hook =
|
||||
|
||||
# (str) Bootstrap to use for android builds
|
||||
# p4a.bootstrap = sdl2
|
||||
|
||||
# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
|
||||
#p4a.port =
|
||||
|
||||
|
||||
#
|
||||
# iOS specific
|
||||
#
|
||||
|
||||
# (str) Name of the certificate to use for signing the debug version
|
||||
# Get a list of available identities: buildozer ios list_identities
|
||||
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"
|
||||
|
||||
# (str) Name of the certificate to use for signing the release version
|
||||
#ios.codesign.release = %(ios.codesign.debug)s
|
||||
|
||||
|
||||
|
||||
[buildozer]
|
||||
|
||||
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
|
||||
log_level = 2
|
||||
|
||||
# (str) Path to build output (i.e. .apk, .ipa) storage
|
||||
bin_dir = ./dist
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# List as sections
|
||||
#
|
||||
# You can define all the "list" as [section:key].
|
||||
# Each line will be considered as a option to the list.
|
||||
# Let's take [app] / source.exclude_patterns.
|
||||
# Instead of doing:
|
||||
#
|
||||
# [app]
|
||||
# source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
|
||||
#
|
||||
# This can be translated into:
|
||||
#
|
||||
# [app:source.exclude_patterns]
|
||||
# license
|
||||
# data/audio/*.wav
|
||||
# data/images/original/*
|
||||
#
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Profiles
|
||||
#
|
||||
# You can extend section / key with a profile
|
||||
# For example, you want to deploy a demo version of your application without
|
||||
# HD content. You could first change the title to add "(demo)" in the name
|
||||
# and extend the excluded directories to remove the HD content.
|
||||
#
|
||||
# [app@demo]
|
||||
# title = My Application (demo)
|
||||
#
|
||||
# [app:source.exclude_patterns@demo]
|
||||
# images/hd/*
|
||||
#
|
||||
# Then, invoke the command line with the "demo" profile:
|
||||
#
|
||||
# buildozer --profile demo android debug
|
||||
@@ -61,7 +61,6 @@ requirements =
|
||||
libzbar
|
||||
|
||||
# (str) Presplash of the application
|
||||
#presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png
|
||||
presplash.filename = %(source.dir)s/electrum/gui/icons/electrum_presplash.png
|
||||
|
||||
# (str) Icon of the application
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
from pythonforandroid.recipes.kivy import KivyRecipe
|
||||
|
||||
|
||||
assert KivyRecipe.depends == ['sdl2', 'pyjnius', 'setuptools', 'python3']
|
||||
assert KivyRecipe.python_depends == ['certifi']
|
||||
|
||||
|
||||
class KivyRecipePinned(KivyRecipe):
|
||||
# kivy master 2020-12-10 (2.0.0 plus a few bugfixes)
|
||||
version = "2debbc3b1484b14824112986cb03b1072a60fbfc"
|
||||
sha512sum = "6cabb77860e63059ab4b0663b87f6396fa9133839b42db754628fc9a55f10b8d759466110e0763fd8dac40a49a03af276cb93b05076471d12db796e679f33d1d"
|
||||
|
||||
# mv "python_depends" into "depends" to ensure we can control what versions get installed
|
||||
depends = [*KivyRecipe.depends, *KivyRecipe.python_depends]
|
||||
python_depends = []
|
||||
|
||||
|
||||
recipe = KivyRecipePinned()
|
||||
@@ -1,19 +0,0 @@
|
||||
import os
|
||||
|
||||
from pythonforandroid.recipes.sdl2 import LibSDL2Recipe
|
||||
from pythonforandroid.util import load_source
|
||||
|
||||
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
|
||||
|
||||
|
||||
assert LibSDL2Recipe._version == "2.0.9"
|
||||
assert LibSDL2Recipe.depends == ['sdl2_image', 'sdl2_mixer', 'sdl2_ttf']
|
||||
assert LibSDL2Recipe.python_depends == []
|
||||
|
||||
|
||||
class LibSDL2RecipePinned(util.InheritedRecipeMixin, LibSDL2Recipe):
|
||||
md5sum = None
|
||||
sha512sum = "a78a4708b2bb5b35a7c7b7501eb3bd60a9aa3bb95a3d84e57763df4a377185e7312a94b66321eef7ca0d17255e4b402fc950e83ef0dbbd08f14ff1194107dc10"
|
||||
|
||||
|
||||
recipe = LibSDL2RecipePinned()
|
||||
@@ -1,18 +0,0 @@
|
||||
import os
|
||||
|
||||
from pythonforandroid.recipes.sdl2_image import LibSDL2Image
|
||||
from pythonforandroid.util import load_source
|
||||
|
||||
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
|
||||
|
||||
|
||||
assert LibSDL2Image._version == "2.0.4"
|
||||
assert LibSDL2Image.depends == []
|
||||
assert LibSDL2Image.python_depends == []
|
||||
|
||||
|
||||
class LibSDL2ImageRecipePinned(util.InheritedRecipeMixin, LibSDL2Image):
|
||||
sha512sum = "7320a5c9111908d402fbb0c12a49eb359a6db645c0c86839793ebb1a5b75eaca7c85eb96851f3a0b4a68a2f06363c8189555afd4f1048a4a41447370eddd7e6a"
|
||||
|
||||
|
||||
recipe = LibSDL2ImageRecipePinned()
|
||||
@@ -1,18 +0,0 @@
|
||||
import os
|
||||
|
||||
from pythonforandroid.recipes.sdl2_mixer import LibSDL2Mixer
|
||||
from pythonforandroid.util import load_source
|
||||
|
||||
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
|
||||
|
||||
|
||||
assert LibSDL2Mixer._version == "2.0.4"
|
||||
assert LibSDL2Mixer.depends == []
|
||||
assert LibSDL2Mixer.python_depends == []
|
||||
|
||||
|
||||
class LibSDL2MixerPinned(util.InheritedRecipeMixin, LibSDL2Mixer):
|
||||
sha512sum = "98c56069640668aaececa63748de21fc8f243c7d06386c45c43d0ee472bbb2595ccda644d9886ce5b95c3a3dee3c0a96903cf9a89ddc18d38f041133470699a3"
|
||||
|
||||
|
||||
recipe = LibSDL2MixerPinned()
|
||||
@@ -1,18 +0,0 @@
|
||||
import os
|
||||
|
||||
from pythonforandroid.recipes.sdl2_ttf import LibSDL2TTF
|
||||
from pythonforandroid.util import load_source
|
||||
|
||||
util = load_source('util', os.path.join(os.path.dirname(os.path.dirname(__file__)), 'util.py'))
|
||||
|
||||
|
||||
assert LibSDL2TTF._version == "2.0.15"
|
||||
assert LibSDL2TTF.depends == []
|
||||
assert LibSDL2TTF.python_depends == []
|
||||
|
||||
|
||||
class LibSDL2TTFPinned(util.InheritedRecipeMixin, LibSDL2TTF):
|
||||
sha512sum = "30d685932c3dd6f2c94e2778357a5c502f0421374293d7102a64d92f9c7861229bf36bedf51c1a698b296a58c858ca442d97afb908b7df1592fc8d4f8ae8ddfd"
|
||||
|
||||
|
||||
recipe = LibSDL2TTFPinned()
|
||||
Reference in New Issue
Block a user