Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cebash/sakia
  • santiago/sakia
  • jonas/sakia
3 results
Show changes
Commits on Source (1575)
Showing
with 743 additions and 157 deletions
......@@ -38,11 +38,20 @@ nosetests.xml
.idea
# Generated files
src/cutecoin/gen_resources/*
src/sakia/gen_resources/*
src/icons_rc.py
src/i18n_rc.py
src/sakia/icons_rc.py
src/sakia/i18n_rc.py
res/i18n/qm
res/i18n/lang-*
out
.directory
temp
*_uic.py
# mypy
.mypy_cache
# pyenv
/.python-version
stages:
- format
- tests
- build
- release
image: registry.duniter.org/docker/python3/sakia-builder:1.2.0
# SUB-TASKS
.push_to_github:
tags:
- github
after_script:
# remove all files in current repo
- rm -rf ./*
- rm -rf .git*
# do a mirror clone in current repo
- git clone --mirror $CI_REPOSITORY_URL .
# do config for github push
- git remote add github $GITHUB_URL_AND_KEY
- git config --global user.email "contact@duniter.org"
- git config --global user.name "Duniter"
# remove refs about merge requests
- bash -c "cat packed-refs | grep -v 'refs/merge-requests' > packed-refs-new; echo 'Removed merge-requests refs.'"
- mv packed-refs-new packed-refs
# github push
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.changes:
only:
changes:
- src/sakia/*
- .gitlab-ci.yml
- Makefile
- requirements_dev.txt
- requirements_deploy.txt
- requirements.txt
- setup.py
- tests/**/*.py
# TASKS
format:
extends:
- .changes
stage: format
script:
- pip install -r requirements_dev.txt
- make check-format
tests:
extends:
- .changes
stage: tests
script:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- /start.sh # start xvfb
- make tests
build:
extends:
- .changes
stage: build
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
release_appimage:
extends:
- .changes
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make appimage
artifacts:
paths:
- ci/appimage/Sakia_x86_64.AppImage
# only:
# - master
release_pypi:
extends:
- .push_to_github
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy PYPI_LOGIN=${PYPI_LOGIN} PYPI_PASSWORD=${PYPI_PASSWORD}
only:
- master
release_pypi_test:
stage: release
when: manual
only: [tags, dev]
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD}
requirements:
- requirements.txt
python-targets:
- 3
ignore-paths:
- lib
- build
- res
- ci
- doc
sudo: false
language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
- "3.4"
addons:
apt:
packages:
- libxcb1
- libxcb1-dev
- libx11-xcb1
- libx11-xcb-dev
- libxcb-keysyms1
- libxcb-keysyms1-dev
- libxcb-image0
- libxcb-image0-dev
- libxcb-shm0
- libxcb-shm0-dev
- libxcb-icccm4
- libxcb-icccm4-dev
- libxcb-sync0
- libxcb-sync0-dev
- libxcb-xfixes0-dev
- libxrender-dev
- libxcb-shape0-dev
- libxcb-randr0-dev
- libxcb-render-util0
- libxcb-render-util0-dev
- libxcb-glx0-dev
- libgl1-mesa-dri
- libegl1-mesa
- libpcre3-dev
os: linux
matrix:
include:
- os: osx
- dist: trusty
sudo: required
exclude:
- os: linux
allow_failures:
- os: osx
before_install:
# Update
- pwd
# Install and configure conda
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels inso/channel/cutecoin
- conda config --add channels pyzo
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
env:
- PYENV_PYTHON_VERSION=3.5.4
before_install:
- ci/travis/before_install.sh
install:
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION cx_freeze pyqt5 libpng=1.5.13 libsodium=1.0.3
- source activate test-environment
- ldd $HOME/miniconda/envs/test-environment/lib/qt5/plugins/platforms/*.so
- pip install coveralls
- pip install pylibscrypt
- pip install libnacl
- pip install requests
- pip install base58
- pip install quamash
- pip install aiohttp
- pip install jsonschema
- pip install git+https://github.com/ucoin-io/ucoin-python-api.git
- pip install git+https://github.com/Insoleet/pretenders.git@develop
- python gen_resources.py
- python gen_translations.py
- python setup.py build
before_script:
# screen must be 24bpp otherwise pyqt5 crashes
# see: https://github.com/pytest-dev/pytest-qt/issues/35
- export XVFBARGS="-screen 0 1280x1024x24"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
- ci/travis/build.sh
script:
- export QT_QPA_PLATFORM_PLUGIN_PATH=$HOME/miniconda/envs/test-environment/lib/qt5/plugins/platforms;
- export QT_PLUGIN_PATH=$HOME/miniconda/envs/test-environment/lib/qt5/plugins
- export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
- coverage run --source=cutecoin.core,cutecoin.gui,cutecoin.models run_tests.py
- ci/travis/test.sh
after_success:
- coverage -rm
- coveralls
- ci/travis/after_success.sh
- ci/travis/before_deploy.sh
deploy:
- provider: releases
api_key:
secure: MUdvTDBeCxO9d/EpzIhr+QYra/KxgYkXX6177SjqWCWDqw9xB3fwSUj8I9ht9DGtwVdadtveumtvLw3pbtVIR0GtIPC9pyvtNz4j6T4Ei3TSE6+StXdMK4NnInvPeTRlobGL+9sZt9MwheJwZ8YGewhBcR0F5UzVfxWeSSrxmyk=
file:
- sakia-${TRAVIS_OS_NAME}.zip
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_OS_NAME} = osx
- provider: releases
api_key:
secure: MUdvTDBeCxO9d/EpzIhr+QYra/KxgYkXX6177SjqWCWDqw9xB3fwSUj8I9ht9DGtwVdadtveumtvLw3pbtVIR0GtIPC9pyvtNz4j6T4Ei3TSE6+StXdMK4NnInvPeTRlobGL+9sZt9MwheJwZ8YGewhBcR0F5UzVfxWeSSrxmyk=
file:
- sakia-${TRAVIS_OS_NAME}.deb
- sakia-${TRAVIS_OS_NAME}.zip
- sakia-${TRAVIS_TAG}-py3-none-any.whl
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_OS_NAME} = linux
## v0.53.2 (18/01/2021)
This is the last version released by Vit.
No more new version or maintenance will be done.
Thanks to Inso for this wonderful project, and to every enthusiast users.
### Bugs
* #809 fix About Sakia available release search code and obsolete link to Github in exception
* #813 remove obsolete github references in README.md
* #815 remove unused dependency asynctest from requirements.txt
* fix "make tests" command running test scripts from AppDir in ci/appimage
## v0.53.1 (1/11/2020)
### Bugs
* #811 Fix WoT window is blank when clicking Explore until the menu "Show in WoT" is used.
Button is removed.
* #793 Fix crash `RuntimeError: no running event loop` when running on Python 3.8
### CI/CD
* #817 Add AppImage to release with automatic compilation in CD
## v0.53.0 (25/09/2020)
### Features
* #816 Add root_servers.yml in $HOME/.config/sakia folder to configure your own root servers
## v0.52.0 (23/04/2020)
### Features
* #807 Add new "Percentage of Average" referential
* Transfer window now use current referential instead of only relative by UD
* Add current referential units on the balance display
### Bugs
* Fix referentials french translation
* Fix network "Open in browser" menu
## v0.51.1 (05/04/2020)
### Bugs
* #802 Fix "Send as source" context menu not appear in Expert Mode on normal received transactions
* Update incomplete french translation
## v0.51.0 (03/04/2020)
### Features
* #798 - Complete workflow to send transaction that we can get back after one week:
* A selector allow to choose the lock condition of the output transaction
* Then, the transaction with special lock condition appears with an underline in the transaction history
* If you are the receiver, you can use the context menu action "Send as source" to send it to yourself
before the issuer get it back
* If you are the issuer, use the context menu action "Send as source" to send it to yourself after the delay
* Before the delay, you can check the lock condition in the transfer window to see the date when the transaction will be unlocked
* In Expert Mode (see Preferences), you can use any incoming transaction or dividend as source for your transfer
### Enhancement
* Add a legend for colors, italic and underlined display of transactions under transaction history
* Upgrade dependencies to duniterpy 0.57.0
### Bugs
* Fix gen_translations.py running Qt4 lrelease in Makefile
* Fix error parsing some WSP2 Head message because software version had a prefix (duniterpy fix)
### CI/CD
* Remove obsolete runner tag
* Release job only on `master`, release_test job only on `dev` or `tags`
## v0.50.5 (21/03/2020)
### Bugs
* Fix send money to pubkey with search user selected
### Tests
* Update and fix pytest suite
* Update duniter-mirage dependency version
### Enhancements
* Tx history update button set to disable until update is done
* Increase delay between network crawlings to 1 mn
### CI/CD
* Add format and tests stage in .gitlab-ci.yml
## v0.50.4 (18/03/2020)
### Code
* Fix session closed error (regression in v0.50.3)
## v0.50.3 (16/03/2020)
### Code
* Fix exception when refresh tx history
* Fix Unclosed client session error (at last !)
### CI/CD
* Fix bug with setuptools 28.8.x version in gitlab CI/CD image
## v0.50.2 (10/03/2020)
### Code
* Add system libs requirement and command line options in README.md
* Fix bad label "ok" on startup message box and enhance it
* Propose new sakia account menu at first start instead of create a new member account on the network
* Only display licence step when registering a new member account on the network
* Update french translation
### Project
* Fix release.sh using simple quote on sakia.__init__ version
* Add this changelog
## v0.50.1 (08/03/2020)
### Code
* Use asyncio.ensure_future() instead of async() which disappear from Py 3.7
* Include the license file into the wheel distributed, the license changed name
### CI/CD
* Fix sources path and allow all file extensions to trigger the CI
### Build
* Add dist check after build in Makefile
### Project
* Fix release.sh broken by black format
## [v0.50.0](https://git.duniter.org/clients/python/sakia/-/milestones/15) (07/03/2020)
### Code
* Update DuniterPy dependency to 0.56.0
* Fix all detected bugs
* Add the Sakia icon in toolbar
* Remove search direct connections
* Add update button in tx history
* Fix translation system
* Update french translation
.PHONY: docs tests check check-format mypy pylint format build deploy deploy_test
.SILENT: deploy deploy_test # do not echo commands with password
# bash required to use source command
SHELL := /bin/bash
# run tests
tests:
python3 gen_resources.py
python3 gen_translations.py
pytest -q -s --disable-warnings tests ${TESTS_FILTER}
# check
check: mypy pylint check-format
# check static typing
mypy:
python3 -m mypy src --ignore-missing-imports
python3 -m mypy tests --ignore-missing-imports
# check code errors
pylint:
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 src/sakia/
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/
# check format
check-format:
black --check src
black --check tests
# format code
format:
black src
black tests
# build a wheel package in build folder and put it in dist folder
build:
if [ -d "./build" ]; then rm -r build/*; fi
if [ -d "./dist" ]; then rm -r dist/*; fi
python3 gen_resources.py
python3 gen_translations.py
python3 setup.py sdist bdist_wheel
twine check dist/*
appimage:
cd ci/appimage && wget -qc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
cd ci/appimage && wget -qc https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/linuxdeploy-plugin-python-x86_64.AppImage && chmod u+x linuxdeploy-plugin-python-x86_64.AppImage
cd ci/appimage && source config.env && ./build.sh
# upload on PyPi repository
deploy:
twine upload dist/* --username ${PYPI_LOGIN} --password ${PYPI_PASSWORD}
# upload on PyPi test repository
deploy_test:
twine upload dist/* --username ${PYPI_TEST_LOGIN} --password ${PYPI_TEST_PASSWORD} --repository-url https://test.pypi.org/legacy/
<!-- Landscape | [![Code Health](https://landscape.io/github/ucoin-io/cutecoin/dev/landscape.svg?style=flat)](https://landscape.io/github/ucoin-io/cutecoin/dev) -->
![sakia logo](https://git.duniter.org/clients/python/sakia/-/raw/master/sakia.png)
Coveralls | [![Coverage Status](https://coveralls.io/repos/ucoin-io/cutecoin/badge.svg?branch=dev)](https://coveralls.io/r/ucoin-io/cutecoin)
This project is not maintained anymore since 18/01/2021.
No more new version or maintenance will be done.
Travis | [![Build Status](https://travis-ci.org/ucoin-io/cutecoin.svg?branch=travis)](https://travis-ci.org/ucoin-io/cutecoin)
Vit thanks Inso for this wonderful project, and every enthusiast users.
Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/0wmo0rk5mds5t3lr/branch/dev)](https://ci.appveyor.com/project/Insoleet/cutecoin/branch/dev)
# Sakia
[![coverage report](https://git.duniter.org/clients/python/sakia/badges/gitlab/coverage.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![pipeline status](https://git.duniter.org/clients/python/sakia/badges/gitlab/pipeline.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![Build Status](https://travis-ci.org/duniter/sakia.svg?branch=travis)](https://travis-ci.org/duniter/sakia)
[![Build status](https://ci.appveyor.com/api/projects/status/pvl18xon8pvu2c8w/branch/dev?svg=true)](https://ci.appveyor.com/project/Insoleet/sakia-bee4m/branch/dev)
Weblate | [![Translation status](http://weblate.ucoin.io/widgets/cutecoin/-/svg-badge.svg)](http://weblate.ucoin.io/engage/cutecoin/?utm_source=widget)
Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project.
![cutecoin logo](https://raw.github.com/ucoin-io/cutecoin/master/cutecoin.png)
cutecoin
========
Qt Client for [Ucoin](http://www.ucoin.io) project.
## Goal features
* Ucoin account management via wallets and communities
* Multi-currency
* Multi-community
* Multi-wallets
* Contacts management
* User-friendly money transfer
* Community membership management
## Current state
### Done (master branch)
### Features
* Accounts management
* Communities viewing
* Money Transfer
* cx_freeze deployment
* Wallets management
* Contacts management
* Joining a community, publishing keys
* Multiple wallets management
### How to build
* __git clone --recursive https://github.com/ucoin-io/cutecoin.git__
### Dependencies
* Dependencies :
* [python3](https://www.python.org/downloads/)
* [cx_freeze for python 3](http://cx-freeze.sourceforge.net/)
* [pyqt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5)
* Qt5
* [python 3.6+](https://www.python.org/downloads/)
* [libsodium](http://doc.libsodium.org/installation/README.html)
* To get python libraries dependencies :
* __pip install pylibscrypt__
* __pip install libnacl__
* __pip install requests__
* __pip install base58__
* Run __python3 gen_resources.py__ in cutecoin folder
* Run __python3 gen_translations.py__ in cutecoin folder
* Run __python3 setup.py build__ in cutecoin folder
* The executable is generated in "build" folder, named "cutecoin"
### How to download latest release
* Go to the [current release](https://github.com/ucoin-io/cutecoin/releases/tag/0.10.0)
* Download the package corresponding to your operating system
* Unzip and start "cutecoin" :)
* Join our beta community by contacting us on ucoin forums : forum.ucoin.io
General tips : use [pyenv](https://github.com/pyenv/pyenv) to build sakia, as described in the [documentation](https://git.duniter.org/clients/python/sakia/-/blob/master/doc/install_for_developers.md)
Building Python with pyenv requires libraries of `openssl` and `sqlite3`. On Ubuntu, install it using the following commands :
apt-get update
apt-get install libssl-dev
apt-get install libsqlite3-dev
### Install with pip
* Run `pip install sakia`
* start "sakia" :)
### Download latest release
* Go to [current release](https://git.duniter.org/clients/python/sakia/-/releases)
* Download AppImage for linux x86_64. Run it !
* Join our developer community by contacting us on [duniter forum](http://forum.duniter.org/)
## Command line options
`-d` to display log to debug
`--currency g1-test` to connect to the g1-test currency network.
## Development
* When writing docstrings, use the reStructuredText format recommended by [PEP 0287](https://www.python.org/dev/peps/pep-0287/#docstring-significant-features)
* Use make commands to check the code and the format it correct.
The development tools require Python 3.6.x or higher.
* Install a supported Python version with [pyenv](https://github.com/pyenv/pyenv)
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
* Create a virtualenv in the project folder:
python -m venv .venv
* Install dependencies
pip install -r requirements.txt
* Run Sakia from the source code
PYTHONPATH="`pwd`/src/." python src/sakia/main.py
* Before submiting a merge requests, please check the static typing and tests.
* Install dev dependencies
pip install -r requirements_dev.txt
* Check static typing with [mypy](http://mypy-lang.org/)
make check
* Run all unit tests (pytest module) with:
make tests
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
* Run only some unit tests by passing a special ENV variable:
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
## Packaging and deploy
### PyPi
In the development pyenv environment, install the tools to build and deploy
pip install --upgrade -r requirements_deploy.txt
Change and commit and tag the new version number (semantic version number)
./release.sh 0.x.y
Build the PyPi package in the `dist` folder
make build
Deploy the package to PyPi test repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy_test PYPI_TEST_LOGIN=xxxx PYPI_TEST_PASSWORD=xxxx
Install the package from PyPi test repository
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple/ sakia
Deploy the package on the PyPi repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy PYPI_LOGIN=xxxx PYPI_PASSWORD=xxxx
### Wheel Build scripts
make build
Or manually:
* Install __wheel__ with `pip install wheel`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the wheel : Run `python3 setup.py bdist_wheel` in sakia folder
### AppImage
make appimage
The make command will do a wheel build, then create the AppImage file `ci/appimage/Sakia_x86_64.AppImage`
### Pyinstaller Build scripts (not maintained)
* Install __pyinstaller__ with `pip install pyinstaller`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the binaries : Run `pyinstall sakia.spec`
## License
This software is distributed under [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).
......@@ -6,31 +6,35 @@ environment:
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\appveyor\\run_with_env.cmd"
matrix:
- PYTHON: "C:\\Python34_64"
PYTHON_VERSION: "3.4"
- PYTHON: "C:\\Python35_64"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "64"
CONDA_PY: "34"
CONDA_PY: "35"
CONDA_NPY: "18"
QTDIR: "C:\\Qt\\5.9\\msvc2015_64"
platform: x64
- PYTHON: "C:\\Python34_32"
PYTHON_VERSION: "3.4"
- PYTHON: "C:\\Python35_32"
PYTHON_VERSION: "3.5"
PYTHON_ARCH: "32"
CONDA_PY: "34"
CONDA_PY: "35"
CONDA_NPY: "18"
QTDIR: "C:\\Qt\\5.9\\msvc2015"
platform: x86
install:
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
# as well as pip, conda-build, and the binstar CLI
- powershell .\\ci\\appveyor\\install.ps1
#- dir /b /s /ad c:\Qt\5.6
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "SET QT_QPA_PLATFORM_PLUGIN_PATH=%PYTHON%\\envs\\test-environment\\Scripts\\plugins"
- choco install -y vcredist2013
#- "SET QT_PLUGIN_PATH=%QTDIR%\\plugins"
- echo %PATH%
#- choco install -y vcredist2015
- "%CMD_IN_ENV% conda config --set always_yes yes --set changeps1 no"
- "%CMD_IN_ENV% conda config --add channels inso/channel/cutecoin"
- "%CMD_IN_ENV% conda config --add channels pyzo"
- "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% cx_freeze pyqt5 libsodium=1.0.3"
- "%CMD_IN_ENV% conda config --add channels inso/channel/sakia"
- "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% libsodium=1.0.3 setuptools=19.2"
build_script:
- ".\\ci\\appveyor\\build.cmd"
......@@ -39,18 +43,28 @@ build_script:
- ".\\ci\\appveyor\\tests.cmd"
- echo %errorlevel%
- powershell .\\ci\\appveyor\\download_vcredist.ps1 -target %cd%\\ci\\appveyor
# Windows Installer
- choco install -y InnoSetup
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
- iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
- move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
artifacts:
- path: build
name: Cutecoin-win$(PYTHON_ARCH)
- path: dist
name: sakia-win$(PYTHON_ARCH)
- path: sakia*.exe
name: sakia-exe
# upload to releases
deploy:
release: Cutecoin $(APPVEYOR_REPO_TAG_NAME)
tag: $(APPVEYOR_REPO_TAG_NAME)
release: sakia $(APPVEYOR_REPO_TAG_NAME)
provider: GitHub
auth_token:
secure: wbzlh6nx1zY1J1avlB0C3hKGm1abFNHBdM60u/U09i5Nam//D6kazvnv5ZBKdR89
artifact: Cutecoin-win$(PYTHON_ARCH)
artifact: /sakia-/
draft: true
prerelease: true
on:
appveyor_repo_tag: true
#!/bin/bash
#./linuxdeploy-x86_64.AppImage --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
# workaround to run inside a docker container
./linuxdeploy-x86_64.AppImage --appimage-extract
mv squashfs-root linuxdeploy-x86_64.AppDir
./linuxdeploy-x86_64.AppDir/AppRun --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
version=0.53.2
# linuxdeploy python plugin
export PYTHON_SOURCE=https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
export PIP_REQUIREMENTS=$(pwd)/../../dist/sakia-${version}-py3-none-any.whl
# linuxdeploy appimage plugin
export OUTPUT=Sakia_x86_64.AppImage
[Desktop Entry]
Version=1.0
Name=Sakia
Name[fr]=Sakia
Comment=Duniter Ğ1 Libre Currency Client
Comment[fr]=Client pour la Monnaie Libre Duniter Ğ1
GenericName=Sakia client
GenericName[fr]=Client Sakia
Exec=sakia
Terminal=false
Type=Application
Icon=sakia
Categories=Utility;
StartupNotify=true
GenericName[fr_FR]=Client Sakia
Comment[fr_FR]=Client pour la Monnaie Libre Duniter Ğ1
MimeType=x-scheme-handler/duniter;
ci/appimage/sakia.png

51.5 KiB

#!/bin/bash
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# Call the entry point
${APPDIR}/usr/bin/python3.6 -s ${APPDIR}/usr/python/lib/python3.6/site-packages/sakia/main.py "$@"
@ECHO OFF
rd /s /q %APPDATA%\sakia
\ No newline at end of file
......@@ -3,29 +3,26 @@
call activate test-environment
echo "%PATH%"
echo "%QT_QPA_PLATFORM_PLUGIN_PATH%"
echo "%QT_PLUGIN_PATH%"
python -V
call pyuic5 --version
pyrcc5 -version
lrelease -version
pip install pylibscrypt
pip install libnacl
pip install requests
pip install base58
pip install git+https://github.com/Insoleet/quamash.git@sockets_only
pip install aiohttp
pip install jsonschema
pip install git+https://github.com/ucoin-io/ucoin-python-api.git
pip install pretenders
call pyuic5 --version
pyrcc5 -version
pip install -r requirements.txt
pip install pyinstaller==3.2
pip install six
pip install packaging
python gen_resources.py
if %errorlevel% neq 0 exit /b 1s
python gen_translations.py
call .\\ci\\appveyor\\gen_translations.cmd
if %errorlevel% neq 0 exit /b 1
python setup.py build
SET PATH=c:\\python35_64\\envs\\test-environment\\lib\\site-packages\\PyQt5\\Qt\\bin;%PATH%
pyinstaller sakia.spec
if %errorlevel% neq 0 exit /b 1
Param([String]$target)
Write-Host "Downloading vcredist to $target"
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/A/4/D/A4D9F1D3-6449-49EB-9A6E-902F61D8D14B/vcredist_x86.exe', "$target\vcredist_x86.exe")
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/A/4/D/A4D9F1D3-6449-49EB-9A6E-902F61D8D14B/vcredist_x64.exe', "$target\vcredist_x64.exe")
@ECHO ON
SET PREVPATH=%PATH%
SET PATH=%QTDIR%\\bin;%QTDIR%\\lib;%PATH%
lrelease -version
python gen_translations.py
if %errorlevel% neq 0 exit /b 1
SET PATH=%PREVPATH%
// Emacs mode hint: -*- mode: JavaScript -*-
function Controller() {
installer.autoRejectMessageBoxes();
installer.installationFinished.connect(function() {
gui.clickButton(buttons.NextButton);
})
}
Controller.prototype.WelcomePageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.CredentialsPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.IntroductionPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.TargetDirectoryPageCallback = function()
{
gui.currentPageWidget().TargetDirectoryLineEdit.setText("C:\\Qt\\5.6");
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ComponentSelectionPageCallback = function() {
//var widget = gui.currentPageWidget();
//widget.selectAll();
gui.clickButton(buttons.NextButton);
}
Controller.prototype.LicenseAgreementPageCallback = function() {
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.StartMenuDirectoryPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ReadyForInstallationPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.FinishedPageCallback = function() {
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
checkBoxForm.launchQtCreatorCheckBox.checked = false;
}
gui.clickButton(buttons.FinishButton);
}
#define MyAppName "Sakia"
#define MyAppPublisher "Sakia team"
#define MyAppURL "http://sakia-wallet.org"
#define MyAppExeName "sakia.exe"
#if !Defined(ROOT_PATH)
#define ROOT_PATH "."
#endif
#define MyAppSrc ROOT_PATH
#define MyAppExe ROOT_PATH + "\dist\sakia\" + MyAppExeName
#pragma message MyAppSrc
#if !FileExists(MyAppExe)
#error "Unable to find MyAppExe"
#endif
#define MyAppVerStr "0.53.2"
[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVerStr}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
OutputDir={#ROOT_PATH}
OutputBaseFilename={#MyAppName}
Compression=lzma
SolidCompression=yes
UninstallDisplayIcon={app}\{#MyAppExeName}
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#MyAppSrc}\dist\sakia\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\sakia.ico"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\sakia.png"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\LICENSE"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\ci\appveyor\after_install.cmd"; DestDir: "{app}\"; Flags: ignoreversion
Source: "{#MyAppSrc}\ci\appveyor\vcredist_x86.exe"; DestDir: "{tmp}\"; Flags: ignoreversion deleteafterinstall
Source: "{#MyAppSrc}\ci\appveyor\vcredist_x64.exe"; DestDir: "{tmp}\"; Flags: ignoreversion deleteafterinstall
[Icons]
Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
#define VCmsg "Installing Microsoft Visual C++ Redistributable...."
[Run]
Filename: "{tmp}\vcredist_x86.exe"; StatusMsg: "{#VCmsg}"; Check: not IsWin64 and not VCinstalled
Filename: "{tmp}\vcredist_x64.exe"; StatusMsg: "{#VCmsg}"; Check: IsWin64 and not VCinstalled
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\after_install.cmd"; Description: "Delete ALL existing data"; Flags: postinstall nowait skipifsilent unchecked
[Code]
function VCinstalled: Boolean;
// By Michael Weiner <mailto:spam@cogit.net>
// Function for Inno Setup Compiler
// 13 November 2015
// Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False.
// The programmer may set the year of redistributable to find; see below.
var
names: TArrayOfString;
i: Integer;
dName, key, year: String;
begin
// Year of redistributable to find; leave null to find installation for any year.
year := '';
Result := False;
key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
// Get an array of all of the uninstall subkey names.
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then
// Uninstall subkey names were found.
begin
i := 0
while ((i < GetArrayLength(names)) and (Result = False)) do
// The loop will end as soon as one instance of a Visual C++ redistributable is found.
begin
// For each uninstall subkey, look for a DisplayName value.
// If not found, then the subkey name will be used instead.
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then
dName := names[i];
// See if the value contains both of the strings below.
Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) <> 0)
i := i + 1;
end;
end;
end;
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2F4DA7A9-B15B-06FC-474C-A470394CAEAA}
LicenseFile="{#MyAppSrc}\LICENSE"
......@@ -3,7 +3,8 @@
call activate test-environment
echo "%PATH%"
echo "%QT_QPA_PLATFORM_PLUGIN_PATH%"
echo "%QT_PLUGIN_PATH%"
python -V
call pyuic5 --version
......@@ -11,6 +12,7 @@ pyrcc5 -version
lrelease -version
python run_tests.py
echo "%cd%"
py.test tests/
if %errorlevel% neq 0 exit /b 1
\ No newline at end of file