mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-04 01:37:26 -04:00
Compare commits
101 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49c3e498c7 | ||
|
|
e2a8efca86 | ||
|
|
541c895d71 | ||
|
|
4eb77491eb | ||
|
|
57f6ae2761 | ||
|
|
e4bd8c4708 | ||
|
|
eb25d4cafa | ||
|
|
edb42af463 | ||
|
|
b74815e8b3 | ||
|
|
8d68c12120 | ||
|
|
e5606fcf73 | ||
|
|
fe363d4dd8 | ||
|
|
475d4311e0 | ||
|
|
c3eb3c6f51 | ||
|
|
a255c5dc42 | ||
|
|
88c0237cad | ||
|
|
4bb527b200 | ||
|
|
bbd4a0055b | ||
|
|
dbc7c69a2d | ||
|
|
98ed779e18 | ||
|
|
d3559a40ba | ||
|
|
80e209df42 | ||
|
|
765982c7a1 | ||
|
|
172e346612 | ||
|
|
2ddb550591 | ||
|
|
7182eb6b93 | ||
|
|
077ab3d58e | ||
|
|
053a6d4388 | ||
|
|
c5e0680bdf | ||
|
|
dfe7f302d4 | ||
|
|
2f3e9abe14 | ||
|
|
e984c28faf | ||
|
|
7db5136143 | ||
|
|
8b78bb08ed | ||
|
|
9384dc9d7d | ||
|
|
36e4312a05 | ||
|
|
e50c830b10 | ||
|
|
c3b984e1c2 | ||
|
|
ef406624b9 | ||
|
|
b13e2012d8 | ||
|
|
d7a3a61bf4 | ||
|
|
c957058860 | ||
|
|
1cce66f866 | ||
|
|
b9eea25e52 | ||
|
|
39522ab549 | ||
|
|
aa5b20ef62 | ||
|
|
2ae9d3f6b6 | ||
|
|
061a256df7 | ||
|
|
7c6138eae1 | ||
|
|
e34c83d7aa | ||
|
|
c28587931f | ||
|
|
1de4a65f90 | ||
|
|
c31cdaad9e | ||
|
|
440012b454 | ||
|
|
4bd21db202 | ||
|
|
25807060a7 | ||
|
|
ff9558db09 | ||
|
|
f3f1dfc020 | ||
|
|
0764fbad33 | ||
|
|
792130a7e6 | ||
|
|
3f0edae3a7 | ||
|
|
76416d9133 | ||
|
|
5ee04841f0 | ||
|
|
1d09876323 | ||
|
|
dce481a3d9 | ||
|
|
28c698375c | ||
|
|
cabbbaf172 | ||
|
|
c89f8eca91 | ||
|
|
16da754c79 | ||
|
|
346d962837 | ||
|
|
9e37b219b9 | ||
|
|
b8b556f289 | ||
|
|
881206db99 | ||
|
|
f8ad672c44 | ||
|
|
8a85221f95 | ||
|
|
5332495c24 | ||
|
|
614b81fd23 | ||
|
|
10a184db8b | ||
|
|
7c4ddf7bc4 | ||
|
|
0149f946b9 | ||
|
|
e3620f39dc | ||
|
|
5592ff5f28 | ||
|
|
fcec4187b6 | ||
|
|
fdfb9634d3 | ||
|
|
1afc8e69c6 | ||
|
|
fb3b4e44da | ||
|
|
5a61c7c941 | ||
|
|
4e9b0ae000 | ||
|
|
a56d4d0f4b | ||
|
|
2b0e7d0dee | ||
|
|
e17e238ee9 | ||
|
|
0fd48a1e56 | ||
|
|
d4eafa1d95 | ||
|
|
675f68ca17 | ||
|
|
30ee14fca1 | ||
|
|
c4ae40223c | ||
|
|
0e9069af80 | ||
|
|
1db66c9698 | ||
|
|
b409e9fc7d | ||
|
|
ecb76b8414 | ||
|
|
da71a00be2 |
107
.github/qt_helper.py
vendored
107
.github/qt_helper.py
vendored
@@ -1,107 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import defusedxml.ElementTree
|
|
||||||
import hashlib
|
|
||||||
import mmap
|
|
||||||
import pathlib
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import urllib.parse
|
|
||||||
import urllib.request
|
|
||||||
import xml.etree.ElementTree as ET
|
|
||||||
|
|
||||||
MAX_TRIES = 32
|
|
||||||
|
|
||||||
def fetch_links_to_archives(os, target, major, minor, patch, toolchain):
|
|
||||||
MAX_XML_SIZE = 1024 * 1024 * 1024
|
|
||||||
MIRROR = 'download.qt.io'
|
|
||||||
base_url = f'https://{MIRROR}/online/qtsdkrepository/{os}/{target}/qt{major}_{major}{minor}{patch}'
|
|
||||||
url = f'{base_url}/Updates.xml'
|
|
||||||
for _ in range(MAX_TRIES):
|
|
||||||
try:
|
|
||||||
resp = urllib.request.urlopen(url).read(MAX_XML_SIZE)
|
|
||||||
update_xml = defusedxml.ElementTree.fromstring(resp)
|
|
||||||
break
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
raise
|
|
||||||
except BaseException as e:
|
|
||||||
print('error', e, flush=True)
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
for pkg in update_xml.findall('./PackageUpdate'):
|
|
||||||
name = pkg.find('.//Name')
|
|
||||||
if name == None:
|
|
||||||
continue
|
|
||||||
if name.text != f'qt.qt{major}.{major}{minor}{patch}.{toolchain}':
|
|
||||||
continue
|
|
||||||
version = pkg.find('.//Version')
|
|
||||||
if version == None:
|
|
||||||
continue
|
|
||||||
archives = pkg.find('.//DownloadableArchives')
|
|
||||||
if archives == None or archives.text == None:
|
|
||||||
continue
|
|
||||||
for archive in archives.text.split(', '):
|
|
||||||
url = f'{base_url}/{name.text}/{version.text}{archive}'
|
|
||||||
file_name = pathlib.Path(urllib.parse.urlparse(url).path).name
|
|
||||||
yield {'name': file_name, 'url': url}
|
|
||||||
|
|
||||||
def download(links):
|
|
||||||
metalink = ET.Element('metalink', xmlns = "urn:ietf:params:xml:ns:metalink")
|
|
||||||
for link in links:
|
|
||||||
file = ET.SubElement(metalink, 'file', name = link['name'])
|
|
||||||
ET.SubElement(file, 'url').text = link['url']
|
|
||||||
data = ET.tostring(metalink, encoding='UTF-8', xml_declaration=True)
|
|
||||||
for _ in range(MAX_TRIES):
|
|
||||||
with subprocess.Popen([
|
|
||||||
'aria2c',
|
|
||||||
'--connect-timeout=8',
|
|
||||||
'--console-log-level=warn',
|
|
||||||
'--continue',
|
|
||||||
'--follow-metalink=mem',
|
|
||||||
'--max-concurrent-downloads=100',
|
|
||||||
'--max-connection-per-server=16',
|
|
||||||
'--max-file-not-found=100',
|
|
||||||
'--max-tries=100',
|
|
||||||
'--min-split-size=1MB',
|
|
||||||
'--retry-wait=1',
|
|
||||||
'--split=100',
|
|
||||||
'--summary-interval=0',
|
|
||||||
'--timeout=8',
|
|
||||||
'--user-agent=',
|
|
||||||
'--metalink-file=-',
|
|
||||||
], stdin=subprocess.PIPE) as aria:
|
|
||||||
aria.communicate(data)
|
|
||||||
if aria.wait() == 0:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def calc_hash_sum(files):
|
|
||||||
obj = hashlib.new('sha256')
|
|
||||||
for path in files:
|
|
||||||
with open(path, 'rb') as f:
|
|
||||||
with mmap.mmap(f.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ) as m:
|
|
||||||
file_hash = hashlib.new('sha256', m).digest()
|
|
||||||
obj.update(file_hash)
|
|
||||||
return obj.digest().hex()
|
|
||||||
|
|
||||||
def extract_archives(files, out='.', targets=[]):
|
|
||||||
for path in files:
|
|
||||||
if subprocess.Popen(['7z', 'x', '-bd', '-y', '-aoa', f'-o{out}', path] + targets,
|
|
||||||
stdout=subprocess.DEVNULL,
|
|
||||||
).wait() != 0:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def main():
|
|
||||||
os, target, version, toolchain, expect = sys.argv[1:]
|
|
||||||
major, minor, patch = version.split('.')
|
|
||||||
links = [*fetch_links_to_archives(os, target, major, minor, patch, toolchain)]
|
|
||||||
print(*[l['url'].encode() for l in links], sep='\n', flush=True)
|
|
||||||
assert download(links)
|
|
||||||
result = calc_hash_sum([l['name'] for l in links])
|
|
||||||
print('result', result, 'expect', expect, flush=True)
|
|
||||||
assert result == expect
|
|
||||||
assert extract_archives([l['name'] for l in links], '.', ['{}.{}.{}'.format(major, minor, patch)])
|
|
||||||
[pathlib.Path(l['name']).unlink() for l in links]
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
69
.github/workflows/build.yml
vendored
69
.github/workflows/build.yml
vendored
@@ -5,6 +5,8 @@ on: [push, pull_request]
|
|||||||
env:
|
env:
|
||||||
FREE_DISKSPACE: |
|
FREE_DISKSPACE: |
|
||||||
sudo rm -rf /usr/local/.ghcup /usr/share/dotnet /usr/share/swift /usr/share/miniconda
|
sudo rm -rf /usr/local/.ghcup /usr/share/dotnet /usr/share/swift /usr/share/miniconda
|
||||||
|
QT_TAG: v5.15.17-lts-lgpl
|
||||||
|
QT_PREFIX: ${{ github.workspace }}/qt-install
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-macos:
|
build-macos:
|
||||||
@@ -57,6 +59,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-pcre mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt mingw-w64-x86_64-angleproject
|
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-pcre mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt mingw-w64-x86_64-angleproject
|
||||||
|
- name: add qmake.exe and windeployqt.exe
|
||||||
|
run: |
|
||||||
|
cp -f "$MSYSTEM_PREFIX/bin/qmake-qt5.exe" "$MSYSTEM_PREFIX/bin/qmake.exe"
|
||||||
|
cp -f "$MSYSTEM_PREFIX/bin/windeployqt-qt5.exe" "$MSYSTEM_PREFIX/bin/windeployqt.exe"
|
||||||
- name: build
|
- name: build
|
||||||
run: DEV_MODE=ON make release-win64 -j2
|
run: DEV_MODE=ON make release-win64 -j2
|
||||||
- name: deploy
|
- name: deploy
|
||||||
@@ -66,25 +72,35 @@ jobs:
|
|||||||
run: build/release/bin/monero-wallet-gui --test-qml
|
run: build/release/bin/monero-wallet-gui --test-qml
|
||||||
|
|
||||||
macos-bundle:
|
macos-bundle:
|
||||||
runs-on: macos-13
|
runs-on: macos-15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf pkg-config pyenv p7zip aria2
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf pkg-config
|
||||||
- name: install dependencies
|
- name: clone qt repo
|
||||||
|
run: git clone -b "${QT_TAG}" --recursive --depth 1 --shallow-submodules https://github.com/qt/qt5
|
||||||
|
- name: build qt from source
|
||||||
run: |
|
run: |
|
||||||
pyenv install 3.12.0
|
cd qt5
|
||||||
pip install defusedxml
|
mkdir build && cd build
|
||||||
- name: download qt
|
../configure -prefix "${QT_PREFIX}" -opensource -confirm-license -release -nomake examples -nomake tests -no-rpath -skip qtwebengine -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine
|
||||||
run: python monero-gui/.github/qt_helper.py mac_x64 desktop 5.15.2 clang_64 c384008156fe63cc183bade0316828c598ff3e5074397c0c9ccc588d6cdc5aca
|
make -j"$(sysctl -n hw.ncpu)"
|
||||||
working-directory: ../
|
make install
|
||||||
- name: build
|
cd ../qttools/src/linguist/lrelease
|
||||||
|
../../../../build/qtbase/bin/qmake
|
||||||
|
make -j"$(sysctl -n hw.ncpu)"
|
||||||
|
make install
|
||||||
|
cd ../../../../qttools/src/macdeployqt/macdeployqt/
|
||||||
|
../../../../build/qtbase/bin/qmake
|
||||||
|
make -j"$(sysctl -n hw.ncpu)"
|
||||||
|
make install
|
||||||
|
- name: build monero-gui
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH=/Users/runner/work/monero-gui/5.15.2/clang_64 ..
|
cmake -D CMAKE_BUILD_TYPE=Release -D ARCH=default -D CMAKE_PREFIX_PATH="${QT_PREFIX}" ..
|
||||||
make
|
make -j"$(sysctl -n hw.ncpu)"
|
||||||
- name: deploy
|
- name: deploy
|
||||||
run: make deploy
|
run: make deploy
|
||||||
working-directory: build
|
working-directory: build
|
||||||
@@ -99,18 +115,11 @@ jobs:
|
|||||||
path: build/bin/monero-wallet-gui.tar
|
path: build/bin/monero-wallet-gui.tar
|
||||||
|
|
||||||
docker-linux-static:
|
docker-linux-static:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
key: docker-linux-static-{hash}
|
|
||||||
restore-keys: |
|
|
||||||
docker-linux-static-
|
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxcb-shape0 libxkbcommon-x11-0
|
run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxcb-shape0 libxkbcommon-x11-0
|
||||||
- name: free up diskspace
|
- name: free up diskspace
|
||||||
@@ -131,18 +140,11 @@ jobs:
|
|||||||
/home/runner/work/monero-gui/monero-gui/build/release/bin/monerod
|
/home/runner/work/monero-gui/monero-gui/build/release/bin/monerod
|
||||||
|
|
||||||
docker-windows-static:
|
docker-windows-static:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
key: docker-windows-static-{hash}
|
|
||||||
restore-keys: |
|
|
||||||
docker-windows-static-
|
|
||||||
- name: free up diskspace
|
- name: free up diskspace
|
||||||
run: ${{env.FREE_DISKSPACE}}
|
run: ${{env.FREE_DISKSPACE}}
|
||||||
- name: prepare build environment
|
- name: prepare build environment
|
||||||
@@ -159,33 +161,24 @@ jobs:
|
|||||||
/home/runner/work/monero-gui/monero-gui/build/x86_64-w64-mingw32/release/bin/monerod.exe
|
/home/runner/work/monero-gui/monero-gui/build/x86_64-w64-mingw32/release/bin/monerod.exe
|
||||||
|
|
||||||
docker-android:
|
docker-android:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.11
|
|
||||||
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
key: docker-android-static-{hash}
|
|
||||||
restore-keys: |
|
|
||||||
docker-android-static-
|
|
||||||
- name: free up diskspace
|
- name: free up diskspace
|
||||||
run: ${{env.FREE_DISKSPACE}}
|
run: ${{env.FREE_DISKSPACE}}
|
||||||
- name: prepare build environment
|
- name: prepare build environment
|
||||||
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
|
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
||||||
- name: Remove obsolete docker layers
|
|
||||||
run: docker images -a | grep none | awk '{ print $3; }' | xargs docker rmi || true
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ github.job }}
|
||||||
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
||||||
|
|
||||||
source-archive:
|
source-archive:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
|||||||
|
|
||||||
set(VERSION_MAJOR "18")
|
set(VERSION_MAJOR "18")
|
||||||
set(VERSION_MINOR "4")
|
set(VERSION_MINOR "4")
|
||||||
set(VERSION_REVISION "0")
|
set(VERSION_REVISION "7")
|
||||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||||
|
|
||||||
option(STATIC "Link libraries statically, requires static Qt")
|
option(STATIC "Link libraries statically, requires static Qt")
|
||||||
@@ -20,7 +20,7 @@ if(DEV_MODE)
|
|||||||
# DEV_MODE checks out the monero submodule to master, which requires C++17.
|
# DEV_MODE checks out the monero submodule to master, which requires C++17.
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
@@ -150,6 +150,8 @@ if(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(QT_MIN_VERSION "5.12")
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|
||||||
# TODO: drop this once we switch to Qt 5.14+
|
# TODO: drop this once we switch to Qt 5.14+
|
||||||
@@ -158,14 +160,13 @@ if(Qt5QmlModels_PKG_CONFIG_FOUND)
|
|||||||
list(APPEND QT5_LIBRARIES Qt5QmlModels)
|
list(APPEND QT5_LIBRARIES Qt5QmlModels)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO: drop this once we switch to Qt 5.12+
|
|
||||||
find_package(Qt5XmlPatterns QUIET)
|
find_package(Qt5XmlPatterns QUIET)
|
||||||
if(Qt5XmlPatterns_FOUND)
|
if(Qt5XmlPatterns_FOUND)
|
||||||
list(APPEND QT5_LIBRARIES Qt5XmlPatterns)
|
list(APPEND QT5_LIBRARIES Qt5XmlPatterns)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
||||||
find_package(${QT5_MODULE} REQUIRED)
|
find_package(${QT5_MODULE} ${QT_MIN_VERSION} REQUIRED)
|
||||||
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
FROM debian:buster
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG ANDROID_NDK_REVISION=23c
|
ARG ANDROID_NDK_REVISION=23c
|
||||||
ARG ANDROID_NDK_HASH=e5053c126a47e84726d9f7173a04686a71f9a67a
|
ARG ANDROID_NDK_HASH=e5053c126a47e84726d9f7173a04686a71f9a67a
|
||||||
ARG ANDROID_SDK_REVISION=7302050_latest
|
ARG ANDROID_SDK_REVISION=7302050_latest
|
||||||
ARG ANDROID_SDK_HASH=7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622
|
ARG ANDROID_SDK_HASH=7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622
|
||||||
ARG QT_VERSION=v5.15.16-lts-lgpl
|
ARG QT_VERSION=v5.15.18-lts-lgpl
|
||||||
|
|
||||||
WORKDIR /opt/android
|
WORKDIR /opt/android
|
||||||
ENV WORKDIR=/opt/android
|
ENV WORKDIR=/opt/android
|
||||||
@@ -20,6 +20,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
|||||||
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
||||||
ENV PREFIX=${WORKDIR}/prefix
|
ENV PREFIX=${WORKDIR}/prefix
|
||||||
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y ant automake build-essential ca-certificates-java file gettext git libc6 libncurses5 \
|
&& apt-get install -y ant automake build-essential ca-certificates-java file gettext git libc6 libncurses5 \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=v5.15.16-lts-lgpl
|
ARG QT_VERSION=v5.15.18-lts-lgpl
|
||||||
|
|
||||||
ENV CFLAGS="-fPIC"
|
ENV CFLAGS="-fPIC"
|
||||||
ENV CPPFLAGS="-fPIC"
|
ENV CPPFLAGS="-fPIC"
|
||||||
@@ -233,9 +233,9 @@ RUN git clone -b v1.0.26 --depth 1 https://github.com/libusb/libusb && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b hidapi-0.13.1 --depth 1 https://github.com/libusb/hidapi && \
|
RUN git clone -b hidapi-0.15.0 --depth 1 https://github.com/libusb/hidapi && \
|
||||||
cd hidapi && \
|
cd hidapi && \
|
||||||
git reset --hard 4ebce6b5059b086d05ca7e091ce04a5fd08ac3ac && \
|
git reset --hard d6b2a974608dec3b76fb1e36c189f22b9cf3650c && \
|
||||||
./bootstrap && \
|
./bootstrap && \
|
||||||
./configure --disable-shared --enable-static && \
|
./configure --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=v5.15.16-lts-lgpl
|
ARG QT_VERSION=v5.15.18-lts-lgpl
|
||||||
ENV SOURCE_DATE_EPOCH=1397818193
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
@@ -12,9 +12,9 @@ RUN apt update && \
|
|||||||
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
|
||||||
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
|
||||||
|
|
||||||
RUN git clone -b v0.18.4.0 --depth 1 https://github.com/monero-project/monero && \
|
RUN git clone -b v0.18.4.6 --depth 1 https://github.com/monero-project/monero && \
|
||||||
cd monero && \
|
cd monero && \
|
||||||
git reset --hard f1311d4237404ab7da76241dbf10e92a65132cc4 && \
|
git reset --hard dbcc7d212c094bd1a45f7291dbb99a4b4627a96d && \
|
||||||
cp -a contrib/depends / && \
|
cp -a contrib/depends / && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -rf monero
|
rm -rf monero
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
|
|
||||||
## Compiling the Monero GUI from source
|
## Compiling the Monero GUI from source
|
||||||
|
|
||||||
*Note*: Qt 5.9.7 is the minimum version required to build the GUI.
|
*Note*: Qt 5.12 is the minimum version required to build the GUI.
|
||||||
|
|
||||||
*Note*: Official GUI releases use monero-wallet-gui from this process alongside the supporting binaries (monerod, etc) from the [CLI deterministic builds](https://github.com/monero-project/monero/blob/release-v0.18/contrib/gitian/README.md).
|
*Note*: Official GUI releases use monero-wallet-gui from this process alongside the supporting binaries (monerod, etc) from the [CLI deterministic builds](https://github.com/monero-project/monero/blob/release-v0.18/contrib/gitian/README.md).
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
```
|
```
|
||||||
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
||||||
```
|
```
|
||||||
\* `master` - replace with the desired version tag (e.g. `v0.18.4.0`) to build the release binaries.
|
\* `master` - replace with the desired version tag (e.g. `v0.18.4.7`) to build the release binaries.
|
||||||
3. Prepare build environment
|
3. Prepare build environment
|
||||||
```
|
```
|
||||||
cd monero-gui
|
cd monero-gui
|
||||||
@@ -128,7 +128,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
```
|
```
|
||||||
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
||||||
```
|
```
|
||||||
\* `master` - replace with the desired version tag (e.g. `v0.18.4.0`) to build the release binaries.
|
\* `master` - replace with the desired version tag (e.g. `v0.18.4.7`) to build the release binaries.
|
||||||
3. Prepare build environment
|
3. Prepare build environment
|
||||||
```
|
```
|
||||||
cd monero-gui
|
cd monero-gui
|
||||||
|
|||||||
@@ -26,16 +26,19 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# libbost_filesyste-mt.dylib has a dependency on libboost_atomic-mt.dylib, maydeployqt does not copy it by itself
|
# Copy Boost dylibs that macdeployqt doesn't pick up
|
||||||
find_package(Boost COMPONENTS atomic)
|
find_package(Boost QUIET COMPONENTS atomic container date_time)
|
||||||
get_target_property(BOOST_ATOMIC_LIB_PATH Boost::atomic LOCATION)
|
set(_boost_extras Boost::atomic Boost::container Boost::date_time)
|
||||||
if(EXISTS ${BOOST_ATOMIC_LIB_PATH})
|
foreach(_tgt IN LISTS _boost_extras)
|
||||||
add_custom_command(TARGET deploy
|
if(TARGET ${_tgt})
|
||||||
POST_BUILD
|
add_custom_command(TARGET deploy POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy "${BOOST_ATOMIC_LIB_PATH}" "$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/"
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
COMMENT "Copying libboost_atomic-mt.dylib"
|
"$<TARGET_FILE:${_tgt}>"
|
||||||
)
|
"$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/"
|
||||||
endif()
|
COMMENT "Copying $<TARGET_FILE_NAME:${_tgt}>"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Apple Silicon requires all binaries to be codesigned
|
# Apple Silicon requires all binaries to be codesigned
|
||||||
find_program(CODESIGN_EXECUTABLE NAMES codesign)
|
find_program(CODESIGN_EXECUTABLE NAMES codesign)
|
||||||
@@ -48,8 +51,12 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
|
find_program(QMAKE_EXECUTABLE qmake HINTS "${_qt_bin_dir}")
|
||||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
|
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
|
||||||
add_custom_command(TARGET monero-wallet-gui POST_BUILD
|
if(NOT QMAKE_EXECUTABLE OR NOT WINDEPLOYQT_EXECUTABLE)
|
||||||
|
message(WARNING "Deploy requires qmake.exe and windeployqt.exe (no -qt5 suffix) in ${_qt_bin_dir}")
|
||||||
|
endif()
|
||||||
|
add_custom_command(TARGET deploy POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE:monero-wallet-gui>" -no-translations -qmldir="${CMAKE_SOURCE_DIR}"
|
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE:monero-wallet-gui>" -no-translations -qmldir="${CMAKE_SOURCE_DIR}"
|
||||||
COMMENT "Running windeployqt..."
|
COMMENT "Running windeployqt..."
|
||||||
)
|
)
|
||||||
@@ -96,11 +103,11 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
libssl-3-x64.dll
|
libssl-3-x64.dll
|
||||||
libcrypto-3-x64.dll
|
libcrypto-3-x64.dll
|
||||||
#icu
|
#icu
|
||||||
libicudt76.dll
|
libicudt78.dll
|
||||||
libicuin76.dll
|
libicuin78.dll
|
||||||
libicuio76.dll
|
libicuio78.dll
|
||||||
libicutu76.dll
|
libicutu78.dll
|
||||||
libicuuc76.dll
|
libicuuc78.dll
|
||||||
)
|
)
|
||||||
|
|
||||||
# Boost Regex is header-only since 1.77
|
# Boost Regex is header-only since 1.77
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import "." as MoneroComponents
|
|||||||
import "effects/" as MoneroEffects
|
import "effects/" as MoneroEffects
|
||||||
import "../js/Utils.js" as Utils
|
import "../js/Utils.js" as Utils
|
||||||
|
|
||||||
Item {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
@@ -50,6 +50,7 @@ Item {
|
|||||||
property bool passwordDialogMode
|
property bool passwordDialogMode
|
||||||
property bool passphraseDialogMode
|
property bool passphraseDialogMode
|
||||||
property bool newPasswordDialogMode
|
property bool newPasswordDialogMode
|
||||||
|
property bool backgroundSyncing
|
||||||
|
|
||||||
// same signals as Dialog has
|
// same signals as Dialog has
|
||||||
signal accepted()
|
signal accepted()
|
||||||
@@ -64,8 +65,6 @@ Item {
|
|||||||
capsLockTextLabel.visible = oshelper.isCapsLock();
|
capsLockTextLabel.visible = oshelper.isCapsLock();
|
||||||
passwordInput1.reset();
|
passwordInput1.reset();
|
||||||
passwordInput2.reset();
|
passwordInput2.reset();
|
||||||
if(!appWindow.currentWallet || appWindow.active)
|
|
||||||
passwordInput1.input.forceActiveFocus();
|
|
||||||
root.walletName = walletName ? walletName : ""
|
root.walletName = walletName ? walletName : ""
|
||||||
errorTextLabel.text = errorText ? errorText : "";
|
errorTextLabel.text = errorText ? errorText : "";
|
||||||
leftPanel.enabled = false
|
leftPanel.enabled = false
|
||||||
@@ -75,12 +74,14 @@ Item {
|
|||||||
root.visible = true;
|
root.visible = true;
|
||||||
appWindow.hideBalanceForced = true;
|
appWindow.hideBalanceForced = true;
|
||||||
appWindow.updateBalance();
|
appWindow.updateBalance();
|
||||||
|
Qt.callLater(() => passwordInput1.input.forceActiveFocus())
|
||||||
}
|
}
|
||||||
|
|
||||||
function open(walletName, errorText, okButtonText, okButtonIcon) {
|
function open(walletName, errorText, okButtonText, okButtonIcon, backgroundSyncOn) {
|
||||||
passwordDialogMode = true;
|
passwordDialogMode = true;
|
||||||
passphraseDialogMode = false;
|
passphraseDialogMode = false;
|
||||||
newPasswordDialogMode = false;
|
newPasswordDialogMode = false;
|
||||||
|
backgroundSyncing = backgroundSyncOn || false;
|
||||||
root.okButtonText = okButtonText;
|
root.okButtonText = okButtonText;
|
||||||
root.okButtonIcon = okButtonIcon ? okButtonIcon : "";
|
root.okButtonIcon = okButtonIcon ? okButtonIcon : "";
|
||||||
_openInit(walletName, errorText);
|
_openInit(walletName, errorText);
|
||||||
@@ -90,6 +91,7 @@ Item {
|
|||||||
passwordDialogMode = false;
|
passwordDialogMode = false;
|
||||||
passphraseDialogMode = true;
|
passphraseDialogMode = true;
|
||||||
newPasswordDialogMode = false;
|
newPasswordDialogMode = false;
|
||||||
|
backgroundSyncing = false;
|
||||||
_openInit("", "");
|
_openInit("", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +99,7 @@ Item {
|
|||||||
passwordDialogMode = false;
|
passwordDialogMode = false;
|
||||||
passphraseDialogMode = false;
|
passphraseDialogMode = false;
|
||||||
newPasswordDialogMode = true;
|
newPasswordDialogMode = true;
|
||||||
|
backgroundSyncing = false;
|
||||||
_openInit("", "");
|
_openInit("", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,12 +207,13 @@ Item {
|
|||||||
font.family: MoneroComponents.Style.fontLight.name
|
font.family: MoneroComponents.Style.fontLight.name
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
text: qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString;
|
text: qsTr("CAPS LOCK IS ON.") + translationManager.emptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
id: passwordInput1
|
id: passwordInput1
|
||||||
password: true
|
password: true
|
||||||
|
input.focus: root.visible && (appWindow.active || Qt.application.state === Qt.ApplicationActive)
|
||||||
Layout.topMargin: 6
|
Layout.topMargin: 6
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
KeyNavigation.tab: {
|
KeyNavigation.tab: {
|
||||||
@@ -300,6 +304,18 @@ Item {
|
|||||||
onClicked: onOk()
|
onClicked: onOk()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
visible: backgroundSyncing
|
||||||
|
text: qsTr("Syncing in the background...") + translationManager.emptyString;
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.family: MoneroComponents.Style.fontLight.name
|
||||||
|
font.italic: true
|
||||||
|
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
images/ledgerFlex.png
Normal file
BIN
images/ledgerFlex.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
images/ledgerNanoGen5.png
Normal file
BIN
images/ledgerNanoGen5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
@@ -23,7 +23,7 @@ You would think timestamp preservation is no problem when unpacking the zip arch
|
|||||||
|
|
||||||
In any case, after unpacking, check the file dates in the `bin` directory where the installer script looks for them with the dates of the files in the zip file: They must be identical.
|
In any case, after unpacking, check the file dates in the `bin` directory where the installer script looks for them with the dates of the files in the zip file: They must be identical.
|
||||||
|
|
||||||
Note that the the following line in `Monero.iss` is also important regarding file timestamps:
|
Note that the following line in `Monero.iss` is also important regarding file timestamps:
|
||||||
|
|
||||||
TimeStampsInUTC=yes
|
TimeStampsInUTC=yes
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Dirs]
|
[Dirs]
|
||||||
Name: "{app}";
|
Name: "{app}";
|
||||||
Name: "{app}\p2pool"; Permissions: users-full
|
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
; The use of the flag "ignoreversion" for the following entries leads to the following behaviour:
|
; The use of the flag "ignoreversion" for the following entries leads to the following behaviour:
|
||||||
@@ -138,6 +137,7 @@ Type: filesandordirs; Name: "{app}\QtQuick.2"
|
|||||||
Type: filesandordirs; Name: "{app}\Material"
|
Type: filesandordirs; Name: "{app}\Material"
|
||||||
Type: filesandordirs; Name: "{app}\Universal"
|
Type: filesandordirs; Name: "{app}\Universal"
|
||||||
Type: filesandordirs; Name: "{app}\scenegraph"
|
Type: filesandordirs; Name: "{app}\scenegraph"
|
||||||
|
Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
|
||||||
Type: filesandordirs; Name: "{app}\p2pool"
|
Type: filesandordirs; Name: "{app}\p2pool"
|
||||||
Type: files; Name: "{app}\D3Dcompiler_47.dll"
|
Type: files; Name: "{app}\D3Dcompiler_47.dll"
|
||||||
Type: files; Name: "{app}\libbz2-1.dll"
|
Type: files; Name: "{app}\libbz2-1.dll"
|
||||||
@@ -173,6 +173,8 @@ Type: files; Name: "{app}\ssleay32.dll"
|
|||||||
Type: files; Name: "{app}\start-high-dpi.bat"
|
Type: files; Name: "{app}\start-high-dpi.bat"
|
||||||
Type: files; Name: "{group}\Utilities\x (Check Blockchain Folder).lnk"
|
Type: files; Name: "{group}\Utilities\x (Check Blockchain Folder).lnk"
|
||||||
|
|
||||||
|
[UninstallDelete]
|
||||||
|
Type: filesandordirs; Name: "{localappdata}\monero-core\p2pool"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:";
|
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:";
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ function addressTruncatePretty(address, blocks){
|
|||||||
if(typeof(address) === "undefined") return "";
|
if(typeof(address) === "undefined") return "";
|
||||||
if(typeof(blocks) === "undefined") blocks = 2;
|
if(typeof(blocks) === "undefined") blocks = 2;
|
||||||
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
|
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
|
||||||
var ret = "";
|
|
||||||
return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' ');
|
return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function ago(epoch) {
|
|||||||
// Returns '<delta> [seconds|minutes|hours|days] ago' string given an epoch
|
// Returns '<delta> [seconds|minutes|hours|days] ago' string given an epoch
|
||||||
|
|
||||||
var now = new Date().getTime() / 1000;
|
var now = new Date().getTime() / 1000;
|
||||||
var delta = now - epoch;
|
var delta = Math.max(now - epoch, 0);
|
||||||
|
|
||||||
if(delta < 60)
|
if(delta < 60)
|
||||||
return qsTr("%n second(s) ago", "0", Math.floor(delta))
|
return qsTr("%n second(s) ago", "0", Math.floor(delta))
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -22,7 +22,7 @@ Lojban
|
|||||||
<!-- <language display_name="English (ZA)" locale="en_SA" wallet_language="English" flag="/lang/flags/za.png" qs="none"/> -->
|
<!-- <language display_name="English (ZA)" locale="en_SA" wallet_language="English" flag="/lang/flags/za.png" qs="none"/> -->
|
||||||
<!-- <language display_name="العربية (PS)" locale="ar_PS" wallet_language="English" flag="/lang/flags/ps.png" qs="none"/> -->
|
<!-- <language display_name="العربية (PS)" locale="ar_PS" wallet_language="English" flag="/lang/flags/ps.png" qs="none"/> -->
|
||||||
<language display_name="Deutsch" locale="de_DE" wallet_language="Deutsch" flag="/lang/flags/de.png" qs="none"/>
|
<language display_name="Deutsch" locale="de_DE" wallet_language="Deutsch" flag="/lang/flags/de.png" qs="none"/>
|
||||||
<language display_name="Esperanto" locale="eo" wallet_language="Esperanto" flag="/lang/flags/esperanto.png" qs="none"/>
|
<language display_name="Esperanto" locale="eo_EO" wallet_language="Esperanto" flag="/lang/flags/eo.png" qs="none"/>
|
||||||
<language display_name="Español" locale="es_ES" wallet_language="Español" flag="/lang/flags/es.png" qs="none"/>
|
<language display_name="Español" locale="es_ES" wallet_language="Español" flag="/lang/flags/es.png" qs="none"/>
|
||||||
<language display_name="Français" locale="fr_FR" wallet_language="Français" flag="/lang/flags/fr.png" qs="none"/>
|
<language display_name="Français" locale="fr_FR" wallet_language="Français" flag="/lang/flags/fr.png" qs="none"/>
|
||||||
<language display_name="Svenska" locale="sv_SE" wallet_language="English" flag="/lang/flags/se.png" qs="none"/>
|
<language display_name="Svenska" locale="sv_SE" wallet_language="English" flag="/lang/flags/se.png" qs="none"/>
|
||||||
|
|||||||
122
main.qml
122
main.qml
@@ -94,11 +94,13 @@ ApplicationWindow {
|
|||||||
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
||||||
property string currentDaemonAddress;
|
property string currentDaemonAddress;
|
||||||
property int disconnectedEpoch: 0
|
property int disconnectedEpoch: 0
|
||||||
property int estimatedBlockchainSize: persistentSettings.pruneBlockchain ? 55 : 150 // GB
|
property int estimatedBlockchainSize: persistentSettings.pruneBlockchain ? 110 : 270 // GB
|
||||||
property alias viewState: rootItem.state
|
property alias viewState: rootItem.state
|
||||||
property string prevSplashText;
|
property string prevSplashText;
|
||||||
property bool splashDisplayedBeforeButtonRequest;
|
property bool splashDisplayedBeforeButtonRequest;
|
||||||
property bool themeTransition: false
|
property bool themeTransition: false
|
||||||
|
property int backgroundSyncType: Wallet.BackgroundSync_Off;
|
||||||
|
property bool isQuitting: false
|
||||||
|
|
||||||
// fiat price conversion
|
// fiat price conversion
|
||||||
property real fiatPrice: 0
|
property real fiatPrice: 0
|
||||||
@@ -133,6 +135,12 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lock() {
|
function lock() {
|
||||||
|
if (currentWallet && currentWallet.getBackgroundSyncType() != Wallet.BackgroundSync_Off) {
|
||||||
|
appWindow.showProcessingSplash(qsTr("Locking..."));
|
||||||
|
currentWallet.startBackgroundSync()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
if(walletPassword === passwordDialog.password)
|
if(walletPassword === passwordDialog.password)
|
||||||
@@ -275,6 +283,15 @@ ApplicationWindow {
|
|||||||
persistentSettings.kdfRounds);
|
persistentSettings.kdfRounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gracefulQuit() {
|
||||||
|
if (isQuitting)
|
||||||
|
return;
|
||||||
|
isQuitting = true;
|
||||||
|
closeWallet(function() {
|
||||||
|
Qt.quit();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function closeWallet(callback) {
|
function closeWallet(callback) {
|
||||||
|
|
||||||
// Disconnect all listeners
|
// Disconnect all listeners
|
||||||
@@ -288,6 +305,9 @@ ApplicationWindow {
|
|||||||
currentWallet.heightRefreshed.disconnect(onHeightRefreshed);
|
currentWallet.heightRefreshed.disconnect(onHeightRefreshed);
|
||||||
currentWallet.refreshed.disconnect(onWalletRefresh)
|
currentWallet.refreshed.disconnect(onWalletRefresh)
|
||||||
currentWallet.updated.disconnect(onWalletUpdate)
|
currentWallet.updated.disconnect(onWalletUpdate)
|
||||||
|
currentWallet.backgroundSyncSetup.disconnect(onBackgroundSyncSetup)
|
||||||
|
currentWallet.backgroundSyncStarted.disconnect(onBackgroundSyncStarted)
|
||||||
|
currentWallet.backgroundSyncStopped.disconnect(onBackgroundSyncStopped)
|
||||||
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
currentWallet.newBlock.disconnect(onWalletNewBlock)
|
||||||
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
currentWallet.moneySpent.disconnect(onWalletMoneySent)
|
||||||
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
currentWallet.moneyReceived.disconnect(onWalletMoneyReceived)
|
||||||
@@ -324,6 +344,7 @@ ApplicationWindow {
|
|||||||
walletName = usefulName(wallet.path)
|
walletName = usefulName(wallet.path)
|
||||||
|
|
||||||
viewOnly = currentWallet.viewOnly;
|
viewOnly = currentWallet.viewOnly;
|
||||||
|
backgroundSyncType = currentWallet.getBackgroundSyncType();
|
||||||
|
|
||||||
// New wallets saves the testnet flag in keys file.
|
// New wallets saves the testnet flag in keys file.
|
||||||
if(persistentSettings.nettype != currentWallet.nettype) {
|
if(persistentSettings.nettype != currentWallet.nettype) {
|
||||||
@@ -335,6 +356,9 @@ ApplicationWindow {
|
|||||||
currentWallet.heightRefreshed.connect(onHeightRefreshed);
|
currentWallet.heightRefreshed.connect(onHeightRefreshed);
|
||||||
currentWallet.refreshed.connect(onWalletRefresh)
|
currentWallet.refreshed.connect(onWalletRefresh)
|
||||||
currentWallet.updated.connect(onWalletUpdate)
|
currentWallet.updated.connect(onWalletUpdate)
|
||||||
|
currentWallet.backgroundSyncSetup.connect(onBackgroundSyncSetup)
|
||||||
|
currentWallet.backgroundSyncStarted.connect(onBackgroundSyncStarted)
|
||||||
|
currentWallet.backgroundSyncStopped.connect(onBackgroundSyncStopped)
|
||||||
currentWallet.newBlock.connect(onWalletNewBlock)
|
currentWallet.newBlock.connect(onWalletNewBlock)
|
||||||
currentWallet.moneySpent.connect(onWalletMoneySent)
|
currentWallet.moneySpent.connect(onWalletMoneySent)
|
||||||
currentWallet.moneyReceived.connect(onWalletMoneyReceived)
|
currentWallet.moneyReceived.connect(onWalletMoneyReceived)
|
||||||
@@ -544,6 +568,15 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't allow opening background wallets in the GUI
|
||||||
|
if (wallet.isBackgroundWallet()) {
|
||||||
|
passwordDialog.onCancel();
|
||||||
|
appWindow.showStatusMessage(qsTr("Can't open background wallets in the GUI"),6);
|
||||||
|
console.log("closing background wallet");
|
||||||
|
closeWallet();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// wallet opened successfully, subscribing for wallet updates
|
// wallet opened successfully, subscribing for wallet updates
|
||||||
connectWallet(wallet)
|
connectWallet(wallet)
|
||||||
|
|
||||||
@@ -585,16 +618,17 @@ ApplicationWindow {
|
|||||||
devicePassphraseDialog.open(on_device)
|
devicePassphraseDialog.open(on_device)
|
||||||
}
|
}
|
||||||
|
|
||||||
function onWalletUpdate() {
|
function onWalletUpdate(stoppedBackgroundSync) {
|
||||||
if (!currentWallet)
|
if (!currentWallet)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
console.log(">>> wallet updated")
|
console.log(">>> wallet updated")
|
||||||
updateBalance();
|
updateBalance();
|
||||||
// Update history if new block found since last update
|
// Update history if new block found since last update or background sync was just stopped
|
||||||
if(foundNewBlock) {
|
if(foundNewBlock || stoppedBackgroundSync) {
|
||||||
|
if (foundNewBlock)
|
||||||
|
console.log("New block found - updating history")
|
||||||
foundNewBlock = false;
|
foundNewBlock = false;
|
||||||
console.log("New block found - updating history")
|
|
||||||
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
currentWallet.history.refresh(currentWallet.currentSubaddressAccount)
|
||||||
|
|
||||||
if(middlePanel.state == "History")
|
if(middlePanel.state == "History")
|
||||||
@@ -602,6 +636,61 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onBackgroundSyncSetup() {
|
||||||
|
console.log(">>> background sync setup");
|
||||||
|
hideProcessingSplash();
|
||||||
|
if (currentWallet.status !== Wallet.Status_Ok) {
|
||||||
|
console.error("Error setting up background sync: ", currentWallet.errorString);
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
appWindow.backgroundSyncType = currentWallet.getBackgroundSyncType();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onBackgroundSyncStarted() {
|
||||||
|
console.log(">>> background sync started");
|
||||||
|
hideProcessingSplash();
|
||||||
|
var started = currentWallet.status === Wallet.Status_Ok;
|
||||||
|
if (!started) {
|
||||||
|
console.error("Error starting background sync: ", currentWallet.errorString);
|
||||||
|
appWindow.showStatusMessage(currentWallet.errorString, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
|
if(walletPassword === passwordDialog.password) {
|
||||||
|
if (currentWallet && started) {
|
||||||
|
appWindow.showProcessingSplash(qsTr("Unlocking..."));
|
||||||
|
currentWallet.stopBackgroundSync(walletPassword);
|
||||||
|
} else {
|
||||||
|
passwordDialog.close();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
passwordDialog.showError(qsTr("Wrong password") + translationManager.emptyString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
passwordDialog.open(usefulName(persistentSettings.wallet_path), "", "", "", started);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onBackgroundSyncStopped() {
|
||||||
|
console.log(">>> background sync stopped");
|
||||||
|
var stopped = currentWallet.status === Wallet.Status_Ok;
|
||||||
|
if (!stopped) {
|
||||||
|
hideProcessingSplash();
|
||||||
|
console.error("Error stopping background sync: ", currentWallet.errorString);
|
||||||
|
|
||||||
|
// If there is an error stopping background sync, the spend key
|
||||||
|
// won't be loaded and the wallet will be in a broken state. Don't
|
||||||
|
// let the user continue normal wallet operations in this state.
|
||||||
|
passwordDialog.showError(qsTr("Error stopping background sync: ") + currentWallet.errorString);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
onWalletUpdate(stopped);
|
||||||
|
hideProcessingSplash();
|
||||||
|
passwordDialog.close();
|
||||||
|
}
|
||||||
|
|
||||||
function connectRemoteNode() {
|
function connectRemoteNode() {
|
||||||
console.log("connecting remote node");
|
console.log("connecting remote node");
|
||||||
|
|
||||||
@@ -1658,7 +1747,7 @@ ApplicationWindow {
|
|||||||
onRejected: console.log("data dir selection canceled")
|
onRejected: console.log("data dir selection canceled")
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.fileUrl)
|
var dataDir = walletManager.urlToLocalPath(blockchainFileDialog.fileUrl)
|
||||||
var validator = daemonManager.validateDataDir(dataDir);
|
var validator = daemonManager.validateDataDir(dataDir, estimatedBlockchainSize);
|
||||||
if(validator.valid) {
|
if(validator.valid) {
|
||||||
persistentSettings.blockchainDataDir = dataDir;
|
persistentSettings.blockchainDataDir = dataDir;
|
||||||
} else {
|
} else {
|
||||||
@@ -2258,6 +2347,20 @@ ApplicationWindow {
|
|||||||
var inactivity = Utils.epoch() - appWindow.userLastActive;
|
var inactivity = Utils.epoch() - appWindow.userLastActive;
|
||||||
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return;
|
||||||
|
|
||||||
|
if (inputDialogVisible) inputDialog.close()
|
||||||
|
remoteNodeDialog.close();
|
||||||
|
informationPopup.close()
|
||||||
|
txConfirmationPopup.close()
|
||||||
|
txConfirmationPopup.clearFields()
|
||||||
|
txConfirmationPopup.rejected()
|
||||||
|
successfulTxPopup.close();
|
||||||
|
|
||||||
|
if (currentWallet && currentWallet.getBackgroundSyncType() != Wallet.BackgroundSync_Off) {
|
||||||
|
appWindow.showProcessingSplash(qsTr("Locking..."));
|
||||||
|
currentWallet.startBackgroundSync()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
if(walletPassword === passwordDialog.password){
|
if(walletPassword === passwordDialog.password){
|
||||||
passwordDialog.close();
|
passwordDialog.close();
|
||||||
@@ -2270,13 +2373,6 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
if (inputDialogVisible) inputDialog.close()
|
|
||||||
remoteNodeDialog.close();
|
|
||||||
informationPopup.close()
|
|
||||||
txConfirmationPopup.close()
|
|
||||||
txConfirmationPopup.clearFields()
|
|
||||||
txConfirmationPopup.rejected()
|
|
||||||
successfulTxPopup.close();
|
|
||||||
passwordDialog.open();
|
passwordDialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
monero
2
monero
Submodule monero updated: f1311d4237...dbcc7d212c
@@ -1447,7 +1447,6 @@ Rectangle {
|
|||||||
var txs = [];
|
var txs = [];
|
||||||
for (var i = 0; i < root.txData.length; i++){
|
for (var i = 0; i < root.txData.length; i++){
|
||||||
var item = root.txData[i];
|
var item = root.txData[i];
|
||||||
var matched = "";
|
|
||||||
|
|
||||||
// daterange filtering
|
// daterange filtering
|
||||||
if(item.timestamp < fromDate || item.timestamp > toDate){
|
if(item.timestamp < fromDate || item.timestamp > toDate){
|
||||||
@@ -1543,6 +1542,7 @@ Rectangle {
|
|||||||
function updateTransactionsFromModel() {
|
function updateTransactionsFromModel() {
|
||||||
// This function copies the items of `appWindow.currentWallet.historyModel` to `root.txModelData`, as a list of javascript objects
|
// This function copies the items of `appWindow.currentWallet.historyModel` to `root.txModelData`, as a list of javascript objects
|
||||||
if(currentWallet == null || typeof currentWallet.history === "undefined" ) return;
|
if(currentWallet == null || typeof currentWallet.history === "undefined" ) return;
|
||||||
|
if(currentWallet.isBackgroundSyncing()) return;
|
||||||
|
|
||||||
var _model = root.model;
|
var _model = root.model;
|
||||||
var total = 0
|
var total = 0
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ Rectangle {
|
|||||||
|
|
||||||
ListElement { column1: qsTr("Mini") ; column2: ""; priority: 0}
|
ListElement { column1: qsTr("Mini") ; column2: ""; priority: 0}
|
||||||
ListElement { column1: qsTr("Main") ; column2: ""; priority: 1}
|
ListElement { column1: qsTr("Main") ; column2: ""; priority: 1}
|
||||||
|
ListElement { column1: qsTr("Nano") ; column2: ""; priority: 2}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -400,7 +401,7 @@ Rectangle {
|
|||||||
|
|
||||||
MoneroComponents.Tooltip {
|
MoneroComponents.Tooltip {
|
||||||
id: chainsHelpTooltip
|
id: chainsHelpTooltip
|
||||||
text: qsTr("Use the mini chain if you have a low hashrate.") + translationManager.emptyString
|
text: qsTr("Use the mini or nano chains if you have a low hashrate.") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
@@ -448,26 +449,43 @@ Rectangle {
|
|||||||
id: flagsHelpTooltip
|
id: flagsHelpTooltip
|
||||||
text: "
|
text: "
|
||||||
Usage:<br>
|
Usage:<br>
|
||||||
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!<br>
|
--wallet Wallet address to mine to. Subaddresses and integrated addresses are not supported!<br>
|
||||||
--host IP address of your Monero node, default is 127.0.0.1<br>
|
--host IP address of your Monero node, default is 127.0.0.1<br>
|
||||||
--rpc-port monerod RPC API port number, default is 18081<br>
|
--rpc-port monerod RPC API port number, default is 18081<br>
|
||||||
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod\'s \"--zmq-pub\" command line parameter)<br>
|
--zmq-port monerod ZMQ pub port number, default is 18083 (same port as in monerod\'s \"--zmq-pub\" command line parameter)<br>
|
||||||
--stratum Comma-separated list of IP:port for stratum server to listen on<br>
|
--stratum Comma-separated list of IP:port for stratum server to listen on<br>
|
||||||
--p2p Comma-separated list of IP:port for p2p server to listen on<br>
|
--p2p Comma-separated list of IP:port for p2p server to listen on<br>
|
||||||
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to<br>
|
--addpeers Comma-separated list of IP:port of other p2pool nodes to connect to<br>
|
||||||
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM<br>
|
--stratum-ban-time N Number of seconds to ban misbehaving stratum client, default is 600<br>
|
||||||
--loglevel Verbosity of the log, integer number between 0 and 6<br>
|
--light-mode Don't allocate RandomX dataset, saves 2GB of RAM<br>
|
||||||
--config Name of the p2pool config file<br>
|
--loglevel Verbosity of the log, integer number between 0 and 6<br>
|
||||||
--data-api Path to the p2pool JSON data (use it in tandem with an external web-server)<br>
|
--data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory<br>
|
||||||
--local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics<br>
|
--sidechain-config Name of the p2pool sidechain parameters file (only use it if you run your own sidechain)<br>
|
||||||
--stratum-api An alias for --local-api<br>
|
--data-api Path to the p2pool JSON data (use it in tandem with an external web-server)<br>
|
||||||
--no-cache Disable p2pool.cache<br>
|
--local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics<br>
|
||||||
--no-color Disable colors in console output<br>
|
--stratum-api An alias for --local-api<br>
|
||||||
--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes<br>
|
--no-cache Disable p2pool.cache<br>
|
||||||
--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000)<br>
|
--no-color Disable colors in console output<br>
|
||||||
--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000)<br>
|
--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes<br>
|
||||||
--start-mining N Start built-in miner using N threads (any value between 1 and 64)<br>
|
--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000)<br>
|
||||||
--help Show this help message
|
--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000)<br>
|
||||||
|
--start-mining N Start built-in miner using N threads (any value between 1 and 64)<br>
|
||||||
|
--no-autodiff Disable automatic difficulty adjustment for miners connected to stratum (WARNING: incompatible with Nicehash and MRR)<br>
|
||||||
|
--rpc-login Specify username[:password] required for Monero RPC server<br>
|
||||||
|
--socks5 Specify IP:port of a SOCKS5 proxy to use for outgoing connections<br>
|
||||||
|
--no-dns Disable DNS queries, use only IP addresses to connect to peers (seed node DNS will be unavailable too)<br>
|
||||||
|
--p2p-external-port Port number that your router uses for mapping to your local p2p port. Use it if you are behind a NAT and still want to accept incoming connections<br>
|
||||||
|
--no-upnp Disable UPnP port forwarding<br>
|
||||||
|
--no-igd An alias for --no-upnp<br>
|
||||||
|
--upnp-stratum Port forward Stratum port (it's not forwarded by default)<br>
|
||||||
|
--merge-mine IP:port and wallet address for another blockchain to merge mine with<br>
|
||||||
|
--version Print p2pool's version and build details<br>
|
||||||
|
--tls-cert file Load TLS certificate chain from \"file\" in the PEM format<br>
|
||||||
|
--tls-cert-key file Load TLS certificate private key from \"file\" in the PEM format<br>
|
||||||
|
--rpc-ssl Enable SSL on RPC connections to the Monero node<br>
|
||||||
|
--rpc-ssl-fingerprint base64-encoded fingerprint of the Monero node's certificate (optional, use it for certificate pinning)<br>
|
||||||
|
--no-stratum-http Disable HTTP on Stratum ports<br>
|
||||||
|
--help Show this help message
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,6 +648,9 @@ allArgs = allArgs.filter( ( el ) => !defaultArgs.includes( el.split(" ")[0] ) )
|
|||||||
if (chainDropdown.currentIndex === 1) {
|
if (chainDropdown.currentIndex === 1) {
|
||||||
chain = "main"
|
chain = "main"
|
||||||
}
|
}
|
||||||
|
if (chainDropdown.currentIndex === 2) {
|
||||||
|
chain = "nano"
|
||||||
|
}
|
||||||
var p2poolArgs = persistentSettings.p2poolFlags;
|
var p2poolArgs = persistentSettings.p2poolFlags;
|
||||||
var success = p2poolManager.start(p2poolArgs, address, chain, threads);
|
var success = p2poolManager.start(p2poolArgs, address, chain, threads);
|
||||||
if (success)
|
if (success)
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ import QtQuick.Layouts 1.1
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
|
import moneroComponents.Wallet 1.0
|
||||||
|
|
||||||
import "../../js/Utils.js" as Utils
|
import "../../js/Utils.js" as Utils
|
||||||
import "../../js/Windows.js" as Windows
|
import "../../js/Windows.js" as Windows
|
||||||
import "../../components" as MoneroComponents
|
import "../../components" as MoneroComponents
|
||||||
@@ -155,6 +157,28 @@ Rectangle {
|
|||||||
onMoved: persistentSettings.lockOnUserInActivityInterval = value
|
onMoved: persistentSettings.lockOnUserInActivityInterval = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.CheckBox {
|
||||||
|
id: backgroundSyncCheckbox
|
||||||
|
visible: !!currentWallet && !currentWallet.isHwBacked() && !appWindow.viewOnly
|
||||||
|
checked: appWindow.backgroundSyncType != Wallet.BackgroundSync_Off
|
||||||
|
text: qsTr("Sync in the background when locked") + translationManager.emptyString
|
||||||
|
toggleOnClick: false
|
||||||
|
onClicked: {
|
||||||
|
if (currentWallet && appWindow) {
|
||||||
|
appWindow.showProcessingSplash(qsTr("Updating settings..."))
|
||||||
|
|
||||||
|
// TODO: add support for custom background password option
|
||||||
|
var newBackgroundSyncType = Wallet.BackgroundSync_Off
|
||||||
|
if (currentWallet.getBackgroundSyncType() === Wallet.BackgroundSync_Off)
|
||||||
|
newBackgroundSyncType = Wallet.BackgroundSync_ReusePassword
|
||||||
|
|
||||||
|
// TODO: don't keep the wallet password in memory on the appWindow
|
||||||
|
// https://github.com/monero-project/monero-gui/issues/1537#issuecomment-410055329
|
||||||
|
currentWallet.setupBackgroundSync(newBackgroundSyncType, appWindow.walletPassword)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
MoneroComponents.CheckBox {
|
||||||
checked: persistentSettings.askStopLocalNode
|
checked: persistentSettings.askStopLocalNode
|
||||||
onClicked: persistentSettings.askStopLocalNode = !persistentSettings.askStopLocalNode
|
onClicked: persistentSettings.askStopLocalNode = !persistentSettings.askStopLocalNode
|
||||||
|
|||||||
4
qml.qrc
4
qml.qrc
@@ -64,7 +64,7 @@
|
|||||||
<file>lang/flags/cz.png</file>
|
<file>lang/flags/cz.png</file>
|
||||||
<file>lang/flags/dk.png</file>
|
<file>lang/flags/dk.png</file>
|
||||||
<file>lang/flags/eg.png</file>
|
<file>lang/flags/eg.png</file>
|
||||||
<file>lang/flags/esperanto.png</file>
|
<file>lang/flags/eo.png</file>
|
||||||
<file>lang/flags/fi.png</file>
|
<file>lang/flags/fi.png</file>
|
||||||
<file>lang/flags/fr.png</file>
|
<file>lang/flags/fr.png</file>
|
||||||
<file>lang/flags/de.png</file>
|
<file>lang/flags/de.png</file>
|
||||||
@@ -281,7 +281,9 @@
|
|||||||
<file>images/ledgerNanoS.png</file>
|
<file>images/ledgerNanoS.png</file>
|
||||||
<file>images/ledgerNanoSPlus.png</file>
|
<file>images/ledgerNanoSPlus.png</file>
|
||||||
<file>images/ledgerNanoX.png</file>
|
<file>images/ledgerNanoX.png</file>
|
||||||
|
<file>images/ledgerNanoGen5.png</file>
|
||||||
<file>images/ledgerStax.png</file>
|
<file>images/ledgerStax.png</file>
|
||||||
|
<file>images/ledgerFlex.png</file>
|
||||||
<file>images/trezor3.png</file>
|
<file>images/trezor3.png</file>
|
||||||
<file>images/trezor5.png</file>
|
<file>images/trezor5.png</file>
|
||||||
<file>images/trezorT.png</file>
|
<file>images/trezorT.png</file>
|
||||||
|
|||||||
@@ -38,9 +38,6 @@
|
|||||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|
||||||
<key>NSRequiresAquaSystemAppearance</key>
|
|
||||||
<string>True</string>
|
|
||||||
|
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ void DaemonManager::exit()
|
|||||||
m_app_exit = true;
|
m_app_exit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap DaemonManager::validateDataDir(const QString &dataDir) const
|
QVariantMap DaemonManager::validateDataDir(const QString &dataDir, const int estimatedBlockchainSize) const
|
||||||
{
|
{
|
||||||
QVariantMap result;
|
QVariantMap result;
|
||||||
bool valid = true;
|
bool valid = true;
|
||||||
@@ -312,9 +312,8 @@ QVariantMap DaemonManager::validateDataDir(const QString &dataDir) const
|
|||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure there is 75GB storage available
|
|
||||||
storageAvailable = storage.bytesAvailable()/1000/1000/1000;
|
storageAvailable = storage.bytesAvailable()/1000/1000/1000;
|
||||||
if (storageAvailable < 75) {
|
if (storageAvailable < estimatedBlockchainSize) {
|
||||||
valid = false;
|
valid = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -339,7 +338,7 @@ bool DaemonManager::checkLmdbExists(QString datadir) {
|
|||||||
if (datadir.isEmpty() || datadir.isNull()) {
|
if (datadir.isEmpty() || datadir.isNull()) {
|
||||||
datadir = QString::fromStdString(tools::get_default_data_dir());
|
datadir = QString::fromStdString(tools::get_default_data_dir());
|
||||||
}
|
}
|
||||||
return validateDataDir(datadir).value("lmdbExists").value<bool>();
|
return QDir(datadir + "/lmdb").exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DaemonManager::getArgs(const QString &dataDir) {
|
QString DaemonManager::getArgs(const QString &dataDir) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
// Send daemon command from qml and prints output in console window.
|
// Send daemon command from qml and prints output in console window.
|
||||||
Q_INVOKABLE void sendCommandAsync(const QStringList &cmd, NetworkType::Type nettype, const QString &dataDir, const QJSValue& callback) const;
|
Q_INVOKABLE void sendCommandAsync(const QStringList &cmd, NetworkType::Type nettype, const QString &dataDir, const QJSValue& callback) const;
|
||||||
Q_INVOKABLE void exit();
|
Q_INVOKABLE void exit();
|
||||||
Q_INVOKABLE QVariantMap validateDataDir(const QString &dataDir) const;
|
Q_INVOKABLE QVariantMap validateDataDir(const QString &dataDir, const int estimatedBlockchainSizeGb) const;
|
||||||
Q_INVOKABLE bool checkLmdbExists(QString datadir);
|
Q_INVOKABLE bool checkLmdbExists(QString datadir);
|
||||||
Q_INVOKABLE QString getArgs(const QString &dataDir);
|
Q_INVOKABLE QString getArgs(const QString &dataDir);
|
||||||
|
|
||||||
|
|||||||
@@ -529,6 +529,69 @@ bool Wallet::scanTransactions(const QVector<QString> &txids)
|
|||||||
return m_walletImpl->scanTransactions(c);
|
return m_walletImpl->scanTransactions(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Wallet::setupBackgroundSync(const Wallet::BackgroundSyncType background_sync_type, const QString &wallet_password)
|
||||||
|
{
|
||||||
|
qDebug() << "Setting up background sync";
|
||||||
|
bool refreshEnabled = m_refreshEnabled;
|
||||||
|
pauseRefresh();
|
||||||
|
|
||||||
|
// run inside scheduler because of lag when stopping/starting refresh
|
||||||
|
m_scheduler.run([this, refreshEnabled, background_sync_type, &wallet_password] {
|
||||||
|
m_walletImpl->setupBackgroundSync(
|
||||||
|
static_cast<Monero::Wallet::BackgroundSyncType>(background_sync_type),
|
||||||
|
wallet_password.toStdString(),
|
||||||
|
Monero::optional<std::string>());
|
||||||
|
if (refreshEnabled)
|
||||||
|
startRefresh();
|
||||||
|
emit backgroundSyncSetup();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Wallet::BackgroundSyncType Wallet::getBackgroundSyncType() const
|
||||||
|
{
|
||||||
|
return static_cast<BackgroundSyncType>(m_walletImpl->getBackgroundSyncType());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Wallet::isBackgroundWallet() const
|
||||||
|
{
|
||||||
|
return m_walletImpl->isBackgroundWallet();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Wallet::isBackgroundSyncing() const
|
||||||
|
{
|
||||||
|
return m_walletImpl->isBackgroundSyncing();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Wallet::startBackgroundSync()
|
||||||
|
{
|
||||||
|
qDebug() << "Starting background sync";
|
||||||
|
bool refreshEnabled = m_refreshEnabled;
|
||||||
|
pauseRefresh();
|
||||||
|
|
||||||
|
// run inside scheduler because of lag when stopping/starting refresh
|
||||||
|
m_scheduler.run([this, refreshEnabled] {
|
||||||
|
m_walletImpl->startBackgroundSync();
|
||||||
|
if (refreshEnabled)
|
||||||
|
startRefresh();
|
||||||
|
emit backgroundSyncStarted();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Wallet::stopBackgroundSync(const QString &password)
|
||||||
|
{
|
||||||
|
qDebug() << "Stopping background sync";
|
||||||
|
bool refreshEnabled = m_refreshEnabled;
|
||||||
|
pauseRefresh();
|
||||||
|
|
||||||
|
// run inside scheduler because of lag when stopping/starting refresh
|
||||||
|
m_scheduler.run([this, password, refreshEnabled] {
|
||||||
|
m_walletImpl->stopBackgroundSync(password.toStdString());
|
||||||
|
if (refreshEnabled)
|
||||||
|
startRefresh();
|
||||||
|
emit backgroundSyncStopped();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool Wallet::refresh(bool historyAndSubaddresses /* = true */)
|
bool Wallet::refresh(bool historyAndSubaddresses /* = true */)
|
||||||
{
|
{
|
||||||
refreshingSet(true);
|
refreshingSet(true);
|
||||||
|
|||||||
@@ -112,6 +112,14 @@ public:
|
|||||||
|
|
||||||
Q_ENUM(ConnectionStatus)
|
Q_ENUM(ConnectionStatus)
|
||||||
|
|
||||||
|
enum BackgroundSyncType {
|
||||||
|
BackgroundSync_Off = Monero::Wallet::BackgroundSync_Off,
|
||||||
|
BackgroundSync_ReusePassword = Monero::Wallet::BackgroundSync_ReusePassword,
|
||||||
|
BackgroundSync_CustomPassword = Monero::Wallet::BackgroundSync_CustomPassword
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_ENUM(BackgroundSyncType)
|
||||||
|
|
||||||
//! returns mnemonic seed
|
//! returns mnemonic seed
|
||||||
QString getSeed() const;
|
QString getSeed() const;
|
||||||
|
|
||||||
@@ -215,6 +223,17 @@ public:
|
|||||||
//! scan transactions
|
//! scan transactions
|
||||||
Q_INVOKABLE bool scanTransactions(const QVector<QString> &txids);
|
Q_INVOKABLE bool scanTransactions(const QVector<QString> &txids);
|
||||||
|
|
||||||
|
Q_INVOKABLE void setupBackgroundSync(const BackgroundSyncType background_sync_type, const QString &wallet_password);
|
||||||
|
Q_INVOKABLE BackgroundSyncType getBackgroundSyncType() const;
|
||||||
|
Q_INVOKABLE bool isBackgroundWallet() const;
|
||||||
|
Q_INVOKABLE bool isBackgroundSyncing() const;
|
||||||
|
|
||||||
|
//! scan in the background with just the view key (wipe the spend key)
|
||||||
|
Q_INVOKABLE void startBackgroundSync();
|
||||||
|
|
||||||
|
//! bring the spend key back and process background synced txs
|
||||||
|
Q_INVOKABLE void stopBackgroundSync(const QString &password);
|
||||||
|
|
||||||
//! refreshes the wallet
|
//! refreshes the wallet
|
||||||
Q_INVOKABLE bool refresh(bool historyAndSubaddresses = true);
|
Q_INVOKABLE bool refresh(bool historyAndSubaddresses = true);
|
||||||
|
|
||||||
@@ -369,6 +388,9 @@ signals:
|
|||||||
void moneyReceived(const QString &txId, quint64 amount);
|
void moneyReceived(const QString &txId, quint64 amount);
|
||||||
void unconfirmedMoneyReceived(const QString &txId, quint64 amount);
|
void unconfirmedMoneyReceived(const QString &txId, quint64 amount);
|
||||||
void newBlock(quint64 height, quint64 targetHeight);
|
void newBlock(quint64 height, quint64 targetHeight);
|
||||||
|
void backgroundSyncSetup() const;
|
||||||
|
void backgroundSyncStarted() const;
|
||||||
|
void backgroundSyncStopped() const;
|
||||||
void addressBookChanged() const;
|
void addressBookChanged() const;
|
||||||
void historyModelChanged() const;
|
void historyModelChanged() const;
|
||||||
void walletCreationHeightChanged();
|
void walletCreationHeightChanged();
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ filter::filter(QObject *parent) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||||
|
if (ev->type() == QEvent::Quit) {
|
||||||
|
emit quitRequested();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// macOS sends fileopen signal for incoming uri handlers
|
// macOS sends fileopen signal for incoming uri handlers
|
||||||
if (ev->type() == QEvent::FileOpen) {
|
if (ev->type() == QEvent::FileOpen) {
|
||||||
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent *>(ev);
|
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent *>(ev);
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ protected:
|
|||||||
bool eventFilter(QObject *obj, QEvent *ev);
|
bool eventFilter(QObject *obj, QEvent *ev);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void quitRequested();
|
||||||
void sequencePressed(const QVariant &o, const QVariant &seq);
|
void sequencePressed(const QVariant &o, const QVariant &seq);
|
||||||
void sequenceReleased(const QVariant &o, const QVariant &seq);
|
void sequenceReleased(const QVariant &o, const QVariant &seq);
|
||||||
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
|
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
|
||||||
|
|||||||
@@ -562,6 +562,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
qCritical() << "QrCodeScanner : something went wrong !";
|
qCritical() << "QrCodeScanner : something went wrong !";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QObject::connect(eventFilter, &filter::quitRequested, rootObject, [rootObject]{ QMetaObject::invokeMethod(rootObject, "gracefulQuit", Qt::QueuedConnection); });
|
||||||
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
|
QObject::connect(eventFilter, SIGNAL(sequencePressed(QVariant,QVariant)), rootObject, SLOT(sequencePressed(QVariant,QVariant)));
|
||||||
QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(QVariant,QVariant)));
|
QObject::connect(eventFilter, SIGNAL(sequenceReleased(QVariant,QVariant)), rootObject, SLOT(sequenceReleased(QVariant,QVariant)));
|
||||||
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
|
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <QRandomGenerator>
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#include "qt/macoshelper.h"
|
#include "qt/macoshelper.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -246,6 +248,18 @@ QString OSHelper::temporaryPath() const
|
|||||||
return QDir::tempPath();
|
return QDir::tempPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString OSHelper::randomPassword(int numBytes) const
|
||||||
|
{
|
||||||
|
numBytes = qBound(16, numBytes, 128);
|
||||||
|
|
||||||
|
QByteArray buf(numBytes, Qt::Uninitialized);
|
||||||
|
auto *rng = QRandomGenerator::system();
|
||||||
|
for (int i = 0; i < numBytes; ++i)
|
||||||
|
buf[i] = char(rng->generate() & 0xFF);
|
||||||
|
|
||||||
|
return QString::fromLatin1(buf.toBase64(QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals));
|
||||||
|
}
|
||||||
|
|
||||||
bool OSHelper::installed() const
|
bool OSHelper::installed() const
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|||||||
@@ -51,14 +51,15 @@ public:
|
|||||||
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
|
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
|
||||||
Q_INVOKABLE QString temporaryFilename() const;
|
Q_INVOKABLE QString temporaryFilename() const;
|
||||||
Q_INVOKABLE QString temporaryPath() const;
|
Q_INVOKABLE QString temporaryPath() const;
|
||||||
|
Q_INVOKABLE QString randomPassword(int numBytes = 32) const;
|
||||||
Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const;
|
Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const;
|
||||||
Q_INVOKABLE bool isCapsLock() const;
|
Q_INVOKABLE bool isCapsLock() const;
|
||||||
Q_INVOKABLE quint8 getNetworkTypeFromFile(const QString &keysPath) const;
|
Q_INVOKABLE quint8 getNetworkTypeFromFile(const QString &keysPath) const;
|
||||||
Q_INVOKABLE void openSeedTemplate() const;
|
Q_INVOKABLE void openSeedTemplate() const;
|
||||||
|
bool installed() const;
|
||||||
|
|
||||||
static std::pair<quint8, QString> getNetworkTypeAndAddressFromFile(const QString &wallet);
|
static std::pair<quint8, QString> getNetworkTypeAndAddressFromFile(const QString &wallet);
|
||||||
private:
|
private:
|
||||||
bool installed() const;
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "P2PoolManager.h"
|
#include "P2PoolManager.h"
|
||||||
#include "net/http_client.h"
|
#include "net/http_client.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
#include "main/oshelper.h"
|
||||||
#include "qt/utils.h"
|
#include "qt/utils.h"
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
|
|
||||||
#if defined(Q_OS_MACOS) && defined(__aarch64__) && !defined(Q_OS_MACOS_AARCH64)
|
#if defined(Q_OS_MACOS) && defined(__aarch64__) && !defined(Q_OS_MACOS_AARCH64)
|
||||||
@@ -53,21 +55,21 @@ void P2PoolManager::download() {
|
|||||||
QString fileName;
|
QString fileName;
|
||||||
QString validHash;
|
QString validHash;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.4/p2pool-v4.4-windows-x64.zip";
|
url = "https://github.com/SChernykh/p2pool/releases/download/v4.14/p2pool-v4.14-windows-x64.zip";
|
||||||
fileName = m_p2poolPath + "/p2pool-v4.4-windows-x64.zip";
|
fileName = m_p2poolPath + "/p2pool-v4.14-windows-x64.zip";
|
||||||
validHash = "2f04ec3f4b28edf6f70bfc369b6ffba8d38af53d7a787d9ef5d630e5925e51de";
|
validHash = "9c7f0476c441fc0c021fae7d01264b4ec61dc3301ed73b65931555550becf396";
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.4/p2pool-v4.4-linux-x64.tar.gz";
|
url = "https://github.com/SChernykh/p2pool/releases/download/v4.14/p2pool-v4.14-linux-x64.tar.gz";
|
||||||
fileName = m_p2poolPath + "/p2pool-v4.4-linux-x64.tar.gz";
|
fileName = m_p2poolPath + "/p2pool-v4.14-linux-x64.tar.gz";
|
||||||
validHash = "a3495e19b2587a38ac9afdb73de8e2eadc90f21e2c348cb972a3ece678cad5f1";
|
validHash = "e64f6f774dc35352b8ae4397ccdb92ce0cc935cdfb100eac58d44e49f8796a01";
|
||||||
#elif defined(Q_OS_MACOS_AARCH64)
|
#elif defined(Q_OS_MACOS_AARCH64)
|
||||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.4/p2pool-v4.4-macos-aarch64.tar.gz";
|
url = "https://github.com/SChernykh/p2pool/releases/download/v4.14/p2pool-v4.14-macos-aarch64.tar.gz";
|
||||||
fileName = m_p2poolPath + "/p2pool-v4.4-macos-aarch64.tar.gz";
|
fileName = m_p2poolPath + "/p2pool-v4.14-macos-aarch64.tar.gz";
|
||||||
validHash = "b8496fe1c5312fa3678e3d0e5ba0cfb7b498b1358dc7ed76a20a38574fef35d4";
|
validHash = "7cc780af6115ef8d9d6b7f3c1336f57dab25745b6208b6e97dca8729782e155b";
|
||||||
#elif defined(Q_OS_MACOS)
|
#elif defined(Q_OS_MACOS)
|
||||||
url = "https://github.com/SChernykh/p2pool/releases/download/v4.4/p2pool-v4.4-macos-x64.tar.gz";
|
url = "https://github.com/SChernykh/p2pool/releases/download/v4.14/p2pool-v4.14-macos-x64.tar.gz";
|
||||||
fileName = m_p2poolPath + "/p2pool-v4.4-macos-x64.tar.gz";
|
fileName = m_p2poolPath + "/p2pool-v4.14-macos-x64.tar.gz";
|
||||||
validHash = "8ab40faf7d1032835a3b3319b193ad2e14901e0b01e1e802c6b8333c8b75dfad";
|
validHash = "7df3be2ae15eda4260d2665e4a2c3c7dc2f1dba26a2a643e46a2b1283097a60a";
|
||||||
#endif
|
#endif
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
epee::net_utils::http::http_simple_client http_client;
|
epee::net_utils::http::http_simple_client http_client;
|
||||||
@@ -182,6 +184,10 @@ bool P2PoolManager::start(const QString &flags, const QString &address, const QS
|
|||||||
arguments << "--start-mining" << threads;
|
arguments << "--start-mining" << threads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chain == "nano") {
|
||||||
|
arguments << "--nano";
|
||||||
|
}
|
||||||
|
|
||||||
if (chain == "mini") {
|
if (chain == "mini") {
|
||||||
arguments << "--mini";
|
arguments << "--mini";
|
||||||
}
|
}
|
||||||
@@ -237,9 +243,14 @@ P2PoolManager::P2PoolManager(QObject *parent)
|
|||||||
started = false;
|
started = false;
|
||||||
// Platform dependent path to p2pool
|
// Platform dependent path to p2pool
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
m_p2poolPath = QApplication::applicationDirPath() + "/p2pool";
|
if (OSHelper().installed()) {
|
||||||
|
m_p2poolPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/p2pool";
|
||||||
|
} else {
|
||||||
|
m_p2poolPath = QApplication::applicationDirPath() + "/p2pool";
|
||||||
|
}
|
||||||
|
|
||||||
if (!QDir(m_p2poolPath).exists()) {
|
if (!QDir(m_p2poolPath).exists()) {
|
||||||
QDir().mkdir(m_p2poolPath);
|
QDir().mkpath(m_p2poolPath);
|
||||||
}
|
}
|
||||||
m_p2pool = m_p2poolPath + "/p2pool.exe";
|
m_p2pool = m_p2poolPath + "/p2pool.exe";
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
|
|||||||
162
src/qt/utils.cpp
162
src/qt/utils.cpp
@@ -29,6 +29,8 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QRandomGenerator>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
#include "TailsOS.h"
|
#include "TailsOS.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
@@ -134,83 +136,87 @@ void registerXdgMime(){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString randomUserAgent(){
|
QString randomUserAgent()
|
||||||
QStringList urand;
|
{
|
||||||
urand << "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"
|
const QStringList userAgents = {
|
||||||
<< "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1",
|
||||||
<< "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0"
|
"Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0",
|
||||||
<< "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0"
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0"
|
"Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0"
|
"Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/29.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0",
|
||||||
<< "Mozilla/5.0 (X11; OpenBSD amd64; rv:28.0) Gecko/20100101 Firefox/28.0"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/29.0",
|
||||||
<< "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0"
|
"Mozilla/5.0 (X11; OpenBSD amd64; rv:28.0) Gecko/20100101 Firefox/28.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:27.3) Gecko/20130101 Firefox/27.3"
|
"Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:27.0) Gecko/20121011 Firefox/27.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:27.3) Gecko/20130101 Firefox/27.3",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
"Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:27.0) Gecko/20121011 Firefox/27.0",
|
||||||
<< "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0"
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0"
|
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0",
|
||||||
<< "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"
|
"Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/23.0"
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130406 Firefox/23.0"
|
"Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/23.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:23.0) Gecko/20131011 Firefox/23.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130406 Firefox/23.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/22.0"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:23.0) Gecko/20131011 Firefox/23.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:22.0) Gecko/20130328 Firefox/22.0"
|
"Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/22.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:22.0) Gecko/20130328 Firefox/22.0",
|
||||||
<< "Mozilla/5.0 (Microsoft Windows NT 6.2.9200.0); rv:22.0) Gecko/20130405 Firefox/22.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1"
|
"Mozilla/5.0 (Microsoft Windows NT 6.2.9200.0); rv:22.0) Gecko/20130405 Firefox/22.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1"
|
"Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:21.0.0) Gecko/20121011 Firefox/21.0.0"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20130331 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:21.0.0) Gecko/20121011 Firefox/21.0.0",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20130331 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20130514 Firefox/21.0"
|
"Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; rv:21.0) Gecko/20130326 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20130514 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130401 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.2; rv:21.0) Gecko/20130326 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130331 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130401 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130330 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130331 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130330 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130401 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130328 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130401 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130328 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130401 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130331 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130401 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130331 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.0; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0"
|
"Mozilla/5.0 (Windows NT 5.0; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; Win64; x64;) Gecko/20100101 Firefox/20.0"
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0",
|
||||||
<< "Mozilla/5.0 (Windows x86; rv:19.0) Gecko/20100101 Firefox/19.0"
|
"Mozilla/5.0 (Windows NT 6.2; Win64; x64;) Gecko/20100101 Firefox/20.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/19.0"
|
"Mozilla/5.0 (Windows x86; rv:19.0) Gecko/20100101 Firefox/19.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/18.0.1"
|
"Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/19.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0"
|
"Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/18.0.1",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0.6"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux armv7l; rv:17.0) Gecko/20100101 Firefox/17.0"
|
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0.6",
|
||||||
<< "Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1"
|
"Mozilla/5.0 (X11; Ubuntu; Linux armv7l; rv:17.0) Gecko/20100101 Firefox/17.0",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1"
|
"Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1"
|
"Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1",
|
||||||
<< "Mozilla/5.0 (X11; NetBSD amd64; rv:16.0) Gecko/20121102 Firefox/16.0"
|
"Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2"
|
"Mozilla/5.0 (X11; NetBSD amd64; rv:16.0) Gecko/20121102 Firefox/16.0",
|
||||||
<< "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.16) Gecko/20120427 Firefox/15.0a1"
|
"Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120716 Firefox/15.0a2",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1"
|
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.16) Gecko/20120427 Firefox/15.0a1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20120910144328 Firefox/15.0.2"
|
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1"
|
"Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20120910144328 Firefox/15.0.2",
|
||||||
<< "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:15.0) Gecko/20121011 Firefox/15.0.1"
|
"Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20120405 Firefox/14.0a1"
|
"Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:15.0) Gecko/20121011 Firefox/15.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120405 Firefox/14.0a1"
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20120405 Firefox/14.0a1",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120405 Firefox/14.0a1"
|
"Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120405 Firefox/14.0a1",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1"
|
"Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120405 Firefox/14.0a1",
|
||||||
<< "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1"
|
"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:2.0.4) Gecko/20120718 AskTbAVR-IDW/3.12.5.17700 Firefox/14.0.1"
|
"Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/14.0.1"
|
"Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:2.0.4) Gecko/20120718 AskTbAVR-IDW/3.12.5.17700 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/ 20120405 Firefox/14.0.1"
|
"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1"
|
"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/ 20120405 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/13.0.1"
|
"Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0"
|
"Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/13.0.1",
|
||||||
<< "Mozilla/5.0 (Windows NT 6.1; de;rv:12.0) Gecko/20120403211507 Firefox/12.0";
|
"Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0",
|
||||||
|
"Mozilla/5.0 (Windows NT 6.1; de;rv:12.0) Gecko/20120403211507 Firefox/12.0"
|
||||||
|
};
|
||||||
|
|
||||||
// @TODO: Qt 5.10 - QRandomGenerator
|
if (userAgents.isEmpty())
|
||||||
int irand = rand() % urand.length();
|
return {};
|
||||||
return urand.at(irand);
|
|
||||||
|
const int idx = QRandomGenerator::global()->bounded(userAgents.size());
|
||||||
|
return userAgents.at(idx);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ ColumnLayout {
|
|||||||
return passwordInput.text === passwordInputConfirm.text;
|
return passwordInput.text === passwordInputConfirm.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcPasswordStrength(inp) {
|
function calcPasswordStrength() {
|
||||||
if(!progressLayout.visible) return;
|
if(!progressLayout.visible) return;
|
||||||
if(passwordInput.text.length <= 1){
|
if(passwordInput.text.length <= 1){
|
||||||
root.passwordFill = 0;
|
root.passwordFill = 0;
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ Rectangle {
|
|||||||
console.log("Creating temporary wallet", tmp_wallet_filename)
|
console.log("Creating temporary wallet", tmp_wallet_filename)
|
||||||
var nettype = appWindow.persistentSettings.nettype;
|
var nettype = appWindow.persistentSettings.nettype;
|
||||||
var kdfRounds = appWindow.persistentSettings.kdfRounds;
|
var kdfRounds = appWindow.persistentSettings.kdfRounds;
|
||||||
var wallet = walletManager.createWallet(tmp_wallet_filename, "", persistentSettings.language_wallet, nettype, kdfRounds)
|
var wallet = walletManager.createWallet(tmp_wallet_filename, oshelper.randomPassword(), persistentSettings.language_wallet, nettype, kdfRounds)
|
||||||
|
|
||||||
wizardController.walletOptionsSeed = wallet.seed
|
wizardController.walletOptionsSeed = wallet.seed
|
||||||
|
|
||||||
@@ -378,9 +378,6 @@ Rectangle {
|
|||||||
console.log("Removing temporary wallet: " + wizardController.tmpWalletFilename)
|
console.log("Removing temporary wallet: " + wizardController.tmpWalletFilename)
|
||||||
oshelper.removeTemporaryWallet(wizardController.tmpWalletFilename)
|
oshelper.removeTemporaryWallet(wizardController.tmpWalletFilename)
|
||||||
|
|
||||||
// protecting wallet with password
|
|
||||||
wizardController.m_wallet.setPassword(wizardController.walletOptionsPassword);
|
|
||||||
|
|
||||||
// save to persistent settings
|
// save to persistent settings
|
||||||
persistentSettings.account_name = wizardController.walletOptionsName
|
persistentSettings.account_name = wizardController.walletOptionsName
|
||||||
persistentSettings.wallet_path = wizardController.m_wallet.path;
|
persistentSettings.wallet_path = wizardController.m_wallet.path;
|
||||||
@@ -399,6 +396,7 @@ Rectangle {
|
|||||||
new_wallet_filename = appWindow.accountsDir + new_wallet_filename;
|
new_wallet_filename = appWindow.accountsDir + new_wallet_filename;
|
||||||
}
|
}
|
||||||
console.log("saving new wallet to", new_wallet_filename);
|
console.log("saving new wallet to", new_wallet_filename);
|
||||||
|
wizardController.m_wallet.setPassword(wizardController.walletOptionsPassword);
|
||||||
wizardController.m_wallet.storeAsync(handler, new_wallet_filename);
|
wizardController.m_wallet.storeAsync(handler, new_wallet_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -479,7 +477,7 @@ Rectangle {
|
|||||||
var deviceName = wizardController.walletOptionsDeviceName;
|
var deviceName = wizardController.walletOptionsDeviceName;
|
||||||
|
|
||||||
connect();
|
connect();
|
||||||
walletManager.createWalletFromDeviceAsync(tmpWalletFilename, "", nettype, deviceName, restoreHeight, subaddressLookahead, kdfRounds);
|
walletManager.createWalletFromDeviceAsync(tmpWalletFilename, oshelper.randomPassword(), nettype, deviceName, restoreHeight, subaddressLookahead, kdfRounds);
|
||||||
creatingWalletDeviceSplash();
|
creatingWalletDeviceSplash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ Rectangle {
|
|||||||
ListElement { column1: "Ledger Nano S"; column2: "Ledger";}
|
ListElement { column1: "Ledger Nano S"; column2: "Ledger";}
|
||||||
ListElement { column1: "Ledger Nano S Plus"; column2: "Ledger";}
|
ListElement { column1: "Ledger Nano S Plus"; column2: "Ledger";}
|
||||||
ListElement { column1: "Ledger Nano X"; column2: "Ledger";}
|
ListElement { column1: "Ledger Nano X"; column2: "Ledger";}
|
||||||
|
ListElement { column1: "Ledger Nano Gen5"; column2: "Ledger";}
|
||||||
ListElement { column1: "Ledger Stax"; column2: "Ledger";}
|
ListElement { column1: "Ledger Stax"; column2: "Ledger";}
|
||||||
|
ListElement { column1: "Ledger Flex"; column2: "Ledger";}
|
||||||
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
|
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
|
||||||
ListElement { column1: "Trezor Safe 3"; column2: "Trezor";}
|
ListElement { column1: "Trezor Safe 3"; column2: "Trezor";}
|
||||||
ListElement { column1: "Trezor Safe 5"; column2: "Trezor";}
|
ListElement { column1: "Trezor Safe 5"; column2: "Trezor";}
|
||||||
@@ -180,8 +182,12 @@ Rectangle {
|
|||||||
return "qrc:///images/ledgerNanoSPlus.png";
|
return "qrc:///images/ledgerNanoSPlus.png";
|
||||||
} else if (ledgerType == "Ledger Nano X") {
|
} else if (ledgerType == "Ledger Nano X") {
|
||||||
return "qrc:///images/ledgerNanoX.png";
|
return "qrc:///images/ledgerNanoX.png";
|
||||||
|
} else if (ledgerType == "Ledger Nano Gen5") {
|
||||||
|
return "qrc:///images/ledgerNanoGen5.png";
|
||||||
} else if (ledgerType == "Ledger Stax") {
|
} else if (ledgerType == "Ledger Stax") {
|
||||||
return "qrc:///images/ledgerStax.png";
|
return "qrc:///images/ledgerStax.png";
|
||||||
|
} else if (ledgerType == "Ledger Flex") {
|
||||||
|
return "qrc:///images/ledgerFlex.png";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ Rectangle {
|
|||||||
visible: false
|
visible: false
|
||||||
text: qsTr("Print this paper, fill it out, and keep it in a safe location. Never share your recovery phrase with anybody, especially with strangers offering technical support.") +
|
text: qsTr("Print this paper, fill it out, and keep it in a safe location. Never share your recovery phrase with anybody, especially with strangers offering technical support.") +
|
||||||
qsTr("Recovery phrase (mnemonic seed)") +
|
qsTr("Recovery phrase (mnemonic seed)") +
|
||||||
qsTr("These words are are a backup of your wallet. They are the only thing needed to access your funds and restore your Monero wallet, so keep this paper in a safe place and do not disclose it to anybody! It is strongly not recommended to store your recovery phrase digitally (in an email, online service, screenshot, photo, or any other type of computer file).") +
|
qsTr("These words are a backup of your wallet. They are the only thing needed to access your funds and restore your Monero wallet, so keep this paper in a safe place and do not disclose it to anybody! It is strongly not recommended to store your recovery phrase digitally (in an email, online service, screenshot, photo, or any other type of computer file).") +
|
||||||
qsTr("Wallet creation date") +
|
qsTr("Wallet creation date") +
|
||||||
qsTr("Wallet restore height") +
|
qsTr("Wallet restore height") +
|
||||||
qsTr("For instructions on how to restore this wallet, visit www.getmonero.org and go to Resources > User Guides > \"How to restore a wallet from mnemonic seed\". Use only Monero wallets that are trusted and recommended by the Monero community (see a list of them in www.getmonero.org/downloads).") + translationManager.emptyString
|
qsTr("For instructions on how to restore this wallet, visit www.getmonero.org and go to Resources > User Guides > \"How to restore a wallet from mnemonic seed\". Use only Monero wallets that are trusted and recommended by the Monero community (see a list of them in www.getmonero.org/downloads).") + translationManager.emptyString
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ Rectangle {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var valid = false;
|
|
||||||
if(wizardController.walletRestoreMode === "keys") {
|
if(wizardController.walletRestoreMode === "keys") {
|
||||||
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
||||||
} else if(wizardController.walletRestoreMode === "seed") {
|
} else if(wizardController.walletRestoreMode === "seed") {
|
||||||
|
|||||||
Reference in New Issue
Block a user