1
0
Commit Graph

42 Commits

Author SHA1 Message Date
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
SomberNight
bc88e1c328 android build: (qml) bump p4a commit
to include single new commit c6e39ae1fb
2022-07-08 16:37:01 +02:00
Sander van Grieken
c656b02319 update tip pthon-for-android qt5-wip 2022-07-07 18:30:16 +02:00
Sander van Grieken
8d57129ad6 p4a: update commit ref to head of qt5-wip (fixes cpu count used for build) 2022-06-30 21:23:41 +02:00
SomberNight
98d32f41d5 build: (reproducibility) always uses "pip install" with "--no-build-isolation"
fixes https://github.com/spesmilo/electrum/issues/7737
fixes https://github.com/spesmilo/electrum/issues/7736
related 8559d1eb72
2022-03-26 02:45:47 +01:00
SomberNight
b1b17029f1 android build: bump targetSdkVersion to 30
This is the new minimum the google play store requires.

note: the newer android command-line tools use a tiny bit different paths,
hence the `mv "${ANDROID_SDK_HOME}/cmdline-tools" "${ANDROID_SDK_HOME}/tools"` rename
see https://github.com/kivy/python-for-android/issues/2540
2022-03-14 16:50:10 +01:00
ThomasV
d91a4da557 Add Qt5/QML building framework to contrib/android:
- update requirements file for building PyQt5
 - use separate .buildozer directories for qml and Kivy
 - add GUI and ARCH parameters to android/build.sh
2022-03-08 17:21:31 +01:00
SomberNight
0df8392c86 build: rm need for sudo in most places; and do not run as root
This includes two logically separate changes:
- on the host, try not to require sudo when running the build scripts
    - namely when interacting with the docker daemon, this requires
      the unix user on the host to be part of the `docker` group
    - this solves part of https://github.com/spesmilo/electrum/issues/7602
- while running inside the docker containers, do not run as root
    - this means that e.g. files created in mounted folders should
      no longer be owned by root on the host
    - there is some code duplication involved here - not sure
      how it could be deduped.
2022-03-03 19:24:18 +01:00
SomberNight
8559d1eb72 build: android reprod: "pip install" needs "--no-build-isolation"
maybe fixes https://github.com/spesmilo/electrum/issues/7640

Looks like by default pip is ignoring the locally available setuptools and wheel,
and downloading the latest ones from the internet at build time...

https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/?highlight=no-build-isolation#disabling-build-isolation
https://stackoverflow.com/a/62889268

> When making build requirements available, pip does so in an isolated environment. That is, pip does not install those requirements into the user’s site-packages, but rather installs them in a temporary directory which it adds to the user’s sys.path for the duration of the build. This ensures that build requirements are handled independently of the user’s runtime environment. For example, a project that needs a recent version of setuptools to build can still be installed, even if the user has an older version installed (and without silently replacing that version).
>
> In certain cases, projects (or redistributors) may have workflows that explicitly manage the build environment. For such workflows, build isolation can be problematic. If this is the case, pip provides a --no-build-isolation flag to disable build isolation. Users supplying this flag are responsible for ensuring the build environment is managed appropriately (including ensuring that all required build dependencies are installed).

If only it were that easy!
If we add the "--no-build-isolation" flag, it becomes our responsibility to install *all* build time deps,
hence we now have "requirements-build-makepackages.txt".
2022-01-22 14:49:35 +01:00
JeremyRand
b1c4bb8914 Add Cirrus CI (#7431)
* Cirrus: Add Tox task

* Cirrus: Add Locale task

* Cirrus: Add Flake8 Task

* Cirrus: Add Regtest task

* Regtest: Flush stdout

Allows viewing output sooner.

* Regtest: Read process.stdout in text mode

Improves ability to quickly see output.

* Cirrus: Add Windows task

* Cirrus: Add Android task

* Cirrus: Add macOS task

* Cirrus: Add AppImage task

* Cirrus: Add tarball task

* Cirrus: Add Submodules task

* Android: remove superfluous cp/rm

* Add .dockerignore

Symlink to .gitignore.
2021-09-13 16:20:54 +00:00
SomberNight
3c9346cce2 android build: attempt at reproducible builds 2021-06-09 18:34:09 +02:00
SomberNight
bb381a263a android build: update p4a/buildozer to latest upstream
Rebased our branches on latest p4a develop HEAD and buildozer master HEAD.

Re `android.allow_backup = False` in buildozer.spec, now that this setting
has been exposed to buildozer.spec (see https://github.com/kivy/buildozer/pull/1206),
we could finally drop a commit from our branch that did the same:
7a7d415d90

Re commenting out `android.arch` in buildozer.spec, we are setting this
via the ENV VAR in make_apk.
2021-04-21 20:04:37 +02:00
SomberNight
3d9798757d android: update app icon; use "adaptive icons" on API 26+
see https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

p4a and buildozer had to be patched for this; I will try to upstream the patches, see:
https://github.com/kivy/python-for-android/pull/2446
https://github.com/kivy/buildozer/pull/1312
2021-04-08 13:33:41 +02:00
SomberNight
6f105ae43b android build: bump targetSdkVersion to 29 (follow-up)
follow-up: 59e9337be0

For some reason, without this change, the first build works but subsequent builds fail.
Not sure what the cause is. This is why Travis builds work.
2020-11-18 20:22:13 +01:00
ghost43
da4f11dbd3 android build: update list of apt deps for buildozer (#6645)
compare https://github.com/kivy/buildozer/blob/0.39/docs/source/installation.rst
and https://github.com/kivy/buildozer/blob/1.2.0/docs/source/installation.rst
2020-10-13 16:31:53 +00:00
SomberNight
da4edc8f74 android: fix back button not working (main surface loses focus)
fixes #6276
2020-07-03 16:10:36 +02:00
SomberNight
528c8c674c android build: update p4a, buildozer, base ubuntu
also, pull in upstream p4a dockerfile changes
https://github.com/kivy/python-for-android/pull/2231
https://github.com/kivy/python-for-android/pull/2218
2020-07-01 03:11:52 +02:00
SomberNight
f5f3394552 git sanity: enforce "git checkout commithash" actually pulls commit
If there is a collision between a branch name and a commit hash, git
will choose the branch, even if the full 40-hex-long commit hash is
given. GitHub disallows branches/tags with such a name but git itself
does not. By adding the `^{commit}` syntax sugar after a ref name,
we can tell git that we want the commit hash to be preferred,
and hence we don't need to trust GitHub (only git).

see https://security.stackexchange.com/questions/225411/
2020-06-16 19:55:17 +02:00
ThomasV
485422b072 move android stuff to contrib/android 2020-06-12 20:57:22 +02:00