forked from Public/monero-gui
Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fce5c7a84 | ||
|
|
157166269b | ||
|
|
caa273afea | ||
|
|
d58ce3f599 | ||
|
|
19a6f399f3 | ||
|
|
18c964afca | ||
|
|
158e0c3523 | ||
|
|
770a7a344b | ||
|
|
f3ddf525a4 | ||
|
|
df2b85e7ee | ||
|
|
e86fa3e4fb | ||
|
|
5702bdef39 | ||
|
|
c7213abb9a | ||
|
|
5ee363f9f3 | ||
|
|
3e01647744 | ||
|
|
f491b41100 | ||
|
|
a564abbe6b | ||
|
|
149732af3a | ||
|
|
2bb6da5f09 | ||
|
|
11370c50eb | ||
|
|
0ae4677a25 | ||
|
|
1c2879bda3 | ||
|
|
0997b38e1e | ||
|
|
be177d6205 | ||
|
|
919b2e4f3a | ||
|
|
8b9580d621 | ||
|
|
6f5bacabfd | ||
|
|
6fab741f2e | ||
|
|
c2977ac410 | ||
|
|
1adf58793f | ||
|
|
9fa597bb58 | ||
|
|
d79f8e8b17 | ||
|
|
a817bfba05 | ||
|
|
04429e85e6 | ||
|
|
e52d86d442 | ||
|
|
7f164e739a | ||
|
|
43214de7d0 | ||
|
|
0cf683a6cf | ||
|
|
c9fd9634ee | ||
|
|
ddcee95b88 | ||
|
|
299067a273 | ||
|
|
08635e3030 | ||
|
|
fdff5f68dd | ||
|
|
9b18344d23 | ||
|
|
153154f484 | ||
|
|
ee0137056d | ||
|
|
1b0f274aed | ||
|
|
cd054f6c26 | ||
|
|
d6cb9b6c85 | ||
|
|
852378accb | ||
|
|
fe73011422 | ||
|
|
9d2f083a97 | ||
|
|
33afd0bb83 | ||
|
|
a165a14519 | ||
|
|
33e1801c57 | ||
|
|
fac3fcb518 | ||
|
|
8457055f08 | ||
|
|
e01c847fde | ||
|
|
bedf04d08a | ||
|
|
83da709436 | ||
|
|
f51b0d7d0c | ||
|
|
1f9d60602a | ||
|
|
7a285b3613 | ||
|
|
6ee5effc15 | ||
|
|
954c972530 | ||
|
|
e5b0837c8e | ||
|
|
a73ae62526 | ||
|
|
44df1bccfc | ||
|
|
0a0dbf8853 | ||
|
|
25ca081109 | ||
|
|
b932df85fd | ||
|
|
9da52f2387 | ||
|
|
79ee893499 | ||
|
|
1b2d940850 | ||
|
|
db4273ee82 | ||
|
|
cb1f3ad0ce | ||
|
|
c81a842b6e | ||
|
|
26ad7b78b5 | ||
|
|
381442a138 | ||
|
|
7cb24f50b8 | ||
|
|
8c5891e28a | ||
|
|
61c0e15404 | ||
|
|
b03714ec45 | ||
|
|
701f063797 | ||
|
|
6ed5369829 | ||
|
|
4661167734 | ||
|
|
39d9d7d071 | ||
|
|
8ad5fd4c76 | ||
|
|
3c28ecef93 | ||
|
|
d3943ca2a9 | ||
|
|
73f76cec99 | ||
|
|
b76b43da6c | ||
|
|
05733c14b7 | ||
|
|
21d8c096ff | ||
|
|
13ca3eeb84 | ||
|
|
4cea7e1647 |
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: eine/setup-msys2@v1
|
- uses: eine/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
update: true
|
update: true
|
||||||
install: mingw-w64-x86_64-toolchain make 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 git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt
|
install: mingw-w64-x86_64-toolchain make 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 git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt
|
||||||
@@ -74,6 +74,12 @@ jobs:
|
|||||||
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ github.job }}
|
||||||
|
path: |
|
||||||
|
/home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui
|
||||||
|
/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-20.04
|
||||||
@@ -91,3 +97,24 @@ jobs:
|
|||||||
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
|
run: docker build --tag monero:build-env-windows --build-arg THREADS=3 --file Dockerfile.windows .
|
||||||
- name: build
|
- name: build
|
||||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-windows sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j3'
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ github.job }}
|
||||||
|
path: |
|
||||||
|
/home/runner/work/monero-gui/monero-gui/build/x86_64-w64-mingw32/release/bin/monero-wallet-gui.exe
|
||||||
|
/home/runner/work/monero-gui/monero-gui/build/x86_64-w64-mingw32/release/bin/monerod.exe
|
||||||
|
|
||||||
|
docker-android:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: preprare build enviroment
|
||||||
|
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
|
||||||
|
- name: build
|
||||||
|
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -e THREADS=3 monero:build-env-android
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ github.job }}
|
||||||
|
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ project(monero-gui)
|
|||||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||||
|
|
||||||
set(VERSION_MAJOR "17")
|
set(VERSION_MAJOR "17")
|
||||||
set(VERSION_MINOR "0")
|
set(VERSION_MINOR "1")
|
||||||
set(VERSION_REVISION "1")
|
set(VERSION_REVISION "4")
|
||||||
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")
|
||||||
@@ -134,7 +134,7 @@ message(STATUS "OpenSSL: libraries at ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARI
|
|||||||
# Zbar (for QR scanner)
|
# Zbar (for QR scanner)
|
||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
add_definitions(-DWITH_SCANNER)
|
add_definitions(-DWITH_SCANNER)
|
||||||
find_package(ZBar0)
|
find_package(ZBar0 REQUIRED)
|
||||||
message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}")
|
message(STATUS "libzbar: include dir at ${ZBAR_INCLUDE_DIR}")
|
||||||
message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}")
|
message(STATUS "libzbar: libraries at ${ZBAR_LIBRARIES}")
|
||||||
endif()
|
endif()
|
||||||
@@ -149,9 +149,11 @@ message(STATUS "libusb: include dir at ${LibUSB_INCLUDE_DIRS}")
|
|||||||
message(STATUS "libusb: libraries at ${LibUSB_LIBRARIES}")
|
message(STATUS "libusb: libraries at ${LibUSB_LIBRARIES}")
|
||||||
|
|
||||||
# HIDApi
|
# HIDApi
|
||||||
find_package(HIDAPI REQUIRED)
|
if(NOT ANDROID)
|
||||||
message(STATUS "libhidapi: include dir at ${HIDAPI_INCLUDE_DIRS}")
|
find_package(HIDAPI REQUIRED)
|
||||||
message(STATUS "libhidapi: libraries at ${HIDAPI_LIBRARIES}")
|
message(STATUS "libhidapi: include dir at ${HIDAPI_INCLUDE_DIRS}")
|
||||||
|
message(STATUS "libhidapi: libraries at ${HIDAPI_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
@@ -174,7 +176,8 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
|
|||||||
program_options
|
program_options
|
||||||
locale)
|
locale)
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
|
set(CMAKE_SKIP_RPATH ON)
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
||||||
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
||||||
@@ -203,9 +206,7 @@ endif()
|
|||||||
set(QT5_LIBRARIES
|
set(QT5_LIBRARIES
|
||||||
Qt5Core
|
Qt5Core
|
||||||
Qt5Quick
|
Qt5Quick
|
||||||
Qt5Widgets
|
|
||||||
Qt5Gui
|
Qt5Gui
|
||||||
Qt5Network
|
|
||||||
Qt5Qml
|
Qt5Qml
|
||||||
Qt5Svg
|
Qt5Svg
|
||||||
Qt5Xml
|
Qt5Xml
|
||||||
@@ -217,12 +218,14 @@ endif()
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND QT5_LIBRARIES Qt5MacExtras)
|
list(APPEND QT5_LIBRARIES Qt5MacExtras)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
||||||
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
||||||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_PREFIX_PATH)
|
if(APPLE AND NOT CMAKE_PREFIX_PATH)
|
||||||
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
||||||
endif()
|
endif()
|
||||||
@@ -252,7 +255,15 @@ foreach(QT5_MODULE ${QT5_LIBRARIES})
|
|||||||
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
include_directories(${${QT5_MODULE}_INCLUDE_DIRS})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES})
|
if(NOT (CMAKE_CROSSCOMPILING AND ANDROID))
|
||||||
|
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES})
|
||||||
|
else()
|
||||||
|
set(QT5_LIBRARIES_ABI)
|
||||||
|
foreach(QT5_MODULE ${QT5_LIBRARIES})
|
||||||
|
list(APPEND QT5_LIBRARIES_ABI "${QT5_MODULE}_${CMAKE_ANDROID_ARCH_ABI}")
|
||||||
|
endforeach()
|
||||||
|
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES_ABI})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(QT5_PKG_CONFIG_FOUND)
|
if(QT5_PKG_CONFIG_FOUND)
|
||||||
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
||||||
@@ -260,15 +271,15 @@ if(QT5_PKG_CONFIG_FOUND)
|
|||||||
set(QT5_PKG_CONFIG "${QT5_PKG_CONFIG}_STATIC")
|
set(QT5_PKG_CONFIG "${QT5_PKG_CONFIG}_STATIC")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(UNIX AND CMAKE_PREFIX_PATH)
|
||||||
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
if(APPLE)
|
||||||
list(JOIN ${QT5_PKG_CONFIG}_LIBRARIES " " ${QT5_PKG_CONFIG}_LIBRARIES)
|
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
||||||
list(JOIN ${QT5_PKG_CONFIG}_INCLUDE_DIRS " " ${QT5_PKG_CONFIG}_INCLUDE_DIRS)
|
endif()
|
||||||
|
|
||||||
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
||||||
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARY_DIRS "${${QT5_PKG_CONFIG}_LIBRARY_DIRS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
||||||
@@ -375,6 +386,23 @@ if(STATIC)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ANDROID)
|
||||||
|
set(QT5_EXTRA_LIBRARIES_LIST
|
||||||
|
GLESv2
|
||||||
|
log
|
||||||
|
z
|
||||||
|
jnigraphics
|
||||||
|
android
|
||||||
|
EGL
|
||||||
|
Qt5VirtualKeyboard_${CMAKE_ANDROID_ARCH_ABI}
|
||||||
|
c++_shared
|
||||||
|
)
|
||||||
|
foreach(LIBRARY ${QT5_EXTRA_LIBRARIES_LIST})
|
||||||
|
find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS "${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/${ANDROID_PLATFORM_LEVEL}" REQUIRED)
|
||||||
|
list(APPEND QT5_LIBRARIES ${${LIBRARY}_LIBRARY})
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Using Boost include dir at ${Boost_INCLUDE_DIRS}")
|
message(STATUS "Using Boost include dir at ${Boost_INCLUDE_DIRS}")
|
||||||
message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}")
|
message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}")
|
||||||
|
|
||||||
|
|||||||
14
DEPLOY.md
14
DEPLOY.md
@@ -2,19 +2,17 @@
|
|||||||
|
|
||||||
Use macOS 10.12 - 10.13 for better backwards compability.
|
Use macOS 10.12 - 10.13 for better backwards compability.
|
||||||
|
|
||||||
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt`
|
1. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install boost zmq libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt hidapi`
|
||||||
|
|
||||||
2. `HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" brew install --HEAD hidapi`
|
2. Get the latest LTS from here: https://www.qt.io/offline-installers and install
|
||||||
|
|
||||||
3. Get the latest LTS from here: https://www.qt.io/offline-installers and install
|
3. `git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/monero-project/monero-gui`
|
||||||
|
|
||||||
4. `git clone --recursive -b v0.X.Y.Z --depth 1 https://github.com/monero-project/monero-gui`
|
4. `CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 make release`
|
||||||
|
|
||||||
5. `CMAKE_PREFIX_PATH=~/Qt5.12.8/5.12.8/clang_64 make release`
|
5. `cd build/release && make deploy`
|
||||||
|
|
||||||
6. `cd build/release && make deploy`
|
6. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
||||||
|
|
||||||
7. Replace the `monerod` binary inside `monero-wallet-gui.app/Contents/MacOS/` with one built using deterministic builds / gitian.
|
|
||||||
|
|
||||||
## Codesigning and notarizing
|
## Codesigning and notarizing
|
||||||
|
|
||||||
|
|||||||
217
Dockerfile.android
Normal file
217
Dockerfile.android
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
FROM debian:unstable
|
||||||
|
|
||||||
|
ARG THREADS=1
|
||||||
|
ARG ANDROID_NDK_REVISION=21d
|
||||||
|
ARG ANDROID_NDK_HASH=bcf4023eb8cb6976a4c7cff0a8a8f145f162bf4d
|
||||||
|
ARG ANDROID_SDK_REVISION=4333796
|
||||||
|
ARG ANDROID_SDK_HASH=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9
|
||||||
|
ARG QT_VERSION=5.15.2
|
||||||
|
|
||||||
|
WORKDIR /opt/android
|
||||||
|
ENV WORKDIR=/opt/android
|
||||||
|
|
||||||
|
ENV ANDROID_NATIVE_API_LEVEL=28
|
||||||
|
ENV ANDROID_API=android-${ANDROID_NATIVE_API_LEVEL}
|
||||||
|
ENV ANDROID_CLANG=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang
|
||||||
|
ENV ANDROID_CLANGPP=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang++
|
||||||
|
ENV ANDROID_NDK_ROOT=${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION}
|
||||||
|
ENV ANDROID_SDK_ROOT=${WORKDIR}/tools
|
||||||
|
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||||
|
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
||||||
|
ENV PREFIX=${WORKDIR}/prefix
|
||||||
|
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y ant automake build-essential ca-certificates-java cmake file gettext git libc6 libncurses5 \
|
||||||
|
libstdc++6 libtinfo5 libtool libz1 openjdk-8-jdk-headless openjdk-8-jre-headless pkg-config python3 unzip wget
|
||||||
|
|
||||||
|
RUN wget -q https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \
|
||||||
|
&& unzip -q sdk-tools-linux-${ANDROID_SDK_REVISION}.zip \
|
||||||
|
&& rm -f sdk-tools-linux-${ANDROID_SDK_REVISION}.zip
|
||||||
|
|
||||||
|
RUN wget -q https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \
|
||||||
|
&& unzip -q android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \
|
||||||
|
&& rm -f android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip
|
||||||
|
|
||||||
|
RUN cd ${ANDROID_SDK_ROOT} && echo y | ./bin/sdkmanager "platform-tools" "platforms;${ANDROID_API}" "tools" > /dev/null
|
||||||
|
RUN cp -r ${WORKDIR}/platforms ${WORKDIR}/platform-tools ${ANDROID_SDK_ROOT}
|
||||||
|
|
||||||
|
ENV HOST_PATH=${PATH}
|
||||||
|
ENV PATH=${TOOLCHAIN_DIR}/aarch64-linux-android/bin:${TOOLCHAIN_DIR}/bin:${PATH}
|
||||||
|
|
||||||
|
ARG ZLIB_VERSION=1.2.11
|
||||||
|
ARG ZLIB_HASH=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
|
||||||
|
RUN wget -q https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
|
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
|
&& rm zlib-${ZLIB_VERSION}.tar.gz \
|
||||||
|
&& cd zlib-${ZLIB_VERSION} \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --static \
|
||||||
|
&& make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \
|
||||||
|
&& cd qt5 \
|
||||||
|
&& perl init-repository --module-subset=default,-qtwebengine \
|
||||||
|
&& PATH=${HOST_PATH} ./configure -v -developer-build -release \
|
||||||
|
-xplatform android-clang \
|
||||||
|
-android-ndk-platform ${ANDROID_API} \
|
||||||
|
-android-ndk ${ANDROID_NDK_ROOT} \
|
||||||
|
-android-sdk ${ANDROID_SDK_ROOT} \
|
||||||
|
-android-ndk-host linux-x86_64 \
|
||||||
|
-no-dbus \
|
||||||
|
-opengl es2 \
|
||||||
|
-no-use-gold-linker \
|
||||||
|
-no-sql-mysql \
|
||||||
|
-opensource -confirm-license \
|
||||||
|
-android-arch arm64-v8a \
|
||||||
|
-prefix ${PREFIX} \
|
||||||
|
-nomake tools -nomake tests -nomake examples \
|
||||||
|
-skip qtwebengine \
|
||||||
|
-skip qtserialport \
|
||||||
|
-skip qtconnectivity \
|
||||||
|
-skip qttranslations \
|
||||||
|
-skip qtpurchasing \
|
||||||
|
-skip qtgamepad -skip qtscript -skip qtdoc \
|
||||||
|
-no-warnings-are-errors \
|
||||||
|
&& sed -i '213,215d' qtbase/src/3rdparty/pcre2/src/sljit/sljitConfigInternal.h \
|
||||||
|
&& PATH=${HOST_PATH} make -j${THREADS} \
|
||||||
|
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
||||||
|
&& cd qttools/src/linguist/lrelease && \
|
||||||
|
../../../../qtbase/bin/qmake && \
|
||||||
|
PATH=${HOST_PATH} make -j$THREADS install && \
|
||||||
|
cd ../../../.. && \
|
||||||
|
rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG ICONV_VERSION=1.16
|
||||||
|
ARG ICONV_HASH=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
||||||
|
RUN wget -q http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \
|
||||||
|
&& echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \
|
||||||
|
&& tar -xzf libiconv-${ICONV_VERSION}.tar.gz \
|
||||||
|
&& rm -f libiconv-${ICONV_VERSION}.tar.gz \
|
||||||
|
&& cd libiconv-${ICONV_VERSION} \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --build=x86_64-linux-gnu --host=aarch64 --prefix=${PREFIX} --disable-rpath \
|
||||||
|
&& make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install
|
||||||
|
|
||||||
|
ARG BOOST_VERSION=1_74_0
|
||||||
|
ARG BOOST_VERSION_DOT=1.74.0
|
||||||
|
ARG BOOST_HASH=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
|
||||||
|
RUN wget -q https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
|
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
||||||
|
&& tar -xf boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
|
&& rm -f boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
|
&& cd boost_${BOOST_VERSION} \
|
||||||
|
&& PATH=${HOST_PATH} ./bootstrap.sh --prefix=${PREFIX} \
|
||||||
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} ./b2 --build-type=minimal link=static runtime-link=static \
|
||||||
|
--with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization \
|
||||||
|
--with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi \
|
||||||
|
threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} \
|
||||||
|
cflags='--target=aarch64-linux-android' \
|
||||||
|
cxxflags='--target=aarch64-linux-android' \
|
||||||
|
linkflags='--target=aarch64-linux-android --sysroot=${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm64 ${ANDROID_NDK_ROOT}/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so -nostdlib++' \
|
||||||
|
install -j${THREADS} \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG OPENSSL_VERSION=1.1.1g
|
||||||
|
ARG OPENSSL_HASH=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46
|
||||||
|
RUN wget -q https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
|
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
|
&& rm openssl-${OPENSSL_VERSION}.tar.gz \
|
||||||
|
&& cd openssl-${OPENSSL_VERSION} \
|
||||||
|
&& ANDROID_NDK_HOME=${ANDROID_NDK_ROOT} ./Configure CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} \
|
||||||
|
android-arm64 no-asm no-shared --static \
|
||||||
|
--with-zlib-include=${PREFIX}/include --with-zlib-lib=${PREFIX}/lib \
|
||||||
|
--prefix=${PREFIX} --openssldir=${PREFIX} \
|
||||||
|
&& sed -i 's/CNF_EX_LIBS=-ldl -pthread//g;s/BIN_CFLAGS=-pie $(CNF_CFLAGS) $(CFLAGS)//g' Makefile \
|
||||||
|
&& ANDROID_NDK_HOME=${ANDROID_NDK_ROOT} make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG ZMQ_VERSION=v4.3.3
|
||||||
|
ARG ZMQ_HASH=04f5bbedee58c538934374dc45182d8fc5926fa3
|
||||||
|
RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth 1 \
|
||||||
|
&& cd libzmq \
|
||||||
|
&& git checkout ${ZMQ_HASH} \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --host=aarch64-linux-android \
|
||||||
|
--enable-static --disable-shared \
|
||||||
|
&& make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
ARG SODIUM_VERSION=1.0.18
|
||||||
|
ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677
|
||||||
|
RUN set -ex \
|
||||||
|
&& git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} --depth 1 \
|
||||||
|
&& cd libsodium \
|
||||||
|
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --host=aarch64-linux-android --enable-static --disable-shared \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN git clone https://github.com/ZBar/ZBar.git --depth 1 \
|
||||||
|
&& cd ZBar \
|
||||||
|
&& git reset --hard 854a5d97059e395807091ac4d80c53f7968abb8f \
|
||||||
|
&& sed -i 's/SHARED/STATIC/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CPP_FEATURES := exceptions rtti features\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS := -Wno-multichar\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -D_ANDROID\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -DLIBDIR="\\".\\""\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -DBUILDING_LIBICONV\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -DBUILDING_LIBCHARSET\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -DIN_LIBRARY\n\0/' android/jni/Android.mk \
|
||||||
|
&& sed -i -E 's/(.*BUILD_STATIC_LIBRARY.*)/LOCAL_CFLAGS += -fno-stack-protector\n\0/' android/jni/Android.mk \
|
||||||
|
&& echo "APP_ABI := arm64-v8a \nAPP_STL := c++_shared \nTARGET_PLATFORM := ${ANDROID_API} \nTARGET_ARCH_ABI := arm64-v8a \nAPP_CFLAGS += -target aarch64-none-linux-android -fexceptions -fstack-protector-strong -fno-limit-debug-info -mfloat-abi=softfp -fno-builtin-memmove -fno-omit-frame-pointer -fno-stack-protector\n" \
|
||||||
|
>> android/jni/Application.mk \
|
||||||
|
&& cd android \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ${ANDROID_NDK_ROOT}/ndk-build ICONV_SRC=${WORKDIR}/libiconv-${ICONV_VERSION} -B V=1 NDK_APPLICATION_MK=jni/Application.mk \
|
||||||
|
&& cp obj/local/arm64-v8a/lib* ${PREFIX}/lib \
|
||||||
|
&& cp -r ../include/* ${PREFIX}/include
|
||||||
|
|
||||||
|
RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git \
|
||||||
|
&& cd libgpg-error \
|
||||||
|
&& git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --host=aarch64-linux-android --prefix=${PREFIX} --disable-rpath --disable-shared --enable-static --disable-doc --disable-tests \
|
||||||
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git \
|
||||||
|
&& cd libgcrypt \
|
||||||
|
&& git reset --hard 56606331bc2a80536db9fc11ad53695126007298 \
|
||||||
|
&& ./autogen.sh \
|
||||||
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --host=aarch64-linux-android --prefix=${PREFIX} --with-gpg-error-prefix=${PREFIX} --disable-shared --enable-static --disable-doc --disable-tests \
|
||||||
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} make -j${THREADS} \
|
||||||
|
&& make -j${THREADS} install \
|
||||||
|
&& rm -rf $(pwd)
|
||||||
|
|
||||||
|
RUN cd tools \
|
||||||
|
&& wget -q http://dl-ssl.google.com/android/repository/tools_r25.2.5-linux.zip \
|
||||||
|
&& unzip -q tools_r25.2.5-linux.zip \
|
||||||
|
&& rm -f tools_r25.2.5-linux.zip \
|
||||||
|
&& echo y | ${ANDROID_SDK_ROOT}/tools/android update sdk --no-ui --all --filter build-tools-28.0.3
|
||||||
|
|
||||||
|
CMD set -ex \
|
||||||
|
&& cd /monero-gui \
|
||||||
|
&& mkdir -p build/Android/release \
|
||||||
|
&& cd build/Android/release \
|
||||||
|
&& cmake \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
||||||
|
-DCMAKE_PREFIX_PATH="${PREFIX}" \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH="${PREFIX}" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DARCH="armv8-a" \
|
||||||
|
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \
|
||||||
|
-DANDROID_ABI="arm64-v8a" \
|
||||||
|
-DANDROID_TOOLCHAIN=clang \
|
||||||
|
-DBoost_USE_STATIC_RUNTIME=ON \
|
||||||
|
-DLRELEASE_PATH="${PREFIX}/bin" \
|
||||||
|
-DQT_ANDROID_APPLICATION_BINARY="monero-wallet-gui" \
|
||||||
|
-DWITH_SCANNER=ON \
|
||||||
|
../../.. \
|
||||||
|
&& PATH=${HOST_PATH} make generate_translations_header \
|
||||||
|
&& make -j${THREADS} -C src \
|
||||||
|
&& make -j${THREADS} apk
|
||||||
@@ -2,13 +2,17 @@ FROM ubuntu:16.04
|
|||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
|
|
||||||
|
ENV CFLAGS="-fPIC"
|
||||||
|
ENV CXXFLAGS="-fPIC"
|
||||||
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
|
||||||
RUN apt install -y automake git pkg-config python xutils-dev && \
|
RUN apt install -y automake git pkg-config python xutils-dev && \
|
||||||
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
||||||
cd xorgproto && \
|
cd xorgproto && \
|
||||||
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -16,7 +20,7 @@ RUN apt install -y automake git pkg-config python xutils-dev && \
|
|||||||
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbproto && \
|
||||||
cd xcbproto && \
|
cd xcbproto && \
|
||||||
git reset --hard 6398e42131eedddde0d98759067dde933191f049 && \
|
git reset --hard 6398e42131eedddde0d98759067dde933191f049 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -25,7 +29,7 @@ RUN apt install -y libtool-bin && \
|
|||||||
git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
||||||
cd libxau && \
|
cd libxau && \
|
||||||
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -34,7 +38,7 @@ RUN apt install -y libpthread-stubs0-dev && \
|
|||||||
git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||||
cd libxcb && \
|
cd libxcb && \
|
||||||
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -42,16 +46,16 @@ RUN apt install -y libpthread-stubs0-dev && \
|
|||||||
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
||||||
cd zlib && \
|
cd zlib && \
|
||||||
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --static && \
|
./configure --static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b VER-2-10-2 --depth 1 https://git.sv.nongnu.org/r/freetype/freetype2.git && \
|
RUN git clone -b VER-2-10-2 --depth 1 https://git.savannah.gnu.org/git/freetype/freetype2.git && \
|
||||||
cd freetype2 && \
|
cd freetype2 && \
|
||||||
git reset --hard 132f19b779828b194b3fede187cee719785db4d8 && \
|
git reset --hard 132f19b779828b194b3fede187cee719785db4d8 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --with-zlib=no && \
|
./configure --disable-shared --enable-static --with-zlib=no && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -60,7 +64,7 @@ RUN git clone -b R_2_2_9 --depth 1 https://github.com/libexpat/libexpat && \
|
|||||||
cd libexpat/expat && \
|
cd libexpat/expat && \
|
||||||
git reset --hard a7bc26b69768f7fb24f0c7976fae24b157b85b13 && \
|
git reset --hard a7bc26b69768f7fb24f0c7976fae24b157b85b13 && \
|
||||||
./buildconf.sh && \
|
./buildconf.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static && \
|
./configure --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -69,7 +73,7 @@ RUN apt install -y autopoint gettext gperf libpng12-dev && \
|
|||||||
git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
||||||
cd fontconfig && \
|
cd fontconfig && \
|
||||||
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -77,37 +81,34 @@ RUN apt install -y autopoint gettext gperf libpng12-dev && \
|
|||||||
RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
||||||
cd icu/icu4c/source && \
|
cd icu/icu4c/source && \
|
||||||
git reset --hard e2d85306162d3a0691b070b4f0a73e4012433444 && \
|
git reset --hard e2d85306162d3a0691b070b4f0a73e4012433444 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-tests --disable-samples && \
|
./configure --disable-shared --enable-static --disable-tests --disable-samples && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y wget && \
|
RUN apt install -y wget && \
|
||||||
wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
||||||
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" > hashsum.txt && \
|
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" | sha256sum -c && \
|
||||||
sha256sum -c hashsum.txt && \
|
|
||||||
tar -xzf boost_1_73_0.tar.gz && \
|
tar -xzf boost_1_73_0.tar.gz && \
|
||||||
rm boost_1_73_0.tar.gz && \
|
rm boost_1_73_0.tar.gz && \
|
||||||
cd boost_1_73_0 && \
|
cd boost_1_73_0 && \
|
||||||
./bootstrap.sh && \
|
./bootstrap.sh && \
|
||||||
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags='-fPIC' cxxflags='-fPIC' install -a --prefix=/usr && \
|
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags="${CFLAGS}" cxxflags="${CXXFLAGS}" install -a --prefix=/usr && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
||||||
echo "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 openssl-1.1.1g.tar.gz" > hashsum.txt && \
|
echo "ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 openssl-1.1.1g.tar.gz" | sha256sum -c && \
|
||||||
sha256sum -c hashsum.txt && \
|
|
||||||
tar -xzf openssl-1.1.1g.tar.gz && \
|
tar -xzf openssl-1.1.1g.tar.gz && \
|
||||||
rm openssl-1.1.1g.tar.gz && \
|
rm openssl-1.1.1g.tar.gz && \
|
||||||
cd openssl-1.1.1g && \
|
cd openssl-1.1.1g && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./config no-asm no-shared no-zlib-dynamic --openssldir=/usr && \
|
./config no-asm no-shared no-zlib-dynamic --openssldir=/usr && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libgl1-mesa-dev libglib2.0-dev libxkbcommon-dev && \
|
RUN apt install -y libgl1-mesa-dev libglib2.0-dev libxkbcommon-dev && \
|
||||||
wget https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
wget https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||||
echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" > hashsum.txt && \
|
echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" | sha256sum -c && \
|
||||||
sha256sum -c hashsum.txt && \
|
|
||||||
tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||||
rm qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
rm qt-everywhere-opensource-src-5.9.9.tar.xz && \
|
||||||
cd qt-everywhere-opensource-src-5.9.9 && \
|
cd qt-everywhere-opensource-src-5.9.9 && \
|
||||||
@@ -137,7 +138,7 @@ RUN apt install -y libudev-dev && \
|
|||||||
git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
||||||
cd libusb && \
|
cd libusb && \
|
||||||
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -146,7 +147,7 @@ RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
|||||||
cd hidapi && \
|
cd hidapi && \
|
||||||
git reset --hard 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f && \
|
git reset --hard 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f && \
|
||||||
./bootstrap && \
|
./bootstrap && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static && \
|
./configure --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -154,7 +155,7 @@ RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
|||||||
RUN git clone -b libX11-1.6.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libx11 && \
|
RUN git clone -b libX11-1.6.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libx11 && \
|
||||||
cd libx11 && \
|
cd libx11 && \
|
||||||
git reset --hard db7cca17ad7807e92a928da9d4c68a00f4836da2 && \
|
git reset --hard db7cca17ad7807e92a928da9d4c68a00f4836da2 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -162,7 +163,7 @@ RUN git clone -b libX11-1.6.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/
|
|||||||
RUN git clone -b libXext-1.3.4 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxext && \
|
RUN git clone -b libXext-1.3.4 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxext && \
|
||||||
cd libxext && \
|
cd libxext && \
|
||||||
git reset --hard ebb167f34a3514783966775fb12573c4ed209625 && \
|
git reset --hard ebb167f34a3514783966775fb12573c4ed209625 && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -172,7 +173,7 @@ RUN apt install -y libsodium-dev && \
|
|||||||
cd libzmq && \
|
cd libzmq && \
|
||||||
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-libunwind --with-libsodium && \
|
./configure --disable-shared --enable-static --disable-libunwind --with-libsodium && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -181,7 +182,7 @@ RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.gi
|
|||||||
cd libgpg-error && \
|
cd libgpg-error && \
|
||||||
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-doc --disable-tests && \
|
./configure --disable-shared --enable-static --disable-doc --disable-tests && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -190,7 +191,7 @@ RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git &&
|
|||||||
cd libgcrypt && \
|
cd libgcrypt && \
|
||||||
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-shared --enable-static --disable-doc && \
|
./configure --disable-shared --enable-static --disable-doc && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -199,7 +200,7 @@ RUN git clone -b v3.10.0 --depth 1 https://github.com/protocolbuffers/protobuf &
|
|||||||
cd protobuf && \
|
cd protobuf && \
|
||||||
git reset --hard 6d4e7fd7966c989e38024a8ea693db83758944f1 && \
|
git reset --hard 6d4e7fd7966c989e38024a8ea693db83758944f1 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --enable-static --disable-shared && \
|
./configure --enable-static --disable-shared && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|||||||
29
Makefile
29
Makefile
@@ -1,4 +1,5 @@
|
|||||||
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
|
||||||
|
MANUAL_SUBMODULES ?= OFF
|
||||||
|
|
||||||
dotgit=$(shell ls -d .git/config)
|
dotgit=$(shell ls -d .git/config)
|
||||||
ifneq ($(dotgit), .git/config)
|
ifneq ($(dotgit), .git/config)
|
||||||
@@ -16,38 +17,42 @@ else
|
|||||||
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
debug:
|
debug:
|
||||||
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) .. && $(MAKE) VERBOSE=1
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} .. && $(MAKE) VERBOSE=1
|
||||||
|
|
||||||
depends:
|
depends:
|
||||||
mkdir -p build/$(target)/release
|
mkdir -p build/$(target)/release
|
||||||
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
cd build/$(target)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
|
||||||
|
|
||||||
devmode:
|
devmode:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
clean:
|
clean:
|
||||||
mkdir -p build && cd build && rm -rf *
|
mkdir -p build && cd build && rm -rf *
|
||||||
scanner:
|
scanner:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
|
|
||||||
release:
|
release:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
|
release-linux-armv8:
|
||||||
|
mkdir -p $(builddir)/release
|
||||||
|
cd $(builddir)/release
|
||||||
|
cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static:
|
release-static:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||||
|
|
||||||
debug-static-win64:
|
debug-static-win64:
|
||||||
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||||
|
|
||||||
debug-static-mac64:
|
debug-static-mac64:
|
||||||
mkdir -p $(builddir)/debug
|
mkdir -p $(builddir)/debug
|
||||||
cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-static-win64:
|
release-static-win64:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||||
|
|
||||||
release-win64:
|
release-win64:
|
||||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
|
||||||
|
|||||||
53
README.md
53
README.md
@@ -44,8 +44,8 @@ GUI development funding and/or some supporting services are also graciously prov
|
|||||||
|
|
||||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/tarilabs.png"/>](https://tarilabs.com/)
|
[<img width="150" src="https://www.getmonero.org/img/sponsors/tarilabs.png"/>](https://tarilabs.com/)
|
||||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/globee.png"/>](https://globee.com/)
|
[<img width="150" src="https://www.getmonero.org/img/sponsors/globee.png"/>](https://globee.com/)
|
||||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/symas.png"/>](https://www.symas.com/)
|
[<img width="150" src="https://www.getmonero.org/img/sponsors/symas.png"/>](https://symas.com/)
|
||||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/forked_logo.png"/>](https://www.forked.net/)
|
[<img width="150" src="https://www.getmonero.org/img/sponsors/forked_logo.png"/>](http://www.forked.net/)
|
||||||
[<img width="150" src="https://www.getmonero.org/img/sponsors/macstadium.png"/>](https://www.macstadium.com/)
|
[<img width="150" src="https://www.getmonero.org/img/sponsors/macstadium.png"/>](https://www.macstadium.com/)
|
||||||
|
|
||||||
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
|
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
|
||||||
@@ -124,6 +124,55 @@ Packaging for your favorite distribution would be a welcome contribution!
|
|||||||
\* `4` - number of CPU threads to use
|
\* `4` - number of CPU threads to use
|
||||||
5. Monero GUI Linux static binaries will be placed in `monero-gui/build/release/bin` directory
|
5. Monero GUI Linux static binaries will be placed in `monero-gui/build/release/bin` directory
|
||||||
|
|
||||||
|
### Building Android APK with Docker (any OS) *Experimental*
|
||||||
|
- Minimum Android 9 Pie (API 28)
|
||||||
|
- ARMv8-A 64-bit CPU
|
||||||
|
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||||
|
2. Clone the repository
|
||||||
|
```
|
||||||
|
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||||
|
```
|
||||||
|
3. Prepare build environment
|
||||||
|
```
|
||||||
|
cd monero-gui
|
||||||
|
docker build --tag monero:build-env-android --build-arg THREADS=4 --file Dockerfile.android .
|
||||||
|
```
|
||||||
|
\* `4` - number of CPU threads to use
|
||||||
|
|
||||||
|
4. Build
|
||||||
|
```
|
||||||
|
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -e THREADS=4 monero:build-env-android
|
||||||
|
```
|
||||||
|
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||||
|
\* `4` - number of CPU threads to use
|
||||||
|
5. Monero GUI APK will be placed in `monero-gui/build/Android/release/android-build` directory
|
||||||
|
6. Deploy
|
||||||
|
* Using ADB (Android debugger bridge)
|
||||||
|
- [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling)
|
||||||
|
* Connect your device with USB and install Monero GUI APK with adb:
|
||||||
|
```
|
||||||
|
adb install build/Android/release/android-build/monero-gui.apk
|
||||||
|
```
|
||||||
|
* Troubleshooting:
|
||||||
|
```
|
||||||
|
adb devices -l
|
||||||
|
adb logcat
|
||||||
|
```
|
||||||
|
* If using adb inside docker, make sure you did
|
||||||
|
```
|
||||||
|
docker run -v /dev/bus/usb:/dev/bus/usb --privileged
|
||||||
|
```
|
||||||
|
* Using a web server
|
||||||
|
```
|
||||||
|
mkdir /usr/tmp
|
||||||
|
cp build/Android/release/android-build/monero-gui.apk /usr/tmp
|
||||||
|
docker run -d -v /usr/tmp:/usr/share/nginx/html:ro -p 8080:80 nginx
|
||||||
|
```
|
||||||
|
Now it should be accessible through a web browser at
|
||||||
|
```
|
||||||
|
http://<your.local.ip>:8080/QtApp-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
### On Linux:
|
### On Linux:
|
||||||
|
|
||||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
Copyright (c) 2014-2018, The Monero Project
|
|
||||||
|
|
||||||
|
|
||||||
## Current status : ALPHA
|
|
||||||
|
|
||||||
- Minimum Android 5.0 (api level 21)
|
|
||||||
- Modal dialogs can appear in background giving the feeling that the application is frozen (Work around : turn screen off/on or switch to another app and back)
|
|
||||||
|
|
||||||
## Build using Docker
|
|
||||||
|
|
||||||
# Base environnement
|
|
||||||
|
|
||||||
cd monero/utils/build_scripts
|
|
||||||
docker build -f android32.Dockerfile -t monero-android .
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Build GUI
|
|
||||||
|
|
||||||
cd android/docker
|
|
||||||
docker build -t monero-gui-android .
|
|
||||||
docker create -it --name monero-gui-android monero-gui-android bash
|
|
||||||
|
|
||||||
# Get the apk
|
|
||||||
|
|
||||||
docker cp monero-gui-android:/opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk .
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
|
|
||||||
- Using ADB (Android debugger bridge) :
|
|
||||||
|
|
||||||
First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling)
|
|
||||||
The only place where we are allowed to play is `/data/local/tmp`. So :
|
|
||||||
|
|
||||||
adb push /opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk /data/local/tmp
|
|
||||||
adb shell pm install -r /data/local/tmp/QtApp-debug.apk
|
|
||||||
|
|
||||||
- Troubleshooting:
|
|
||||||
|
|
||||||
adb devices -l
|
|
||||||
adb logcat
|
|
||||||
|
|
||||||
if using adb inside docker, make sure you did "docker run -v /dev/bus/usb:/dev/bus/usb --privileged"
|
|
||||||
|
|
||||||
- Using a web server
|
|
||||||
|
|
||||||
mkdir /usr/tmp
|
|
||||||
cp QtApp-debug.apk /usr/tmp
|
|
||||||
docker run -d -v /usr/tmp:/usr/share/nginx/html:ro -p 8080:80 nginx
|
|
||||||
|
|
||||||
Now it should be accessible through a web browser at
|
|
||||||
|
|
||||||
http://<your.local.ip>:8080/QtApp-debug.apk
|
|
||||||
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
FROM monero-android
|
|
||||||
|
|
||||||
#INSTALL JAVA
|
|
||||||
RUN echo "deb http://ftp.fr.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list
|
|
||||||
RUN dpkg --add-architecture i386 \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386 \
|
|
||||||
&& apt-get install -y -t jessie-backports ca-certificates-java openjdk-8-jdk-headless openjdk-8-jre-headless ant
|
|
||||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
|
|
||||||
ENV PATH $JAVA_HOME/bin:$PATH
|
|
||||||
|
|
||||||
#Get Qt
|
|
||||||
ENV QT_VERSION 5.8
|
|
||||||
|
|
||||||
RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} \
|
|
||||||
&& cd qt5 \
|
|
||||||
&& perl init-repository
|
|
||||||
|
|
||||||
## Note: Need to use libc++ but Qt does not provide mkspec for libc++.
|
|
||||||
## Their support of it is quite recent and they claim they don't use it by default
|
|
||||||
## [only because it produces bigger binary objects](https://bugreports.qt.io/browse/QTBUG-50724).
|
|
||||||
|
|
||||||
#Create new mkspec for clang + libc++
|
|
||||||
RUN cp -r qt5/qtbase/mkspecs/android-clang qt5/qtbase/mkspecs/android-clang-libc \
|
|
||||||
&& cd qt5/qtbase/mkspecs/android-clang-libc \
|
|
||||||
&& sed -i '16i ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH' qmake.conf \
|
|
||||||
&& sed -i '17i ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include' qmake.conf \
|
|
||||||
&& echo "QMAKE_LIBS_PRIVATE = -lc++_shared -llog -lz -lm -ldl -lc -lgcc " >> qmake.conf \
|
|
||||||
&& echo "QMAKE_CFLAGS -= -mfpu=vfp " >> qmake.conf \
|
|
||||||
&& echo "QMAKE_CXXFLAGS -= -mfpu=vfp " >> qmake.conf \
|
|
||||||
&& echo "QMAKE_CFLAGS += -mfpu=vfp4 " >> qmake.conf \
|
|
||||||
&& echo "QMAKE_CXXFLAGS += -mfpu=vfp4 " >> qmake.conf
|
|
||||||
|
|
||||||
ENV ANDROID_API android-21
|
|
||||||
|
|
||||||
#ANDROID SDK TOOLS
|
|
||||||
RUN echo y | $ANDROID_SDK_ROOT/tools/android update sdk --no-ui --all --filter platform-tools
|
|
||||||
RUN echo y | $ANDROID_SDK_ROOT/tools/android update sdk --no-ui --all --filter ${ANDROID_API}
|
|
||||||
RUN echo y | $ANDROID_SDK_ROOT/tools/android update sdk --no-ui --all --filter build-tools-25.0.1
|
|
||||||
|
|
||||||
ENV CLEAN_PATH $JAVA_HOME/bin:/usr/cmake-3.6.3-Linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
|
|
||||||
#build Qt
|
|
||||||
RUN cd qt5 && PATH=${CLEAN_PATH} ./configure -developer-build -release \
|
|
||||||
-xplatform android-clang-libc \
|
|
||||||
-android-ndk-platform ${ANDROID_API} \
|
|
||||||
-android-ndk $ANDROID_NDK_ROOT \
|
|
||||||
-android-sdk $ANDROID_SDK_ROOT \
|
|
||||||
-opensource -confirm-license \
|
|
||||||
-prefix ${WORKDIR}/Qt-${QT_VERSION} \
|
|
||||||
-nomake tests -nomake examples \
|
|
||||||
-skip qtserialport \
|
|
||||||
-skip qtconnectivity \
|
|
||||||
-skip qttranslations \
|
|
||||||
-skip qtgamepad -skip qtscript -skip qtdoc
|
|
||||||
|
|
||||||
# build Qt tools : gnustl_shared.so is hard-coded in androiddeployqt
|
|
||||||
# replace it with libc++_shared.so
|
|
||||||
COPY androiddeployqt.patch qt5/qttools/androiddeployqt.patch
|
|
||||||
RUN cd qt5/qttools \
|
|
||||||
&& git apply androiddeployqt.patch \
|
|
||||||
&& cd .. \
|
|
||||||
&& PATH=${CLEAN_PATH} make -j4 \
|
|
||||||
&& PATH=${CLEAN_PATH} make install
|
|
||||||
|
|
||||||
# Get iconv and ZBar
|
|
||||||
ENV ICONV_VERSION 1.14
|
|
||||||
RUN git clone https://github.com/ZBar/ZBar.git \
|
|
||||||
&& curl -s -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \
|
|
||||||
&& tar -xzf libiconv-${ICONV_VERSION}.tar.gz \
|
|
||||||
&& cd libiconv-${ICONV_VERSION} \
|
|
||||||
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ./configure --build=x86_64-linux-gnu --host=arm-eabi --prefix=${WORKDIR}/libiconv --disable-rpath
|
|
||||||
|
|
||||||
ENV PATH $ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:${WORKDIR}/Qt-${QT_VERSION}/bin:$PATH
|
|
||||||
|
|
||||||
#Build libiconv.a and libzbarjni.a
|
|
||||||
COPY android.mk.patch ZBar/android.mk.patch
|
|
||||||
RUN cd ZBar \
|
|
||||||
&& git apply android.mk.patch \
|
|
||||||
&& echo \
|
|
||||||
"APP_ABI := armeabi-v7a \n\
|
|
||||||
APP_STL := c++_shared \n\
|
|
||||||
TARGET_PLATFORM := ${ANDROID_API} \n\
|
|
||||||
TARGET_ARCH_ABI := armeabi-v7a \n\
|
|
||||||
APP_CFLAGS += -target armv7-none-linux-androideabi -fexceptions -fstack-protector-strong -fno-limit-debug-info -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -fno-omit-frame-pointer -fno-stack-protector\n"\
|
|
||||||
>> android/jni/Application.mk \
|
|
||||||
&& cd android \
|
|
||||||
&& android update project --path . -t "${ANDROID_API}" \
|
|
||||||
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ ant -Dndk.dir=${ANDROID_NDK_ROOT} -Diconv.src=${WORKDIR}/libiconv-${ICONV_VERSION} zbar-clean zbar-ndk-build
|
|
||||||
|
|
||||||
RUN cp openssl/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
|
||||||
RUN cp boost_${BOOST_VERSION}/android32/lib/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
|
||||||
RUN cp ZBar/android/obj/local/armeabi-v7a/lib* ${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm/usr/lib
|
|
||||||
|
|
||||||
RUN git clone https://github.com/monero-project/monero-gui.git \
|
|
||||||
&& cd monero-gui \
|
|
||||||
&& git submodule update \
|
|
||||||
&& CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ BOOST_ROOT=/opt/android/boost_1_62_0 \
|
|
||||||
BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \
|
|
||||||
OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \
|
|
||||||
CMAKE_INCLUDE_PATH=${WORKDIR}/cppzmq/ \
|
|
||||||
CMAKE_LIBRARY_PATH=${WORKDIR}/zeromq4-1/.libs \
|
|
||||||
CXXFLAGS="-I ${WORKDIR}/zeromq4-1/include/" \
|
|
||||||
./build.sh release-android \
|
|
||||||
&& cd build \
|
|
||||||
&& make deploy
|
|
||||||
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
|
|
||||||
index e442b07..158afd5 100644
|
|
||||||
--- a/android/jni/Android.mk
|
|
||||||
+++ b/android/jni/Android.mk
|
|
||||||
@@ -12,14 +12,18 @@ LOCAL_PATH := $(ICONV_SRC)
|
|
||||||
|
|
||||||
LOCAL_MODULE := libiconv
|
|
||||||
|
|
||||||
+LOCAL_ARM_MODE := arm
|
|
||||||
+LOCAL_CPP_FEATURES := exceptions rtti features
|
|
||||||
LOCAL_CFLAGS := \
|
|
||||||
-Wno-multichar \
|
|
||||||
-D_ANDROID \
|
|
||||||
- -DLIBDIR="c" \
|
|
||||||
+ -DLIBDIR="\".\"" \
|
|
||||||
-DBUILDING_LIBICONV \
|
|
||||||
-DBUILDING_LIBCHARSET \
|
|
||||||
-DIN_LIBRARY
|
|
||||||
|
|
||||||
+LOCAL_CFLAGS += -fno-stack-protector
|
|
||||||
+
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
lib/iconv.c \
|
|
||||||
libcharset/lib/localcharset.c \
|
|
||||||
@@ -30,13 +34,14 @@ LOCAL_C_INCLUDES := \
|
|
||||||
$(ICONV_SRC)/libcharset \
|
|
||||||
$(ICONV_SRC)/libcharset/include
|
|
||||||
|
|
||||||
-include $(BUILD_SHARED_LIBRARY)
|
|
||||||
+include $(BUILD_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
LOCAL_LDLIBS := -llog -lcharset
|
|
||||||
|
|
||||||
# libzbarjni
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
+
|
|
||||||
LOCAL_PATH := $(MY_LOCAL_PATH)
|
|
||||||
LOCAL_MODULE := zbarjni
|
|
||||||
LOCAL_SRC_FILES := ../../java/zbarjni.c \
|
|
||||||
@@ -71,6 +76,17 @@ LOCAL_C_INCLUDES := ../include \
|
|
||||||
../zbar \
|
|
||||||
$(ICONV_SRC)/include
|
|
||||||
|
|
||||||
-LOCAL_SHARED_LIBRARIES := libiconv
|
|
||||||
+LOCAL_STATIC_LIBRARIES := libiconv
|
|
||||||
+LOCAL_ARM_MODE := arm
|
|
||||||
+LOCAL_CPP_FEATURES := exceptions rtti features
|
|
||||||
+
|
|
||||||
+LOCAL_CFLAGS := \
|
|
||||||
+ -Wno-multichar \
|
|
||||||
+ -D_ANDROID \
|
|
||||||
+ -DLIBDIR="\".\"" \
|
|
||||||
+ -DBUILDING_LIBICONV \
|
|
||||||
+ -DBUILDING_LIBCHARSET \
|
|
||||||
+ -DIN_LIBRARY
|
|
||||||
+
|
|
||||||
|
|
||||||
-include $(BUILD_SHARED_LIBRARY)
|
|
||||||
\ No newline at end of file
|
|
||||||
+include $(BUILD_STATIC_LIBRARY)
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
|
|
||||||
index 8a8e591..71d693e 100644
|
|
||||||
--- a/src/androiddeployqt/main.cpp
|
|
||||||
+++ b/src/androiddeployqt/main.cpp
|
|
||||||
@@ -1122,7 +1122,7 @@ bool updateLibsXml(const Options &options)
|
|
||||||
|
|
||||||
QString libsPath = QLatin1String("libs/") + options.architecture + QLatin1Char('/');
|
|
||||||
|
|
||||||
- QString qtLibs = QLatin1String("<item>gnustl_shared</item>\n");
|
|
||||||
+ QString qtLibs = QLatin1String("<item>c++_shared</item>\n");
|
|
||||||
QString bundledInLibs;
|
|
||||||
QString bundledInAssets;
|
|
||||||
foreach (Options::BundledFile bundledFile, options.bundledFiles) {
|
|
||||||
@@ -2519,6 +2519,39 @@ bool installApk(const Options &options)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+bool copyStl(Options *options)
|
|
||||||
+{
|
|
||||||
+ if (options->deploymentMechanism == Options::Debug && !options->installApk)
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ if (options->verbose)
|
|
||||||
+ fprintf(stdout, "Copying LIBC++ STL library\n");
|
|
||||||
+
|
|
||||||
+ QString filePath = options->ndkPath
|
|
||||||
+ + QLatin1String("/sources/cxx-stl/llvm-libc++")
|
|
||||||
+ + QLatin1String("/libs/")
|
|
||||||
+ + options->architecture
|
|
||||||
+ + QLatin1String("/libc++_shared.so");
|
|
||||||
+ if (!QFile::exists(filePath)) {
|
|
||||||
+ fprintf(stderr, "LIBC STL library does not exist at %s\n", qPrintable(filePath));
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ QString destinationDirectory =
|
|
||||||
+ options->deploymentMechanism == Options::Debug
|
|
||||||
+ ? options->temporaryDirectoryName + QLatin1String("/lib")
|
|
||||||
+ : options->outputDirectory + QLatin1String("/libs/") + options->architecture;
|
|
||||||
+
|
|
||||||
+ if (!copyFileIfNewer(filePath, destinationDirectory
|
|
||||||
+ + QLatin1String("/libc++_shared.so"), options->verbose)) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (options->deploymentMechanism == Options::Debug && !deployToLocalTmp(options, QLatin1String("/lib/libc++_shared.so")))
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
bool copyGnuStl(Options *options)
|
|
||||||
{
|
|
||||||
if (options->deploymentMechanism == Options::Debug && !options->installApk)
|
|
||||||
@@ -2870,7 +2903,7 @@ int main(int argc, char *argv[])
|
|
||||||
if (Q_UNLIKELY(options.timing))
|
|
||||||
fprintf(stdout, "[TIMING] %d ms: Read dependencies\n", options.timer.elapsed());
|
|
||||||
|
|
||||||
- if (options.deploymentMechanism != Options::Ministro && !copyGnuStl(&options))
|
|
||||||
+ if (options.deploymentMechanism != Options::Ministro && !copyStl(&options))
|
|
||||||
return CannotCopyGnuStl;
|
|
||||||
|
|
||||||
if (Q_UNLIKELY(options.timing))
|
|
||||||
121
build.sh
121
build.sh
@@ -1,121 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
BUILD_TYPE=$1
|
|
||||||
BUILD_TREZOR=${BUILD_TREZOR-true}
|
|
||||||
source ./utils.sh
|
|
||||||
platform=$(get_platform)
|
|
||||||
# default build type
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Return 0 if the command exists, 1 if it does not.
|
|
||||||
exists() {
|
|
||||||
command -v "$1" &>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# Return the first value in $@ that's a runnable command.
|
|
||||||
find_command() {
|
|
||||||
for arg in "$@"; do
|
|
||||||
if exists "$arg"; then
|
|
||||||
echo "$arg"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
|
||||||
echo "Building release"
|
|
||||||
CONFIG="CONFIG+=release";
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|
||||||
echo "Building release-static"
|
|
||||||
if [ "$platform" != "darwin" ]; then
|
|
||||||
CONFIG="CONFIG+=release static";
|
|
||||||
else
|
|
||||||
# OS X: build static libwallet but dynamic Qt.
|
|
||||||
echo "OS X: Building Qt project without static flag"
|
|
||||||
CONFIG="CONFIG+=release";
|
|
||||||
fi
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
|
||||||
echo "Building release for ANDROID"
|
|
||||||
CONFIG="CONFIG+=release static WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
|
||||||
ANDROID=true
|
|
||||||
BIN_PATH=release/bin
|
|
||||||
DISABLE_PASS_STRENGTH_METER=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
|
||||||
echo "Building debug for ANDROID : ultra INSECURE !!"
|
|
||||||
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
|
||||||
ANDROID=true
|
|
||||||
BIN_PATH=debug/bin
|
|
||||||
DISABLE_PASS_STRENGTH_METER=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
|
||||||
echo "Building debug"
|
|
||||||
CONFIG="CONFIG+=debug"
|
|
||||||
BIN_PATH=debug/bin
|
|
||||||
else
|
|
||||||
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
source ./utils.sh
|
|
||||||
pushd $(pwd)
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
MONERO_DIR=monero
|
|
||||||
MONEROD_EXEC=monerod
|
|
||||||
|
|
||||||
MAKE='make'
|
|
||||||
if [[ $platform == *bsd* ]]; then
|
|
||||||
MAKE='gmake'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build libwallet
|
|
||||||
export BUILD_TREZOR
|
|
||||||
./get_libwallet_api.sh $BUILD_TYPE
|
|
||||||
|
|
||||||
# build zxcvbn
|
|
||||||
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then
|
|
||||||
$MAKE -C src/zxcvbn-c || exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d build ]; then mkdir build; fi
|
|
||||||
|
|
||||||
|
|
||||||
# Platform indepenent settings
|
|
||||||
if [ "$ANDROID" != true ] && ([ "$platform" == "linux32" ] || [ "$platform" == "linux64" ]); then
|
|
||||||
exists lsb_release && distro="$(lsb_release -is)"
|
|
||||||
if [ "$distro" = "Ubuntu" ] || [ "$distro" = "Fedora" ] || test -f /etc/fedora-release; then
|
|
||||||
CONFIG="$CONFIG libunwind_off"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
BIN_PATH=$BIN_PATH/monero-wallet-gui.app/Contents/MacOS/
|
|
||||||
elif [ "$platform" == "mingw64" ] || [ "$platform" == "mingw32" ]; then
|
|
||||||
MONEROD_EXEC=monerod.exe
|
|
||||||
fi
|
|
||||||
|
|
||||||
# force version update
|
|
||||||
get_tag
|
|
||||||
GUI_VERSION=$(echo "$TAGNAME" | sed 's/^v\([[:digit:]]\)/\1/')
|
|
||||||
echo "var GUI_VERSION = \"$GUI_VERSION\"" > version.js
|
|
||||||
|
|
||||||
cd build
|
|
||||||
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
|
||||||
echo "Failed to find suitable qmake command."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
$QMAKE ../monero-wallet-gui.pro "$CONFIG" || exit
|
|
||||||
$MAKE || exit
|
|
||||||
|
|
||||||
# Copy monerod to bin folder
|
|
||||||
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
|
||||||
cp ../$MONERO_DIR/bin/$MONEROD_EXEC $BIN_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make deploy
|
|
||||||
popd
|
|
||||||
|
|
||||||
1803
cmake/Doxyfile.in
1803
cmake/Doxyfile.in
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
|||||||
/* increase vertical space */
|
|
||||||
#titlearea, #nav-path {
|
|
||||||
display: none;
|
|
||||||
height: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* uncomment these lines for some extra vertical space */
|
|
||||||
|
|
||||||
/*
|
|
||||||
.tablist li {
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
||||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
||||||
|
|
||||||
#.rst:
|
|
||||||
# FindBacktrace
|
|
||||||
# -------------
|
|
||||||
#
|
|
||||||
# Find provider for backtrace(3).
|
|
||||||
#
|
|
||||||
# Checks if OS supports backtrace(3) via either libc or custom library.
|
|
||||||
# This module defines the following variables:
|
|
||||||
#
|
|
||||||
# ``Backtrace_HEADER``
|
|
||||||
# The header file needed for backtrace(3). Cached.
|
|
||||||
# Could be forcibly set by user.
|
|
||||||
# ``Backtrace_INCLUDE_DIRS``
|
|
||||||
# The include directories needed to use backtrace(3) header.
|
|
||||||
# ``Backtrace_LIBRARIES``
|
|
||||||
# The libraries (linker flags) needed to use backtrace(3), if any.
|
|
||||||
# ``Backtrace_FOUND``
|
|
||||||
# Is set if and only if backtrace(3) support detected.
|
|
||||||
#
|
|
||||||
# The following cache variables are also available to set or use:
|
|
||||||
#
|
|
||||||
# ``Backtrace_LIBRARY``
|
|
||||||
# The external library providing backtrace, if any.
|
|
||||||
# ``Backtrace_INCLUDE_DIR``
|
|
||||||
# The directory holding the backtrace(3) header.
|
|
||||||
#
|
|
||||||
# Typical usage is to generate of header file using configure_file() with the
|
|
||||||
# contents like the following::
|
|
||||||
#
|
|
||||||
# #cmakedefine01 Backtrace_FOUND
|
|
||||||
# #if Backtrace_FOUND
|
|
||||||
# # include <${Backtrace_HEADER}>
|
|
||||||
# #endif
|
|
||||||
#
|
|
||||||
# And then reference that generated header file in actual source.
|
|
||||||
|
|
||||||
include(CMakePushCheckState)
|
|
||||||
include(CheckSymbolExists)
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
# List of variables to be provided to find_package_handle_standard_args()
|
|
||||||
set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if(Backtrace_HEADER)
|
|
||||||
set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
|
|
||||||
else(Backtrace_HEADER)
|
|
||||||
set(_Backtrace_HEADER_TRY "execinfo.h")
|
|
||||||
endif(Backtrace_HEADER)
|
|
||||||
|
|
||||||
find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
|
|
||||||
set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
|
|
||||||
|
|
||||||
if (NOT DEFINED Backtrace_LIBRARY)
|
|
||||||
# First, check if we already have backtrace(), e.g., in libc
|
|
||||||
cmake_push_check_state(RESET)
|
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
|
|
||||||
set(CMAKE_REQUIRED_QUIET ${Backtrace_FIND_QUIETLY})
|
|
||||||
check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
|
|
||||||
cmake_pop_check_state()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(_Backtrace_SYM_FOUND)
|
|
||||||
# Avoid repeating the message() call below each time CMake is run.
|
|
||||||
if(NOT Backtrace_FIND_QUIETLY AND NOT DEFINED Backtrace_LIBRARY)
|
|
||||||
message(STATUS "backtrace facility detected in default set of libraries")
|
|
||||||
endif()
|
|
||||||
set(Backtrace_LIBRARY "" CACHE FILEPATH "Library providing backtrace(3), empty for default set of libraries")
|
|
||||||
else()
|
|
||||||
# Check for external library, for non-glibc systems
|
|
||||||
if(Backtrace_INCLUDE_DIR)
|
|
||||||
# OpenBSD has libbacktrace renamed to libexecinfo
|
|
||||||
find_library(Backtrace_LIBRARY "execinfo")
|
|
||||||
elseif() # respect user wishes
|
|
||||||
set(_Backtrace_HEADER_TRY "backtrace.h")
|
|
||||||
find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
|
|
||||||
find_library(Backtrace_LIBRARY "backtrace")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Prepend list with library path as it's more common practice
|
|
||||||
set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "Backtrace_LIBRARY: ${Backtrace_LIBRARY}")
|
|
||||||
if(Backtrace_LIBRARY STREQUAL "NOTFOUND")
|
|
||||||
set(Backtrace_LIBRARY "")
|
|
||||||
endif()
|
|
||||||
if(Backtrace_LIBRARY STREQUAL "Backtrace_LIBRARY-NOTFOUND")
|
|
||||||
set(Backtrace_LIBRARY "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
|
|
||||||
set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
|
|
||||||
|
|
||||||
find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
|
|
||||||
mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# - Try to find Berkeley DB
|
|
||||||
# Once done this will define
|
|
||||||
#
|
|
||||||
# BERKELEY_DB_FOUND - system has Berkeley DB
|
|
||||||
# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory
|
|
||||||
# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB
|
|
||||||
# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB
|
|
||||||
|
|
||||||
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h
|
|
||||||
/usr/include/db4
|
|
||||||
/usr/local/include/db4
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx )
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES)
|
|
||||||
# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view
|
|
||||||
mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES )
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# - Try to find libunwind
|
|
||||||
# Once done this will define
|
|
||||||
#
|
|
||||||
# LIBUNWIND_FOUND - system has libunwind
|
|
||||||
# LIBUNWIND_INCLUDE_DIR - the libunwind include directory
|
|
||||||
# LIBUNWIND_LIBRARIES - Link these to use libunwind
|
|
||||||
# LIBUNWIND_DEFINITIONS - Compiler switches required for using libunwind
|
|
||||||
|
|
||||||
# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
find_path(LIBUNWIND_INCLUDE_DIR libunwind.h
|
|
||||||
/usr/include
|
|
||||||
/usr/local/include
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(LIBUNWIND_LIBRARIES NAMES unwind )
|
|
||||||
if(NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND")
|
|
||||||
if (CMAKE_COMPILER_IS_GNUCC)
|
|
||||||
set(LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# some versions of libunwind need liblzma, and we don't use pkg-config
|
|
||||||
# so we just look whether liblzma is installed, and add it if it is.
|
|
||||||
# It might not be actually needed, but doesn't hurt if it is not.
|
|
||||||
# We don't need any headers, just the lib, as it's privately needed.
|
|
||||||
message(STATUS "looking for liblzma")
|
|
||||||
find_library(LIBLZMA_LIBRARIES lzma )
|
|
||||||
if(NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND")
|
|
||||||
message(STATUS "liblzma found")
|
|
||||||
set(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)
|
|
||||||
# show the LIBUNWIND_INCLUDE_DIR and LIBUNWIND_LIBRARIES variables only in the advanced view
|
|
||||||
mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES )
|
|
||||||
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
# --------------------------------- FindMiniupnpc Start ---------------------------------
|
|
||||||
# Locate miniupnp library
|
|
||||||
# This module defines
|
|
||||||
# MINIUPNP_FOUND, if false, do not try to link to miniupnp
|
|
||||||
# MINIUPNP_LIBRARY, the miniupnp variant
|
|
||||||
# MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
|
|
||||||
# MINIUPNPC_VERSION_1_7_OR_HIGHER, set if we detect the version of miniupnpc is 1.7 or higher
|
|
||||||
#
|
|
||||||
# Note that the expected include convention is
|
|
||||||
# #include "miniupnpc.h"
|
|
||||||
# and not
|
|
||||||
# #include <miniupnpc/miniupnpc.h>
|
|
||||||
# This is because, the miniupnpc location is not standardized and may exist
|
|
||||||
# in locations other than miniupnpc/
|
|
||||||
|
|
||||||
if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
|
|
||||||
# Already in cache, be silent
|
|
||||||
set(MINIUPNP_FIND_QUIETLY TRUE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
|
|
||||||
HINTS $ENV{MINIUPNP_INCLUDE_DIR}
|
|
||||||
PATH_SUFFIXES miniupnpc
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(MINIUPNP_LIBRARY miniupnpc
|
|
||||||
HINTS $ENV{MINIUPNP_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(MINIUPNP_STATIC_LIBRARY libminiupnpc.a
|
|
||||||
HINTS $ENV{MINIUPNP_STATIC_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(MINIUPNP_INCLUDE_DIRS ${MINIUPNP_INCLUDE_DIR})
|
|
||||||
set(MINIUPNP_LIBRARIES ${MINIUPNP_LIBRARY})
|
|
||||||
set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(
|
|
||||||
MiniUPnPc DEFAULT_MSG
|
|
||||||
MINIUPNP_INCLUDE_DIR
|
|
||||||
MINIUPNP_LIBRARY
|
|
||||||
)
|
|
||||||
|
|
||||||
IF(MINIUPNPC_FOUND)
|
|
||||||
file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
|
|
||||||
if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
|
|
||||||
set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
|
|
||||||
if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
|
|
||||||
message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
|
|
||||||
set(MINIUPNP_FOUND true)
|
|
||||||
set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY)
|
|
||||||
# --------------------------------- FindMiniupnpc End ---------------------------------
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
# - Try to find readline include dirs and libraries
|
|
||||||
#
|
|
||||||
# Usage of this module as follows:
|
|
||||||
#
|
|
||||||
# find_package(Readline)
|
|
||||||
#
|
|
||||||
# Variables used by this module, they can change the default behaviour and need
|
|
||||||
# to be set before calling find_package:
|
|
||||||
#
|
|
||||||
# Readline_ROOT_DIR Set this variable to the root installation of
|
|
||||||
# readline if the module has problems finding the
|
|
||||||
# proper installation path.
|
|
||||||
#
|
|
||||||
# Variables defined by this module:
|
|
||||||
#
|
|
||||||
# READLINE_FOUND System has readline, include and lib dirs found
|
|
||||||
# GNU_READLINE_FOUND Version of readline found is GNU readline, not libedit!
|
|
||||||
# LIBEDIT_FOUND Version of readline found is libedit, not GNU readline!
|
|
||||||
# Readline_INCLUDE_DIR The readline include directories.
|
|
||||||
# Readline_LIBRARY The readline library.
|
|
||||||
# GNU_READLINE_LIBRARY The GNU readline library or empty string.
|
|
||||||
# LIBEDIT_LIBRARY The libedit library or empty string.
|
|
||||||
|
|
||||||
find_path(Readline_ROOT_DIR
|
|
||||||
NAMES include/readline/readline.h
|
|
||||||
PATHS /usr/local/opt/readline/ /opt/local/ /usr/local/ /usr/
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
|
|
||||||
find_path(Readline_INCLUDE_DIR
|
|
||||||
NAMES readline/readline.h
|
|
||||||
PATHS ${Readline_ROOT_DIR}/include
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(Readline_LIBRARY
|
|
||||||
NAMES readline
|
|
||||||
PATHS ${Readline_ROOT_DIR}/lib
|
|
||||||
NO_DEFAULT_PATH
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(Termcap_LIBRARY
|
|
||||||
NAMES tinfo termcap ncursesw ncurses cursesw curses
|
|
||||||
)
|
|
||||||
|
|
||||||
if(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
|
||||||
set(READLINE_FOUND TRUE)
|
|
||||||
else(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
|
||||||
FIND_LIBRARY(Readline_LIBRARY NAMES readline PATHS Readline_ROOT_DIR)
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY )
|
|
||||||
MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY)
|
|
||||||
endif(Readline_INCLUDE_DIR AND Readline_LIBRARY)
|
|
||||||
|
|
||||||
mark_as_advanced(
|
|
||||||
Readline_ROOT_DIR
|
|
||||||
Readline_INCLUDE_DIR
|
|
||||||
Readline_LIBRARY
|
|
||||||
)
|
|
||||||
|
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${Readline_INCLUDE_DIR})
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY})
|
|
||||||
|
|
||||||
include(CheckFunctionExists)
|
|
||||||
check_function_exists(rl_copy_text HAVE_COPY_TEXT)
|
|
||||||
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION)
|
|
||||||
|
|
||||||
if(NOT HAVE_COMPLETION_FUNCTION)
|
|
||||||
if (Readline_LIBRARY)
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY} ${Termcap_LIBRARY})
|
|
||||||
endif(Readline_LIBRARY)
|
|
||||||
check_function_exists(rl_copy_text HAVE_COPY_TEXT_TC)
|
|
||||||
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION_TC)
|
|
||||||
set(HAVE_COMPLETION_FUNCTION ${HAVE_COMPLETION_FUNCTION_TC})
|
|
||||||
set(HAVE_COPY_TEXT ${HAVE_COPY_TEXT_TC})
|
|
||||||
if(HAVE_COMPLETION_FUNCTION)
|
|
||||||
set(Readline_LIBRARY ${Readline_LIBRARY} ${Termcap_LIBRARY})
|
|
||||||
endif(HAVE_COMPLETION_FUNCTION)
|
|
||||||
endif(NOT HAVE_COMPLETION_FUNCTION)
|
|
||||||
|
|
||||||
set(LIBEDIT_LIBRARY "")
|
|
||||||
set(GNU_READLINE_LIBRARY "")
|
|
||||||
|
|
||||||
if(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)
|
|
||||||
set(GNU_READLINE_FOUND TRUE)
|
|
||||||
set(GNU_READLINE_LIBRARY ${Readline_LIBRARY})
|
|
||||||
elseif(READLINE_FOUND AND NOT HAVE_COPY_TEXT)
|
|
||||||
set(LIBEDIT_FOUND TRUE)
|
|
||||||
set(LIBEDIT_LIBRARY ${Readline_LIBRARY})
|
|
||||||
endif(HAVE_COMPLETION_FUNCTION AND HAVE_COPY_TEXT)
|
|
||||||
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# Copyright (c) 2014-2019, The Monero Project
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
MESSAGE(STATUS "Looking for libunbound")
|
|
||||||
|
|
||||||
FIND_PATH(UNBOUND_INCLUDE_DIR
|
|
||||||
NAMES unbound.h
|
|
||||||
PATH_SUFFIXES include/ include/unbound/
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}"
|
|
||||||
${UNBOUND_ROOT}
|
|
||||||
$ENV{UNBOUND_ROOT}
|
|
||||||
/usr/local/
|
|
||||||
/usr/
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(UNBOUND_LIBRARIES unbound)
|
|
||||||
@@ -9,14 +9,30 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
pkg_check_modules(PC_ZBAR QUIET zbar)
|
if(PkgConfig_FOUND)
|
||||||
set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
|
pkg_check_modules(PC_ZBAR QUIET zbar)
|
||||||
find_library(ZBAR_LIBRARIES NAMES zbar
|
if(PC_ZBAR_FOUND)
|
||||||
HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS} )
|
set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
|
||||||
find_path(ZBAR_INCLUDE_DIR Decoder.h
|
find_library(ZBAR_LIBRARIES NAMES zbar HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS})
|
||||||
HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS}
|
find_path(ZBAR_INCLUDE_DIR Decoder.h HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS} PATH_SUFFIXES zbar)
|
||||||
PATH_SUFFIXES zbar )
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ZBAR_LIBRARIES AND ANDROID)
|
||||||
|
find_library(ZBARJNI_LIBRARY NAMES zbarjni)
|
||||||
|
find_library(ICONV_LIBRARY NAMES iconv)
|
||||||
|
if(ZBARJNI_LIBRARY AND ICONV_LIBRARY)
|
||||||
|
set(ZBAR_LIBRARIES ${ZBARJNI_LIBRARY} ${ICONV_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ZBAR_INCLUDE_DIR)
|
||||||
|
find_path(ZBAR_H_PATH zbar.h)
|
||||||
|
if(ZBAR_H_PATH)
|
||||||
|
set(ZBAR_INCLUDE_DIR "${ZBAR_H_PATH}/zbar")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
|
find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
|
||||||
message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}")
|
message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
# Copyright (c) 2014-2019, The Monero Project
|
|
||||||
#
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
|
||||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
|
||||||
|
|
||||||
# Check what commit we're on
|
|
||||||
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
if(RET)
|
|
||||||
# Something went wrong, set the version tag to -unknown
|
|
||||||
|
|
||||||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.")
|
|
||||||
set(VERSIONTAG "unknown")
|
|
||||||
set(VERSION_IS_RELEASE "false")
|
|
||||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
|
||||||
else()
|
|
||||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
|
||||||
message(STATUS "You are currently on commit ${COMMIT}")
|
|
||||||
|
|
||||||
# Get all the tags
|
|
||||||
execute_process(COMMAND "${GIT}" rev-list --tags --max-count=1 --abbrev-commit RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
if(NOT TAGGEDCOMMIT)
|
|
||||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
|
||||||
set(VERSIONTAG "${COMMIT}")
|
|
||||||
set(VERSION_IS_RELEASE "false")
|
|
||||||
else()
|
|
||||||
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}")
|
|
||||||
|
|
||||||
# Check if we're building that tagged commit or a different one
|
|
||||||
if(COMMIT STREQUAL TAGGEDCOMMIT)
|
|
||||||
message(STATUS "You are building a tagged release")
|
|
||||||
set(VERSIONTAG "release")
|
|
||||||
set(VERSION_IS_RELEASE "true")
|
|
||||||
else()
|
|
||||||
message(STATUS "You are ahead of or behind a tagged release")
|
|
||||||
set(VERSIONTAG "${COMMIT}")
|
|
||||||
set(VERSION_IS_RELEASE "false")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
|
||||||
endif()
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
# Copyright (c) 2014-2017, The Monero Project
|
|
||||||
#
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
# permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
# conditions and the following disclaimer.
|
|
||||||
#
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
# of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
# materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software without specific
|
|
||||||
# prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
function (write_static_version_header hash)
|
|
||||||
set(VERSIONTAG "${hash}")
|
|
||||||
configure_file("${CMAKE_SOURCE_DIR}/monero/src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp")
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
find_package(Git QUIET)
|
|
||||||
if ("$Format:$" STREQUAL "")
|
|
||||||
# We're in a tarball; use hard-coded variables.
|
|
||||||
write_static_version_header("release")
|
|
||||||
elseif (GIT_FOUND OR Git_FOUND)
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
|
|
||||||
COMMAND "${CMAKE_COMMAND}"
|
|
||||||
"-D" "GIT=${GIT_EXECUTABLE}"
|
|
||||||
"-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
|
|
||||||
"-P" "cmake/GenVersion.cmake"
|
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
|
||||||
|
|
||||||
#message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
|
||||||
# COMMAND "${CMAKE_COMMAND}"
|
|
||||||
# "-D" "GIT=${GIT_EXECUTABLE}"
|
|
||||||
# "-D" "TO=${CMAKE_BINARY_DIR}/monero/version.cpp"
|
|
||||||
# "-P" "cmake/GenVersion.cmake"
|
|
||||||
# BYPRODUCTS "${CMAKE_BINARY_DIR}/monero/version.cpp"
|
|
||||||
# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
|
||||||
else()
|
|
||||||
message(STATUS "WARNING: Git was not found!")
|
|
||||||
write_static_version_header("unknown")
|
|
||||||
endif ()
|
|
||||||
add_custom_target(genversion ALL
|
|
||||||
DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")
|
|
||||||
|
|
||||||
|
|
||||||
#find_package(Git QUIET)
|
|
||||||
#if ("$Format:$" STREQUAL "")
|
|
||||||
# # We're in a tarball; use hard-coded variables.
|
|
||||||
# write_static_version_header("release")
|
|
||||||
#elseif (GIT_FOUND OR Git_FOUND)
|
|
||||||
# message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
|
||||||
# add_custom_command(
|
|
||||||
# OUTPUT "${CMAKE_BINARY_DIR}/version.cpp"
|
|
||||||
# COMMAND "${CMAKE_COMMAND}"
|
|
||||||
# "-D" "GIT=${GIT_EXECUTABLE}"
|
|
||||||
# "-D" "TO=${CMAKE_BINARY_DIR}/version.cpp"
|
|
||||||
# "-P" "cmake/GenVersion.cmake"
|
|
||||||
# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
|
||||||
#else()
|
|
||||||
# message(STATUS "WARNING: Git was not found!")
|
|
||||||
# write_static_version_header("unknown")
|
|
||||||
#endif ()
|
|
||||||
#add_custom_target(genversion ALL
|
|
||||||
# DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
syntax = "proto2";
|
|
||||||
|
|
||||||
import "google/protobuf/descriptor.proto";
|
|
||||||
|
|
||||||
message Success {
|
|
||||||
optional string message = 1;
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
// Copyright (c) 2014-2019, The Monero Project
|
|
||||||
//
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
// permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
// conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
// of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
// materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
// used to endorse or promote products derived from this software without specific
|
|
||||||
// prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
static_assert(1, "FAIL");
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
// Copyright (c) 2014-2019, The Monero Project
|
|
||||||
//
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without modification, are
|
|
||||||
// permitted provided that the following conditions are met:
|
|
||||||
//
|
|
||||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
||||||
// conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
||||||
// of conditions and the following disclaimer in the documentation and/or other
|
|
||||||
// materials provided with the distribution.
|
|
||||||
//
|
|
||||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
||||||
// used to endorse or promote products derived from this software without specific
|
|
||||||
// prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
||||||
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
static_assert(1, "FAIL");
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
// Copyright (c) 2014-2019, The Monero Project
|
// Copyright (c) 2020, The Monero Project
|
||||||
//
|
//
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without modification, are
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
// permitted provided that the following conditions are met:
|
// permitted provided that the following conditions are met:
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
// conditions and the following disclaimer.
|
// conditions and the following disclaimer.
|
||||||
//
|
//
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
// of conditions and the following disclaimer in the documentation and/or other
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
// materials provided with the distribution.
|
// materials provided with the distribution.
|
||||||
//
|
//
|
||||||
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
// used to endorse or promote products derived from this software without specific
|
// used to endorse or promote products derived from this software without specific
|
||||||
// prior written permission.
|
// prior written permission.
|
||||||
//
|
//
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
@@ -26,18 +26,42 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <string>
|
import QtQuick 2.9
|
||||||
#include <iostream>
|
import QtQuick.Layouts 1.3
|
||||||
#include <google/protobuf/message.h>
|
|
||||||
#include <google/protobuf/unknown_field_set.h>
|
|
||||||
#include "test-protobuf.pb.h"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
import FontAwesome 1.0
|
||||||
google::protobuf::UnknownFieldSet ufs;
|
|
||||||
ufs.ClearAndFreeMemory();
|
|
||||||
|
|
||||||
Success sc;
|
import "../components" as MoneroComponents
|
||||||
sc.set_message("test");
|
|
||||||
sc.SerializeToOstream(&std::cerr);
|
Item {
|
||||||
return 0;
|
implicitHeight: layout.height
|
||||||
|
implicitWidth: layout.width
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: layout
|
||||||
|
opacity: mouseArea.containsMouse ? 1 : 0.85
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
Layout.bottomMargin: 5
|
||||||
|
fontColor: MoneroComponents.Style.defaultFontColor
|
||||||
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontSize: 26
|
||||||
|
styleName: "Solid"
|
||||||
|
text: FontAwesome.language
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
font.pixelSize: 14
|
||||||
|
text: persistentSettings.language
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: appWindow.toggleLanguageView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,15 @@ Rectangle {
|
|||||||
property var connected: Wallet.ConnectionStatus_Disconnected
|
property var connected: Wallet.ConnectionStatus_Disconnected
|
||||||
|
|
||||||
function getConnectionStatusString(status) {
|
function getConnectionStatusString(status) {
|
||||||
|
switch (appWindow.daemonStartStopInProgress)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
return qsTr("Starting the node");
|
||||||
|
case 2:
|
||||||
|
return qsTr("Stopping the node");
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case Wallet.ConnectionStatus_Connected:
|
case Wallet.ConnectionStatus_Connected:
|
||||||
if (!appWindow.daemonSynced)
|
if (!appWindow.daemonSynced)
|
||||||
|
|||||||
466
components/TxConfirmationDialog.qml
Normal file
466
components/TxConfirmationDialog.qml
Normal file
@@ -0,0 +1,466 @@
|
|||||||
|
// Copyright (c) 2014-2020, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.9
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import "../components" as MoneroComponents
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
x: parent.width/2 - root.width/2
|
||||||
|
y: parent.height/2 - root.height/2
|
||||||
|
// TODO: implement without hardcoding sizes
|
||||||
|
width: 580
|
||||||
|
height: 400
|
||||||
|
color: MoneroComponents.Style.blackTheme ? "black" : "white"
|
||||||
|
visible: false
|
||||||
|
radius: 10
|
||||||
|
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||||
|
border.width: 1
|
||||||
|
focus: true
|
||||||
|
Keys.enabled: true
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
Keys.onEnterPressed: {
|
||||||
|
if (root.state == "default") {
|
||||||
|
root.close()
|
||||||
|
root.accepted()
|
||||||
|
} else if (root.state == "error") {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Keys.onReturnPressed: {
|
||||||
|
if (root.state == "default") {
|
||||||
|
root.close()
|
||||||
|
root.accepted()
|
||||||
|
} else if (root.state == "error") {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
KeyNavigation.tab: confirmButton
|
||||||
|
|
||||||
|
property var transactionAmount: ""
|
||||||
|
property var transactionAddress: ""
|
||||||
|
property var transactionDescription: ""
|
||||||
|
property var transactionFee: ""
|
||||||
|
property var transactionPriority: ""
|
||||||
|
property bool sweepUnmixable: false
|
||||||
|
property alias errorText: errorText
|
||||||
|
property alias confirmButton: confirmButton
|
||||||
|
property alias backButton: backButton
|
||||||
|
property alias bottomText: bottomText
|
||||||
|
property alias bottomTextAnimation: bottomTextAnimation
|
||||||
|
|
||||||
|
state: "default"
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
// waiting for user action, show tx details + back and confirm buttons
|
||||||
|
name: "default";
|
||||||
|
when: errorText.text == "" && bottomText.text == ""
|
||||||
|
PropertyChanges { target: errorText; visible: false }
|
||||||
|
PropertyChanges { target: txAmountText; visible: root.transactionAmount !== "(all)" || (root.transactionAmount === "(all)" && currentWallet.isHwBacked() === true) }
|
||||||
|
PropertyChanges { target: txAmountBusyIndicator; visible: !txAmountText.visible }
|
||||||
|
PropertyChanges { target: txFiatAmountText; visible: txAmountText.visible && persistentSettings.fiatPriceEnabled && root.transactionAmount !== "(all)" }
|
||||||
|
PropertyChanges { target: txDetails; visible: true }
|
||||||
|
PropertyChanges { target: bottom; visible: true }
|
||||||
|
PropertyChanges { target: bottomMessage; visible: false }
|
||||||
|
PropertyChanges { target: buttons; visible: true }
|
||||||
|
PropertyChanges { target: backButton; visible: true; primary: false }
|
||||||
|
PropertyChanges { target: confirmButton; visible: true }
|
||||||
|
}, State {
|
||||||
|
// error message being displayed, show only back button
|
||||||
|
name: "error";
|
||||||
|
when: errorText.text !== ""
|
||||||
|
PropertyChanges { target: dialogTitle; text: "Error" }
|
||||||
|
PropertyChanges { target: errorText; visible: true }
|
||||||
|
PropertyChanges { target: txAmountText; visible: false }
|
||||||
|
PropertyChanges { target: txAmountBusyIndicator; visible: false }
|
||||||
|
PropertyChanges { target: txFiatAmountText; visible: false }
|
||||||
|
PropertyChanges { target: txDetails; visible: false }
|
||||||
|
PropertyChanges { target: bottom; visible: true }
|
||||||
|
PropertyChanges { target: bottomMessage; visible: false }
|
||||||
|
PropertyChanges { target: buttons; visible: true }
|
||||||
|
PropertyChanges { target: backButton; visible: true; primary: true }
|
||||||
|
PropertyChanges { target: confirmButton; visible: false }
|
||||||
|
}, State {
|
||||||
|
// creating or sending transaction, show tx details and don't show any button
|
||||||
|
name: "bottomText";
|
||||||
|
when: errorText.text == "" && bottomText.text !== ""
|
||||||
|
PropertyChanges { target: errorText; visible: false }
|
||||||
|
PropertyChanges { target: txAmountText; visible: root.transactionAmount !== "(all)" || (root.transactionAmount === "(all)" && currentWallet.isHwBacked() === true) }
|
||||||
|
PropertyChanges { target: txAmountBusyIndicator; visible: !txAmountText.visible }
|
||||||
|
PropertyChanges { target: txFiatAmountText; visible: txAmountText.visible && persistentSettings.fiatPriceEnabled && root.transactionAmount !== "(all)" }
|
||||||
|
PropertyChanges { target: txDetails; visible: true }
|
||||||
|
PropertyChanges { target: bottom; visible: true }
|
||||||
|
PropertyChanges { target: bottomMessage; visible: true }
|
||||||
|
PropertyChanges { target: buttons; visible: false }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
// same signals as Dialog has
|
||||||
|
signal accepted()
|
||||||
|
signal rejected()
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
root.visible = true;
|
||||||
|
|
||||||
|
//clean previous error message
|
||||||
|
errorText.text = "";
|
||||||
|
root.forceActiveFocus()
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
root.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearFields() {
|
||||||
|
root.transactionAmount = "";
|
||||||
|
root.transactionAddress = "";
|
||||||
|
root.transactionDescription = "";
|
||||||
|
root.transactionFee = "";
|
||||||
|
root.transactionPriority = "";
|
||||||
|
root.sweepUnmixable = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showFiatConversion(valueXMR) {
|
||||||
|
const fiatFee = fiatApiConvertToFiat(valueXMR);
|
||||||
|
return "%1 %2".arg(fiatFee < 0.01 ? "<0.01" : "~" + fiatFee).arg(fiatApiCurrencySymbol());
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 10
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 25
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
MoneroComponents.Label {
|
||||||
|
id: dialogTitle
|
||||||
|
Layout.fillWidth: true
|
||||||
|
fontSize: 18
|
||||||
|
fontFamily: "Arial"
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: {
|
||||||
|
if (appWindow.viewOnly) {
|
||||||
|
return qsTr("Create transaction file") + translationManager.emptyString;
|
||||||
|
} else if (root.sweepUnmixable) {
|
||||||
|
return qsTr("Sweep unmixable outputs") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return qsTr("Confirm send") + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: errorText
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 71
|
||||||
|
|
||||||
|
BusyIndicator {
|
||||||
|
id: txAmountBusyIndicator
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
running: root.transactionAmount == "(all)"
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: txAmountText
|
||||||
|
Layout.fillWidth: true
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font.pixelSize: root.transactionAmount == "(all)" && currentWallet.isHwBacked() === true ? 32 : 42
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: {
|
||||||
|
if (root.transactionAmount == "(all)" && currentWallet.isHwBacked() === true) {
|
||||||
|
return qsTr("All unlocked balance") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return root.transactionAmount + " XMR " + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: txFiatAmountText
|
||||||
|
Layout.fillWidth: true
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
font.pixelSize: 20
|
||||||
|
color: MoneroComponents.Style.buttonSecondaryTextColor
|
||||||
|
text: showFiatConversion(transactionAmount) + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
columns: 2
|
||||||
|
id: txDetails
|
||||||
|
Layout.fillWidth: true
|
||||||
|
columnSpacing: 15
|
||||||
|
rowSpacing: 16
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
|
text: qsTr("From") + ":" + translationManager.emptyString
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 15
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: {
|
||||||
|
if (currentWallet) {
|
||||||
|
var walletTitle = function() {
|
||||||
|
if (currentWallet.isLedger()) {
|
||||||
|
return "Ledger";
|
||||||
|
} else if (currentWallet.isTrezor()) {
|
||||||
|
return "Trezor";
|
||||||
|
} else {
|
||||||
|
return qsTr("My wallet");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var walletName = appWindow.walletName;
|
||||||
|
if (appWindow.currentWallet.numSubaddressAccounts() > 1) {
|
||||||
|
var currentSubaddressAccount = currentWallet.currentSubaddressAccount;
|
||||||
|
var currentAccountLabel = currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
|
||||||
|
return walletTitle() + " (" + walletName + ")" + "<br>" + qsTr("Account #") + currentSubaddressAccount + (currentAccountLabel !== "" ? " (" + currentAccountLabel + ")" : "") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return walletTitle() + " (" + walletName + ")" + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 15
|
||||||
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
|
text: qsTr("To") + ":" + translationManager.emptyString
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pixelSize: 15
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
textFormat: Text.RichText
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: {
|
||||||
|
if (root.transactionAddress) {
|
||||||
|
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(root.transactionAddress) : null;
|
||||||
|
var fulladdress = root.transactionAddress;
|
||||||
|
var spacedaddress = fulladdress.match(/.{1,4}/g);
|
||||||
|
var spacedaddress = spacedaddress.join(' ');
|
||||||
|
if (!addressBookName) {
|
||||||
|
return qsTr("Monero address") + "<br>" + spacedaddress + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return FontAwesome.addressBook + " " + addressBookName + "<br>" + spacedaddress;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment : Qt.AlignTop | Qt.AlignLeft
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
|
text: qsTr("Fee") + ":" + translationManager.emptyString
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Text {
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
font.pixelSize: 15
|
||||||
|
text: {
|
||||||
|
if (currentWallet) {
|
||||||
|
if (!root.transactionFee) {
|
||||||
|
if (currentWallet.isHwBacked() === true) {
|
||||||
|
return qsTr("See on device") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return qsTr("Calculating fee") + "..." + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return root.transactionFee + " XMR"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 8
|
||||||
|
color: MoneroComponents.Style.buttonSecondaryTextColor
|
||||||
|
visible: persistentSettings.fiatPriceEnabled && root.transactionFee
|
||||||
|
font.pixelSize: 15
|
||||||
|
text: showFiatConversion(root.transactionFee)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: bottom
|
||||||
|
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: bottomMessage
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
|
||||||
|
BusyIndicator {
|
||||||
|
visible: !bottomTextAnimation.running
|
||||||
|
running: !bottomTextAnimation.running
|
||||||
|
scale: .5
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: bottomText
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
text: ""
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
font.pixelSize: 17
|
||||||
|
opacity: 1
|
||||||
|
|
||||||
|
SequentialAnimation{
|
||||||
|
id:bottomTextAnimation
|
||||||
|
running: false
|
||||||
|
loops: Animation.Infinite
|
||||||
|
alwaysRunToEnd: true
|
||||||
|
NumberAnimation { target: bottomText; property: "opacity"; to: 0; duration: 500}
|
||||||
|
NumberAnimation { target: bottomText; property: "opacity"; to: 1; duration: 500}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: buttons
|
||||||
|
spacing: 70
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: backButton
|
||||||
|
text: qsTr("Back") + translationManager.emptyString;
|
||||||
|
width: 200
|
||||||
|
focus: false
|
||||||
|
primary: false
|
||||||
|
KeyNavigation.tab: confirmButton
|
||||||
|
Keys.enabled: backButton.visible
|
||||||
|
Keys.onReturnPressed: backButton.onClicked
|
||||||
|
Keys.onEnterPressed: backButton.onClicked
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: confirmButton
|
||||||
|
text: qsTr("Confirm") + translationManager.emptyString;
|
||||||
|
rightIcon: "qrc:///images/rightArrow.png"
|
||||||
|
width: 200
|
||||||
|
focus: false
|
||||||
|
KeyNavigation.tab: backButton
|
||||||
|
Keys.enabled: confirmButton.visible
|
||||||
|
Keys.onReturnPressed: confirmButton.onClicked
|
||||||
|
Keys.onEnterPressed: confirmButton.onClicked
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
root.close()
|
||||||
|
root.clearFields()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
root.close()
|
||||||
|
root.accepted()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
android-no-sdk {
|
|
||||||
target.path = /data/user/qt
|
|
||||||
export(target.path)
|
|
||||||
INSTALLS += target
|
|
||||||
} else:android {
|
|
||||||
x86 {
|
|
||||||
target.path = /libs/x86
|
|
||||||
} else: armeabi-v7a {
|
|
||||||
target.path = /libs/armeabi-v7a
|
|
||||||
} else {
|
|
||||||
target.path = /libs/armeabi
|
|
||||||
}
|
|
||||||
export(target.path)
|
|
||||||
INSTALLS += target
|
|
||||||
} else:unix {
|
|
||||||
isEmpty(target.path) {
|
|
||||||
qnx {
|
|
||||||
target.path = /tmp/$${TARGET}/bin
|
|
||||||
} else {
|
|
||||||
target.path = /opt/$${TARGET}/bin
|
|
||||||
}
|
|
||||||
export(target.path)
|
|
||||||
}
|
|
||||||
INSTALLS += target
|
|
||||||
}
|
|
||||||
|
|
||||||
export(INSTALLS)
|
|
||||||
@@ -1,286 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
MONERO_URL=https://github.com/monero-project/monero.git
|
|
||||||
MONERO_BRANCH=master
|
|
||||||
|
|
||||||
pushd $(pwd)
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
INSTALL_DIR=$ROOT_DIR/wallet
|
|
||||||
MONERO_DIR=$ROOT_DIR/monero
|
|
||||||
BUILD_LIBWALLET=false
|
|
||||||
|
|
||||||
# init and update monero submodule
|
|
||||||
if [ ! -d $MONERO_DIR/src ]; then
|
|
||||||
git submodule init monero
|
|
||||||
fi
|
|
||||||
git submodule update --remote
|
|
||||||
git -C $MONERO_DIR fetch
|
|
||||||
git -C $MONERO_DIR checkout v0.17.0.1
|
|
||||||
|
|
||||||
# get monero core tag
|
|
||||||
pushd $MONERO_DIR
|
|
||||||
get_tag
|
|
||||||
popd
|
|
||||||
# create local monero branch
|
|
||||||
git -C $MONERO_DIR checkout -B $VERSIONTAG
|
|
||||||
|
|
||||||
# Merge monero PR dependencies
|
|
||||||
|
|
||||||
# Workaround for git username requirements
|
|
||||||
# Save current user settings and revert back when we are done with merging PR's
|
|
||||||
OLD_GIT_USER=$(git -C $MONERO_DIR config --local user.name)
|
|
||||||
OLD_GIT_EMAIL=$(git -C $MONERO_DIR config --local user.email)
|
|
||||||
git -C $MONERO_DIR config user.name "Monero GUI"
|
|
||||||
git -C $MONERO_DIR config user.email "gui@monero.local"
|
|
||||||
# check for PR requirements in most recent commit message (i.e requires #xxxx)
|
|
||||||
for PR in $(git log --format=%B -n 1 | grep -io "requires #[0-9]*" | sed 's/[^0-9]*//g'); do
|
|
||||||
echo "Merging monero push request #$PR"
|
|
||||||
# fetch pull request and merge
|
|
||||||
git -C $MONERO_DIR fetch origin pull/$PR/head:PR-$PR
|
|
||||||
git -C $MONERO_DIR merge --quiet PR-$PR -m "Merge monero PR #$PR"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
done
|
|
||||||
|
|
||||||
# revert back to old git config
|
|
||||||
$(git -C $MONERO_DIR config user.name "$OLD_GIT_USER")
|
|
||||||
$(git -C $MONERO_DIR config user.email "$OLD_GIT_EMAIL")
|
|
||||||
|
|
||||||
git -C $MONERO_DIR submodule init
|
|
||||||
git -C $MONERO_DIR submodule update
|
|
||||||
|
|
||||||
# Build libwallet if it doesnt exist
|
|
||||||
if [ ! -f $MONERO_DIR/lib/libwallet_merged.a ]; then
|
|
||||||
echo "libwallet_merged.a not found - Building libwallet"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
# Build libwallet if no previous version file exists
|
|
||||||
elif [ ! -f $MONERO_DIR/version.sh ]; then
|
|
||||||
echo "monero/version.h not found - Building libwallet"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
## Compare previously built version with submodule + merged PR's version.
|
|
||||||
else
|
|
||||||
source $MONERO_DIR/version.sh
|
|
||||||
# compare submodule version with latest build
|
|
||||||
pushd "$MONERO_DIR"
|
|
||||||
get_tag
|
|
||||||
popd
|
|
||||||
echo "latest libwallet version: $GUI_MONERO_VERSION"
|
|
||||||
echo "Installed libwallet version: $VERSIONTAG"
|
|
||||||
# check if recent
|
|
||||||
if [ "$VERSIONTAG" != "$GUI_MONERO_VERSION" ]; then
|
|
||||||
echo "Building new libwallet version $GUI_MONERO_VERSION"
|
|
||||||
BUILD_LIBWALLET=true
|
|
||||||
else
|
|
||||||
echo "latest libwallet ($GUI_MONERO_VERSION) is already built. Remove monero/lib/libwallet_merged.a to force rebuild"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BUILD_LIBWALLET" != true ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "GUI_MONERO_VERSION=\"$VERSIONTAG\"" > $MONERO_DIR/version.sh
|
|
||||||
|
|
||||||
## Continue building libwallet
|
|
||||||
|
|
||||||
# default build type
|
|
||||||
BUILD_TYPE=$1
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=ON"
|
|
||||||
if [ "$BUILD_TREZOR" == false ]; then
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=OFF"
|
|
||||||
fi
|
|
||||||
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR_UDP_RELEASE=ON ${BUILD_TREZOR_FLAGS}"
|
|
||||||
|
|
||||||
STATIC=false
|
|
||||||
ANDROID=false
|
|
||||||
if [ "$BUILD_TYPE" == "release" ]; then
|
|
||||||
echo "Building libwallet release"
|
|
||||||
CMAKE_BUILD_TYPE=Release
|
|
||||||
elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|
||||||
echo "Building libwallet release-static"
|
|
||||||
CMAKE_BUILD_TYPE=Release
|
|
||||||
STATIC=true
|
|
||||||
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
|
||||||
echo "Building libwallet release-static for ANDROID"
|
|
||||||
CMAKE_BUILD_TYPE=Release
|
|
||||||
STATIC=true
|
|
||||||
ANDROID=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
|
||||||
echo "Building libwallet debug-static for ANDROID"
|
|
||||||
CMAKE_BUILD_TYPE=Debug
|
|
||||||
STATIC=true
|
|
||||||
ANDROID=true
|
|
||||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
|
||||||
echo "Building libwallet debug"
|
|
||||||
CMAKE_BUILD_TYPE=Debug
|
|
||||||
STATIC=true
|
|
||||||
else
|
|
||||||
echo "Valid build types are release, release-static, release-android, debug-android and debug"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "cleaning up existing monero build dir, libs and includes"
|
|
||||||
rm -fr $MONERO_DIR/build
|
|
||||||
rm -fr $MONERO_DIR/lib
|
|
||||||
rm -fr $MONERO_DIR/include
|
|
||||||
rm -fr $MONERO_DIR/bin
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p $MONERO_DIR/build/$BUILD_TYPE
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE
|
|
||||||
|
|
||||||
# reusing function from "utils.sh"
|
|
||||||
platform=$(get_platform)
|
|
||||||
# default make executable
|
|
||||||
make_exec="make"
|
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
|
||||||
ARCH="native"
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linux64" ]; then
|
|
||||||
if [ "$ANDROID" == true ]; then
|
|
||||||
ARCH="armv7-a"
|
|
||||||
elif [ "$STATIC" == true ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linux32" ]; then
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
ARCH="i686"
|
|
||||||
fi
|
|
||||||
elif [ "$platform" == "linuxarmv7" ]; then
|
|
||||||
ARCH="armv7-a"
|
|
||||||
elif [ "$platform" == "mingw32" ]; then
|
|
||||||
ARCH="i686"
|
|
||||||
elif [ "$platform" == "mingw64" ]; then
|
|
||||||
ARCH="x86-64"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building for ARCH=$ARCH"
|
|
||||||
|
|
||||||
## OS X
|
|
||||||
if [ "$platform" == "darwin" ]; then
|
|
||||||
echo "Configuring build for MacOS.."
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="mac-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX 64
|
|
||||||
elif [ "$platform" == "linux64" ]; then
|
|
||||||
echo "Configuring build for Linux x64"
|
|
||||||
if [ "$ANDROID" == true ]; then
|
|
||||||
echo "Configuring build for Android on Linux host"
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
elif [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=ON -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_TAG="linux-x64" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX 32
|
|
||||||
elif [ "$platform" == "linux32" ]; then
|
|
||||||
echo "Configuring build for Linux i686"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX ARMv7
|
|
||||||
elif [ "$platform" == "linuxarmv7" ]; then
|
|
||||||
echo "Configuring build for Linux armv7"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D BUILD_TESTS=OFF -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## LINUX other
|
|
||||||
elif [ "$platform" == "linux" ]; then
|
|
||||||
echo "Configuring build for Linux general"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Windows 64
|
|
||||||
## Windows is always static to work outside msys2
|
|
||||||
elif [ "$platform" == "mingw64" ]; then
|
|
||||||
# Do something under Windows NT platform
|
|
||||||
echo "Configuring build for MINGW64.."
|
|
||||||
BOOST_ROOT=/mingw64/boost
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_TAG="win-x64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
|
||||||
|
|
||||||
## Windows 32
|
|
||||||
elif [ "$platform" == "mingw32" ]; then
|
|
||||||
# Do something under Windows NT platform
|
|
||||||
echo "Configuring build for MINGW32.."
|
|
||||||
BOOST_ROOT=/mingw32/boost
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="$ARCH" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=$(cd $MINGW_PREFIX/.. && pwd -W) ../..
|
|
||||||
make_exec="mingw32-make"
|
|
||||||
else
|
|
||||||
echo "Unknown platform, configuring general build"
|
|
||||||
if [ "$STATIC" == true ]; then
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
else
|
|
||||||
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D ARCH="$ARCH" -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set CPU core count
|
|
||||||
# thanks to SO: http://stackoverflow.com/a/20283965/4118915
|
|
||||||
if test -z "$CPU_CORE_COUNT"; then
|
|
||||||
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build libwallet_merged
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/src/wallet
|
|
||||||
eval $make_exec version -C ../..
|
|
||||||
eval $make_exec -j$CPU_CORE_COUNT
|
|
||||||
eval $make_exec install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Build monerod
|
|
||||||
# win32 need to build daemon manually with msys2 toolchain
|
|
||||||
if [ "$platform" != "mingw32" ] && [ "$ANDROID" != true ]; then
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/src/daemon
|
|
||||||
eval make -j$CPU_CORE_COUNT
|
|
||||||
eval make install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build install epee
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/contrib/epee all install
|
|
||||||
|
|
||||||
# install easylogging
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/easylogging++ all install
|
|
||||||
|
|
||||||
# install lmdb
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/db_drivers/liblmdb all install
|
|
||||||
|
|
||||||
# Install libunbound
|
|
||||||
if [ -d $MONERO_DIR/build/$BUILD_TYPE/external/unbound ]; then
|
|
||||||
echo "Installing libunbound..."
|
|
||||||
pushd $MONERO_DIR/build/$BUILD_TYPE/external/unbound
|
|
||||||
# no need to make, it was already built as dependency for libwallet
|
|
||||||
# make -j$CPU_CORE_COUNT
|
|
||||||
$make_exec install -j$CPU_CORE_COUNT
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# install randomx
|
|
||||||
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/randomx all install
|
|
||||||
|
|
||||||
popd
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
# 3 header files required by monero are missing from the IOS SDK. I copied them from iphoneSimulator SDK
|
|
||||||
# cd /Applications/XCode.app
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/vmmeter.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/udp_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/
|
|
||||||
# sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/ip_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z $BUILD_TYPE ]; then
|
|
||||||
BUILD_TYPE=release
|
|
||||||
fi
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
if [ -z $BOOST_LIBRARYDIR ]; then
|
|
||||||
BOOST_LIBRARYDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/lib
|
|
||||||
fi
|
|
||||||
if [ -z $BOOST_INCLUDEDIR ]; then
|
|
||||||
BOOST_INCLUDEDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/include
|
|
||||||
fi
|
|
||||||
if [ -z $OPENSSL_INCLUDE_DIR ]; then
|
|
||||||
OPENSSL_INCLUDE_DIR=${ROOT_DIR}/../openssl/1.0.2j/include
|
|
||||||
fi
|
|
||||||
if [ -z $OPENSSL_ROOT_DIR ]; then
|
|
||||||
OPENSSL_ROOT_DIR=${ROOT_DIR}/../openssl/1.0.2j
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building IOS armv7"
|
|
||||||
rm -r monero/build > /dev/null
|
|
||||||
mkdir -p monero/build/release
|
|
||||||
pushd monero/build/release
|
|
||||||
cmake -D IOS=ON -D ARCH=armv7 -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
|
|
||||||
make -j4 && make install
|
|
||||||
popd
|
|
||||||
echo "Building IOS arm64"
|
|
||||||
rm -r monero/build > /dev/null
|
|
||||||
mkdir -p monero/build/release
|
|
||||||
pushd monero/build/release
|
|
||||||
cmake -D IOS=ON -D ARCH=armv8-a -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
|
|
||||||
make -j4 && make install
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo "Creating fat library for armv7 and arm64"
|
|
||||||
pushd monero
|
|
||||||
mkdir -p lib-ios
|
|
||||||
lipo -create lib-armv7/libwallet_merged.a lib-arm64/libwallet_merged.a -output lib-ios/libwallet_merged.a
|
|
||||||
lipo -create lib-armv7/libunbound.a lib-arm64/libunbound.a -output lib-ios/libunbound.a
|
|
||||||
lipo -create lib-armv7/libepee.a lib-arm64/libepee.a -output lib-ios/libepee.a
|
|
||||||
popd
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
TARGET=$1
|
|
||||||
|
|
||||||
GUI_EXEC=$2
|
|
||||||
|
|
||||||
platform=$(get_platform)
|
|
||||||
|
|
||||||
if [[ "$platform" == "linux64" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/x86_64-linux-gnu"
|
|
||||||
elif [[ "$platform" == "linux32" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/i386-linux-gnu"
|
|
||||||
elif [[ "$platform" == "linuxarmv7" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/arm-linux-gnueabihf"
|
|
||||||
elif [[ "$platform" == "linuxarmv8" ]]; then
|
|
||||||
PLAT_DIR="/usr/lib/aarch64-linux-gnu"
|
|
||||||
else
|
|
||||||
PLAT_DIR="/usr/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$QT_DIR" ]; then
|
|
||||||
QT_DIR=$PLAT_DIR/qt5
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$QTXML_DIR" ]; then
|
|
||||||
QTXML_DIR=$PLAT_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy dependencies
|
|
||||||
EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread'
|
|
||||||
INCLUDE='libunbound'
|
|
||||||
cp -rv $QT_DIR/qml $TARGET || exit
|
|
||||||
cp -rv $QT_DIR/plugins $TARGET || exit
|
|
||||||
mkdir -p $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep $INCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit
|
|
||||||
#cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit
|
|
||||||
|
|
||||||
# Create start script
|
|
||||||
cat > $TARGET/start-gui.sh <<EOL
|
|
||||||
#!/bin/bash
|
|
||||||
export LD_LIBRARY_PATH=\`pwd\`/libs
|
|
||||||
export QT_PLUGIN_PATH=\`pwd\`/plugins
|
|
||||||
export QML2_IMPORT_PATH=\`pwd\`/qml
|
|
||||||
# make it so that it can be called from anywhere and also through soft links
|
|
||||||
SCRIPT_DIR="\$(dirname "\$(test -L "\${BASH_SOURCE[0]}" && readlink "\${BASH_SOURCE[0]}" || echo "\${BASH_SOURCE[0]}")")"
|
|
||||||
"\$SCRIPT_DIR"/$GUI_EXEC "\$@"
|
|
||||||
EOL
|
|
||||||
|
|
||||||
# Create start script
|
|
||||||
cat > $TARGET/start-tails.AppImage <<EOL
|
|
||||||
#!/bin/bash
|
|
||||||
# Silly hack to provide a launcher that is double clickable
|
|
||||||
bash ./start-gui.sh
|
|
||||||
EOL
|
|
||||||
|
|
||||||
chmod +x $TARGET/start-gui.sh
|
|
||||||
chmod +x $TARGET/start-tails.AppImage
|
|
||||||
203
main.qml
203
main.qml
@@ -65,14 +65,13 @@ ApplicationWindow {
|
|||||||
property var currentWallet;
|
property var currentWallet;
|
||||||
property bool disconnected: currentWallet ? currentWallet.disconnected : false
|
property bool disconnected: currentWallet ? currentWallet.disconnected : false
|
||||||
property var transaction;
|
property var transaction;
|
||||||
property var transactionDescription;
|
|
||||||
property var walletPassword
|
property var walletPassword
|
||||||
property int restoreHeight:0
|
property int restoreHeight:0
|
||||||
property bool daemonSynced: false
|
property bool daemonSynced: false
|
||||||
property bool walletSynced: false
|
property bool walletSynced: false
|
||||||
property int maxWindowHeight: (isAndroid || isIOS)? screenHeight : (screenHeight < 900)? 720 : 800;
|
property int maxWindowHeight: (isAndroid || isIOS)? screenHeight : (screenHeight < 900)? 720 : 800;
|
||||||
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
|
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
|
||||||
property bool daemonStartStopInProgress: false
|
property int daemonStartStopInProgress: 0
|
||||||
property alias toolTip: toolTip
|
property alias toolTip: toolTip
|
||||||
property string walletName
|
property string walletName
|
||||||
property bool viewOnly: false
|
property bool viewOnly: false
|
||||||
@@ -508,16 +507,30 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onDeviceButtonRequest(code){
|
function onDeviceButtonRequest(code){
|
||||||
prevSplashText = splash.messageText;
|
if (txConfirmationPopup.visible) {
|
||||||
splashDisplayedBeforeButtonRequest = splash.visible;
|
txConfirmationPopup.bottomTextAnimation.running = true
|
||||||
appWindow.showProcessingSplash(qsTr("Please proceed to the device..."));
|
if (!txConfirmationPopup.errorText.visible) {
|
||||||
|
txConfirmationPopup.bottomText.text = qsTr("Please confirm transaction on the device...") + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
txConfirmationPopup.bottomText.text = qsTr("Please proceed to the device...") + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
prevSplashText = splash.messageText;
|
||||||
|
splashDisplayedBeforeButtonRequest = splash.visible;
|
||||||
|
appWindow.showProcessingSplash(qsTr("Please proceed to the device..."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDeviceButtonPressed(){
|
function onDeviceButtonPressed(){
|
||||||
if (splashDisplayedBeforeButtonRequest){
|
if (txConfirmationPopup.visible) {
|
||||||
appWindow.showProcessingSplash(prevSplashText);
|
txConfirmationPopup.bottomTextAnimation.running = false;
|
||||||
|
txConfirmationPopup.bottomText.text = qsTr("Signing transaction in the device...") + translationManager.emptyString;
|
||||||
} else {
|
} else {
|
||||||
hideProcessingSplash();
|
if (splashDisplayedBeforeButtonRequest){
|
||||||
|
appWindow.showProcessingSplash(prevSplashText);
|
||||||
|
} else {
|
||||||
|
hideProcessingSplash();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,31 +720,33 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startDaemon(flags){
|
function startDaemon(flags){
|
||||||
daemonStartStopInProgress = true;
|
daemonStartStopInProgress = 1;
|
||||||
|
|
||||||
// Pause refresh while starting daemon
|
// Pause refresh while starting daemon
|
||||||
currentWallet.pauseRefresh();
|
currentWallet.pauseRefresh();
|
||||||
|
|
||||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
|
||||||
const noSync = appWindow.walletMode === 0;
|
const noSync = appWindow.walletMode === 0;
|
||||||
const bootstrapNodeAddress = persistentSettings.walletMode < 2 ? "auto" : persistentSettings.bootstrapNodeAddress
|
const bootstrapNodeAddress = persistentSettings.walletMode < 2 ? "auto" : persistentSettings.bootstrapNodeAddress
|
||||||
daemonManager.start(flags, persistentSettings.nettype, persistentSettings.blockchainDataDir, bootstrapNodeAddress, noSync);
|
daemonManager.start(flags, persistentSettings.nettype, persistentSettings.blockchainDataDir, bootstrapNodeAddress, noSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopDaemon(callback){
|
function stopDaemon(callback, splash){
|
||||||
daemonStartStopInProgress = true;
|
daemonStartStopInProgress = 2;
|
||||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."))
|
if (splash) {
|
||||||
|
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."));
|
||||||
|
}
|
||||||
daemonManager.stopAsync(persistentSettings.nettype, function(result) {
|
daemonManager.stopAsync(persistentSettings.nettype, function(result) {
|
||||||
daemonStartStopInProgress = false;
|
daemonStartStopInProgress = 0;
|
||||||
hideProcessingSplash();
|
if (splash) {
|
||||||
|
hideProcessingSplash();
|
||||||
|
}
|
||||||
callback(result);
|
callback(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDaemonStarted(){
|
function onDaemonStarted(){
|
||||||
console.log("daemon started");
|
console.log("daemon started");
|
||||||
daemonStartStopInProgress = false;
|
daemonStartStopInProgress = 0;
|
||||||
hideProcessingSplash();
|
|
||||||
currentWallet.connected(true);
|
currentWallet.connected(true);
|
||||||
// resume refresh
|
// resume refresh
|
||||||
currentWallet.startRefresh();
|
currentWallet.startRefresh();
|
||||||
@@ -744,8 +759,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function onDaemonStartFailure(error) {
|
function onDaemonStartFailure(error) {
|
||||||
console.log("daemon start failed");
|
console.log("daemon start failed");
|
||||||
daemonStartStopInProgress = false;
|
daemonStartStopInProgress = 0;
|
||||||
hideProcessingSplash();
|
|
||||||
// resume refresh
|
// resume refresh
|
||||||
currentWallet.startRefresh();
|
currentWallet.startRefresh();
|
||||||
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
||||||
@@ -811,51 +825,33 @@ ApplicationWindow {
|
|||||||
|
|
||||||
function onTransactionCreated(pendingTransaction,address,paymentId,mixinCount){
|
function onTransactionCreated(pendingTransaction,address,paymentId,mixinCount){
|
||||||
console.log("Transaction created");
|
console.log("Transaction created");
|
||||||
hideProcessingSplash();
|
txConfirmationPopup.bottomText.text = "";
|
||||||
transaction = pendingTransaction;
|
transaction = pendingTransaction;
|
||||||
// validate address;
|
// validate address;
|
||||||
if (transaction.status !== PendingTransaction.Status_Ok) {
|
if (transaction.status !== PendingTransaction.Status_Ok) {
|
||||||
console.error("Can't create transaction: ", transaction.errorString);
|
console.error("Can't create transaction: ", transaction.errorString);
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
if (currentWallet.connected() == Wallet.ConnectionStatus_WrongVersion) {
|
||||||
if (currentWallet.connected() == Wallet.ConnectionStatus_WrongVersion)
|
txConfirmationPopup.errorText.text = qsTr("Can't create transaction: Wrong daemon version: ") + transaction.errorString
|
||||||
informationPopup.text = qsTr("Can't create transaction: Wrong daemon version: ") + transaction.errorString
|
} else {
|
||||||
else
|
txConfirmationPopup.errorText.text = qsTr("Can't create transaction: ") + transaction.errorString
|
||||||
informationPopup.text = qsTr("Can't create transaction: ") + transaction.errorString
|
}
|
||||||
informationPopup.icon = StandardIcon.Critical
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open();
|
|
||||||
// deleting transaction object, we don't want memleaks
|
// deleting transaction object, we don't want memleaks
|
||||||
currentWallet.disposeTransaction(transaction);
|
currentWallet.disposeTransaction(transaction);
|
||||||
|
|
||||||
} else if (transaction.txCount == 0) {
|
} else if (transaction.txCount == 0) {
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
console.error("Can't create transaction: ", transaction.errorString);
|
||||||
informationPopup.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
txConfirmationPopup.errorText.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
||||||
informationPopup.icon = StandardIcon.Information
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
// deleting transaction object, we don't want memleaks
|
// deleting transaction object, we don't want memleaks
|
||||||
currentWallet.disposeTransaction(transaction);
|
currentWallet.disposeTransaction(transaction);
|
||||||
} else {
|
} else {
|
||||||
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
||||||
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
||||||
|
|
||||||
// here we show confirmation popup;
|
// here we update txConfirmationPopup
|
||||||
transactionConfirmationPopup.title = qsTr("Please confirm transaction:\n") + translationManager.emptyString;
|
txConfirmationPopup.transactionAmount = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.amount));
|
||||||
transactionConfirmationPopup.text = "";
|
txConfirmationPopup.transactionFee = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.fee));
|
||||||
transactionConfirmationPopup.text += (address === "" ? "" : (qsTr("Address: ") + address));
|
txConfirmationPopup.confirmButton.text = viewOnly ? qsTr("Save as file") : qsTr("Confirm") + translationManager.emptyString;
|
||||||
transactionConfirmationPopup.text += (paymentId === "" ? "" : (qsTr("\nPayment ID: ") + paymentId));
|
txConfirmationPopup.confirmButton.rightIcon = viewOnly ? "" : "qrc:///images/rightArrow.png"
|
||||||
transactionConfirmationPopup.text += qsTr("\n\nAmount: ") + walletManager.displayAmount(transaction.amount);
|
|
||||||
transactionConfirmationPopup.text += qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee);
|
|
||||||
transactionConfirmationPopup.text += qsTr("\nRingsize: ") + (mixinCount + 1);
|
|
||||||
transactionConfirmationPopup.text += qsTr("\n\nNumber of transactions: ") + transaction.txCount
|
|
||||||
transactionConfirmationPopup.text += (transactionDescription === "" ? "" : (qsTr("\nDescription: ") + transactionDescription))
|
|
||||||
for (var i = 0; i < transaction.subaddrIndices.length; ++i){
|
|
||||||
transactionConfirmationPopup.text += qsTr("\nSpending address index: ") + transaction.subaddrIndices[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
transactionConfirmationPopup.text += translationManager.emptyString;
|
|
||||||
transactionConfirmationPopup.icon = StandardIcon.Question
|
|
||||||
transactionConfirmationPopup.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -869,12 +865,12 @@ ApplicationWindow {
|
|||||||
", mixins: ", mixinCount,
|
", mixins: ", mixinCount,
|
||||||
", priority: ", priority,
|
", priority: ", priority,
|
||||||
", description: ", description);
|
", description: ", description);
|
||||||
|
txConfirmationPopup.bottomTextAnimation.running = false
|
||||||
var splashMsg = qsTr("Creating transaction...");
|
txConfirmationPopup.bottomText.text = qsTr("Creating transaction...") + translationManager.emptyString;
|
||||||
splashMsg += appWindow.currentWallet.isLedger() ? qsTr("\n\nPlease check your hardware wallet –\nyour input may be required.") : "";
|
txConfirmationPopup.transactionAddress = address;
|
||||||
showProcessingSplash(splashMsg);
|
txConfirmationPopup.transactionAmount = Utils.removeTrailingZeros(amount);
|
||||||
|
txConfirmationPopup.transactionPriority = priority;
|
||||||
transactionDescription = description;
|
txConfirmationPopup.transactionDescription = description;
|
||||||
|
|
||||||
// validate amount;
|
// validate amount;
|
||||||
if (amount !== "(all)") {
|
if (amount !== "(all)") {
|
||||||
@@ -882,31 +878,21 @@ ApplicationWindow {
|
|||||||
console.log("integer amount: ", amountxmr);
|
console.log("integer amount: ", amountxmr);
|
||||||
console.log("integer unlocked", currentWallet.unlockedBalance())
|
console.log("integer unlocked", currentWallet.unlockedBalance())
|
||||||
if (amountxmr <= 0) {
|
if (amountxmr <= 0) {
|
||||||
hideProcessingSplash()
|
txConfirmationPopup.errorText.text = qsTr("Amount is wrong: expected number from %1 to %2")
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
.arg(walletManager.displayAmount(0))
|
||||||
informationPopup.text = qsTr("Amount is wrong: expected number from %1 to %2")
|
.arg(walletManager.displayAmount(currentWallet.unlockedBalance()))
|
||||||
.arg(walletManager.displayAmount(0))
|
+ translationManager.emptyString;
|
||||||
.arg(walletManager.displayAmount(currentWallet.unlockedBalance()))
|
|
||||||
+ translationManager.emptyString
|
|
||||||
|
|
||||||
informationPopup.icon = StandardIcon.Critical
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
return;
|
return;
|
||||||
} else if (amountxmr > currentWallet.unlockedBalance()) {
|
} else if (amountxmr > currentWallet.unlockedBalance()) {
|
||||||
hideProcessingSplash()
|
txConfirmationPopup.errorText.text = qsTr("Insufficient funds. Unlocked balance: %1")
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
.arg(walletManager.displayAmount(currentWallet.unlockedBalance()))
|
||||||
informationPopup.text = qsTr("Insufficient funds. Unlocked balance: %1")
|
+ translationManager.emptyString;
|
||||||
.arg(walletManager.displayAmount(currentWallet.unlockedBalance()))
|
|
||||||
+ translationManager.emptyString
|
|
||||||
|
|
||||||
informationPopup.icon = StandardIcon.Critical
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
txConfirmationPopup.open();
|
||||||
|
|
||||||
if (amount === "(all)")
|
if (amount === "(all)")
|
||||||
currentWallet.createTransactionAllAsync(address, paymentId, mixinCount, priority);
|
currentWallet.createTransactionAllAsync(address, paymentId, mixinCount, priority);
|
||||||
else
|
else
|
||||||
@@ -934,40 +920,27 @@ ApplicationWindow {
|
|||||||
function handleSweepUnmixable() {
|
function handleSweepUnmixable() {
|
||||||
console.log("Creating transaction: ")
|
console.log("Creating transaction: ")
|
||||||
|
|
||||||
|
txConfirmationPopup.sweepUnmixable = true;
|
||||||
transaction = currentWallet.createSweepUnmixableTransaction();
|
transaction = currentWallet.createSweepUnmixableTransaction();
|
||||||
if (transaction.status !== PendingTransaction.Status_Ok) {
|
if (transaction.status !== PendingTransaction.Status_Ok) {
|
||||||
console.error("Can't create transaction: ", transaction.errorString);
|
console.error("Can't create transaction: ", transaction.errorString);
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
txConfirmationPopup.errorText.text = qsTr("Can't create transaction: ") + transaction.errorString + translationManager.emptyString
|
||||||
informationPopup.text = qsTr("Can't create transaction: ") + transaction.errorString
|
|
||||||
informationPopup.icon = StandardIcon.Critical
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open();
|
|
||||||
// deleting transaction object, we don't want memleaks
|
// deleting transaction object, we don't want memleaks
|
||||||
currentWallet.disposeTransaction(transaction);
|
currentWallet.disposeTransaction(transaction);
|
||||||
|
|
||||||
} else if (transaction.txCount == 0) {
|
} else if (transaction.txCount == 0) {
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
console.error("No unmixable outputs to sweep");
|
||||||
informationPopup.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
txConfirmationPopup.errorText.text = qsTr("No unmixable outputs to sweep") + translationManager.emptyString
|
||||||
informationPopup.icon = StandardIcon.Information
|
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
// deleting transaction object, we don't want memleaks
|
// deleting transaction object, we don't want memleaks
|
||||||
currentWallet.disposeTransaction(transaction);
|
currentWallet.disposeTransaction(transaction);
|
||||||
} else {
|
} else {
|
||||||
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
|
||||||
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
+ ", fee: " + walletManager.displayAmount(transaction.fee));
|
||||||
|
txConfirmationPopup.transactionAmount = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.amount));
|
||||||
// here we show confirmation popup;
|
txConfirmationPopup.transactionFee = Utils.removeTrailingZeros(walletManager.displayAmount(transaction.fee));
|
||||||
|
|
||||||
transactionConfirmationPopup.title = qsTr("Confirmation") + translationManager.emptyString
|
|
||||||
transactionConfirmationPopup.text = qsTr("Please confirm transaction:\n")
|
|
||||||
+ qsTr("\n\nAmount: ") + walletManager.displayAmount(transaction.amount)
|
|
||||||
+ qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee)
|
|
||||||
+ translationManager.emptyString
|
|
||||||
transactionConfirmationPopup.icon = StandardIcon.Question
|
|
||||||
transactionConfirmationPopup.open()
|
|
||||||
// committing transaction
|
// committing transaction
|
||||||
}
|
}
|
||||||
|
txConfirmationPopup.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
// called after user confirms transaction
|
// called after user confirms transaction
|
||||||
@@ -985,40 +958,28 @@ ApplicationWindow {
|
|||||||
// Store to file
|
// Store to file
|
||||||
transaction.setFilename(path);
|
transaction.setFilename(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
appWindow.showProcessingSplash(qsTr("Sending transaction ..."));
|
|
||||||
currentWallet.commitTransactionAsync(transaction);
|
currentWallet.commitTransactionAsync(transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTransactionCommitted(success, transaction, txid) {
|
function onTransactionCommitted(success, transaction, txid) {
|
||||||
hideProcessingSplash();
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
console.log("Error committing transaction: " + transaction.errorString);
|
console.log("Error committing transaction: " + transaction.errorString);
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
||||||
informationPopup.text = qsTr("Couldn't send the money: ") + transaction.errorString
|
informationPopup.text = qsTr("Couldn't send the money: ") + transaction.errorString
|
||||||
informationPopup.icon = StandardIcon.Critical
|
informationPopup.icon = StandardIcon.Critical
|
||||||
|
informationPopup.onCloseCallback = null;
|
||||||
|
informationPopup.open();
|
||||||
} else {
|
} else {
|
||||||
var txid_text = ""
|
if (txConfirmationPopup.transactionDescription.length > 0) {
|
||||||
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
|
||||||
for (var i = 0; i < txid.length; ++i) {
|
|
||||||
if (txid_text.length > 0)
|
|
||||||
txid_text += ", "
|
|
||||||
txid_text += txid[i]
|
|
||||||
}
|
|
||||||
informationPopup.text = (viewOnly)? qsTr("Transaction saved to file: %1").arg(path) : qsTr("Monero sent successfully: %1 transaction(s) ").arg(txid.length) + txid_text + translationManager.emptyString
|
|
||||||
informationPopup.icon = StandardIcon.Information
|
|
||||||
if (transactionDescription.length > 0) {
|
|
||||||
for (var i = 0; i < txid.length; ++i)
|
for (var i = 0; i < txid.length; ++i)
|
||||||
currentWallet.setUserNote(txid[i], transactionDescription);
|
currentWallet.setUserNote(txid[i], txConfirmationPopup.transactionDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear tx fields
|
// Clear tx fields
|
||||||
middlePanel.transferView.clearFields()
|
middlePanel.transferView.clearFields()
|
||||||
|
txConfirmationPopup.clearFields()
|
||||||
successfulTxPopup.open(txid)
|
successfulTxPopup.open(txid)
|
||||||
|
|
||||||
}
|
}
|
||||||
informationPopup.onCloseCallback = null
|
|
||||||
informationPopup.open()
|
|
||||||
currentWallet.refresh()
|
currentWallet.refresh()
|
||||||
currentWallet.disposeTransaction(transaction)
|
currentWallet.disposeTransaction(transaction)
|
||||||
currentWallet.storeAsync(function(success) {
|
currentWallet.storeAsync(function(success) {
|
||||||
@@ -1299,7 +1260,7 @@ ApplicationWindow {
|
|||||||
function fiatApiConvertToFiat(amount) {
|
function fiatApiConvertToFiat(amount) {
|
||||||
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
|
var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR;
|
||||||
if(ticker <= 0){
|
if(ticker <= 0){
|
||||||
console.log(fiatApiError("Invalid ticker value: " + ticker));
|
fiatApiError("Invalid ticker value: " + ticker);
|
||||||
return "?.??";
|
return "?.??";
|
||||||
}
|
}
|
||||||
return (amount * ticker).toFixed(2);
|
return (amount * ticker).toFixed(2);
|
||||||
@@ -1367,6 +1328,7 @@ ApplicationWindow {
|
|||||||
} else {
|
} else {
|
||||||
wizard.wizardState = "wizardHome";
|
wizard.wizardState = "wizardHome";
|
||||||
rootItem.state = "normal"
|
rootItem.state = "normal"
|
||||||
|
logger.resetLogFilePath(persistentSettings.portable);
|
||||||
openWallet("wizard");
|
openWallet("wizard");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1467,10 +1429,11 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Confrirmation aka question dialog
|
// Transaction confirmation popup
|
||||||
StandardDialog {
|
TxConfirmationDialog {
|
||||||
|
// dynamically change onclose handler
|
||||||
|
id: txConfirmationPopup
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
id: transactionConfirmationPopup
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
var handleAccepted = function() {
|
var handleAccepted = function() {
|
||||||
// Save transaction to file if view only wallet
|
// Save transaction to file if view only wallet
|
||||||
@@ -1776,7 +1739,7 @@ ApplicationWindow {
|
|||||||
anchors.fill: blurredArea
|
anchors.fill: blurredArea
|
||||||
source: blurredArea
|
source: blurredArea
|
||||||
radius: 64
|
radius: 64
|
||||||
visible: passwordDialog.visible || inputDialog.visible || splash.visible || updateDialog.visible || devicePassphraseDialog.visible || successfulTxPopup.visible
|
visible: passwordDialog.visible || inputDialog.visible || splash.visible || updateDialog.visible || devicePassphraseDialog.visible || txConfirmationPopup.visible || successfulTxPopup.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1895,7 +1858,7 @@ ApplicationWindow {
|
|||||||
repeat: true
|
repeat: true
|
||||||
running: persistentSettings.autosave
|
running: persistentSettings.autosave
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (currentWallet) {
|
if (currentWallet && !currentWallet.refreshing) {
|
||||||
currentWallet.storeAsync(function(success) {
|
currentWallet.storeAsync(function(success) {
|
||||||
if (success) {
|
if (success) {
|
||||||
appWindow.showStatusMessage(qsTr("Autosaved the wallet"), 3);
|
appWindow.showStatusMessage(qsTr("Autosaved the wallet"), 3);
|
||||||
@@ -1974,7 +1937,7 @@ ApplicationWindow {
|
|||||||
// Simple mode connection check timer
|
// Simple mode connection check timer
|
||||||
id: simpleModeConnectionTimer
|
id: simpleModeConnectionTimer
|
||||||
interval: 2000
|
interval: 2000
|
||||||
running: appWindow.walletMode < 2 && currentWallet != undefined && !daemonStartStopInProgress
|
running: appWindow.walletMode < 2 && currentWallet != undefined && daemonStartStopInProgress == 0
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: appWindow.checkSimpleModeConnection()
|
onTriggered: appWindow.checkSimpleModeConnection()
|
||||||
}
|
}
|
||||||
@@ -2052,7 +2015,7 @@ ApplicationWindow {
|
|||||||
if(daemonManager == undefined || persistentSettings.useRemoteNode) {
|
if(daemonManager == undefined || persistentSettings.useRemoteNode) {
|
||||||
closeAccepted();
|
closeAccepted();
|
||||||
} else if (appWindow.walletMode == 0) {
|
} else if (appWindow.walletMode == 0) {
|
||||||
stopDaemon(closeAccepted);
|
stopDaemon(closeAccepted, true);
|
||||||
} else {
|
} else {
|
||||||
showProcessingSplash(qsTr("Checking local node status..."));
|
showProcessingSplash(qsTr("Checking local node status..."));
|
||||||
const handler = function(running) {
|
const handler = function(running) {
|
||||||
|
|||||||
2
monero
2
monero
Submodule monero updated: 1a9a984d26...f690e4984d
@@ -1,581 +0,0 @@
|
|||||||
# qml components require at least QT 5.9.7
|
|
||||||
lessThan (QT_MAJOR_VERSION, 5) | lessThan (QT_MINOR_VERSION, 9) {
|
|
||||||
error("Can't build with Qt $${QT_VERSION}. Use at least Qt 5.9.7")
|
|
||||||
}
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
QT += svg qml gui-private quick widgets
|
|
||||||
|
|
||||||
WALLET_ROOT=$$PWD/monero
|
|
||||||
|
|
||||||
CONFIG += c++11 link_pkgconfig
|
|
||||||
packagesExist(libusb-1.0) {
|
|
||||||
PKGCONFIG += libusb-1.0
|
|
||||||
}
|
|
||||||
packagesExist(hidapi-libusb) {
|
|
||||||
PKGCONFIG += hidapi-libusb
|
|
||||||
}
|
|
||||||
|
|
||||||
GCC_VERSION = $$system("g++ -dumpversion")
|
|
||||||
GCC_VERSION = $$split(GCC_VERSION, .)
|
|
||||||
GCC_VERSION_MAJOR = $$member(GCC_VERSION, 0)
|
|
||||||
GCC_VERSION_MINOR = $$member(GCC_VERSION, 1)
|
|
||||||
greaterThan(GCC_VERSION_MAJOR, 9) | if(equals(GCC_VERSION_MAJOR, 9) : greaterThan(GCC_VERSION_MINOR, 0)) {
|
|
||||||
GCC_9_1_OR_GREATER = TRUE
|
|
||||||
}
|
|
||||||
|
|
||||||
!win32 | !isEmpty(GCC_9_1_OR_GREATER) {
|
|
||||||
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
|
|
||||||
QMAKE_LFLAGS += -fstack-protector -fstack-protector-strong
|
|
||||||
}
|
|
||||||
|
|
||||||
!win32 {
|
|
||||||
packagesExist(protobuf) {
|
|
||||||
PKGCONFIG += protobuf
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# cleaning "auto-generated" bitmonero directory on "make distclean"
|
|
||||||
QMAKE_DISTCLEAN += -r $$WALLET_ROOT
|
|
||||||
|
|
||||||
INCLUDEPATH += $$WALLET_ROOT/include \
|
|
||||||
$$PWD/src/libwalletqt \
|
|
||||||
$$PWD/src/QR-Code-generator \
|
|
||||||
$$PWD/src \
|
|
||||||
$$WALLET_ROOT/src \
|
|
||||||
$$WALLET_ROOT/external/easylogging++ \
|
|
||||||
$$WALLET_ROOT/contrib/epee/include
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
src/main/filter.h \
|
|
||||||
src/main/clipboardAdapter.h \
|
|
||||||
src/main/oscursor.h \
|
|
||||||
src/libwalletqt/WalletManager.h \
|
|
||||||
src/libwalletqt/Wallet.h \
|
|
||||||
src/libwalletqt/PassphraseHelper.h \
|
|
||||||
src/libwalletqt/PendingTransaction.h \
|
|
||||||
src/libwalletqt/TransactionHistory.h \
|
|
||||||
src/libwalletqt/TransactionInfo.h \
|
|
||||||
src/libwalletqt/QRCodeImageProvider.h \
|
|
||||||
src/libwalletqt/Transfer.h \
|
|
||||||
src/NetworkType.h \
|
|
||||||
src/main/oshelper.h \
|
|
||||||
src/TranslationManager.h \
|
|
||||||
src/model/TransactionHistoryModel.h \
|
|
||||||
src/model/TransactionHistorySortFilterModel.h \
|
|
||||||
src/QR-Code-generator/BitBuffer.hpp \
|
|
||||||
src/QR-Code-generator/QrCode.hpp \
|
|
||||||
src/QR-Code-generator/QrSegment.hpp \
|
|
||||||
src/model/AddressBookModel.h \
|
|
||||||
src/libwalletqt/AddressBook.h \
|
|
||||||
src/model/SubaddressModel.h \
|
|
||||||
src/libwalletqt/Subaddress.h \
|
|
||||||
src/model/SubaddressAccountModel.h \
|
|
||||||
src/libwalletqt/SubaddressAccount.h \
|
|
||||||
src/zxcvbn-c/zxcvbn.h \
|
|
||||||
src/libwalletqt/UnsignedTransaction.h \
|
|
||||||
src/main/Logger.h \
|
|
||||||
src/main/MainApp.h \
|
|
||||||
src/qt/downloader.h \
|
|
||||||
src/qt/FutureScheduler.h \
|
|
||||||
src/qt/ipc.h \
|
|
||||||
src/qt/KeysFiles.h \
|
|
||||||
src/qt/network.h \
|
|
||||||
src/qt/utils.h \
|
|
||||||
src/qt/macoshelper.h \
|
|
||||||
src/qt/MoneroSettings.h \
|
|
||||||
src/qt/TailsOS.h
|
|
||||||
|
|
||||||
SOURCES += src/main/main.cpp \
|
|
||||||
src/main/filter.cpp \
|
|
||||||
src/main/clipboardAdapter.cpp \
|
|
||||||
src/main/oscursor.cpp \
|
|
||||||
src/libwalletqt/WalletManager.cpp \
|
|
||||||
src/libwalletqt/WalletListenerImpl.cpp \
|
|
||||||
src/libwalletqt/Wallet.cpp \
|
|
||||||
src/libwalletqt/PassphraseHelper.cpp \
|
|
||||||
src/libwalletqt/PendingTransaction.cpp \
|
|
||||||
src/libwalletqt/TransactionHistory.cpp \
|
|
||||||
src/libwalletqt/TransactionInfo.cpp \
|
|
||||||
src/libwalletqt/QRCodeImageProvider.cpp \
|
|
||||||
src/main/oshelper.cpp \
|
|
||||||
src/openpgp/openpgp.cpp \
|
|
||||||
src/TranslationManager.cpp \
|
|
||||||
src/model/TransactionHistoryModel.cpp \
|
|
||||||
src/model/TransactionHistorySortFilterModel.cpp \
|
|
||||||
src/QR-Code-generator/BitBuffer.cpp \
|
|
||||||
src/QR-Code-generator/QrCode.cpp \
|
|
||||||
src/QR-Code-generator/QrSegment.cpp \
|
|
||||||
src/model/AddressBookModel.cpp \
|
|
||||||
src/libwalletqt/AddressBook.cpp \
|
|
||||||
src/model/SubaddressModel.cpp \
|
|
||||||
src/libwalletqt/Subaddress.cpp \
|
|
||||||
src/model/SubaddressAccountModel.cpp \
|
|
||||||
src/libwalletqt/SubaddressAccount.cpp \
|
|
||||||
src/zxcvbn-c/zxcvbn.c \
|
|
||||||
src/libwalletqt/UnsignedTransaction.cpp \
|
|
||||||
src/main/Logger.cpp \
|
|
||||||
src/main/MainApp.cpp \
|
|
||||||
src/qt/downloader.cpp \
|
|
||||||
src/qt/FutureScheduler.cpp \
|
|
||||||
src/qt/ipc.cpp \
|
|
||||||
src/qt/KeysFiles.cpp \
|
|
||||||
src/qt/network.cpp \
|
|
||||||
src/qt/updater.cpp \
|
|
||||||
src/qt/utils.cpp \
|
|
||||||
src/qt/MoneroSettings.cpp \
|
|
||||||
src/qt/TailsOS.cpp
|
|
||||||
|
|
||||||
CONFIG(DISABLE_PASS_STRENGTH_METER) {
|
|
||||||
HEADERS -= src/zxcvbn-c/zxcvbn.h
|
|
||||||
SOURCES -= src/zxcvbn-c/zxcvbn.c
|
|
||||||
DEFINES += "DISABLE_PASS_STRENGTH_METER"
|
|
||||||
}
|
|
||||||
|
|
||||||
!ios {
|
|
||||||
HEADERS += src/daemon/DaemonManager.h
|
|
||||||
SOURCES += src/daemon/DaemonManager.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
lupdate_only {
|
|
||||||
SOURCES = *.qml \
|
|
||||||
components/*.qml \
|
|
||||||
components/effects/*.qml \
|
|
||||||
pages/*.qml \
|
|
||||||
pages/settings/*.qml \
|
|
||||||
pages/merchant/*.qml \
|
|
||||||
wizard/*.qml \
|
|
||||||
wizard/*js
|
|
||||||
}
|
|
||||||
|
|
||||||
# Linker flags required by Trezor
|
|
||||||
TREZOR_LINKER = $$cat($$WALLET_ROOT/lib/trezor_link_flags.txt)
|
|
||||||
|
|
||||||
ios:armv7 {
|
|
||||||
message("target is armv7")
|
|
||||||
LIBS += \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/armv7 \
|
|
||||||
}
|
|
||||||
ios:arm64 {
|
|
||||||
message("target is arm64")
|
|
||||||
LIBS += \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBS_COMMON = \
|
|
||||||
-lgcrypt \
|
|
||||||
-lgpg-error \
|
|
||||||
-lwallet_merged \
|
|
||||||
-llmdb \
|
|
||||||
-lepee \
|
|
||||||
-lunbound \
|
|
||||||
-lsodium \
|
|
||||||
-leasylogging \
|
|
||||||
-lrandomx
|
|
||||||
|
|
||||||
!ios:!android {
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
message("Host is Android")
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -Werror -Wformat -Wformat-security
|
|
||||||
QMAKE_CFLAGS += -Werror -Wformat -Wformat-security
|
|
||||||
QMAKE_CXXFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
|
||||||
QMAKE_CFLAGS_RELEASE += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2
|
|
||||||
|
|
||||||
ios {
|
|
||||||
message("Host is IOS")
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -v
|
|
||||||
QMAKE_IOS_DEVICE_ARCHS = arm64
|
|
||||||
CONFIG += arm64
|
|
||||||
LIBS += -L$$WALLET_ROOT/lib-ios \
|
|
||||||
$$LIBS_COMMON
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-L$$PWD/../OpenSSL-for-iPhone/lib \
|
|
||||||
-L$$PWD/../ofxiOSBoost/build/libs/boost/lib/arm64 \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-lssl \
|
|
||||||
-lcrypto \
|
|
||||||
-ldl
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG(WITH_SCANNER) {
|
|
||||||
if( greaterThan(QT_MINOR_VERSION, 5) ) {
|
|
||||||
message("using camera scanner")
|
|
||||||
QT += multimedia
|
|
||||||
DEFINES += "WITH_SCANNER"
|
|
||||||
INCLUDEPATH += $$PWD/src/QR-Code-scanner
|
|
||||||
HEADERS += \
|
|
||||||
src/QR-Code-scanner/QrScanThread.h \
|
|
||||||
src/QR-Code-scanner/QrCodeScanner.h
|
|
||||||
SOURCES += \
|
|
||||||
src/QR-Code-scanner/QrScanThread.cpp \
|
|
||||||
src/QR-Code-scanner/QrCodeScanner.cpp
|
|
||||||
android {
|
|
||||||
INCLUDEPATH += $$PWD/../ZBar/include
|
|
||||||
LIBS += -lzbarjni -liconv
|
|
||||||
} else {
|
|
||||||
LIBS += -lzbar
|
|
||||||
macx {
|
|
||||||
ZBAR_DIR = $$system(brew --prefix zbar, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$ZBAR_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
message("Skipping camera scanner because of Incompatible Qt Version !")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# currently we only support x86 build as qt.io only provides prebuilt qt for x86 mingw
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
|
|
||||||
# QMAKE_HOST.arch is unreliable, will allways report 32bit if mingw32 shell is run.
|
|
||||||
# Obtaining arch through uname should be reliable. This also fixes building the project in Qt creator without changes.
|
|
||||||
MSYS_HOST_ARCH = $$system(uname -a | grep -o "x86_64")
|
|
||||||
|
|
||||||
# WIN64 Host settings
|
|
||||||
contains(MSYS_HOST_ARCH, x86_64) {
|
|
||||||
message("Host is 64bit")
|
|
||||||
MSYS_ROOT_PATH=c:/msys64
|
|
||||||
|
|
||||||
# WIN32 Host settings
|
|
||||||
} else {
|
|
||||||
message("Host is 32bit")
|
|
||||||
MSYS_ROOT_PATH=c:/msys32
|
|
||||||
}
|
|
||||||
|
|
||||||
# WIN64 Target settings
|
|
||||||
contains(QMAKE_HOST.arch, x86_64) {
|
|
||||||
MSYS_MINGW_PATH=/mingw64
|
|
||||||
|
|
||||||
# WIN32 Target settings
|
|
||||||
} else {
|
|
||||||
MSYS_MINGW_PATH=/mingw32
|
|
||||||
}
|
|
||||||
|
|
||||||
MSYS_PATH=$$MSYS_ROOT_PATH$$MSYS_MINGW_PATH
|
|
||||||
|
|
||||||
# boost root path
|
|
||||||
BOOST_PATH=$$MSYS_PATH/boost
|
|
||||||
BOOST_MINGW_PATH=$$MSYS_MINGW_PATH/boost
|
|
||||||
|
|
||||||
LIBS+=-L$$MSYS_PATH/lib
|
|
||||||
LIBS+=-L$$MSYS_MINGW_PATH/lib
|
|
||||||
LIBS+=-L$$BOOST_PATH/lib
|
|
||||||
LIBS+=-L$$BOOST_MINGW_PATH/lib
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-Wl,-Bdynamic \
|
|
||||||
-lwinscard \
|
|
||||||
-lwsock32 \
|
|
||||||
-lIphlpapi \
|
|
||||||
-lcrypt32 \
|
|
||||||
-lhidapi \
|
|
||||||
-lgdi32 $$TREZOR_LINKER \
|
|
||||||
-Wl,-Bstatic \
|
|
||||||
-lboost_serialization-mt \
|
|
||||||
-lboost_thread-mt \
|
|
||||||
-lboost_system-mt \
|
|
||||||
-lboost_date_time-mt \
|
|
||||||
-lboost_filesystem-mt \
|
|
||||||
-lboost_regex-mt \
|
|
||||||
-lboost_chrono-mt \
|
|
||||||
-lboost_program_options-mt \
|
|
||||||
-lboost_locale-mt \
|
|
||||||
-licuio \
|
|
||||||
-licuin \
|
|
||||||
-licuuc \
|
|
||||||
-licudt \
|
|
||||||
-licutu \
|
|
||||||
-liconv \
|
|
||||||
-lstdc++ \
|
|
||||||
-lpthread \
|
|
||||||
-lsetupapi \
|
|
||||||
-lssl \
|
|
||||||
-lsodium \
|
|
||||||
-lcrypto \
|
|
||||||
-lws2_32 \
|
|
||||||
-lole32
|
|
||||||
|
|
||||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
|
||||||
message("Target is 32bit")
|
|
||||||
## Windows x86 (32bit) specific build here
|
|
||||||
## there's 2Mb stack in libwallet allocated internally, so we set stack=4Mb
|
|
||||||
## this fixes app crash for x86 Windows build
|
|
||||||
QMAKE_LFLAGS += -Wl,--stack,4194304
|
|
||||||
} else {
|
|
||||||
message("Target is 64bit")
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -Wl,--dynamicbase -Wl,--nxcompat
|
|
||||||
}
|
|
||||||
|
|
||||||
linux {
|
|
||||||
CONFIG(static) {
|
|
||||||
message("using static libraries")
|
|
||||||
LIBS+= -Wl,-Bstatic
|
|
||||||
QMAKE_LFLAGS += -static-libgcc -static-libstdc++
|
|
||||||
QMAKE_LIBDIR += /usr/local/ssl/lib
|
|
||||||
# contains(QT_ARCH, x86_64) {
|
|
||||||
LIBS+= -lunbound \
|
|
||||||
-lusb-1.0 \
|
|
||||||
-lhidapi-hidraw \
|
|
||||||
-ludev
|
|
||||||
# }
|
|
||||||
} else {
|
|
||||||
# On some distro's we need to add dynload
|
|
||||||
LIBS+= -ldl
|
|
||||||
}
|
|
||||||
|
|
||||||
LIBS+= \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-lssl \
|
|
||||||
-llmdb \
|
|
||||||
-lsodium \
|
|
||||||
-lhidapi-libusb \
|
|
||||||
-lcrypto $$TREZOR_LINKER
|
|
||||||
|
|
||||||
if(!android) {
|
|
||||||
LIBS+= \
|
|
||||||
-Wl,-Bdynamic \
|
|
||||||
-lGL \
|
|
||||||
-lX11
|
|
||||||
}
|
|
||||||
# currently monero has an issue with "static" build and linunwind-dev,
|
|
||||||
# so we link libunwind-dev only for non-Ubuntu distros
|
|
||||||
CONFIG(libunwind_off) {
|
|
||||||
message(Building without libunwind)
|
|
||||||
} else {
|
|
||||||
message(Building with libunwind)
|
|
||||||
LIBS += -Wl,-Bdynamic -lunwind
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack
|
|
||||||
}
|
|
||||||
|
|
||||||
macx {
|
|
||||||
# mixing static and shared libs are not supported on mac
|
|
||||||
# CONFIG(static) {
|
|
||||||
# message("using static libraries")
|
|
||||||
# LIBS+= -Wl,-Bstatic
|
|
||||||
# }
|
|
||||||
|
|
||||||
OPENSSL_DIR = $$system(brew --prefix openssl, lines, EXIT_CODE)
|
|
||||||
!equals(EXIT_CODE, 0) {
|
|
||||||
OPENSSL_DIR = /usr/local/ssl
|
|
||||||
}
|
|
||||||
OPENSSL_LIBRARY_DIR = $$OPENSSL_DIR/lib
|
|
||||||
INCLUDEPATH += $$OPENSSL_DIR/include
|
|
||||||
|
|
||||||
BOOST_DIR = $$system(brew --prefix boost, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$BOOST_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
GCRYPT_DIR = $$system(brew --prefix libgcrypt, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$GCRYPT_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
GPGP_ERROR_DIR = $$system(brew --prefix libgpg-error, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$GPGP_ERROR_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
SODIUM_DIR = $$system(brew --prefix libsodium, lines, EXIT_CODE)
|
|
||||||
equals(EXIT_CODE, 0) {
|
|
||||||
INCLUDEPATH += $$SODIUM_DIR/include
|
|
||||||
} else {
|
|
||||||
INCLUDEPATH += /usr/local/include
|
|
||||||
}
|
|
||||||
|
|
||||||
QT += macextras
|
|
||||||
OBJECTIVE_SOURCES += src/qt/macoshelper.mm
|
|
||||||
LIBS+= -Wl,-dead_strip
|
|
||||||
LIBS+= -Wl,-dead_strip_dylibs
|
|
||||||
LIBS+= -Wl,-bind_at_load
|
|
||||||
LIBS+= \
|
|
||||||
-L/usr/local/lib \
|
|
||||||
-L$$OPENSSL_LIBRARY_DIR \
|
|
||||||
-L/usr/local/opt/boost/lib \
|
|
||||||
-lboost_serialization \
|
|
||||||
-lboost_thread-mt \
|
|
||||||
-lboost_system \
|
|
||||||
-lboost_date_time \
|
|
||||||
-lboost_filesystem \
|
|
||||||
-lboost_regex \
|
|
||||||
-lboost_chrono \
|
|
||||||
-lboost_program_options \
|
|
||||||
-framework CoreFoundation \
|
|
||||||
-framework AppKit \
|
|
||||||
-lhidapi \
|
|
||||||
-lssl \
|
|
||||||
-lsodium \
|
|
||||||
-lcrypto \
|
|
||||||
-ldl $$TREZOR_LINKER
|
|
||||||
|
|
||||||
QMAKE_LFLAGS += -pie
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# translation stuff
|
|
||||||
TRANSLATIONS = $$files($$PWD/translations/monero-core_*.ts)
|
|
||||||
|
|
||||||
CONFIG(release, debug|release) {
|
|
||||||
DESTDIR = release/bin
|
|
||||||
LANGUPD_OPTIONS = -locations none -no-ui-lines -no-obsolete
|
|
||||||
LANGREL_OPTIONS = -compress -nounfinished -removeidentical
|
|
||||||
|
|
||||||
} else {
|
|
||||||
DESTDIR = debug/bin
|
|
||||||
LANGUPD_OPTIONS =
|
|
||||||
# LANGREL_OPTIONS = -markuntranslated "MISS_TR "
|
|
||||||
}
|
|
||||||
|
|
||||||
TRANSLATION_TARGET_DIR = $$OUT_PWD/translations
|
|
||||||
|
|
||||||
!ios {
|
|
||||||
isEmpty(QMAKE_LUPDATE) {
|
|
||||||
win32:LANGUPD = $$[QT_INSTALL_BINS]\lupdate.exe
|
|
||||||
else:LANGUPD = $$[QT_INSTALL_BINS]/lupdate
|
|
||||||
}
|
|
||||||
|
|
||||||
isEmpty(QMAKE_LRELEASE) {
|
|
||||||
win32:LANGREL = $$[QT_INSTALL_BINS]\lrelease.exe
|
|
||||||
else:LANGREL = $$[QT_INSTALL_BINS]/lrelease
|
|
||||||
}
|
|
||||||
|
|
||||||
langupd.command = \
|
|
||||||
$$LANGUPD $$LANGUPD_OPTIONS $$shell_path($$_PRO_FILE) -ts $$_PRO_FILE_PWD/$$TRANSLATIONS
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
langrel.depends = langupd
|
|
||||||
langrel.input = TRANSLATIONS
|
|
||||||
langrel.output = $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
||||||
langrel.commands = \
|
|
||||||
$$LANGREL $$LANGREL_OPTIONS ${QMAKE_FILE_IN} -qm $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
|
|
||||||
langrel.CONFIG += no_link
|
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += langupd deploy deploy_win
|
|
||||||
QMAKE_EXTRA_COMPILERS += langrel
|
|
||||||
|
|
||||||
# Compile an initial version of translation files when running qmake
|
|
||||||
# the first time and generate the resource file for translations.
|
|
||||||
!exists($$TRANSLATION_TARGET_DIR) {
|
|
||||||
mkpath($$TRANSLATION_TARGET_DIR)
|
|
||||||
}
|
|
||||||
qrc_entry = "<RCC>"
|
|
||||||
qrc_entry += ' <qresource prefix="/">'
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry)
|
|
||||||
for(tsfile, TRANSLATIONS) {
|
|
||||||
qmfile = $$TRANSLATION_TARGET_DIR/$$basename(tsfile)
|
|
||||||
qmfile ~= s/.ts$/.qm/
|
|
||||||
system($$LANGREL $$LANGREL_OPTIONS $$tsfile -qm $$qmfile)
|
|
||||||
qrc_entry = " <file>$$basename(qmfile)</file>"
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
||||||
}
|
|
||||||
qrc_entry = " </qresource>"
|
|
||||||
qrc_entry += "</RCC>"
|
|
||||||
write_file($$TRANSLATION_TARGET_DIR/translations.qrc, qrc_entry, append)
|
|
||||||
RESOURCES += $$TRANSLATION_TARGET_DIR/translations.qrc
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Update: no issues with the "slow link process" anymore,
|
|
||||||
# for development, just build debug version of libwallet_merged lib
|
|
||||||
# by invoking 'get_libwallet_api.sh Debug'
|
|
||||||
# so we update translations everytime even for debug build
|
|
||||||
|
|
||||||
PRE_TARGETDEPS += langupd compiler_langrel_make_all
|
|
||||||
|
|
||||||
RESOURCES += qml.qrc
|
|
||||||
CONFIG += qtquickcompiler
|
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
|
||||||
QML_IMPORT_PATH = fonts
|
|
||||||
|
|
||||||
# Default rules for deployment.
|
|
||||||
include(deployment.pri)
|
|
||||||
macx {
|
|
||||||
deploy.commands += macdeployqt $$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET) -qmldir=$$PWD
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
deploy.commands += windeployqt $$sprintf("%1/%2/%3.exe", $$OUT_PWD, $$DESTDIR, $$TARGET) -no-translations -qmldir=$$PWD
|
|
||||||
# Win64 msys2 deploy settings
|
|
||||||
contains(QMAKE_HOST.arch, x86_64) {
|
|
||||||
deploy.commands += $$escape_expand(\n\t) $$PWD/windeploy_helper.sh $$DESTDIR
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
linux:!android {
|
|
||||||
deploy.commands += $$escape_expand(\n\t) $$PWD/linuxdeploy_helper.sh $$DESTDIR $$TARGET
|
|
||||||
}
|
|
||||||
|
|
||||||
android{
|
|
||||||
deploy.commands += make install INSTALL_ROOT=$$DESTDIR && androiddeployqt --input android-libmonero-wallet-gui.so-deployment-settings.json --output $$DESTDIR --deployment bundled --android-platform android-21 --jdk /usr/lib/jvm/java-8-openjdk-amd64 -qmldir=$$PWD
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
|
||||||
.gitignore \
|
|
||||||
$$TRANSLATIONS
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
notes.txt \
|
|
||||||
monero/src/wallet/CMakeLists.txt
|
|
||||||
|
|
||||||
VERSION = $$cat('version.js', lines)
|
|
||||||
VERSION = $$find(VERSION, 'GUI_VERSION')
|
|
||||||
VERSION_LONG = $$replace(VERSION, '.*\"(.*)\"', '\1')
|
|
||||||
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
|
|
||||||
|
|
||||||
# windows application icon
|
|
||||||
RC_ICONS = images/appicon.ico
|
|
||||||
|
|
||||||
# mac Info.plist & application icon
|
|
||||||
QMAKE_INFO_PLIST = $$PWD/share/Info.plist
|
|
||||||
macx {
|
|
||||||
QMAKE_POST_LINK += sed -i "''" -e "s/@VERSION@/$$VERSION/g" -e "s/@VERSION_LONG@/$$VERSION_LONG/g" "$$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET)/Contents/Info.plist";
|
|
||||||
}
|
|
||||||
ICON = $$PWD/images/appicon.icns
|
|
||||||
@@ -764,12 +764,18 @@ Rectangle {
|
|||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: {
|
text: {
|
||||||
if (isout) {
|
if (isout) {
|
||||||
|
if (isFailed) {
|
||||||
|
return qsTr("Failed") + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
if (isPending) {
|
||||||
|
return qsTr("Waiting confirmation...") + translationManager.emptyString;
|
||||||
|
}
|
||||||
if (address) {
|
if (address) {
|
||||||
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||||
}
|
}
|
||||||
if (amount != 0) {
|
if (amount != 0) {
|
||||||
return (blockheight ? qsTr("Unknown recipient") : qsTr("Waiting confirmation...")) + translationManager.emptyString;
|
return qsTr("Unknown recipient") + translationManager.emptyString;
|
||||||
} else {
|
} else {
|
||||||
return qsTr("My wallet") + translationManager.emptyString;
|
return qsTr("My wallet") + translationManager.emptyString;
|
||||||
}
|
}
|
||||||
@@ -1489,6 +1495,8 @@ Rectangle {
|
|||||||
|
|
||||||
for (var i = 0; i < count; ++i) {
|
for (var i = 0; i < count; ++i) {
|
||||||
var idx = _model.index(i, 0);
|
var idx = _model.index(i, 0);
|
||||||
|
var isPending = model.data(idx, TransactionHistoryModel.TransactionPendingRole);
|
||||||
|
var isFailed = model.data(idx, TransactionHistoryModel.TransactionFailedRole);
|
||||||
var isout = _model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
|
var isout = _model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
|
||||||
var amount = _model.data(idx, TransactionHistoryModel.TransactionAmountRole);
|
var amount = _model.data(idx, TransactionHistoryModel.TransactionAmountRole);
|
||||||
var hash = _model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
var hash = _model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
||||||
@@ -1525,6 +1533,8 @@ Rectangle {
|
|||||||
|
|
||||||
root.txModelData.push({
|
root.txModelData.push({
|
||||||
"i": i,
|
"i": i,
|
||||||
|
"isPending": isPending,
|
||||||
|
"isFailed": isFailed,
|
||||||
"isout": isout,
|
"isout": isout,
|
||||||
"amount": amount,
|
"amount": amount,
|
||||||
"displayAmount": displayAmount,
|
"displayAmount": displayAmount,
|
||||||
|
|||||||
@@ -553,7 +553,8 @@ Rectangle {
|
|||||||
if (appWindow.viewOnly && !appWindow.isTrustedDaemon()){
|
if (appWindow.viewOnly && !appWindow.isTrustedDaemon()){
|
||||||
errorMessage = "<p class='orange'>" + qsTr("* To import, you must connect to a local node or a trusted remote node") + "</p>";
|
errorMessage = "<p class='orange'>" + qsTr("* To import, you must connect to a local node or a trusted remote node") + "</p>";
|
||||||
}
|
}
|
||||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:#ffffff;} p.orange{color:#ff9323;}</style>" +
|
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
||||||
|
";} p.orange{color:#ff9323;}</style>" +
|
||||||
"<p>" + qsTr("1. Using cold wallet, export the key images into a file") + "</p>" +
|
"<p>" + qsTr("1. Using cold wallet, export the key images into a file") + "</p>" +
|
||||||
"<p>" + qsTr("2. Using view-only wallet, import the key images file") + "</p>" +
|
"<p>" + qsTr("2. Using view-only wallet, import the key images file") + "</p>" +
|
||||||
errorMessage + translationManager.emptyString
|
errorMessage + translationManager.emptyString
|
||||||
@@ -593,7 +594,8 @@ Rectangle {
|
|||||||
if (appWindow.viewOnly && !pageRoot.checkInformation(amountLine.text, addressLine.text, appWindow.persistentSettings.nettype)){
|
if (appWindow.viewOnly && !pageRoot.checkInformation(amountLine.text, addressLine.text, appWindow.persistentSettings.nettype)){
|
||||||
errorMessage = "<p class='orange'>" + qsTr("* To create a transaction file, please enter address and amount above") + "</p>";
|
errorMessage = "<p class='orange'>" + qsTr("* To create a transaction file, please enter address and amount above") + "</p>";
|
||||||
}
|
}
|
||||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:#ffffff;} p.orange{color:#ff9323;}</style>" +
|
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
||||||
|
";} p.orange{color:#ff9323;}</style>" +
|
||||||
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
||||||
"<p>" + qsTr("2. Using cold wallet, import the outputs file and export the key images") + "</p>" +
|
"<p>" + qsTr("2. Using cold wallet, import the outputs file and export the key images") + "</p>" +
|
||||||
"<p>" + qsTr("3. Using view-only wallet, import the key images file and create a transaction file") + "</p>" +
|
"<p>" + qsTr("3. Using view-only wallet, import the key images file and create a transaction file") + "</p>" +
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ Rectangle {
|
|||||||
} else if(appWindow.walletMode === 1){
|
} else if(appWindow.walletMode === 1){
|
||||||
return qsTr("Simple mode") + " (bootstrap)" + translationManager.emptyString;
|
return qsTr("Simple mode") + " (bootstrap)" + translationManager.emptyString;
|
||||||
} else if(appWindow.walletMode === 2){
|
} else if(appWindow.walletMode === 2){
|
||||||
return qsTr("Advanced mode") + translationManager.emptyString;
|
return "%1 (%2)".arg(qsTr("Advanced mode")).arg(persistentSettings.useRemoteNode ? qsTr("Remote node") : qsTr("Local node")) + translationManager.emptyString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,9 +272,9 @@ Rectangle {
|
|||||||
<style type='text/css'>\
|
<style type='text/css'>\
|
||||||
a {cursor:pointer;text-decoration: none; color: #FF6C3C}\
|
a {cursor:pointer;text-decoration: none; color: #FF6C3C}\
|
||||||
</style>\
|
</style>\
|
||||||
<a href='#'>%1</a>".arg(walletLogPath)
|
<a href='#'>%1</a>".arg(logger.logFilePath)
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
onLinkActivated: oshelper.openContainingFolder(walletLogPath)
|
onLinkActivated: oshelper.openContainingFolder(logger.logFilePath)
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -397,7 +397,7 @@ Rectangle {
|
|||||||
if(currentWallet)
|
if(currentWallet)
|
||||||
data += currentWallet.walletCreationHeight;
|
data += currentWallet.walletCreationHeight;
|
||||||
|
|
||||||
data += "\nWallet log path: " + walletLogPath;
|
data += "\nWallet log path: " + logger.logFilePath;
|
||||||
data += "\nWallet mode: " + walletModeString;
|
data += "\nWallet mode: " + walletModeString;
|
||||||
data += "\nGraphics mode: " + isOpenGL ? "OpenGL" : "Low graphics mode";
|
data += "\nGraphics mode: " + isOpenGL ? "OpenGL" : "Low graphics mode";
|
||||||
if (isTails)
|
if (isTails)
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ Rectangle{
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
enabled: persistentSettings.useRemoteNode
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.useRemoteNode = false;
|
persistentSettings.useRemoteNode = false;
|
||||||
appWindow.disconnectRemoteNode();
|
appWindow.disconnectRemoteNode();
|
||||||
@@ -227,6 +228,7 @@ Rectangle{
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
enabled: !persistentSettings.useRemoteNode
|
||||||
onClicked: {
|
onClicked: {
|
||||||
appWindow.connectRemoteNode();
|
appWindow.connectRemoteNode();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Rectangle {
|
|||||||
iconText: FontAwesome.eye
|
iconText: FontAwesome.eye
|
||||||
description: qsTr("Creates a new wallet that can only view and initiate transactions, but requires a spendable wallet to sign transactions before sending.") + translationManager.emptyString
|
description: qsTr("Creates a new wallet that can only view and initiate transactions, but requires a spendable wallet to sign transactions before sending.") + translationManager.emptyString
|
||||||
title: qsTr("Create a view-only wallet") + translationManager.emptyString
|
title: qsTr("Create a view-only wallet") + translationManager.emptyString
|
||||||
visible: !appWindow.viewOnly
|
visible: !appWindow.viewOnly && (currentWallet ? !currentWallet.isLedger() : true)
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newPath = currentWallet.path + "_viewonly";
|
var newPath = currentWallet.path + "_viewonly";
|
||||||
|
|||||||
2
qml.qrc
2
qml.qrc
@@ -4,6 +4,7 @@
|
|||||||
<file>LeftPanel.qml</file>
|
<file>LeftPanel.qml</file>
|
||||||
<file>MiddlePanel.qml</file>
|
<file>MiddlePanel.qml</file>
|
||||||
<file>components/Label.qml</file>
|
<file>components/Label.qml</file>
|
||||||
|
<file>components/LanguageButton.qml</file>
|
||||||
<file>components/SettingsListItem.qml</file>
|
<file>components/SettingsListItem.qml</file>
|
||||||
<file>components/Slider.qml</file>
|
<file>components/Slider.qml</file>
|
||||||
<file>components/UpdateDialog.qml</file>
|
<file>components/UpdateDialog.qml</file>
|
||||||
@@ -243,5 +244,6 @@
|
|||||||
<file>images/success.png</file>
|
<file>images/success.png</file>
|
||||||
<file>images/success@2x.png</file>
|
<file>images/success@2x.png</file>
|
||||||
<file>components/SuccessfulTxDialog.qml</file>
|
<file>components/SuccessfulTxDialog.qml</file>
|
||||||
|
<file>components/TxConfirmationDialog.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -81,13 +81,20 @@ if(APPLE)
|
|||||||
list(APPEND RESOURCES ${ICON})
|
list(APPEND RESOURCES ${ICON})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(monero-wallet-gui ${EXECUTABLE_FLAG} main/main.cpp
|
set(monero_wallet_gui_sources
|
||||||
${SOURCE_FILES}
|
${SOURCE_FILES}
|
||||||
${PASS_STRENGTH_FILES}
|
${PASS_STRENGTH_FILES}
|
||||||
${QR_CODE_FILES}
|
${QR_CODE_FILES}
|
||||||
${RESOURCES}
|
${RESOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ANDROID)
|
||||||
|
add_executable(monero-wallet-gui ${EXECUTABLE_FLAG} ${monero_wallet_gui_sources})
|
||||||
|
else()
|
||||||
|
add_library(monero-wallet-gui SHARED ${monero_wallet_gui_sources})
|
||||||
|
set_target_properties(monero-wallet-gui PROPERTIES COMPILE_DEFINITIONS "ANDROID")
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(monero-wallet-gui PROPERTIES
|
set_target_properties(monero-wallet-gui PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||||
MACOSX_BUNDLE TRUE
|
MACOSX_BUNDLE TRUE
|
||||||
@@ -164,13 +171,17 @@ if(X11_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
target_link_libraries(monero-wallet-gui
|
if(NOT ANDROID)
|
||||||
${ZBAR_LIBRARIES}
|
target_link_libraries(monero-wallet-gui
|
||||||
jpeg
|
${ZBAR_LIBRARIES}
|
||||||
v4l2
|
jpeg
|
||||||
v4lconvert
|
v4l2
|
||||||
rt
|
v4lconvert
|
||||||
)
|
rt
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_link_libraries(monero-wallet-gui ${ZBAR_LIBRARIES})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(TARGET monero-wallet-gui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:daemon> $<TARGET_FILE_DIR:monero-wallet-gui>)
|
add_custom_command(TARGET monero-wallet-gui POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:daemon> $<TARGET_FILE_DIR:monero-wallet-gui>)
|
||||||
@@ -178,5 +189,5 @@ add_custom_command(TARGET monero-wallet-gui POST_BUILD COMMAND ${CMAKE_COMMAND}
|
|||||||
include(Deploy)
|
include(Deploy)
|
||||||
|
|
||||||
install(TARGETS monero-wallet-gui
|
install(TARGETS monero-wallet-gui
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
DESTINATION bin
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -112,6 +112,10 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
|||||||
arguments << "--no-sync";
|
arguments << "--no-sync";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!flags.contains("--out-peers", Qt::CaseSensitive) && bootstrapNodeAddress == "auto") {
|
||||||
|
arguments << "--out-peers" << "16";
|
||||||
|
}
|
||||||
|
|
||||||
arguments << "--check-updates" << "disabled";
|
arguments << "--check-updates" << "disabled";
|
||||||
|
|
||||||
// --max-concurrency based on threads available.
|
// --max-concurrency based on threads available.
|
||||||
|
|||||||
@@ -27,6 +27,11 @@
|
|||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "Wallet.h"
|
#include "Wallet.h"
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include "PendingTransaction.h"
|
#include "PendingTransaction.h"
|
||||||
#include "UnsignedTransaction.h"
|
#include "UnsignedTransaction.h"
|
||||||
#include "TransactionHistory.h"
|
#include "TransactionHistory.h"
|
||||||
@@ -50,6 +55,8 @@
|
|||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
|
|
||||||
|
#include "qt/ScopeGuard.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static const int DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS = 5;
|
static const int DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS = 5;
|
||||||
static const int DAEMON_BLOCKCHAIN_TARGET_HEIGHT_CACHE_TTL_SECONDS = 30;
|
static const int DAEMON_BLOCKCHAIN_TARGET_HEIGHT_CACHE_TTL_SECONDS = 30;
|
||||||
@@ -124,6 +131,19 @@ bool Wallet::disconnected() const
|
|||||||
return m_disconnected;
|
return m_disconnected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Wallet::refreshing() const
|
||||||
|
{
|
||||||
|
return m_refreshing;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Wallet::refreshingSet(bool value)
|
||||||
|
{
|
||||||
|
if (m_refreshing.exchange(value) != value)
|
||||||
|
{
|
||||||
|
emit refreshingChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Wallet::setConnectionStatus(ConnectionStatus value)
|
void Wallet::setConnectionStatus(ConnectionStatus value)
|
||||||
{
|
{
|
||||||
if (m_connectionStatus == value)
|
if (m_connectionStatus == value)
|
||||||
@@ -196,7 +216,7 @@ void Wallet::storeAsync(const QJSValue &callback, const QString &path /* = "" */
|
|||||||
{
|
{
|
||||||
const auto future = m_scheduler.run(
|
const auto future = m_scheduler.run(
|
||||||
[this, path] {
|
[this, path] {
|
||||||
QMutexLocker locker(&m_storeMutex);
|
QMutexLocker locker(&m_asyncMutex);
|
||||||
|
|
||||||
return QJSValueList({m_walletImpl->store(path.toStdString())});
|
return QJSValueList({m_walletImpl->store(path.toStdString())});
|
||||||
},
|
},
|
||||||
@@ -263,7 +283,7 @@ void Wallet::initAsync(
|
|||||||
emit walletCreationHeightChanged();
|
emit walletCreationHeightChanged();
|
||||||
qDebug() << "init async finished - starting refresh";
|
qDebug() << "init async finished - starting refresh";
|
||||||
connected(true);
|
connected(true);
|
||||||
m_walletImpl->startRefresh();
|
startRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (future.first)
|
if (future.first)
|
||||||
@@ -466,41 +486,37 @@ bool Wallet::importKeyImages(const QString& path)
|
|||||||
return m_walletImpl->importKeyImages(path.toStdString());
|
return m_walletImpl->importKeyImages(path.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Wallet::refresh()
|
bool Wallet::refresh(bool historyAndSubaddresses /* = true */)
|
||||||
{
|
{
|
||||||
bool result = m_walletImpl->refresh();
|
refreshingSet(true);
|
||||||
m_history->refresh(currentSubaddressAccount());
|
const auto cleanup = sg::make_scope_guard([this]() noexcept {
|
||||||
m_subaddress->refresh(currentSubaddressAccount());
|
refreshingSet(false);
|
||||||
m_subaddressAccount->getAll();
|
});
|
||||||
if (result)
|
|
||||||
emit updated();
|
{
|
||||||
return result;
|
QMutexLocker locker(&m_asyncMutex);
|
||||||
|
|
||||||
|
bool result = m_walletImpl->refresh();
|
||||||
|
if (historyAndSubaddresses)
|
||||||
|
{
|
||||||
|
m_history->refresh(currentSubaddressAccount());
|
||||||
|
m_subaddress->refresh(currentSubaddressAccount());
|
||||||
|
m_subaddressAccount->getAll();
|
||||||
|
}
|
||||||
|
if (result)
|
||||||
|
emit updated();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wallet::refreshAsync()
|
void Wallet::startRefresh()
|
||||||
{
|
{
|
||||||
qDebug() << "refresh async";
|
m_refreshEnabled = true;
|
||||||
m_walletImpl->refreshAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wallet::setAutoRefreshInterval(int seconds)
|
void Wallet::pauseRefresh()
|
||||||
{
|
{
|
||||||
m_walletImpl->setAutoRefreshInterval(seconds);
|
m_refreshEnabled = false;
|
||||||
}
|
|
||||||
|
|
||||||
int Wallet::autoRefreshInterval() const
|
|
||||||
{
|
|
||||||
return m_walletImpl->autoRefreshInterval();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Wallet::startRefresh() const
|
|
||||||
{
|
|
||||||
m_walletImpl->startRefresh();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Wallet::pauseRefresh() const
|
|
||||||
{
|
|
||||||
m_walletImpl->pauseRefresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QString &payment_id,
|
PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QString &payment_id,
|
||||||
@@ -874,6 +890,8 @@ bool Wallet::parse_uri(const QString &uri, QString &address, QString &payment_id
|
|||||||
|
|
||||||
bool Wallet::rescanSpent()
|
bool Wallet::rescanSpent()
|
||||||
{
|
{
|
||||||
|
QMutexLocker locker(&m_asyncMutex);
|
||||||
|
|
||||||
return m_walletImpl->rescanSpent();
|
return m_walletImpl->rescanSpent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1041,6 +1059,8 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
, m_subaddressModel(nullptr)
|
, m_subaddressModel(nullptr)
|
||||||
, m_subaddressAccount(nullptr)
|
, m_subaddressAccount(nullptr)
|
||||||
, m_subaddressAccountModel(nullptr)
|
, m_subaddressAccountModel(nullptr)
|
||||||
|
, m_refreshEnabled(false)
|
||||||
|
, m_refreshing(false)
|
||||||
, m_scheduler(this)
|
, m_scheduler(this)
|
||||||
{
|
{
|
||||||
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
||||||
@@ -1058,12 +1078,16 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
m_connectionStatusRunning = false;
|
m_connectionStatusRunning = false;
|
||||||
m_daemonUsername = "";
|
m_daemonUsername = "";
|
||||||
m_daemonPassword = "";
|
m_daemonPassword = "";
|
||||||
|
|
||||||
|
startRefreshThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
Wallet::~Wallet()
|
Wallet::~Wallet()
|
||||||
{
|
{
|
||||||
qDebug("~Wallet: Closing wallet");
|
qDebug("~Wallet: Closing wallet");
|
||||||
|
|
||||||
|
pauseRefresh();
|
||||||
|
m_walletImpl->stop();
|
||||||
m_scheduler.shutdownWaitForFinished();
|
m_scheduler.shutdownWaitForFinished();
|
||||||
|
|
||||||
delete m_addressBook;
|
delete m_addressBook;
|
||||||
@@ -1090,3 +1114,32 @@ Wallet::~Wallet()
|
|||||||
m_walletListener = NULL;
|
m_walletListener = NULL;
|
||||||
qDebug("m_walletImpl deleted");
|
qDebug("m_walletImpl deleted");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Wallet::startRefreshThread()
|
||||||
|
{
|
||||||
|
const auto future = m_scheduler.run([this] {
|
||||||
|
constexpr const std::chrono::seconds refreshInterval{10};
|
||||||
|
constexpr const std::chrono::milliseconds intervalResolution{100};
|
||||||
|
|
||||||
|
auto last = std::chrono::steady_clock::now();
|
||||||
|
while (!m_scheduler.stopping())
|
||||||
|
{
|
||||||
|
if (m_refreshEnabled)
|
||||||
|
{
|
||||||
|
const auto now = std::chrono::steady_clock::now();
|
||||||
|
const auto elapsed = now - last;
|
||||||
|
if (elapsed >= refreshInterval)
|
||||||
|
{
|
||||||
|
refresh(false);
|
||||||
|
last = std::chrono::steady_clock::now();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::this_thread::sleep_for(intervalResolution);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!future.first)
|
||||||
|
{
|
||||||
|
throw std::runtime_error("failed to start auto refresh thread");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ class Wallet : public QObject, public PassprasePrompter
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool disconnected READ disconnected NOTIFY disconnectedChanged)
|
Q_PROPERTY(bool disconnected READ disconnected NOTIFY disconnectedChanged)
|
||||||
|
Q_PROPERTY(bool refreshing READ refreshing NOTIFY refreshingChanged)
|
||||||
Q_PROPERTY(QString seed READ getSeed)
|
Q_PROPERTY(QString seed READ getSeed)
|
||||||
Q_PROPERTY(QString seedLanguage READ getSeedLanguage)
|
Q_PROPERTY(QString seedLanguage READ getSeedLanguage)
|
||||||
Q_PROPERTY(Status status READ status)
|
Q_PROPERTY(Status status READ status)
|
||||||
@@ -207,20 +208,11 @@ public:
|
|||||||
Q_INVOKABLE bool importKeyImages(const QString& path);
|
Q_INVOKABLE bool importKeyImages(const QString& path);
|
||||||
|
|
||||||
//! refreshes the wallet
|
//! refreshes the wallet
|
||||||
Q_INVOKABLE bool refresh();
|
Q_INVOKABLE bool refresh(bool historyAndSubaddresses = true);
|
||||||
|
|
||||||
//! refreshes the wallet asynchronously
|
|
||||||
Q_INVOKABLE void refreshAsync();
|
|
||||||
|
|
||||||
//! setup auto-refresh interval in seconds
|
|
||||||
Q_INVOKABLE void setAutoRefreshInterval(int seconds);
|
|
||||||
|
|
||||||
//! return auto-refresh interval in seconds
|
|
||||||
Q_INVOKABLE int autoRefreshInterval() const;
|
|
||||||
|
|
||||||
// pause/resume refresh
|
// pause/resume refresh
|
||||||
Q_INVOKABLE void startRefresh() const;
|
Q_INVOKABLE void startRefresh();
|
||||||
Q_INVOKABLE void pauseRefresh() const;
|
Q_INVOKABLE void pauseRefresh();
|
||||||
|
|
||||||
//! creates transaction
|
//! creates transaction
|
||||||
Q_INVOKABLE PendingTransaction * createTransaction(const QString &dst_addr, const QString &payment_id,
|
Q_INVOKABLE PendingTransaction * createTransaction(const QString &dst_addr, const QString &payment_id,
|
||||||
@@ -394,6 +386,7 @@ signals:
|
|||||||
void currentSubaddressAccountChanged() const;
|
void currentSubaddressAccountChanged() const;
|
||||||
void disconnectedChanged() const;
|
void disconnectedChanged() const;
|
||||||
void proxyAddressChanged() const;
|
void proxyAddressChanged() const;
|
||||||
|
void refreshingChanged() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Wallet(QObject * parent = nullptr);
|
Wallet(QObject * parent = nullptr);
|
||||||
@@ -421,9 +414,12 @@ private:
|
|||||||
const QString& proxyAddress);
|
const QString& proxyAddress);
|
||||||
|
|
||||||
bool disconnected() const;
|
bool disconnected() const;
|
||||||
|
bool refreshing() const;
|
||||||
|
void refreshingSet(bool value);
|
||||||
void setConnectionStatus(ConnectionStatus value);
|
void setConnectionStatus(ConnectionStatus value);
|
||||||
QString getProxyAddress() const;
|
QString getProxyAddress() const;
|
||||||
void setProxyAddress(QString address);
|
void setProxyAddress(QString address);
|
||||||
|
void startRefreshThread();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class WalletManager;
|
friend class WalletManager;
|
||||||
@@ -454,15 +450,17 @@ private:
|
|||||||
mutable SubaddressModel * m_subaddressModel;
|
mutable SubaddressModel * m_subaddressModel;
|
||||||
SubaddressAccount * m_subaddressAccount;
|
SubaddressAccount * m_subaddressAccount;
|
||||||
mutable SubaddressAccountModel * m_subaddressAccountModel;
|
mutable SubaddressAccountModel * m_subaddressAccountModel;
|
||||||
|
QMutex m_asyncMutex;
|
||||||
QMutex m_connectionStatusMutex;
|
QMutex m_connectionStatusMutex;
|
||||||
bool m_connectionStatusRunning;
|
bool m_connectionStatusRunning;
|
||||||
QString m_daemonUsername;
|
QString m_daemonUsername;
|
||||||
QString m_daemonPassword;
|
QString m_daemonPassword;
|
||||||
QString m_proxyAddress;
|
QString m_proxyAddress;
|
||||||
mutable QMutex m_proxyMutex;
|
mutable QMutex m_proxyMutex;
|
||||||
|
std::atomic<bool> m_refreshEnabled;
|
||||||
|
std::atomic<bool> m_refreshing;
|
||||||
WalletListenerImpl *m_walletListener;
|
WalletListenerImpl *m_walletListener;
|
||||||
FutureScheduler m_scheduler;
|
FutureScheduler m_scheduler;
|
||||||
QMutex m_storeMutex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#include "Logger.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
@@ -33,9 +35,11 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "Logger.h"
|
#include <easylogging++.h>
|
||||||
|
#include <wallet/api/wallet2_api.h>
|
||||||
|
|
||||||
|
#include "qt/MoneroSettings.h"
|
||||||
#include "qt/TailsOS.h"
|
#include "qt/TailsOS.h"
|
||||||
#include "wallet/api/wallet2_api.h"
|
|
||||||
|
|
||||||
// default log path by OS (should be writable)
|
// default log path by OS (should be writable)
|
||||||
static const QString defaultLogName = "monero-wallet-gui.log";
|
static const QString defaultLogName = "monero-wallet-gui.log";
|
||||||
@@ -63,15 +67,21 @@ static const QString defaultLogName = "monero-wallet-gui.log";
|
|||||||
|
|
||||||
|
|
||||||
// return the absolute path of the logfile and ensure path folder exists
|
// return the absolute path of the logfile and ensure path folder exists
|
||||||
const QString getLogPath(const QString logPath)
|
const QString getLogPath(const QString &userDefinedLogFilePath, bool portable)
|
||||||
{
|
{
|
||||||
const QFileInfo fi(logPath);
|
const QFileInfo fi(userDefinedLogFilePath);
|
||||||
|
if (!userDefinedLogFilePath.isEmpty() && !fi.isDir())
|
||||||
|
{
|
||||||
|
return fi.absoluteFilePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (portable)
|
||||||
|
{
|
||||||
|
return QDir(MoneroSettings::portableFolderName()).filePath(defaultLogName);
|
||||||
|
}
|
||||||
|
|
||||||
if(TailsOS::detect() && TailsOS::usePersistence)
|
if(TailsOS::detect() && TailsOS::usePersistence)
|
||||||
return QDir::homePath() + "/Persistent/Monero/logs/" + defaultLogName;
|
return QDir::homePath() + "/Persistent/Monero/logs/" + defaultLogName;
|
||||||
|
|
||||||
if(!logPath.isEmpty() && !fi.isDir())
|
|
||||||
return fi.absoluteFilePath();
|
|
||||||
else {
|
else {
|
||||||
QDir appDir(osPath + "/" + appFolder);
|
QDir appDir(osPath + "/" + appFolder);
|
||||||
if(!appDir.exists())
|
if(!appDir.exists())
|
||||||
@@ -98,3 +108,27 @@ void messageHandler(QtMsgType type, const QMessageLogContext &context, const QSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger::Logger(QCoreApplication &parent, QString userDefinedLogFilePath)
|
||||||
|
: QObject(&parent)
|
||||||
|
, m_applicationFilePath(parent.applicationFilePath().toStdString())
|
||||||
|
, m_userDefinedLogFilePath(std::move(userDefinedLogFilePath))
|
||||||
|
{
|
||||||
|
el::Configurations c;
|
||||||
|
c.setGlobally(el::ConfigurationType::ToFile, "false");
|
||||||
|
c.setGlobally(el::ConfigurationType::ToStandardOutput, "true");
|
||||||
|
el::Loggers::setDefaultConfigurations(c, true);
|
||||||
|
qInstallMessageHandler(messageHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Logger::resetLogFilePath(bool portable)
|
||||||
|
{
|
||||||
|
m_logFilePath = QDir::toNativeSeparators(getLogPath(m_userDefinedLogFilePath, portable));
|
||||||
|
Monero::Wallet::init(m_applicationFilePath.c_str(), "monero-wallet-gui", m_logFilePath.toStdString(), true);
|
||||||
|
qWarning() << "Logging to" << m_logFilePath;
|
||||||
|
emit logFilePathChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Logger::logFilePath() const
|
||||||
|
{
|
||||||
|
return m_logFilePath;
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,11 +26,28 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#ifndef LOGGER_H
|
#pragma once
|
||||||
#define LOGGER_H
|
|
||||||
|
|
||||||
const QString getLogPath(const QString logPath);
|
#include <QCoreApplication>
|
||||||
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
#endif // LOGGER_H
|
class Logger : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(QString logFilePath READ logFilePath NOTIFY logFilePathChanged)
|
||||||
|
|
||||||
|
public:
|
||||||
|
Logger(QCoreApplication &parent, QString userDefinedLogFilePath);
|
||||||
|
|
||||||
|
Q_INVOKABLE void resetLogFilePath(bool portable);
|
||||||
|
QString logFilePath() const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void logFilePathChanged() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::string m_applicationFilePath;
|
||||||
|
QString m_logFilePath;
|
||||||
|
const QString m_userDefinedLogFilePath;
|
||||||
|
};
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
#include "model/SubaddressModel.h"
|
#include "model/SubaddressModel.h"
|
||||||
#include "SubaddressAccount.h"
|
#include "SubaddressAccount.h"
|
||||||
#include "model/SubaddressAccountModel.h"
|
#include "model/SubaddressAccountModel.h"
|
||||||
#include "wallet/api/wallet2_api.h"
|
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
#include "MainApp.h"
|
#include "MainApp.h"
|
||||||
#include "qt/downloader.h"
|
#include "qt/downloader.h"
|
||||||
@@ -157,8 +156,6 @@ int main(int argc, char *argv[])
|
|||||||
// platform dependant settings
|
// platform dependant settings
|
||||||
#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
|
#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
|
||||||
bool isDesktop = true;
|
bool isDesktop = true;
|
||||||
#elif defined(Q_OS_LINUX)
|
|
||||||
bool isLinux = true;
|
|
||||||
#elif defined(Q_OS_ANDROID)
|
#elif defined(Q_OS_ANDROID)
|
||||||
bool isAndroid = true;
|
bool isAndroid = true;
|
||||||
#elif defined(Q_OS_IOS)
|
#elif defined(Q_OS_IOS)
|
||||||
@@ -180,8 +177,8 @@ int main(int argc, char *argv[])
|
|||||||
// disable "QApplication: invalid style override passed" warning
|
// disable "QApplication: invalid style override passed" warning
|
||||||
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
|
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
// force platform xcb
|
// platform xcb by default
|
||||||
if (isDesktop) qputenv("QT_QPA_PLATFORM", "xcb");
|
if (isDesktop && qEnvironmentVariableIsEmpty("QT_QPA_PLATFORM")) qputenv("QT_QPA_PLATFORM", "xcb");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// enable High DPI scaling
|
// enable High DPI scaling
|
||||||
@@ -269,10 +266,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
|
|
||||||
Monero::Utils::onStartup();
|
Monero::Utils::onStartup();
|
||||||
|
|
||||||
// Log settings
|
Logger logger(app, parser.value(logPathOption));
|
||||||
const QString logPath = QDir::toNativeSeparators(getLogPath(parser.value(logPathOption)));
|
|
||||||
Monero::Wallet::init(argv[0], "monero-wallet-gui", logPath.toStdString().c_str(), true);
|
|
||||||
qInstallMessageHandler(messageHandler);
|
|
||||||
|
|
||||||
// loglevel is configured in main.qml. Anything lower than
|
// loglevel is configured in main.qml. Anything lower than
|
||||||
// qWarning is not shown here unless MONERO_LOG_LEVEL env var is set
|
// qWarning is not shown here unless MONERO_LOG_LEVEL env var is set
|
||||||
@@ -281,7 +275,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
if (logLevelOk && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max){
|
if (logLevelOk && logLevel >= 0 && logLevel <= Monero::WalletManagerFactory::LogLevel_Max){
|
||||||
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
||||||
}
|
}
|
||||||
qWarning().noquote() << "app startd" << "(log: " + logPath + ")";
|
|
||||||
|
|
||||||
if (parser.isSet(verifyUpdateOption))
|
if (parser.isSet(verifyUpdateOption))
|
||||||
{
|
{
|
||||||
@@ -446,14 +439,14 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
|
|
||||||
engine.addImageProvider(QLatin1String("qrcode"), new QRCodeImageProvider());
|
engine.addImageProvider(QLatin1String("qrcode"), new QRCodeImageProvider());
|
||||||
|
|
||||||
|
engine.rootContext()->setContextProperty("logger", &logger);
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("mainApp", &app);
|
engine.rootContext()->setContextProperty("mainApp", &app);
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("IPC", ipc);
|
engine.rootContext()->setContextProperty("IPC", ipc);
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("qtRuntimeVersion", qVersion());
|
engine.rootContext()->setContextProperty("qtRuntimeVersion", qVersion());
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("walletLogPath", logPath);
|
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("tailsUsePersistence", TailsOS::usePersistence);
|
engine.rootContext()->setContextProperty("tailsUsePersistence", TailsOS::usePersistence);
|
||||||
|
|
||||||
// Exclude daemon manager from IOS
|
// Exclude daemon manager from IOS
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
#include "FutureScheduler.h"
|
#include "FutureScheduler.h"
|
||||||
|
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
|
#include <QThreadPool>
|
||||||
|
|
||||||
FutureScheduler::FutureScheduler(QObject *parent)
|
FutureScheduler::FutureScheduler(QObject *parent)
|
||||||
: QObject(parent), Alive(0), Stopping(false)
|
: QObject(parent), Alive(0), Stopping(false)
|
||||||
{
|
{
|
||||||
|
static std::once_flag once;
|
||||||
|
std::call_once(once, []() {
|
||||||
|
QThreadPool::globalInstance()->setMaxThreadCount(4);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureScheduler::~FutureScheduler()
|
FutureScheduler::~FutureScheduler()
|
||||||
@@ -65,6 +73,11 @@ QPair<bool, QFuture<QJSValueList>> FutureScheduler::run(std::function<QJSValueLi
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FutureScheduler::stopping() const noexcept
|
||||||
|
{
|
||||||
|
return Stopping;
|
||||||
|
}
|
||||||
|
|
||||||
bool FutureScheduler::add() noexcept
|
bool FutureScheduler::add() noexcept
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&Mutex);
|
QMutexLocker locker(&Mutex);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
|
|
||||||
QPair<bool, QFuture<void>> run(std::function<void()> function) noexcept;
|
QPair<bool, QFuture<void>> run(std::function<void()> function) noexcept;
|
||||||
QPair<bool, QFuture<QJSValueList>> run(std::function<QJSValueList()> function, const QJSValue &callback);
|
QPair<bool, QFuture<QJSValueList>> run(std::function<QJSValueList()> function, const QJSValue &callback);
|
||||||
|
bool stopping() const noexcept;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool add() noexcept;
|
bool add() noexcept;
|
||||||
@@ -59,7 +60,7 @@ private:
|
|||||||
size_t Alive;
|
size_t Alive;
|
||||||
QWaitCondition Condition;
|
QWaitCondition Condition;
|
||||||
QMutex Mutex;
|
QMutex Mutex;
|
||||||
bool Stopping;
|
std::atomic<bool> Stopping;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FUTURE_SCHEDULER_H
|
#endif // FUTURE_SCHEDULER_H
|
||||||
|
|||||||
@@ -108,8 +108,10 @@ void WalletKeysFilesModel::refresh(const QString &moneroAccountsDir)
|
|||||||
void WalletKeysFilesModel::findWallets(const QString &moneroAccountsDir)
|
void WalletKeysFilesModel::findWallets(const QString &moneroAccountsDir)
|
||||||
{
|
{
|
||||||
QDirIterator it(moneroAccountsDir, QDirIterator::Subdirectories);
|
QDirIterator it(moneroAccountsDir, QDirIterator::Subdirectories);
|
||||||
for (; it.hasNext(); it.next())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
|
it.next();
|
||||||
|
|
||||||
QFileInfo keysFileinfo = it.fileInfo();
|
QFileInfo keysFileinfo = it.fileInfo();
|
||||||
|
|
||||||
constexpr const char keysFileExtension[] = "keys";
|
constexpr const char keysFileExtension[] = "keys";
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ QString MoneroSettings::portableFilePath() const
|
|||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MoneroSettings::portableFolderName() const
|
QString MoneroSettings::portableFolderName()
|
||||||
{
|
{
|
||||||
return "monero-storage";
|
return "monero-storage";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ public:
|
|||||||
Q_INVOKABLE bool setPortable(bool enabled);
|
Q_INVOKABLE bool setPortable(bool enabled);
|
||||||
Q_INVOKABLE void setWritable(bool enabled);
|
Q_INVOKABLE void setWritable(bool enabled);
|
||||||
|
|
||||||
|
static QString portableFolderName();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void _q_propertyChanged();
|
void _q_propertyChanged();
|
||||||
|
|
||||||
@@ -84,7 +86,6 @@ private:
|
|||||||
bool portable() const;
|
bool portable() const;
|
||||||
bool portableConfigExists() const;
|
bool portableConfigExists() const;
|
||||||
QString portableFilePath() const;
|
QString portableFilePath() const;
|
||||||
QString portableFolderName() const;
|
|
||||||
std::unique_ptr<QSettings> portableSettings() const;
|
std::unique_ptr<QSettings> portableSettings() const;
|
||||||
std::unique_ptr<QSettings> unportableSettings() const;
|
std::unique_ptr<QSettings> unportableSettings() const;
|
||||||
void swap(std::unique_ptr<QSettings> newSettings);
|
void swap(std::unique_ptr<QSettings> newSettings);
|
||||||
|
|||||||
74
utils.sh
74
utils.sh
@@ -1,74 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
|
|
||||||
function get_platform {
|
|
||||||
local platform="unknown"
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
|
||||||
platform="darwin"
|
|
||||||
elif [ "$(uname)" == "FreeBSD" ]; then
|
|
||||||
platform="freebsd"
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
|
||||||
if [ "$(expr substr $(uname -m) 1 6)" == "x86_64" ]; then
|
|
||||||
platform="linux64"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then
|
|
||||||
platform="linux32"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 6)" == "armv7l" ]; then
|
|
||||||
platform="linuxarmv7"
|
|
||||||
elif [ "$(expr substr $(uname -m) 1 7)" == "aarch64" ]; then
|
|
||||||
platform="linuxarmv8"
|
|
||||||
else
|
|
||||||
platform="linux"
|
|
||||||
fi
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
|
|
||||||
platform="mingw64"
|
|
||||||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
|
|
||||||
platform="mingw32"
|
|
||||||
fi
|
|
||||||
echo "$platform"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function get_tag()
|
|
||||||
{
|
|
||||||
COMMIT=$(git rev-parse --short HEAD | sed -e 's/[\t ]*//')
|
|
||||||
if test $? -ne 0
|
|
||||||
then
|
|
||||||
echo "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive."
|
|
||||||
VERSIONTAG="unknown"
|
|
||||||
else
|
|
||||||
echo "You are currently on commit ${COMMIT}"
|
|
||||||
TAGGEDCOMMIT=$(git rev-list --tags --max-count=1 --abbrev-commit | sed -e 's/[\t ]*//')
|
|
||||||
if test -z "$TAGGEDCOMMIT"
|
|
||||||
then
|
|
||||||
echo "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive."
|
|
||||||
VERSIONTAG=$COMMIT
|
|
||||||
else
|
|
||||||
echo "The most recent tag was at ${TAGGEDCOMMIT}"
|
|
||||||
if test "$TAGGEDCOMMIT" = "$COMMIT"
|
|
||||||
then
|
|
||||||
echo "You are building a tagged release"
|
|
||||||
VERSIONTAG="release"
|
|
||||||
else
|
|
||||||
echo "You are ahead of or behind a tagged release"
|
|
||||||
VERSIONTAG="$COMMIT"
|
|
||||||
fi
|
|
||||||
# save tag name + commit if availible
|
|
||||||
TAGNAME=$(git describe --tags | sed -e 's/[\t ]*//')
|
|
||||||
if test -z "$TAGNAME"
|
|
||||||
then
|
|
||||||
TAGNAME="$VERSIONTAG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
source $ROOT_DIR/utils.sh
|
|
||||||
|
|
||||||
|
|
||||||
TARGET=$1
|
|
||||||
|
|
||||||
BUILD_TYPE=$2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -z $BUILD_TYPE ]]; then
|
|
||||||
BUILD_TYPE=Release
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" == "Release" ]]; then
|
|
||||||
echo "Release build"
|
|
||||||
ICU_FILES=(libicudt67.dll libicuin67.dll libicuio67.dll libicutu67.dll libicuuc67.dll)
|
|
||||||
else
|
|
||||||
echo "Debug build"
|
|
||||||
ICU_FILES=(libicudtd67.dll libicuind67.dll libicuiod67.dll libicutud67.dll libicuucd67.dll)
|
|
||||||
fi
|
|
||||||
|
|
||||||
FILES=(libprotobuf.dll libbrotlicommon.dll libbrotlidec.dll libusb-1.0.dll zlib1.dll libzstd.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libintl-8.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libfreetype-6.dll libbz2-1.dll libssp-0.dll libpcre2-16-0.dll libhidapi-0.dll libdouble-conversion.dll libgcrypt-20.dll)
|
|
||||||
|
|
||||||
OPENSSL_FILES=(libssl-1_1 libcrypto-1_1)
|
|
||||||
|
|
||||||
platform=$(get_platform)
|
|
||||||
|
|
||||||
if [[ "$platform" == "mingw64" ]]; then
|
|
||||||
PLATFORM_FILES="libgcc_s_seh-1.dll"
|
|
||||||
OPENSSL_SUFFIX="-x64"
|
|
||||||
elif [[ "$platform" == "mingw32" ]]; then
|
|
||||||
PLATFORM_FILES="libgcc_s_dw2-1.dll"
|
|
||||||
OPENSSL_SUFFIX = ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
for f in "${FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${ICU_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${PLATFORM_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done
|
|
||||||
|
|
||||||
for f in "${OPENSSL_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f$OPENSSL_SUFFIX.dll $TARGET || exit 1; done
|
|
||||||
|
|
||||||
cp $ROOT_DIR/start-low-graphics-mode.bat $TARGET
|
|
||||||
@@ -56,10 +56,20 @@ Rectangle {
|
|||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
WizardHeader {
|
RowLayout {
|
||||||
Layout.bottomMargin: 20
|
Layout.fillWidth: true
|
||||||
title: qsTr("Welcome to Monero") + translationManager.emptyString
|
spacing: 10
|
||||||
subtitle: ""
|
|
||||||
|
WizardHeader {
|
||||||
|
Layout.bottomMargin: 7
|
||||||
|
Layout.fillWidth: true
|
||||||
|
title: qsTr("Welcome to Monero") + translationManager.emptyString
|
||||||
|
subtitle: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.LanguageButton {
|
||||||
|
Layout.bottomMargin: 8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WizardMenuItem {
|
WizardMenuItem {
|
||||||
@@ -147,15 +157,6 @@ Rectangle {
|
|||||||
wizardController.wizardState = 'wizardModeSelection';
|
wizardController.wizardState = 'wizardModeSelection';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
|
||||||
small: true
|
|
||||||
text: qsTr("Change language") + translationManager.emptyString
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
appWindow.toggleLanguageView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.CheckBox2 {
|
MoneroComponents.CheckBox2 {
|
||||||
@@ -222,7 +223,6 @@ Rectangle {
|
|||||||
validator: IntValidator { bottom: 1 }
|
validator: IntValidator { bottom: 1 }
|
||||||
text: persistentSettings.kdfRounds ? persistentSettings.kdfRounds : "1"
|
text: persistentSettings.kdfRounds ? persistentSettings.kdfRounds : "1"
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
console.log('x');
|
|
||||||
kdfRoundsText.text = persistentSettings.kdfRounds = parseInt(kdfRoundsText.text) >= 1 ? parseInt(kdfRoundsText.text) : 1;
|
kdfRoundsText.text = persistentSettings.kdfRounds = parseInt(kdfRoundsText.text) >= 1 ? parseInt(kdfRoundsText.text) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,15 +152,7 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
columnSpacing: 20
|
columnSpacing: 20
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.LanguageButton { }
|
||||||
id: idChangeLang
|
|
||||||
Layout.minimumWidth: 150
|
|
||||||
text: qsTr("Language") + translationManager.emptyString
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
appWindow.toggleLanguageView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: btnContinue
|
id: btnContinue
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ Rectangle {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.resetLogFilePath(portable);
|
||||||
appWindow.changeWalletMode(mode);
|
appWindow.changeWalletMode(mode);
|
||||||
wizardController.wizardStackView.backTransition = false;
|
wizardController.wizardStackView.backTransition = false;
|
||||||
wizardController.wizardState = wizardState;
|
wizardController.wizardState = wizardState;
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ Rectangle {
|
|||||||
|
|
||||||
var valid = false;
|
var valid = false;
|
||||||
if(wizardController.walletRestoreMode === "keys") {
|
if(wizardController.walletRestoreMode === "keys") {
|
||||||
valid = wizardRestoreWallet1.verifyFromKeys();
|
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
||||||
return valid;
|
|
||||||
} else if(wizardController.walletRestoreMode === "seed") {
|
} else if(wizardController.walletRestoreMode === "seed") {
|
||||||
valid = wizardWalletInput.verify();
|
valid = wizardWalletInput.verify();
|
||||||
if(!valid) return false;
|
if(!valid) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user