1
0
Commit Graph

93 Commits

Author SHA1 Message Date
SomberNight
31b176169a contrib: mv locale-related scripts to contrib/locale/ 2025-04-14 17:18:37 +00:00
SomberNight
1144d9b8ea build: add script build_cleanlocale.sh 2025-04-14 17:18:34 +00:00
SomberNight
3567a4cfb0 mv git submodule electrum-locale from contrib to electrum/locale
- this merges `contrib/deterministic-build/locale` and `electrum/locale`
- it is now once again possible have translations when running from a local git clone
    - which was already possible in the past before crowdin removed their unauthenticated APIs
        - see https://github.com/spesmilo/electrum/issues/9531
    - however, the translations available are the often-old frozen strings from electrum-locale
        - while previously one could just download the latest strings from crowdin
2025-04-14 17:18:30 +00:00
SomberNight
269a240fb9 build: partial rerun freeze_packages
update electrum-aionostr, aiorpcx, and aiohttp (and friends)
2025-04-01 16:59:22 +00:00
SomberNight
f35437f03c build: set ELECTRUM_ECC_DONT_COMPILE=1, instead manually build lib
Haven't checked if electrum-ecc compiles libsecp reproducibly.
For now let's just keep the old flow.
(but if we spent time on making that compilation reproducible,
the appimage and the macos builds could use it directly)
2024-10-10 15:46:18 +00:00
ThomasV
9dbbd815a3 build scripts: add libsecp256k1 library to the electrum_ecc directory 2024-10-10 15:46:07 +00:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight
d46e724816 win/mac build: bump pyinstaller (5.13.2->6.6.0) 2024-04-19 13:07:39 +00:00
SomberNight
1451ec936a win/mac build: fix pyinstaller missing libsecp during part of Analysis
```
602 WARNING: Failed to collect submodules for 'pkg_resources._vendor.pyparsing.diagram' because importing 'pkg_resources._vendor.pyparsing.diagram' raised: ModuleNotFoundError: No module named 'railroad'
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll'(or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one ofits dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
5921 WARNING: collect_data_files - skipping data collection for module 'electrum.plugins' as it is not a package.
```
2023-11-30 13:43:54 +00:00
SomberNight
9b14b87936 win build: tighten pip install with --no-binary somewhat
related https://github.com/spesmilo/electrum/pull/7918
2023-06-02 23:12:36 +00:00
SomberNight
e455677284 win build: bump pyinstaller (4.10->5.11)
In `build-electrum-git.sh`, the `-w` CLI arg is removed: it was apparently ignored as we are using a .spec file,
and pyinstaller 5.0+ is now raising a hard error (see https://github.com/pyinstaller/pyinstaller/issues/6660).
```
option(s) not allowed:
  --console/--nowindowed/--windowed/--noconsole
makespec options not valid when a .spec file is given
```

-----

In ecc_fast.py, we don't sys.exit() anymore as pyinstaller 5.0+ tries to import electrum during the Analysis phase.
see https://github.com/pyinstaller/pyinstaller/pull/6171

```
57912 INFO: Looking for dynamic libraries
1746 INFO: gettext setting initial language to None
1932 ERROR: libsecp256k1 library failed to load. exceptions: [FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-2.dll' (or one of its depende
ncies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-1.dll' (or one of its dependenc
ies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'C:\\python3\\lib\\site-packages\\electrum\\libsecp256k1-0.dll' (or one of its dependencie
s). Try using the full path with constructor syntax."), FileNotFoundError("Could not find module 'libsecp256k1-2.dll' (or one of its dependencies). Try using the full path with constructor
syntax."), FileNotFoundError("Could not find module 'libsecp256k1-1.dll' (or one of its dependencies). Try using the full path with constructor syntax."), FileNotFoundError("Could not find
module 'libsecp256k1-0.dll' (or one of its dependencies). Try using the full path with constructor syntax.")]
Traceback (most recent call last):
  File "C:\python3\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\python3\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\python3\scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
    run()
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\python3\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 1006, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 928, in build
    exec(code, spec_namespace)
  File "deterministic.spec", line 55, in <module>
    a = Analysis([home+'run_electrum',
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 428, in __init__
    self.__postinit__()
  File "C:\python3\lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 736, in assemble
    isolated.call(find_binary_dependencies, self.binaries, self.binding_redirects, collected_packages)
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_parent.py", line 372, in call
    return isolated.call(function, *args, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_parent.py", line 302, in call
    raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to find_binary_dependencies() failed with:
  File "C:\python3\lib\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command
    output = function(*args, **kwargs)
  File "C:\python3\lib\site-packages\PyInstaller\building\build_main.py", line 177, in find_binary_dependencies
    __import__(package)
  File "C:\python3\lib\site-packages\electrum\__init__.py", line 20, in <module>
    from .wallet import Wallet
  File "C:\python3\lib\site-packages\electrum\wallet.py", line 53, in <module>
    from .bip32 import BIP32Node, convert_bip32_intpath_to_strpath, convert_bip32_strpath_to_intpath
  File "C:\python3\lib\site-packages\electrum\bip32.py", line 11, in <module>
    from . import constants
  File "C:\python3\lib\site-packages\electrum\constants.py", line 30, in <module>
    from . import bitcoin
  File "C:\python3\lib\site-packages\electrum\bitcoin.py", line 35, in <module>
    from . import ecc
  File "C:\python3\lib\site-packages\electrum\ecc.py", line 39, in <module>
    from .ecc_fast import _libsecp256k1, SECP256K1_EC_UNCOMPRESSED
  File "C:\python3\lib\site-packages\electrum\ecc_fast.py", line 151, in <module>
    sys.exit(f"Error: Failed to load libsecp256k1.")
SystemExit: Error: Failed to load libsecp256k1.
🗯 ERROR: build-electrum-git failed
```

Also, the -OO flag is removed from wine python, for similar reasons:
pyinstaller imports electrum, and in electrum/__init__.py, we raise
if -O is used: 9b1fb0e5fe/electrum/__init__.py (L40)
2023-06-02 22:37:43 +00:00
accumulator
d51ee07a81 use debian makensis instead of windows makensis executable through wine (#8057) 2022-11-04 20:31:01 +00:00
SomberNight
b5900eae98 contrib: reformat most shell scripts
Mostly just indentations.
For consistency, to conform to .editorconfig.
2022-09-27 14:55:22 +00:00
SomberNight
b3e869a5de build win/mac: do not pass custom args to pyinstaller; use envvars
custom args no longer work with pyinstaller 5.0 (see https://github.com/pyinstaller/pyinstaller/issues/6762 )

```
option(s) not allowed:
  ...
makespec options not valid when a .spec file is given
```
2022-08-29 15:22:43 +00:00
SomberNight
c2b5e3ec15 build: use build-locale.sh in all build scripts 2022-08-16 19:06:47 +00:00
SomberNight
87904e2c7e win build: force using source dist for some of our python dependencies
Instead of using pre-built binary wheels from PyPI.
We should tighten this more (re other requirements-*.txt files),
but there is no C compiler available inside the wine environment atm...
2022-08-06 06:43:31 +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
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
659c00e06b mac build: don't create __pycache__ folders
The .pyc files would get created when a .py module is imported,
which is done during the build for some source files by pyinstaller
(when it analyses imports).

I considered setting PYTHONDONTWRITEBYTECODE=1 in build_tools_util.sh,
to apply to all builds, but am not sure how it would affect the Android build,
where we actually want .pyc files included in the apk.
2021-07-12 18:07:31 +02:00
SomberNight
c23fca37d4 build: clarify which locale files are included
related: 2cb4e56be3
2021-03-31 17:00:39 +02:00
SomberNight
41233a4bc7 windows build: minor clean-up 2021-03-07 22:58:44 +01:00
SomberNight
dded25f398 windows build: cache pip downloads 2021-03-07 22:12:26 +01:00
SomberNight
b0230f6a4b build: fix win/appimage binaries following jsonrpc dep-removal
follow-up #6220
2020-06-11 05:37:52 +02:00
SomberNight
4cec098d2d build: create a standalone build script for libsecp256k1
heavily based on Electron-Cash/Electron-Cash@eda015908e
2020-02-11 16:48:24 +01:00
SomberNight
b560bc92cc windows build: maybe fix reproducibility (jsonschema-*.dist-info) 2020-01-22 16:28:51 +01:00
SomberNight
7c090f92ce binaries: use "--no-dependencies" option for pip install
All (incl indirect) dependencies are already listed in deterministic-build/requirements*.txt.
This option makes it easier to manually rm a dependency from that list for e.g. testing.
2020-01-10 19:01:32 +01:00
SomberNight
c8e2653690 wine build: pin build dependencies
"pip install pyinstaller" was "silently" grabbing unpinned dependencies
2019-08-09 19:05:32 +02:00
SomberNight
61bf5ce59a windows build: calculate COFF checksum ourselves
closes #5504
2019-07-10 23:44:51 +02:00
Axel Gembe
dcecf7db4b Wine Build: Make it less noisy
This suppresses the pip script location warnings, like we already
do for AppImage. It also disables the Wine debugging messages by
setting WINEDEBUG=-all.

-----

taken from Electron-Cash/Electron-Cash@d3685b038e
2019-07-04 22:32:51 +02:00
SomberNight
5ed6a68d8c update make_locale doc references, and small nits 2019-07-03 17:42:40 +02:00
SomberNight
423d44bcaf build-wine: some clean-up. cache downloads. better status messages 2019-07-01 20:18:30 +02:00
SomberNight
31ba440d1c build-wine: print some text before "pip install" 2019-06-23 03:09:05 +02:00
SomberNight
add3b36f32 build: replace remaining "python setup.py install" with "pip install" 2019-02-02 08:07:48 +01:00
SomberNight
16bac5fd73 rm qt icons file
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons

based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
SomberNight
3ca1b710d6 build: use sha256sum instead of md5sum 2019-01-31 17:01:00 +01:00
SomberNight
762082e13d wine build: dedupe PYTHON_VERSION 2018-12-09 07:17:37 +01:00
Filip Gospodinov
f05f3b430a build-wine: fix locale path
`$i` already contains `locale/`.
2018-09-14 14:37:14 +02:00
ThomasV
96fb75ffc6 Merge pull request #4685 from toxeus/locale
build-wine: avoid untracked changes in submodule
2018-09-06 17:59:25 +02:00
Filip Gospodinov
6c7bfe613f contrib: remove git describe workaround (#4683)
`git describe` fails if no tag can be found, leading
to the whole build script to fail. This is not always
desired. To prevent `git describe` from failing in
this case the `--always` flag can be passed which
causes a short commit hash to be output when a tag
is not present.
2018-09-04 22:32:46 +02:00
Filip Gospodinov
9220545e60 build-wine: avoid untracked changes in submodule
The locale output file can simply be output in the folder
where it's actually needed. This also saves a recursive copy.

This makes `.gitignore` in the electrum-locale submodule
obsolete.
2018-09-04 16:53:53 +02:00
SomberNight
cb6bde49b4 fix some wine build failures on branches/forks 2018-07-19 14:36:30 +02:00
ThomasV
88eb2390e6 Merge branch 'master' into docker 2018-07-15 11:13:51 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00
SomberNight
5d462f9555 win binaries: bump python version to 3.6.6 2018-07-12 18:33:43 +02:00
Filip Gospodinov
73fee2fefa build-wine: allow local testing
Before, it was only possible to test commits that are
on Github (pull request or merged). Now, changes can be
tested locally too.

This introduces the risk that a release could be built
containing uncommitted changes which by definition breaks
deterministic builds. Fortunately, this will always be
detected because the version string is created using
`git describe --tags --dirty`.

Also, retire $TARGET variable because it decouples the
build scripts from the commit revision to be built. This
is a problem for deterministic  builds.
2018-07-10 13:33:46 +02:00
SomberNight
2d29c9313f docker windows build: fix missing translations 2018-06-30 18:56:50 +02:00
Lucas Betschart
d467a5a8ec Pyinstaller: Clean cache before building
Clean PyInstaller cache and remove temporary files before building.
2018-06-30 13:03:05 +02:00
ThomasV
86209e81b9 win builds: call 'git describe' before we add unstaged files to the repo 2018-06-28 19:55:26 +02:00
Johann Bauer
4a65db54c9 Travis: Fix Windows build from PRs 2018-05-30 22:29:51 +02:00
SomberNight
483a2a40cd wine-build: fetch pull requests from repo if can't find commit
follow-up 25089aa9c2
2018-05-27 04:25:11 +02:00