Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
289f9ab1d2 | ||
|
|
73747e05a7 | ||
|
|
3051ce5118 | ||
|
|
fb32fa2fd2 | ||
|
|
b3eab6085f | ||
|
|
835aecb79d | ||
|
|
6cba5d0487 | ||
|
|
50b78cee51 | ||
|
|
1b6f648a0b | ||
|
|
6b2f8f847e | ||
|
|
917f8b5812 | ||
|
|
a62fb95fbf | ||
|
|
c3b0d00a72 | ||
|
|
d6dfd678b8 | ||
|
|
8b215c1e73 | ||
|
|
96295a52de | ||
|
|
ccd0e8e64b | ||
|
|
3b3ec89306 | ||
|
|
373fe8e02a | ||
|
|
14d9793193 | ||
|
|
65ceab6323 | ||
|
|
6b2118ecf6 | ||
|
|
ca78025735 | ||
|
|
c5eb13145f | ||
|
|
946443bf8c | ||
|
|
ae33c2f1b0 | ||
|
|
c97c0d597b | ||
|
|
ee3713b16b | ||
|
|
ae39e71061 | ||
|
|
7e5cac9fa3 | ||
|
|
b61b2b1630 | ||
|
|
1b1d1db14d | ||
|
|
81ec0183ea | ||
|
|
f5046cea54 | ||
|
|
624f13b2d9 | ||
|
|
0d502f0e45 | ||
|
|
6549ca4e1d | ||
|
|
37578dde7b | ||
|
|
225ae1233e | ||
|
|
d8cb29c4d4 | ||
|
|
502785f233 | ||
|
|
e3cf87906b | ||
|
|
5c3821007d | ||
|
|
c02e084dcf | ||
|
|
85d4e0ac6d | ||
|
|
fbca9c9340 | ||
|
|
d9d0ac1830 | ||
|
|
3adb2a6fe7 | ||
|
|
742ad82b88 | ||
|
|
a1ce8f866a | ||
|
|
24e8942ac5 | ||
|
|
3163d68e9e | ||
|
|
a6e1a6877f | ||
|
|
ac1ed1873a | ||
|
|
2ccefe0883 | ||
|
|
06f09e1f2e | ||
|
|
c3e9fbb25a | ||
|
|
096b28318c | ||
|
|
562d071c62 | ||
|
|
474d4b1994 | ||
|
|
49b55768f7 | ||
|
|
640a4d72e0 | ||
|
|
0e37f97aa2 | ||
|
|
499ad4a3aa | ||
|
|
8b5bdc4c6a | ||
|
|
cfee938516 | ||
|
|
c024323eab | ||
|
|
a2ad4692a3 |
@@ -1,10 +1,9 @@
|
||||
[submodule "contrib/KDMacTouchBar"]
|
||||
path = contrib/KDMacTouchBar
|
||||
url = https://github.com/KDAB/KDMacTouchBar.git
|
||||
[submodule "monero"]
|
||||
path = monero
|
||||
url = https://git.wownero.com/wownero/wownero
|
||||
branch = wowlet
|
||||
[submodule "contrib/quirc"]
|
||||
path = contrib/quirc
|
||||
url = https://github.com/dlbeer/quirc.git
|
||||
[submodule "wownero"]
|
||||
path = wownero
|
||||
url = https://git.wownero.com/wownero/wownero.git
|
||||
|
||||
@@ -4,18 +4,18 @@ project(wowlet)
|
||||
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
set(VERSION_MAJOR "0")
|
||||
set(VERSION_MINOR "2")
|
||||
set(VERSION_MAJOR "3")
|
||||
set(VERSION_MINOR "0")
|
||||
set(VERSION_REVISION "0")
|
||||
set(VERSION "beta-2")
|
||||
set(VERSION "beta-4")
|
||||
|
||||
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
||||
option(XMRIG "Include XMRig module" ON)
|
||||
option(OPENVR "Include OpenVR support" OFF)
|
||||
option(QML "Include QtQuick (QML)" OFF)
|
||||
option(TOR_BIN "Path to Tor binary to embed inside WOWlet" OFF)
|
||||
option(OPENVR "Include OpenVR support")
|
||||
option(ANDROID "Android deployment")
|
||||
option(ANDROID_DEBUG "View the Android app on desktop")
|
||||
option(TOR_BIN "Path to Tor binary to embed inside WOWlet")
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
option(USE_DEVICE_TREZOR "Trezor support compilation" OFF)
|
||||
option(USE_DEVICE_TREZOR "Trezor support compilation")
|
||||
option(DONATE_BEG "Prompt donation window every once in a while" ON)
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
||||
include(CheckCCompilerFlag)
|
||||
@@ -28,23 +28,16 @@ include(CheckSymbolExists)
|
||||
|
||||
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
|
||||
set(BUILD_GUI_DEPS ON)
|
||||
set(ARCH "x86-64")
|
||||
set(BUILD_64 ON)
|
||||
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
||||
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
||||
set(USE_SINGLE_BUILDDIR ON)
|
||||
if(OPENVR)
|
||||
set(QML ON)
|
||||
endif()
|
||||
|
||||
# Are we in debug mode?
|
||||
set(_CMAKE_BUILD_TYPE "")
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
|
||||
if("${_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
||||
set(DEBUG ON)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
message(STATUS "OPENVR: ${OPENVR}")
|
||||
message(STATUS "QML: ${QML}")
|
||||
endif()
|
||||
|
||||
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
|
||||
@@ -59,7 +52,7 @@ if(STATIC)
|
||||
# manually set the unbound submodule the right commit that has the fix.
|
||||
# This only works with -DMANUAL_SUBMODULES=1
|
||||
message(STATUS "applying unbound static build fix contrib/unbound_static.patch")
|
||||
execute_process(COMMAND bash -c "git -C ${CMAKE_SOURCE_DIR}/monero/external/unbound apply ${CMAKE_SOURCE_DIR}/contrib/unbound_static.patch")
|
||||
execute_process(COMMAND bash -c "git -C ${CMAKE_SOURCE_DIR}/wownero/external/unbound apply ${CMAKE_SOURCE_DIR}/contrib/unbound_static.patch")
|
||||
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_STATIC_RUNTIME ON)
|
||||
@@ -92,21 +85,19 @@ function (add_linker_flag_if_supported flag var)
|
||||
endfunction()
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Initializing submodules")
|
||||
execute_process(COMMAND git "submodule" "update" "--init" "--recursive")
|
||||
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero OUTPUT_VARIABLE _WOWNERO_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT _WOWNERO_HEAD STREQUAL WOWNERO_HEAD)
|
||||
message(FATAL_ERROR "[submodule] Monero HEAD was at ${_WOWNERO_HEAD} but should be at ${WOWNERO_HEAD}")
|
||||
else()
|
||||
message(STATUS "[submodule] Wownero HEAD @ ${WOWNERO_HEAD}")
|
||||
endif()
|
||||
endif()
|
||||
#if(GIT_FOUND)
|
||||
# message(STATUS "Initializing submodules")
|
||||
# execute_process(COMMAND git "submodule" "update" "--init" "--recursive")
|
||||
# execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/wownero OUTPUT_VARIABLE _WOWNERO_HEAD OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# if(NOT _WOWNERO_HEAD STREQUAL WOWNERO_HEAD)
|
||||
# message(FATAL_ERROR "[submodule] Wownero HEAD was at ${_WOWNERO_HEAD} but should be at ${WOWNERO_HEAD}")
|
||||
# else()
|
||||
# message(STATUS "[submodule] Wownero HEAD @ ${WOWNERO_HEAD}")
|
||||
# endif()
|
||||
#endif()
|
||||
|
||||
add_subdirectory(monero)
|
||||
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "monero" DEFINITION UNBOUND_LIBRARY)
|
||||
add_subdirectory(wownero)
|
||||
get_directory_property(ARCH_WIDTH DIRECTORY "wownero" DEFINITION ARCH_WIDTH)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(VersionMonero)
|
||||
@@ -173,7 +164,7 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
|
||||
program_options
|
||||
locale)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
# https://github.com/monero-project/monero-gui/issues/3142#issuecomment-705940446
|
||||
set(CMAKE_SKIP_RPATH ON)
|
||||
@@ -195,6 +186,17 @@ if("$ENV{DRONE}" STREQUAL "true")
|
||||
message(STATUS "We are inside a static compile with Drone CI")
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
||||
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
||||
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
||||
endif()
|
||||
if(APPLE AND NOT CMAKE_PREFIX_PATH)
|
||||
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# To build WOWlet with embedded (and static) Tor, pass CMake -DTOR_BIN=/path/to/tor
|
||||
if(TOR_BIN)
|
||||
if(APPLE)
|
||||
@@ -249,7 +251,7 @@ if(MINGW)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||
if(DEPENDS)
|
||||
set(ICU_LIBRARIES iconv)
|
||||
set(ICU_LIBRARIES iconv)
|
||||
else()
|
||||
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
|
||||
endif()
|
||||
@@ -264,7 +266,7 @@ elseif(DRAGONFLY)
|
||||
set(EXTRA_LIBRARIES execinfo ${COMPAT})
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
||||
set(EXTRA_LIBRARIES socket nsl resolv)
|
||||
elseif(NOT MSVC AND NOT DEPENDS)
|
||||
elseif(NOT MSVC AND NOT DEPENDS AND NOT ANDROID)
|
||||
find_library(RT rt)
|
||||
set(EXTRA_LIBRARIES ${RT})
|
||||
endif()
|
||||
@@ -384,10 +386,6 @@ if(OPENVR)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/openvr")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar")
|
||||
endif()
|
||||
|
||||
if(WITH_SCANNER)
|
||||
add_library(quirc STATIC
|
||||
contrib/quirc/lib/decode.c
|
||||
|
||||
@@ -262,7 +262,7 @@ RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
||||
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
||||
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" | sha256sum -c && \
|
||||
tar -xzf boost_1_73_0.tar.gz && \
|
||||
rm boost_1_73_0.tar.gz && \
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
FROM debian:stretch
|
||||
|
||||
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 file gettext git libc6 libncurses5 \
|
||||
libssl-dev 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 -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
|
||||
|
||||
RUN git clone -b v3.19.7 --depth 1 https://github.com/Kitware/CMake \
|
||||
&& cd CMake \
|
||||
&& git reset --hard 22612dd53a46c7f9b4c3f4b7dbe5c78f9afd9581 \
|
||||
&& PATH=${HOST_PATH} ./bootstrap \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} \
|
||||
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
||||
&& rm -rf $(pwd)
|
||||
|
||||
RUN git clone -b v1.6.35 --depth 1 https://github.com/glennrp/libpng.git && \
|
||||
cd libpng && \
|
||||
git reset --hard c17d164b4467f099b4484dfd4a279da0bc1dbd4a \
|
||||
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --with-zlib-prefix="${PREFIX}" --host=aarch64-linux-android --prefix=${PREFIX} --disable-shared --enable-static \
|
||||
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} make -j${THREADS} \
|
||||
&& make -j${THREADS} install \
|
||||
&& rm -rf $(pwd)
|
||||
|
||||
# @TODO: don't hardcode ANDROID_PLATFORM
|
||||
RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git && \
|
||||
cd libqrencode && \
|
||||
git reset --hard 59ee597f913fcfda7a010a6e106fbee2595f68e4 && \
|
||||
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
||||
-DANDROID_PLATFORM="28" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DARCH="armv8-a" \
|
||||
-DANDROID_ABI="arm64-v8a" \
|
||||
-DANDROID_TOOLCHAIN=clang \
|
||||
-DCMAKE_PREFIX_PATH="${PREFIX}" \
|
||||
-DPNG_PNG_INCLUDE_DIR="${PREFIX}/include/libpng16/" \
|
||||
-DPNG_LIBRARY="${PREFIX}/lib/libqtlibpng_arm64-v8a.a" \
|
||||
-DICONV_LIBRARY=/opt/android/prefix/lib/libiconv.a \
|
||||
-DICONV_INCLUDE_DIR=/opt/android/prefix/include/ \
|
||||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" && \
|
||||
make -j$THREADS && \
|
||||
make -j$THREADS install && \
|
||||
rm -rf $(pwd)
|
||||
|
||||
RUN ls -al && uname -a
|
||||
|
||||
# @TODO: switch to Release
|
||||
CMD set -ex \
|
||||
&& cd /wowlet \
|
||||
&& mkdir -p build/Android/release \
|
||||
&& cd build/Android/release \
|
||||
&& E=1 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="wowlet" \
|
||||
-DWITH_SCANNER=ON \
|
||||
-DUSE_DEVICE_TREZOR=OFF \
|
||||
-DUSE_SINGLE_BUILDDIR=ON \
|
||||
-DMANUAL_SUBMODULES=1 \
|
||||
-DUSE_SINGLE_BUILDDIR=ON \
|
||||
-DQML=ON \
|
||||
-DANDROID=ON \
|
||||
../../.. \
|
||||
&& PATH=${HOST_PATH} make generate_translations_header \
|
||||
&& make -j${THREADS} -C src \
|
||||
&& make -j${THREADS} apk
|
||||
@@ -27,7 +27,6 @@
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
|
||||
CMAKEFLAGS = \
|
||||
-DARCH=x86_64 \
|
||||
-DBUILD_64=On \
|
||||
-DBUILD_TESTS=Off \
|
||||
-DOPENVR=Off \
|
||||
@@ -43,6 +42,7 @@ CMAKEFLAGS = \
|
||||
$(CMAKEFLAGS_EXTRA)
|
||||
|
||||
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
||||
release-static: CMAKEFLAGS += -DXMRIG=OFF
|
||||
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF)
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
[](https://ci.wownero.com/wowlet/wowlet)
|
||||
|
||||
# WOWlet- a free Wownero desktop wallet
|
||||
|
||||
WOWlet is a free, open-source Wownero client for Linux, Mac OS, and Windows.
|
||||
|
||||
WOWlet is a free, open-source Wownero client for Linux with ports for Mac OS and Windows.
|
||||

|
||||
|
||||
## Development resources
|
||||
|
||||
* Git: [git.wownero.com/wowlet/wowlet](https://git.wownero.com/wowlet/wowlet)
|
||||
* IRC: `#wownero` on Freenode
|
||||
* IRC: `#wownero-dev` on [OFTC](https://oftc.net/)
|
||||
* [Building WOWlet from source](https://git.wownero.com/wowlet/wowlet/src/branch/master/docs/BUILDING.md)
|
||||
* [Working on WOWlet](https://git.wownero.com/wowlet/wowlet/src/branch/master/docs/HACKING.md)
|
||||
|
||||
Copyright (c) 2020-2021 The Monero Project.
|
||||
|
||||
@@ -35,7 +35,7 @@ if(RET)
|
||||
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}")
|
||||
configure_file("wownero/src/version.cpp.in" "${TO}")
|
||||
else()
|
||||
string(SUBSTRING ${COMMIT} 0 9 COMMIT)
|
||||
message(STATUS "You are currently on commit ${COMMIT}")
|
||||
@@ -61,5 +61,5 @@ else()
|
||||
set(VERSION_IS_RELEASE "false")
|
||||
endif()
|
||||
endif()
|
||||
configure_file("monero/src/version.cpp.in" "${TO}")
|
||||
configure_file("wownero/src/version.cpp.in" "${TO}")
|
||||
endif()
|
||||
@@ -4,7 +4,7 @@
|
||||
find_package(Git QUIET)
|
||||
# Check what commit we're on
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short=9 HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/wownero)
|
||||
|
||||
if(RET)
|
||||
# Something went wrong, set the version tag to -unknown
|
||||
@@ -37,7 +37,7 @@ endif()
|
||||
|
||||
# Check latest tagged release
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --abbrev=0 RESULT_VARIABLE RET OUTPUT_VARIABLE TAG OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/monero)
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/wownero)
|
||||
|
||||
if(RET)
|
||||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#define WOWLET_VERSION "@VERSION@"
|
||||
#define WOWLET_BRANCH "@WOWLET_BRANCH@"
|
||||
#define WOWLET_VERSION_SEMVER "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_REVISION@"
|
||||
|
||||
#define MONERO_VERSION "@MONERO_VERSION@"
|
||||
#define MONERO_BRANCH "@MONERO_BRANCH@"
|
||||
|
||||
@@ -22,13 +22,13 @@ mkdir -p "$DEBDIR/usr/share/icons/hicolor/256x256/apps/"
|
||||
|
||||
# Copy over assets
|
||||
|
||||
cp "$PWD/src/assets/control" "$DEBDIR/DEBIAN/control"
|
||||
cp "$PWD/src/assets/copyright" "$DEBDIR/debian/copyright"
|
||||
cp "$PWD/src/assets/copyright" "$DEBDIR/usr/share/doc/wowlet/copyright"
|
||||
cp "$PWD/src/assets/changelog.gz" "$DEBDIR/usr/share/doc/wowlet/changelog.gz"
|
||||
cp "$PWD/contrib/debian/control" "$DEBDIR/DEBIAN/control"
|
||||
cp "$PWD/contrib/debian/copyright" "$DEBDIR/debian/copyright"
|
||||
cp "$PWD/contrib/debian/copyright" "$DEBDIR/usr/share/doc/wowlet/copyright"
|
||||
cp "$PWD/contrib/debian/changelog.gz" "$DEBDIR/usr/share/doc/wowlet/changelog.gz"
|
||||
cp "$PWD/src/assets/org.wowlet.wowlet.metainfo.xml" "$DEBDIR/usr/share/metainfo/org.wowlet.wowlet.metainfo.xml"
|
||||
cp "$PWD/README.md" "$DEBDIR/usr/share/doc/wowlet/README"
|
||||
cp "$PWD/SECURITY.md" "$DEBDIR/usr/share/doc/wowlet/SECURITY"
|
||||
cp "$PWD/docs/SECURITY.md" "$DEBDIR/usr/share/doc/wowlet/SECURITY"
|
||||
cp "$PWD/build/bin/wowlet" "$DEBDIR/usr/bin/wowlet"
|
||||
cp "$PWD/src/assets/org.wowlet.wowlet.desktop" "$DEBDIR/usr/share/applications/org.wowlet.wowlet.desktop"
|
||||
cp "$PWD/src/assets/wowlet.1.gz" "$DEBDIR/usr/share/man/man1/wowlet.1.gz"
|
||||
@@ -43,4 +43,4 @@ cp "$PWD/src/assets/images/appicons/256x256.png" "$DEBDIR/usr/share/icons/hicolo
|
||||
# Build deb package
|
||||
|
||||
dpkg-deb --build $DEBDIR
|
||||
mv wowlet.DebDir.deb wowlet_1.0_amd64.deb
|
||||
mv wowlet.DebDir.deb wowlet_2.1_amd64.deb
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Package: wowlet
|
||||
Version: 1.0
|
||||
Version: 2.1
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
@@ -27,7 +27,7 @@ Replace `master` with the desired version tag (e.g. `beta-4`) to build the relea
|
||||
#### 2. Base image
|
||||
|
||||
```bash
|
||||
docker build --tag wowlet:linux --build-arg THREADS=4 .
|
||||
docker build --tag wowlet:linux --build-arg THREADS=6 .
|
||||
```
|
||||
|
||||
Building the base image takes a while. You only need to build the base image once.
|
||||
@@ -37,7 +37,7 @@ Building the base image takes a while. You only need to build the base image onc
|
||||
##### Standalone binary
|
||||
|
||||
```bash
|
||||
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:linux sh -c 'make release-static -j4'
|
||||
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:linux sh -c 'make release-static -j6'
|
||||
```
|
||||
|
||||
If you're re-running a build make sure to `rm -rf build/` first.
|
||||
@@ -67,7 +67,7 @@ Replace `master` with the desired version tag (e.g. `beta-4`) to build the relea
|
||||
|
||||
|
||||
```bash
|
||||
docker build -f Dockerfile.windows --tag wowlet:win --build-arg THREADS=4 .
|
||||
docker build -f Dockerfile.windows --tag wowlet:win --build-arg THREADS=6 .
|
||||
```
|
||||
|
||||
Building the base image takes a while. You only need to build the base image once.
|
||||
@@ -75,7 +75,7 @@ Building the base image takes a while. You only need to build the base image onc
|
||||
#### 3. Build
|
||||
|
||||
```bash
|
||||
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:win sh -c 'make depends root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j4'
|
||||
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:win sh -c 'make windows root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j6'
|
||||
```
|
||||
|
||||
If you're re-running a build make sure to `rm -rf build/` first.
|
||||
@@ -96,13 +96,28 @@ Clone the repository.
|
||||
```bash
|
||||
git clone --recursive https://git.wownero.com/wowlet/wowlet.git
|
||||
```
|
||||
Download Qt5.15.1 from here:
|
||||
https://download.qt.io/archive/qt/5.15/5.15.1/single/
|
||||
and build Qt 5.15.1:
|
||||
|
||||
Get the latest LTS from here: https://www.qt.io/offline-installers and install.
|
||||
|
||||
Build WOWlet.
|
||||
Qt build on Mac OS:
|
||||
|
||||
```bash
|
||||
CMAKE_PREFIX_PATH=~/Qt5.15.1/5.15.1/clang_64 make mac-release
|
||||
cd ~/Downloads/qt-everywhere-src-5.15.1
|
||||
./configure -prefix $PWD/qtbase -release -nomake examples -nomake tests -skip qtwebchannel -skip qtpurchasing -skip webengine -skip qtwebview
|
||||
make -j 4
|
||||
```
|
||||
|
||||
Build WOWlet:
|
||||
|
||||
```bash
|
||||
CMAKE_PREFIX_PATH=/Users/$username/Downloads/qt-everywhere-src-5.15.1/qtbase/ make mac-release
|
||||
```
|
||||
|
||||
Install and start tor service for ticker/forums:
|
||||
```bash
|
||||
brew install tor
|
||||
brew services start tor
|
||||
```
|
||||
|
||||
The resulting Mac OS application can be found `build/bin/wowlet.app` and will **not** have Tor embedded.
|
||||
|
||||
@@ -28,7 +28,7 @@ by running this command: `pandoc wowlet.1.md -s -t man -o wowlet.1 && gzip wowle
|
||||
apt install -y git cmake libqrencode-dev build-essential cmake libboost-all-dev \
|
||||
miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev \
|
||||
libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev \
|
||||
libprotobuf-dev protobuf-compiler libgcrypt20-dev
|
||||
libprotobuf-dev protobuf-compiler libgcrypt20-dev libpng-dev
|
||||
```
|
||||
|
||||
## Mac OS
|
||||
@@ -107,6 +107,4 @@ To skip the wizards and open a wallet directly use `--wallet-file`:
|
||||
./wowlet --use-local-tor --wallet-file /home/user/Wownero/wallets/bla.keys
|
||||
```
|
||||
|
||||
It is recommended that you use `--stagenet` for development. Testnet is also possible,
|
||||
but you'll have to provide Wownero a testnet node of your own.
|
||||
|
||||
|
||||
@@ -2,14 +2,9 @@ set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# pthread
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(QML)
|
||||
# PNG
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
endif()
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
# Compile these source files (.h/.cpp)
|
||||
file(GLOB SOURCE_FILES
|
||||
@@ -39,11 +34,7 @@ file(GLOB SOURCE_FILES
|
||||
"dialog/*.cpp"
|
||||
)
|
||||
|
||||
if(QML)
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets Quick Qml QuickControls2 QmlImportScanner Multimedia)
|
||||
else()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets Multimedia)
|
||||
endif()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets Quick QuickWidgets Qml QuickControls2 QuickCompiler QmlImportScanner Multimedia)
|
||||
|
||||
if(OPENVR)
|
||||
# include some extra files
|
||||
@@ -57,6 +48,15 @@ if(OPENVR)
|
||||
list(APPEND SOURCE_FILES ${SOURCE_FILES_QML})
|
||||
endif()
|
||||
|
||||
if(ANDROID OR ANDROID_DEBUG)
|
||||
qt5_add_resources(RESOURCES mobile/qml.qrc)
|
||||
file(GLOB SOURCE_FILES_QML
|
||||
"mobile/*.h"
|
||||
"mobile/*.cpp"
|
||||
)
|
||||
list(APPEND SOURCE_FILES ${SOURCE_FILES_QML})
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-deprecated-declarations") # @TODO: removeme
|
||||
|
||||
add_subdirectory(libwalletqt)
|
||||
@@ -98,11 +98,16 @@ if(APPLE)
|
||||
list(APPEND RESOURCES ${ICON})
|
||||
endif()
|
||||
|
||||
add_executable(wowlet ${EXECUTABLE_FLAG} main.cpp
|
||||
${SOURCE_FILES}
|
||||
${RESOURCES}
|
||||
${ASSETS_TOR}
|
||||
)
|
||||
if(NOT ANDROID)
|
||||
add_executable(wowlet ${EXECUTABLE_FLAG} main.cpp
|
||||
${SOURCE_FILES}
|
||||
${RESOURCES}
|
||||
${ASSETS_TOR}
|
||||
)
|
||||
else()
|
||||
add_library(wowlet SHARED ${SOURCE_FILES} ${RESOURCES})
|
||||
set_target_properties(wowlet PROPERTIES COMPILE_DEFINITIONS "ANDROID")
|
||||
endif()
|
||||
|
||||
# mac os bundle
|
||||
set_target_properties(wowlet PROPERTIES
|
||||
@@ -122,10 +127,10 @@ file(GLOB_RECURSE SRC_HEADERS *.h)
|
||||
|
||||
target_include_directories(wowlet PUBLIC
|
||||
${CMAKE_BINARY_DIR}/src/wowlet_autogen/include
|
||||
${CMAKE_SOURCE_DIR}/monero/include
|
||||
${CMAKE_SOURCE_DIR}/monero/src
|
||||
${CMAKE_SOURCE_DIR}/monero/external/easylogging++
|
||||
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include
|
||||
${CMAKE_SOURCE_DIR}/wownero/include
|
||||
${CMAKE_SOURCE_DIR}/wownero/src
|
||||
${CMAKE_SOURCE_DIR}/wownero/external/easylogging++
|
||||
${CMAKE_SOURCE_DIR}/wownero/contrib/epee/include
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/daemon
|
||||
@@ -158,8 +163,12 @@ if(TOR_BIN)
|
||||
target_compile_definitions(wowlet PRIVATE HAS_TOR_BIN=1)
|
||||
endif()
|
||||
|
||||
if(XMRIG)
|
||||
target_compile_definitions(wowlet PRIVATE HAS_XMRIG=1)
|
||||
if(ANDROID)
|
||||
target_compile_definitions(wowlet PRIVATE HAS_ANDROID=1)
|
||||
endif()
|
||||
|
||||
if(ANDROID_DEBUG)
|
||||
target_compile_definitions(wowlet PRIVATE HAS_ANDROID_DEBUG=1)
|
||||
endif()
|
||||
|
||||
if(OPENVR)
|
||||
@@ -194,10 +203,7 @@ endif()
|
||||
|
||||
target_compile_definitions(wowlet PUBLIC VR_API_PUBLIC)
|
||||
|
||||
if(QML)
|
||||
qt5_import_qml_plugins(${PROJECT_NAME})
|
||||
target_compile_definitions(wowlet PRIVATE HAS_QML=1)
|
||||
endif()
|
||||
qt5_import_qml_plugins(${PROJECT_NAME})
|
||||
|
||||
target_compile_definitions(wowlet
|
||||
PUBLIC
|
||||
@@ -220,45 +226,64 @@ else()
|
||||
target_link_libraries(wowlet PUBLIC monero-seed::monero-seed)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# yolo some hardcoded paths
|
||||
target_include_directories(wowlet PUBLIC
|
||||
/opt/android/prefix/include/QtAndroidExtras/
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link Wownero core libraries
|
||||
target_link_libraries(wowlet PUBLIC
|
||||
wallet_merged
|
||||
${LMDB_LIBRARY}
|
||||
epee
|
||||
${UNBOUND_LIBRARY}
|
||||
${SODIUM_LIBRARY}
|
||||
wallet_api
|
||||
easylogging
|
||||
blockchain_db
|
||||
hardforks
|
||||
${Boost_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
${EXTRA_LIBRARIES})
|
||||
|
||||
# Link Qt libraries
|
||||
if(QML)
|
||||
target_link_libraries(wowlet PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt5::Svg
|
||||
Qt5::QSvgPlugin
|
||||
Qt5::QSvgIconPlugin
|
||||
Qt5::Xml
|
||||
Qt5::WebSockets
|
||||
Qt5::Quick
|
||||
Qt5::Qml
|
||||
Qt5::QuickControls2
|
||||
Qt5::QuickWidgets)
|
||||
|
||||
if(ANDROID)
|
||||
# yolo some hardcoded paths
|
||||
target_link_libraries(wowlet PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt5::Svg
|
||||
Qt5::QSvgPlugin
|
||||
Qt5::QSvgIconPlugin
|
||||
Qt5::Xml
|
||||
Qt5::WebSockets
|
||||
Qt5::Quick
|
||||
Qt5::Qml
|
||||
Qt5::QuickControls2)
|
||||
else()
|
||||
target_link_libraries(wowlet PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
Qt5::Network
|
||||
Qt5::Svg
|
||||
Qt5::Xml
|
||||
Qt5::WebSockets)
|
||||
/opt/android/prefix/lib/libQt5QuickTemplates2_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Quick_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5QmlModels_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Qml_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Svg_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Widgets_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Gui_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Xml_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5XmlPatterns_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Network_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5Core_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5VirtualKeyboard_arm64-v8a.so
|
||||
/opt/android/prefix/lib/libQt5AndroidExtras_arm64-v8a.so
|
||||
/opt/android/prefix/plugins/bearer/libplugins_bearer_qandroidbearer_arm64-v8a.so
|
||||
GLESv2
|
||||
log
|
||||
z
|
||||
jnigraphics
|
||||
android
|
||||
EGL
|
||||
c++_shared
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link random other stuff
|
||||
@@ -294,7 +319,7 @@ if(OPENVR)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(wowlet
|
||||
target_link_libraries(wowlet PUBLIC
|
||||
KDMacTouchBar
|
||||
)
|
||||
target_include_directories(wowlet
|
||||
@@ -329,3 +354,17 @@ endif()
|
||||
install(TARGETS wowlet
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
|
||||
message(STATUS "=============================================")
|
||||
message(STATUS "VERSION_MAJOR: ${VERSION_MAJOR}")
|
||||
message(STATUS "VERSION_MINOR: ${VERSION_MINOR}")
|
||||
message(STATUS "VERSION_REVISION: ${VERSION_REVISION}")
|
||||
message(STATUS "STATIC: ${STATIC}")
|
||||
message(STATUS "VERSION: ${VERSION}")
|
||||
message(STATUS "Include Valve's OpenVR library: ${OPENVR}")
|
||||
message(STATUS "This build is for Android: ${ANDROID}")
|
||||
message(STATUS "This build is for testing the Android app on desktop: ${ANDROID_DEBUG}")
|
||||
message(STATUS "TOR_BIN: ${TOR_BIN}")
|
||||
message(STATUS "DONATE_BEG: ${DONATE_BEG}")
|
||||
message(STATUS "=============================================")
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "appcontext.h"
|
||||
#include "globals.h"
|
||||
#include "config-wowlet.h"
|
||||
|
||||
// libwalletqt
|
||||
#include "libwalletqt/TransactionHistory.h"
|
||||
@@ -30,85 +31,90 @@ AppContext::AppContext(QCommandLineParser *cmdargs) {
|
||||
this->cmdargs = cmdargs;
|
||||
AppContext::isQML = false;
|
||||
|
||||
// OS & env
|
||||
#if defined(Q_OS_MAC)
|
||||
this->isMac = true;
|
||||
this->isTorSocks = qgetenv("DYLD_INSERT_LIBRARIES").indexOf("libtorsocks") >= 0;
|
||||
#elif __ANDROID__
|
||||
this->isAndroid = true;
|
||||
#elif defined(Q_OS_LINUX)
|
||||
this->isLinux = true;
|
||||
this->isTorSocks = qgetenv("LD_PRELOAD").indexOf("libtorsocks") >= 0;
|
||||
#elif defined(Q_OS_WIN)
|
||||
this->isTorSocks = false;
|
||||
#endif
|
||||
|
||||
this->isTails = TailsOS::detect();
|
||||
this->isWhonix = WhonixOS::detect();
|
||||
#elif defined(Q_OS_WIN)
|
||||
this->isWindows = true;
|
||||
this->isTorSocks = false;
|
||||
#endif
|
||||
this->androidDebug = cmdargs->isSet("android-debug");
|
||||
|
||||
//Paths
|
||||
// Paths
|
||||
this->pathGenericData = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
|
||||
this->configRoot = QDir::homePath();
|
||||
if (isTails) { // #if defined(PORTABLE)
|
||||
QString portablePath = []{
|
||||
QString appImagePath = qgetenv("APPIMAGE");
|
||||
if (appImagePath.isEmpty()) {
|
||||
qDebug() << "Not an appimage, using currentPath()";
|
||||
return QDir::currentPath() + "/.wowlet";
|
||||
}
|
||||
|
||||
QFileInfo appImageDir(appImagePath);
|
||||
return appImageDir.absoluteDir().path() + "/.wowlet";
|
||||
}();
|
||||
|
||||
|
||||
if (QDir().mkpath(portablePath)) {
|
||||
this->configRoot = portablePath;
|
||||
} else {
|
||||
qCritical() << "Unable to create portable directory: " << portablePath;
|
||||
}
|
||||
}
|
||||
|
||||
this->accountName = Utils::getUnixAccountName();
|
||||
this->homeDir = QDir::homePath();
|
||||
|
||||
this->configDirectory = QString("%1/.config/wowlet/").arg(this->configRoot);
|
||||
this->configDirectoryVR = QString("%1%2").arg(this->configDirectory, "vr");
|
||||
|
||||
if (isTails) this->setupPathsTails();
|
||||
|
||||
QString walletDir = config()->get(Config::walletDirectory).toString();
|
||||
if (walletDir.isEmpty()) {
|
||||
#if defined(Q_OS_LINUX) or defined(Q_OS_MAC)
|
||||
this->defaultWalletDir = QString("%1/Wownero/wallets").arg(this->configRoot);
|
||||
this->defaultWalletDirRoot = QString("%1/Wownero").arg(this->configRoot);
|
||||
#elif defined(Q_OS_WIN)
|
||||
this->defaultWalletDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/Wownero";
|
||||
this->defaultWalletDirRoot = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
#endif
|
||||
if(walletDir.isEmpty()) {
|
||||
if (isAndroid && !androidDebug) setupPathsAndroid();
|
||||
else if (isWindows) setupPathsWindows();
|
||||
else if (isLinux || isMac) setupPathsUnix();
|
||||
} else {
|
||||
this->defaultWalletDir = walletDir;
|
||||
this->defaultWalletDirRoot = walletDir;
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
// can haz disk I/O?
|
||||
QVector<QString> perms = {
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
"android.permission.READ_EXTERNAL_STORAGE"
|
||||
};
|
||||
Utils::androidAskPermissions(perms);
|
||||
#endif
|
||||
|
||||
// Create wallet dirs
|
||||
qDebug() << "creating " << defaultWalletDir;
|
||||
if (!QDir().mkpath(defaultWalletDir))
|
||||
qCritical() << "Unable to create dir: " << defaultWalletDir;
|
||||
|
||||
this->configDirectory = QString("%1/.config/wowlet/").arg(this->configRoot);
|
||||
#if defined(Q_OS_UNIX)
|
||||
if(!this->configDirectory.endsWith('/'))
|
||||
this->configDirectory = QString("%1/").arg(this->configDirectory);
|
||||
#endif
|
||||
this->configDirectoryVR = QString("%1%2").arg(this->configDirectory, "vr");
|
||||
|
||||
// Create some directories
|
||||
createConfigDirectory(this->configDirectory);
|
||||
|
||||
// if(this->cmdargs->isSet("stagenet"))
|
||||
// this->networkType = NetworkType::STAGENET;
|
||||
// else if(this->cmdargs->isSet("testnet"))
|
||||
// this->networkType = NetworkType::TESTNET;
|
||||
// else
|
||||
this->networkType = NetworkType::MAINNET;
|
||||
|
||||
qDebug() << "configRoot: " << this->configRoot;
|
||||
qDebug() << "homeDir: " << this->homeDir;
|
||||
qDebug() << "customWalletDir: " << walletDir;
|
||||
qDebug() << "defaultWalletDir: " << this->defaultWalletDir;
|
||||
qDebug() << "defaultWalletDirRoot: " << this->defaultWalletDirRoot;
|
||||
qDebug() << "configDirectory: " << this->configDirectory;
|
||||
|
||||
// auto nodeSourceUInt = config()->get(Config::nodeSource).toUInt();
|
||||
// AppContext::nodeSource = static_cast<NodeSource>(nodeSourceUInt);
|
||||
this->nodes = new Nodes(this, this->networkClearnet);
|
||||
connect(this, &AppContext::nodeSourceChanged, this->nodes, &Nodes::onNodeSourceChanged);
|
||||
connect(this, &AppContext::setCustomNodes, this->nodes, &Nodes::setCustomNodes);
|
||||
|
||||
// Tor & socks proxy
|
||||
this->ws = new WSClient(this, wsUrl);
|
||||
// init backend URLs
|
||||
if(cmdargs->isSet("backend-host"))
|
||||
this->backendHost = cmdargs->value("backend-host");
|
||||
if(cmdargs->isSet("backend-host"))
|
||||
this->backendPort = cmdargs->value("backend-port").toUInt();
|
||||
if(cmdargs->isSet("backend-tls"))
|
||||
this->backendTLS = true;
|
||||
|
||||
backendWSUrl = this->backendTLS ? "wss://" : "ws://";
|
||||
backendWSUrl += QString("%1:%2").arg(this->backendHost).arg(this->backendPort);
|
||||
backendHTTPUrl = this->backendTLS ? "https://" : "http://";
|
||||
backendHTTPUrl += QString("%1:%2").arg(this->backendHost).arg(this->backendPort);
|
||||
|
||||
// init websocket client
|
||||
this->ws = new WSClient(this);
|
||||
connect(this->ws, &WSClient::WSMessage, this, &AppContext::onWSMessage);
|
||||
connect(this->ws, &WSClient::connectionEstablished, this, &AppContext::wsConnected);
|
||||
connect(this->ws, &WSClient::closed, this, &AppContext::wsDisconnected);
|
||||
@@ -119,6 +125,24 @@ AppContext::AppContext(QCommandLineParser *cmdargs) {
|
||||
this->storeWallet();
|
||||
});
|
||||
|
||||
// If system clock skewed for >= 300 seconds, assume a wake-up from hibernate and reload the websocket connection
|
||||
if(!this->isAndroid)
|
||||
m_hibernateTimer.start(3 * 1000);
|
||||
|
||||
m_hibernatePreviousTime = std::chrono::steady_clock::now();
|
||||
connect(&m_hibernateTimer, &QTimer::timeout, [this]() {
|
||||
const auto now = std::chrono::steady_clock::now();
|
||||
const auto elapsed = now - m_hibernatePreviousTime;
|
||||
|
||||
if(elapsed >= m_hibernateDetectInterval) {
|
||||
qCritical() << "Clock skew detected, resetting websocket connection";
|
||||
this->ws->webSocket.abort();
|
||||
this->ws->start();
|
||||
}
|
||||
|
||||
m_hibernatePreviousTime = now;
|
||||
});
|
||||
|
||||
// restore height lookup
|
||||
this->initRestoreHeights();
|
||||
|
||||
@@ -139,10 +163,8 @@ AppContext::AppContext(QCommandLineParser *cmdargs) {
|
||||
AppContext::prices = new Prices();
|
||||
|
||||
// XMRig
|
||||
#ifdef HAS_XMRIG
|
||||
this->XMRig = new XmRig(this->configDirectory, this);
|
||||
this->XMRig->prepare();
|
||||
#endif
|
||||
|
||||
this->walletManager = WalletManager::instance();
|
||||
QString logPath = QString("%1/daemon.log").arg(configDirectory);
|
||||
@@ -160,17 +182,25 @@ AppContext::AppContext(QCommandLineParser *cmdargs) {
|
||||
|
||||
// libwallet connects
|
||||
connect(this->walletManager, &WalletManager::walletOpened, this, &AppContext::onWalletOpened);
|
||||
|
||||
// hideOnClose
|
||||
auto hideOnClose = config()->get(Config::hideOnClose).toBool();
|
||||
if(hideOnClose)
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
}
|
||||
|
||||
void AppContext::initTor() {
|
||||
this->tor = new Tor(this, this);
|
||||
this->tor->start();
|
||||
|
||||
if (!isWhonix && wsUrl.contains(".onion")) {
|
||||
this->networkProxy = new QNetworkProxy(QNetworkProxy::Socks5Proxy, Tor::torHost, Tor::torPort);
|
||||
this->network->setProxy(*networkProxy);
|
||||
this->ws->webSocket.setProxy(*networkProxy);
|
||||
if (!isWhonix && !backendHost.contains(".onion")) {
|
||||
qDebug() << "'backend-host' did not contain '.onion' - running without Tor proxy.";
|
||||
return;
|
||||
}
|
||||
|
||||
this->networkProxy = new QNetworkProxy(QNetworkProxy::Socks5Proxy, Tor::torHost, Tor::torPort);
|
||||
this->network->setProxy(*networkProxy);
|
||||
this->ws->webSocket.setProxy(*networkProxy);
|
||||
}
|
||||
|
||||
void AppContext::initWS() {
|
||||
@@ -304,6 +334,7 @@ void AppContext::onPreferredFiatCurrencyChanged(const QString &symbol) {
|
||||
auto *model = this->currentWallet->transactionHistoryModel();
|
||||
if(model != nullptr) {
|
||||
model->preferredFiatSymbol = symbol;
|
||||
this->currentWallet->transactionHistoryModel()->transactionHistory()->calcFiatInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,6 +380,13 @@ void AppContext::onWalletOpened(Wallet *wallet) {
|
||||
connect(this->currentWallet, &Wallet::heightRefreshed, this, &AppContext::onHeightRefreshed);
|
||||
connect(this->currentWallet, &Wallet::transactionCreated, this, &AppContext::onTransactionCreated);
|
||||
|
||||
this->currentWallet->historyModel(); // load historyModel
|
||||
auto *txHistory = this->currentWallet->history();
|
||||
txHistory->refresh(this->currentWallet->currentSubaddressAccount());
|
||||
|
||||
connect(AppContext::prices, &Prices::fiatPricesUpdated, txHistory, &TransactionHistory::calcFiatInfo);
|
||||
connect(AppContext::prices, &Prices::cryptoPricesUpdated, txHistory, &TransactionHistory::calcFiatInfo);
|
||||
|
||||
emit walletOpened(wallet);
|
||||
|
||||
connect(this->currentWallet, &Wallet::connectionStatusChanged, [this]{
|
||||
@@ -410,20 +448,23 @@ void AppContext::onWSMessage(const QJsonObject &msg) {
|
||||
if(changed)
|
||||
emit blockHeightWSUpdated(this->heights);
|
||||
}
|
||||
|
||||
else if(cmd == "yellwow") {
|
||||
this->yellowPagesData = msg.value("data").toArray();
|
||||
emit yellowUpdated();
|
||||
}
|
||||
else if(cmd == "rpc_nodes") {
|
||||
this->onWSNodes(msg.value("data").toArray());
|
||||
}
|
||||
#if defined(HAS_XMRIG)
|
||||
else if(cmd == "xmrig") {
|
||||
this->XMRigDownloads(msg.value("data").toObject());
|
||||
}
|
||||
#endif
|
||||
else if(cmd == "wownerod_releases") {
|
||||
emit WownerodDownloads(msg.value("data").toObject());
|
||||
}
|
||||
else if(cmd == "crypto_rates") {
|
||||
QJsonArray crypto_rates = msg.value("data").toArray();
|
||||
AppContext::prices->cryptoPricesReceived(crypto_rates);
|
||||
}
|
||||
|
||||
else if(cmd == "fiat_rates") {
|
||||
QJsonObject fiat_rates = msg.value("data").toObject();
|
||||
AppContext::prices->fiatPricesReceived(fiat_rates);
|
||||
@@ -432,21 +473,35 @@ void AppContext::onWSMessage(const QJsonObject &msg) {
|
||||
QJsonArray reddit_data = msg.value("data").toArray();
|
||||
this->onWSReddit(reddit_data);
|
||||
}
|
||||
|
||||
else if(cmd == "forum") {
|
||||
QJsonArray forum_data = msg.value("data").toArray();
|
||||
this->onWSForum(forum_data);
|
||||
}
|
||||
else if(cmd == "funding_proposals") {
|
||||
auto ccs_data = msg.value("data").toArray();
|
||||
this->onWSCCS(ccs_data);
|
||||
}
|
||||
|
||||
else if(cmd == "suchwow") {
|
||||
QJsonArray such_data = msg.value("data").toArray();
|
||||
emit suchWowUpdated(such_data);
|
||||
}
|
||||
|
||||
else if(cmd == "txFiatHistory") {
|
||||
auto txFiatHistory_data = msg.value("data").toObject();
|
||||
AppContext::txFiatHistory->onWSData(txFiatHistory_data);
|
||||
}
|
||||
else if(cmd == "wowlet_releases") {
|
||||
versionPending = msg.value("data").toObject();
|
||||
auto version_str = versionPending.value("version").toString();
|
||||
|
||||
if(Utils::versionOutdated(WOWLET_VERSION_SEMVER, version_str))
|
||||
emit versionOutdated(version_str, versionPending);
|
||||
}
|
||||
else if(cmd == "kill") {
|
||||
// used *only* in dire emergencies
|
||||
auto killme = msg.value("data").toBool();
|
||||
if(killme)
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
#if defined(HAS_OPENVR)
|
||||
else if(cmd == "requestPIN") {
|
||||
auto pin = msg.value("data").toString();
|
||||
@@ -497,6 +552,23 @@ void AppContext::onWSNodes(const QJsonArray &nodes) {
|
||||
this->nodes->onWSNodesReceived(l);
|
||||
}
|
||||
|
||||
void AppContext::onWSForum(const QJsonArray& forum_data) {
|
||||
QList<QSharedPointer<ForumPost>> l;
|
||||
|
||||
for (auto &&entry: forum_data) {
|
||||
auto obj = entry.toObject();
|
||||
auto forumPost = new ForumPost(
|
||||
obj.value("title").toString(),
|
||||
obj.value("author").toString(),
|
||||
obj.value("permalink").toString(),
|
||||
obj.value("comments").toInt());
|
||||
QSharedPointer<ForumPost> r = QSharedPointer<ForumPost>(forumPost);
|
||||
l.append(r);
|
||||
}
|
||||
|
||||
emit forumUpdated(l);
|
||||
}
|
||||
|
||||
void AppContext::onWSReddit(const QJsonArray& reddit_data) {
|
||||
QList<QSharedPointer<RedditPost>> l;
|
||||
|
||||
@@ -558,12 +630,14 @@ void AppContext::createConfigDirectory(const QString &dir) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAS_OPENVR
|
||||
auto config_dir_vr = QString("%1%2").arg(dir, "vr");
|
||||
if(!Utils::dirExists(config_dir_vr)) {
|
||||
qDebug() << QString("Creating directory: %1").arg(config_dir_vr);
|
||||
if (!QDir().mkpath(config_dir_vr))
|
||||
throw std::runtime_error("Could not create directory " + config_dir_vr.toStdString());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AppContext::createWalletWithoutSpecifyingSeed(const QString &name, const QString &password) {
|
||||
@@ -949,3 +1023,38 @@ void AppContext::refreshModels() {
|
||||
this->currentWallet->coins()->refresh(this->currentWallet->currentSubaddressAccount());
|
||||
// Todo: set timer for refreshes
|
||||
}
|
||||
|
||||
void AppContext::setupPathsUnix() {
|
||||
this->defaultWalletDir = QString("%1/Wownero/wallets").arg(this->configRoot);
|
||||
this->defaultWalletDirRoot = QString("%1/Wownero").arg(this->configRoot);
|
||||
}
|
||||
|
||||
void AppContext::setupPathsWindows() {
|
||||
this->defaultWalletDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + "/Wownero";
|
||||
this->defaultWalletDirRoot = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
|
||||
}
|
||||
|
||||
void AppContext::setupPathsAndroid() {
|
||||
this->defaultWalletDir = QString("%1/Wownero/wallets").arg(this->pathGenericData);
|
||||
this->defaultWalletDirRoot = QString("%1/Wownero").arg(this->pathGenericData);
|
||||
}
|
||||
|
||||
void AppContext::setupPathsTails() {
|
||||
QString portablePath = []{
|
||||
QString appImagePath = qgetenv("APPIMAGE");
|
||||
if (appImagePath.isEmpty()) {
|
||||
qDebug() << "Not an appimage, using currentPath()";
|
||||
return QDir::currentPath() + "/.wowlet";
|
||||
}
|
||||
|
||||
QFileInfo appImageDir(appImagePath);
|
||||
return appImageDir.absoluteDir().path() + "/.wowlet";
|
||||
}();
|
||||
|
||||
if (QDir().mkpath(portablePath)) {
|
||||
this->configRoot = portablePath;
|
||||
} else {
|
||||
qCritical() << "Unable to create portable directory: " << portablePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "utils/txfiathistory.h"
|
||||
#include "utils/WowletSeed.h"
|
||||
#include "widgets/RedditPost.h"
|
||||
#include "widgets/ForumPost.h"
|
||||
#include "widgets/CCSEntry.h"
|
||||
#include "utils/RestoreHeightLookup.h"
|
||||
#include "utils/nodes.h"
|
||||
@@ -39,7 +40,13 @@ public:
|
||||
~AppContext() override;
|
||||
bool isTails = false;
|
||||
bool isWhonix = false;
|
||||
bool isAndroid = false;
|
||||
bool isLinux = false;
|
||||
bool isMac = false;
|
||||
bool isWindows = false;
|
||||
bool isDebug = false;
|
||||
static bool isQML;
|
||||
bool androidDebug = false;
|
||||
|
||||
// Donation config
|
||||
const QString donationAddress = "Wo3MWeKwtA918DU4c69hVSNgejdWFCRCuWjShRY66mJkU2Hv58eygJWDJS1MNa2Ge5M1WjUkGHuLqHkweDxwZZU42d16v94mP";
|
||||
@@ -50,6 +57,7 @@ public:
|
||||
|
||||
QString coinName = "wownero";
|
||||
bool isTorSocks = false;
|
||||
QString pathGenericData;
|
||||
QString homeDir;
|
||||
QString accountName;
|
||||
QString configRoot;
|
||||
@@ -58,7 +66,13 @@ public:
|
||||
QString defaultWalletDir;
|
||||
QString defaultWalletDirRoot;
|
||||
QString tmpTxDescription;
|
||||
QString wsUrl = "6wku2m4zrv6j666crlo7lzofv6ud6enzllyhou3ijeigpukymi37caad.onion";
|
||||
|
||||
// https://git.wownero.com/wowlet/wowlet-backend/
|
||||
QString backendHost = "6wku2m4zrv6j666crlo7lzofv6ud6enzllyhou3ijeigpukymi37caad.onion";
|
||||
unsigned int backendPort = 80;
|
||||
bool backendTLS = false;
|
||||
QString backendWSUrl;
|
||||
QString backendHTTPUrl;
|
||||
|
||||
QString walletPath;
|
||||
QString walletPassword = "";
|
||||
@@ -98,7 +112,8 @@ public:
|
||||
static QMap<QString, QString> txDescriptionCache;
|
||||
static QMap<QString, QString> txCache;
|
||||
static TxFiatHistory *txFiatHistory;
|
||||
static bool isQML;
|
||||
QJsonArray yellowPagesData;
|
||||
QJsonObject versionPending;
|
||||
|
||||
// libwalletqt
|
||||
bool refreshed = false;
|
||||
@@ -154,6 +169,7 @@ private slots:
|
||||
void onWSMessage(const QJsonObject& msg);
|
||||
void onWSCCS(const QJsonArray &ccs_data);
|
||||
void onWSReddit(const QJsonArray& reddit_data);
|
||||
void onWSForum(const QJsonArray& forum_data);
|
||||
|
||||
void onMoneySpent(const QString &txId, quint64 amount);
|
||||
void onMoneyReceived(const QString &txId, quint64 amount);
|
||||
@@ -192,11 +208,14 @@ signals:
|
||||
void wsConnected();
|
||||
void wsDisconnected();
|
||||
void redditUpdated(QList<QSharedPointer<RedditPost>> &posts);
|
||||
void forumUpdated(QList<QSharedPointer<ForumPost>> &posts);
|
||||
void nodesUpdated(QList<QSharedPointer<WowletNode>> &nodes);
|
||||
void ccsUpdated(QList<QSharedPointer<CCSEntry>> &entries);
|
||||
void suchWowUpdated(const QJsonArray &such_data);
|
||||
void yellowUpdated();
|
||||
void nodeSourceChanged(NodeSource nodeSource);
|
||||
void XMRigDownloads(const QJsonObject &data);
|
||||
void WownerodDownloads(const QJsonObject &data);
|
||||
void pinLookupReceived(QString address, QString pin);
|
||||
void pinLookupErrorReceived();
|
||||
void pinReceived(QString pin);
|
||||
@@ -210,11 +229,20 @@ signals:
|
||||
void initiateTransaction();
|
||||
void endTransaction();
|
||||
void setTitle(const QString &title); // set window title
|
||||
void versionOutdated(QString version_string, QJsonObject data);
|
||||
|
||||
private:
|
||||
WalletKeysFilesModel *m_walletKeysFilesModel;
|
||||
const int m_donationBoundary = 15;
|
||||
QTimer m_storeTimer;
|
||||
QTimer m_hibernateTimer;
|
||||
std::chrono::seconds m_hibernateDetectInterval{300};
|
||||
std::chrono::time_point<std::chrono::steady_clock> m_hibernatePreviousTime;
|
||||
|
||||
void setupPathsUnix();
|
||||
void setupPathsWindows();
|
||||
void setupPathsAndroid();
|
||||
void setupPathsTails();
|
||||
};
|
||||
|
||||
#endif //WOWLET_APPCONTEXT_H
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
<file>assets/images/confirmed.svg</file>
|
||||
<file>assets/images/connect.svg</file>
|
||||
<file>assets/images/copy.png</file>
|
||||
<file>assets/images/dog_running.gif</file>
|
||||
<file>assets/images/dog_sitting.gif</file>
|
||||
<file>assets/images/edit.png</file>
|
||||
<file>assets/images/exchange.png</file>
|
||||
<file>assets/images/exchange_white.png</file>
|
||||
@@ -37,6 +39,7 @@
|
||||
<file>assets/images/eye_blind.png</file>
|
||||
<file>assets/images/wowlet.png</file>
|
||||
<file>assets/images/file.png</file>
|
||||
<file>assets/images/fire.png</file>
|
||||
<file>assets/images/gnome-calc.png</file>
|
||||
<file>assets/images/history.png</file>
|
||||
<file>assets/images/info.png</file>
|
||||
@@ -129,8 +132,56 @@
|
||||
<file>assets/images/welcome/wow74.png</file>
|
||||
<file>assets/images/welcome/wow75.png</file>
|
||||
<file>assets/images/welcome/wow76.png</file>
|
||||
<file>assets/images/welcome/wow77.png</file>
|
||||
<file>assets/images/welcome/wow78.png</file>
|
||||
<file>assets/images/welcome/wow79.png</file>
|
||||
<file>assets/images/welcome/wow80.png</file>
|
||||
<file>assets/images/welcome/wow81.png</file>
|
||||
<file>assets/images/welcome/wow82.png</file>
|
||||
<file>assets/images/welcome/wow83.png</file>
|
||||
<file>assets/images/welcome/wow84.png</file>
|
||||
<file>assets/images/welcome/wow85.png</file>
|
||||
<file>assets/images/welcome/wow86.png</file>
|
||||
<file>assets/images/welcome/wow87.png</file>
|
||||
<file>assets/images/welcome/wow88.png</file>
|
||||
<file>assets/images/welcome/wow89.png</file>
|
||||
<file>assets/images/welcome/wow90.png</file>
|
||||
<file>assets/images/welcome/wow91.png</file>
|
||||
<file>assets/images/welcome/wow92.png</file>
|
||||
<file>assets/images/welcome/wow93.png</file>
|
||||
<file>assets/images/welcome/wow94.png</file>
|
||||
<file>assets/images/welcome/wow95.png</file>
|
||||
<file>assets/images/welcome/wow96.png</file>
|
||||
<file>assets/images/welcome/wow97.png</file>
|
||||
<file>assets/images/welcome/wow98.png</file>
|
||||
<file>assets/images/welcome/wow99.png</file>
|
||||
<file>assets/images/welcome/wow100.png</file>
|
||||
<file>assets/images/welcome/wow101.png</file>
|
||||
<file>assets/images/welcome/wow102.png</file>
|
||||
<file>assets/images/welcome/wow103.png</file>
|
||||
<file>assets/images/welcome/wow104.png</file>
|
||||
<file>assets/images/welcome/wow105.png</file>
|
||||
<file>assets/images/welcome/wow106.png</file>
|
||||
<file>assets/images/welcome/wow107.png</file>
|
||||
<file>assets/images/welcome/wow108.png</file>
|
||||
<file>assets/images/welcome/wow109.png</file>
|
||||
<file>assets/images/welcome/wow110.png</file>
|
||||
<file>assets/images/welcome/wow111.png</file>
|
||||
<file>assets/images/welcome/wow112.png</file>
|
||||
<file>assets/images/welcome/wow113.png</file>
|
||||
<file>assets/images/welcome/wow114.png</file>
|
||||
<file>assets/images/welcome/wow115.png</file>
|
||||
<file>assets/images/welcome/wow116.png</file>
|
||||
<file>assets/images/welcome/wow117.png</file>
|
||||
<file>assets/images/welcome/wow118.png</file>
|
||||
<file>assets/images/welcome/wow119.png</file>
|
||||
<file>assets/images/welcome/wow120.png</file>
|
||||
<file>assets/images/welcome/wow121.png</file>
|
||||
<file>assets/images/welcome/wow122.png</file>
|
||||
<file>assets/images/welcome/wow123.png</file>
|
||||
<file>assets/images/preferences.png</file>
|
||||
<file>assets/images/preferences.svg</file>
|
||||
<file>assets/images/credits.jpg</file>
|
||||
<file>assets/images/qrcode.png</file>
|
||||
<file>assets/images/qrcode_white.png</file>
|
||||
<file>assets/images/revealer_c.png</file>
|
||||
@@ -138,6 +189,7 @@
|
||||
<file>assets/images/seal.png</file>
|
||||
<file>assets/images/seed.png</file>
|
||||
<file>assets/images/speaker.png</file>
|
||||
<file>assets/images/pls_update.jpg</file>
|
||||
<file>assets/images/status_connected_fork.png</file>
|
||||
<file>assets/images/status_connected.png</file>
|
||||
<file>assets/images/status_connected_proxy_fork.png</file>
|
||||
@@ -176,5 +228,31 @@
|
||||
<file>assets/images/zoom.png</file>
|
||||
<file>assets/mnemonic_25_english.txt</file>
|
||||
<file>assets/restore_heights_wownero_mainnet.txt</file>
|
||||
|
||||
<file alias="mining/bottom_center_console.png">assets/images/mining/bottom_center_console.png</file>
|
||||
<file alias="mining/intel.png">assets/images/mining/intel.png</file>
|
||||
<file alias="mining/amd.png">assets/images/mining/amd.png</file>
|
||||
<file alias="mining/lowerleft_circle.png">assets/images/mining/lowerleft_circle.png</file>
|
||||
<file alias="mining/lowerleft.png">assets/images/mining/lowerleft.png</file>
|
||||
<file alias="mining/lower_repeat.png">assets/images/mining/lower_repeat.png</file>
|
||||
<file alias="mining/lowerright.png">assets/images/mining/lowerright.png</file>
|
||||
<file alias="mining/r_bottom.png">assets/images/mining/r_bottom.png</file>
|
||||
<file alias="mining/r_left.png">assets/images/mining/r_left.png</file>
|
||||
<file alias="mining/r_right.png">assets/images/mining/r_right.png</file>
|
||||
<file alias="mining/topleft.png">assets/images/mining/topleft.png</file>
|
||||
<file alias="mining/topright_bar.png">assets/images/mining/topright_bar.png</file>
|
||||
<file alias="mining/topright_left.png">assets/images/mining/topright_left.png</file>
|
||||
<file alias="mining/topright_middle.png">assets/images/mining/topright_middle.png</file>
|
||||
<file alias="mining/topright_right.png">assets/images/mining/topright_right.png</file>
|
||||
<file alias="mining/warning.png">assets/images/mining/warning.png</file>
|
||||
<file alias="mining/axe.png">assets/images/mining/axe.png</file>
|
||||
<file alias="mining/lowerleft_btn.png">assets/images/mining/lowerleft_btn.png</file>
|
||||
<file alias="mining/elmo.gif">assets/images/mining/elmo.gif</file>
|
||||
<file alias="mining/bubble.png">assets/images/mining/bubble.png</file>
|
||||
<file alias="mining/mining.webp">assets/images/mining/mining.webp</file>
|
||||
|
||||
<file alias="fonts/ComicMono.ttf">assets/fonts/ComicMono.ttf</file>
|
||||
<file alias="fonts/ComicMono-Bold.ttf">assets/fonts/ComicMono-Bold.ttf</file>
|
||||
<file alias="mining.qml">ui/qml/mining.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
After Width: | Height: | Size: 227 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 102 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 123 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -32,17 +32,26 @@ ContactsWidget::ContactsWidget(QWidget *parent) :
|
||||
this->newContact();
|
||||
});
|
||||
|
||||
// row context menu
|
||||
m_rowMenu = new QMenu(ui->contacts);
|
||||
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy address", this, &ContactsWidget::copyAddress);
|
||||
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy name", this, &ContactsWidget::copyName);
|
||||
m_rowMenu->addAction("Pay to", this, &ContactsWidget::payTo);
|
||||
m_rowMenu->addAction("Delete", this, &ContactsWidget::deleteContact);
|
||||
connect(ui->btn_addContact, &QPushButton::pressed, [this]{
|
||||
this->newContact();
|
||||
});
|
||||
|
||||
connect(ui->contacts, &QTreeView::customContextMenuRequested, [=](const QPoint & point){
|
||||
QModelIndex index = ui->contacts->indexAt(point);
|
||||
if (index.isValid()) {
|
||||
auto username = index.model()->data(index.siblingAtColumn(AddressBookModel::Description), Qt::UserRole).toString();
|
||||
|
||||
m_rowMenu = new QMenu(ui->contacts);
|
||||
if(username.contains("(yp)"))
|
||||
m_rowMenu->addAction(QIcon(":/assets/images/network.png"), "Visit user's YellWOWPage", this, &ContactsWidget::visitYellowPage);
|
||||
|
||||
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy address", this, &ContactsWidget::copyAddress);
|
||||
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy name", this, &ContactsWidget::copyName);
|
||||
m_rowMenu->addAction("Pay to", this, &ContactsWidget::payTo);
|
||||
m_rowMenu->addAction("Delete", this, &ContactsWidget::deleteContact);
|
||||
|
||||
m_rowMenu->exec(ui->contacts->viewport()->mapToGlobal(point));
|
||||
m_rowMenu->deleteLater();
|
||||
}
|
||||
else {
|
||||
m_contextMenu->exec(ui->contacts->viewport()->mapToGlobal(point));
|
||||
@@ -52,6 +61,68 @@ ContactsWidget::ContactsWidget(QWidget *parent) :
|
||||
connect(ui->search, &QLineEdit::textChanged, this, &ContactsWidget::setSearchFilter);
|
||||
}
|
||||
|
||||
QMap<QString, QString> ContactsWidget::data() {
|
||||
auto rtn = QMap<QString, QString>();
|
||||
for (int i = 0; i < m_ctx->currentWallet->addressBook()->count(); i++) {
|
||||
m_ctx->currentWallet->addressBook()->getRow(i, [&rtn](const AddressBookInfo &entry) {
|
||||
rtn[entry.description()] = entry.address();
|
||||
});
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
unsigned int ContactsWidget::rowIndex(const QString &name) {
|
||||
// name -> row index lookup
|
||||
int result = -1;
|
||||
for (int i = 0; i < m_ctx->currentWallet->addressBook()->count(); i++) {
|
||||
m_ctx->currentWallet->addressBook()->getRow(i, [i, name, &result](const AddressBookInfo &entry) {
|
||||
if(entry.description() == name) result = i;
|
||||
return;
|
||||
});
|
||||
|
||||
if(result != -1)
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void ContactsWidget::loadYellowPages() {
|
||||
if (m_ctx->currentWallet == nullptr || m_ctx->yellowPagesData.empty())
|
||||
return;
|
||||
|
||||
auto contacts = this->data();
|
||||
for (auto item: m_ctx->yellowPagesData) {
|
||||
auto obj = item.toObject();
|
||||
const auto username = QString("%1 (yp)").arg(obj.value("username").toString());
|
||||
const auto address = obj.value("address").toString();
|
||||
|
||||
if(contacts.contains(username)) {
|
||||
if(contacts[username] == address) continue;
|
||||
|
||||
// update the address
|
||||
auto idx = this->rowIndex(username);
|
||||
if(idx == -1) continue;
|
||||
m_model->deleteRow((int)idx);
|
||||
}
|
||||
|
||||
bool addressValid = WalletManager::addressValid(address, m_ctx->currentWallet->nettype());
|
||||
if (!addressValid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
m_ctx->currentWallet->addressBook()->addRow(address, "", username);
|
||||
}
|
||||
}
|
||||
|
||||
void ContactsWidget::visitYellowPage() {
|
||||
auto index = ui->contacts->currentIndex();
|
||||
auto username = index.model()->data(
|
||||
index.siblingAtColumn(AddressBookModel::Description),
|
||||
Qt::UserRole).toString();
|
||||
username = username.replace(" (yp)", "").trimmed();
|
||||
Utils::externalLinkWarning(this, QString("https://yellow.wownero.com/user/%1").arg(username));
|
||||
}
|
||||
|
||||
void ContactsWidget::copyAddress() {
|
||||
QModelIndex index = ui->contacts->currentIndex();
|
||||
ModelUtils::copyColumn(&index, AddressBookModel::Address);
|
||||
|
||||
@@ -22,6 +22,7 @@ class ContactsWidget : public QWidget
|
||||
public:
|
||||
explicit ContactsWidget(QWidget *parent = nullptr);
|
||||
void setModel(AddressBookModel * model);
|
||||
QMap<QString, QString> data();
|
||||
~ContactsWidget() override;
|
||||
|
||||
public slots:
|
||||
@@ -30,9 +31,11 @@ public slots:
|
||||
void payTo();
|
||||
void newContact(QString address = "", QString name = "");
|
||||
void deleteContact();
|
||||
void visitYellowPage();
|
||||
void setShowFullAddresses(bool show);
|
||||
void setSearchFilter(const QString &filter);
|
||||
void resetModel();
|
||||
void loadYellowPages();
|
||||
|
||||
signals:
|
||||
void fillAddress(QString &address);
|
||||
@@ -50,6 +53,8 @@ private:
|
||||
QMenu *m_headerMenu;
|
||||
AddressBookModel * m_model;
|
||||
AddressBookProxyModel * m_proxyModel;
|
||||
|
||||
unsigned int rowIndex(const QString &name);
|
||||
};
|
||||
|
||||
#endif // CONTACTSWIDGET_H
|
||||
|
||||
@@ -6,17 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>589</width>
|
||||
<height>416</height>
|
||||
<width>310</width>
|
||||
<height>283</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -29,14 +26,38 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="search">
|
||||
<property name="placeholderText">
|
||||
<string>Search contacts...</string>
|
||||
<property name="verticalSpacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="search">
|
||||
<property name="placeholderText">
|
||||
<string>Search contacts...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_addContact">
|
||||
<property name="text">
|
||||
<string>New contact</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTreeView" name="contacts">
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
|
||||