1
0
Commit Graph

68 Commits

Author SHA1 Message Date
Sander van Grieken
1ac885ea40 qml: add android permission methods in AppController 2025-04-03 12:37:17 +02:00
SomberNight
571acf71fe android: update p4a ref
- to include 0ab0d872e6
  > recipes: add patches for python3 recipes, for reproducible .pyc generation
  This should fix build repro of the apk.
2024-10-15 23:37:57 +00:00
SomberNight
071150f465 android: update p4a ref
- to include d4432ec8d0
    see https://github.com/spesmilo/electrum/issues/9215#issuecomment-2403072217
- and add a fixme to revisit apkdiff re horrors beyond my comprehension
2024-10-10 18:39:42 +00:00
SomberNight
d1de29513f android build: use spesmilo/ fork of p4a and buildozer
- fdroid maintainers asked that releases use fixed forks of p4a and buildozer,
  so now we use the newly created forks in the spesmilo org. I plan to keep using
  my existing contributor-specific repos for development, but whatever we push
  to electrum master, should use the new spesmilo/ forks.
  see https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15858#note_2136345746
  - Also, I added branch protection rules for branches named "electrum_*", so if
    we name the branches that are actually used in releases as such, we won't
    accidentally force-push them. (ref https://github.com/spesmilo/electrum/issues/8162)
    I think we can just create a new branch whenever we would want to force-push
    the existing one.
- also factored out some parameters so that it is easier to programmatically
  access them from the fdroid build script.
  see https://gitlab.com/fdroid/fdroiddata/-/merge_requests/15858#note_2136094409
2024-10-02 17:27:17 +00:00
SomberNight
7e532ec995 android build: add own logic to calculate versionCode
Use our own logic to go from ELECTRUM_VERSION to numeric android versionCode,
instead of using the default conversion done by python-for-android.

Even before this, we were already patching p4a to modify their logic (see [0]).
This commit changes that logic again, and moves it into a separate script in our repo.
- calculation change is due to the f-droid maintainers asking for the
  arch code to be in the least significant digits (instead of most sig digits) (see [1])

I have pushed and changed to a new p4a branch, which is just a copy of the previous one
with 3 commits related to versionCode calc squashed.

[0]: edb7e4fe6d
[1]: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2380559324
2024-09-30 19:51:28 +00:00
SomberNight
2c6e768c8d android: update p4a ref
to have 58d21ad89b
> reproducible apks: strip file path prefix from .pyc files

related: https://github.com/spesmilo/electrum/issues/9215
2024-09-26 18:27:52 +00:00
SomberNight
cfb53e4880 android build: bump python version (3.8.18->3.10.14)
cffi also had to be updated for this, and corresponding commit backported from upstream p4a
2024-04-18 17:17:49 +00:00
SomberNight
8677a91dce android: update p4a ref
to have 04e80084eb
> recipe: libsecp256k1: enable modules for schnorr sigs
2024-04-11 15:25:37 +00:00
Sander van Grieken
b84a7508a3 android: p4a ref 0c507ead85
PythonActivity.setSecureWindow: don't redraw after clearing FLAG_SECURE
2024-02-22 10:15:51 +01:00
Sander van Grieken
6738e1e90f p4a: python-for-android ref 4f1a1a3a41f6bf8d28984bfd1ec8af3c5d8eb362
> qt6: replace synchronizedList with explicit synchronize block, as we still see ConcurrentModificationExceptions
  in the play store.
2024-02-07 12:08:10 +01:00
Sander van Grieken
a8dc27ef4c android: buildozer ref 4403ecf445f10b5fbf7c74f4621bf2b922ad35b5
buildozer didn't pass android target_sdk_version from spec file
2024-01-13 01:15:52 +01:00
SomberNight
11764f9a79 android build: make apt less quiet, for more feedback about progress 2024-01-10 20:49:18 +00:00
SomberNight
0a6283b1ef build: bump zbar version in win/mac/android builds
- new version (0.23.93) fixes a security issue
  bb05ec54ee/ChangeLog (L5)
2024-01-10 20:46:38 +00:00
Sander van Grieken
3935e378b3 android: p4a ref d976b539dc7c808d103a7edfe6dc1fd300582a89
> don't keep build dir around after succesful build
2023-12-29 16:16:07 +01:00
Sander van Grieken
c1ebc42724 android: p4a ref f534fe9bcd692c4df97e644d34c5bd8acede01eb
> qt6: don't copy entire build tree to dist, use select set of include patterns.
2023-12-29 13:58:46 +01:00
SomberNight
bf4934bb9f android build: update p4a fork with qt6 build repro fixes
related https://github.com/spesmilo/electrum/issues/8746
2023-12-16 09:05:28 +00:00
xiaolou86
00c584d557 contrib: fix typos 2023-12-04 14:15:38 +08:00
Sander van Grieken
58ff76adcf android: correctly describe buildozer branch used 2023-11-07 10:32:09 +01:00
Sander van Grieken
32c1915de4 qml: restore Send/ScanDialog for desktop/dev, keeping qr scan Activity for android only.
Also use stable R package, regardless of APP_PACKAGE_DOMAIN used in build.
2023-11-07 10:17:10 +01:00
SomberNight
5c3e14d8de qml: replace Send/ScanDialog with java bases zxing qr scan activity. 2023-11-07 10:17:10 +01:00
Sander van Grieken
b9ab0f63ef qt6: update buildozer ref to ce4f2257249fdf4ff1f4cb8983fd7ac44174a274 2023-11-07 10:17:10 +01:00
Sander van Grieken
bf6163b4f8 android: update p4a ref to 3b3733dbf5f461e197ba83887ac0d3b6d0f1c396
buildozer ref to 698b48136c55b2495128207c5e98dccc128bb6c2
2023-11-07 10:09:51 +01:00
Sander van Grieken
770a32cf6a qt6: update recipe pins, NDK, SDK, Ant, use venv for buildozer/p4a, add tomli recipe 2023-11-07 10:09:51 +01:00
Sander van Grieken
16d3db95ab qt6: update android build container to bookworm 2023-11-07 10:09:51 +01:00
Sander van Grieken
0672ea20ab qml: implement toggle for android SECURE_FLAG and add marker to wizard pages
that should be secured.
2023-05-02 15:16:51 +02:00
Sander van Grieken
2fc9ee5c51 p4a: fix for Qt5 accessibility bug
see 087fc3c583
2023-04-24 11:29:26 +02:00
Sander van Grieken
b40794014d android: exclude more unneeded files in qml resource bundle generation 2023-04-06 11:42:06 +02:00
SomberNight
0e5464ca13 android build: enable asserts, and add sanity-check for it
Note that 0f541be6f1 added a warning log if asserts are disabled.
It is intentional that these two things are in separate files:
We always want to log that warning, even if someone is using electrum as a library.
However, in that latter case, I think it's fine not to sys.exit(), but leave the decision up to the library user.

Similar thinking when running from source: let's log the warning but don't sys.exit().
2023-03-31 16:24:14 +00:00
Sander van Grieken
aaff7502db android: update P4A to 3c2750795ba93aa1a3e513a13c2ea2ac5bddba17
remove qt5 patch to disable avx/avx2 for x86_64 arch
2023-03-23 17:00:08 +01:00
ghost43
27bc0bb552 Merge pull request #8267 from SomberNight/202303_build_userid1000
build: docker scripts to work even if host user id != 1000
2023-03-21 17:54:29 +00:00
Sander van Grieken
1176552132 android: upgrade to Qt 5.15.7, PyQt5 5.15.9 2023-03-21 12:41:20 +01:00
Sander van Grieken
c9df290301 android: update P4A to 8589243afb48fdb116d791dc5b3973382e83273f
include Qt Virtual Keyboard libraries and associated QtQuick components
2023-03-20 13:15:03 +01:00
SomberNight
6e472efd5f build: follow-up prev: only use host userid for local dev builds
reproducibility probably needs a hardcoded userid

Also, move the UID arg later in the dockerfiles, for better caching.
(if local dev build and repro build set different UIDs, the build caches
will diverge at that step)
2023-03-20 02:06:54 +00:00
Sander van Grieken
ab073827cf build: use uid of user building the build containers 2023-03-20 02:06:50 +00:00
Sander van Grieken
a5485e5f68 android: use material dark style for splashscreen action bar 2023-03-06 12:03:25 +01:00
Sander van Grieken
d2883e19ac android: qt5 activity inhibit screenshots 2023-03-06 11:11:08 +01:00
Sander van Grieken
65abb90049 build: update build container base image versions, update apt sources to current 2023-02-27 11:16:04 +01:00
Sander van Grieken
5426411f99 android: include p4a cherry-pick 70fa6ddd040dc14f3cb28ebc2cfc5779c5cc5342,
avoid sh>=2
2023-02-27 10:57:12 +01:00
SomberNight
ccc0b5daa2 build: don't force-push git branches needed for historical builds
closes https://github.com/spesmilo/electrum/issues/8162
2023-01-24 15:06:31 +00:00
Sander van Grieken
3129fdb358 also build android x86_64 arch. update python-for-android to include x86_64 qt5 patch. 2023-01-06 10:44:48 +01:00
Sander van Grieken
9704dab68b qml: remove qml splash, update python-for-android with splash support.
main.qml now shows black cover that fades out when app is ready.
2023-01-05 20:09:14 +01:00
Sander van Grieken
6a1f19fd86 update python-for-android to electrum_20210421d fb8f6fc44ef7465500c534186b0aba2a5e4ddc15
includes fixes for nativeSetenv
2023-01-05 14:06:42 +01:00
Sander van Grieken
acde8cd0b7 add apt --allow-downgrades in more places.
build sdist also from debian bullseye container
2022-11-06 10:55:10 +01:00
Sander van Grieken
c0772019f1 rerun freeze_container_distro.sh and update docker base images for debian buster and bullseye 2022-11-06 10:42:39 +01:00
Sander van Grieken
49037ecc85 qml: handle bitcoin: and lightning: uri intents 2022-10-18 18:31:59 +02:00
SomberNight
6d01dbcc5c android build: "req..-build-android.txt" to only use source pkgs 2022-10-14 17:59:18 +00:00
SomberNight
0efc8815a4 android build: bump targetSdkVersion from 30 to 31
The google play store will require 31, starting 2022-11 (next month).
A few commits are cherry-picked onto our forks of p4a and buildozer
from upstream, but the forks are not rebased.

Note that the compileSdkVersion is kept at 30,
only the targetSdkVersion is bumped 30->31.

closes https://github.com/spesmilo/electrum/pull/8010

I am trying to upstream some relevant p4a and buildozer changes
in e.g. https://github.com/kivy/python-for-android/pull/2686
2022-10-14 15:56:33 +00:00
SomberNight
1789778673 android build: p4a to build pyqt5 using "hostpython" instead of sys py
The current system python in the docker baseimage is py3.9, while the
targetpython and hostpython built by p4a are py3.8, and this was causing
linker issues in the pyqt5 build.
It is also cleaner IMHO to have p4a handle what is needed for a recipe
instead of assuming it is available in the system. (and I think this is
how other existing recipes work)

fixes https://github.com/spesmilo/electrum/issues/8016
2022-10-14 15:52:33 +00:00
SomberNight
65fda1f41d android build: fix Dockerfile "COPY" instructions
The build context is $PROJECT_ROOT
2022-08-22 12:47:35 +00:00
Sander van Grieken
46d76f0504 android: adapt Dockerfile to use debian bullseye base 2022-08-22 12:47:26 +00:00