mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-30 04:39:57 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40493475ba | ||
|
|
4098e8c0e5 | ||
|
|
ca234008b9 | ||
|
|
2ebb41a371 | ||
|
|
6cf4299f78 | ||
|
|
df0459da69 | ||
|
|
46accb1077 | ||
|
|
7a91ba5a84 |
+16
-21
@@ -5,9 +5,9 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
|||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
set(VERSION_MAJOR "3")
|
set(VERSION_MAJOR "3")
|
||||||
set(VERSION_MINOR "1")
|
set(VERSION_MINOR "2")
|
||||||
set(VERSION_REVISION "0")
|
set(VERSION_REVISION "0")
|
||||||
set(VERSION "beta-5")
|
set(VERSION "beta-6")
|
||||||
|
|
||||||
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
||||||
option(OPENVR "Include OpenVR support")
|
option(OPENVR "Include OpenVR support")
|
||||||
@@ -25,11 +25,16 @@ include(FindCcache)
|
|||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
set(WOWNERO_HEAD "ff5182f7f2825263e93e88064931597b3c6cf928")
|
set(WOWNERO_HEAD "cf3bba3aee00d9d3e3f902f66f3710d820d3bdfb")
|
||||||
set(BUILD_GUI_DEPS ON)
|
set(BUILD_GUI_DEPS ON)
|
||||||
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
||||||
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
||||||
set(USE_SINGLE_BUILDDIR ON)
|
set(USE_SINGLE_BUILDDIR ON)
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
set(LINUX_ACTIVATION ON)
|
||||||
|
else()
|
||||||
|
set(LINUX_ACTIVATION OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Are we in debug mode?
|
# Are we in debug mode?
|
||||||
set(_CMAKE_BUILD_TYPE "")
|
set(_CMAKE_BUILD_TYPE "")
|
||||||
@@ -114,23 +119,8 @@ set(HIDAPI_FOUND OFF)
|
|||||||
# QrEncode
|
# QrEncode
|
||||||
find_package(QREncode REQUIRED)
|
find_package(QREncode REQUIRED)
|
||||||
|
|
||||||
# Tevador 14 word Monero seed
|
# Tevador 14 word seed (https://git.wownero.com/wowlet/wownero-seed)
|
||||||
find_package(monero-seed CONFIG)
|
find_package(wownero-seed CONFIG REQUIRED)
|
||||||
if(NOT monero-seed_FOUND)
|
|
||||||
if(FETCH_DEPS)
|
|
||||||
FetchContent_Declare(monero-seed
|
|
||||||
GIT_REPOSITORY https://git.wownero.com/wowlet/monero-seed.git)
|
|
||||||
FetchContent_GetProperties(monero-seed)
|
|
||||||
if(NOT monero-seed_POPULATED)
|
|
||||||
message(STATUS "Fetching monero-seed")
|
|
||||||
FetchContent_Populate(monero-seed)
|
|
||||||
add_subdirectory(${monero-seed_SOURCE_DIR} ${monero-seed_BINARY_DIR})
|
|
||||||
endif()
|
|
||||||
add_library(monero-seed::monero-seed ALIAS monero-seed)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "monero-seed was not installed and fetching deps is disabled")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
@@ -205,7 +195,7 @@ if(TOR_BIN)
|
|||||||
if (EXISTS "${tor_path}")
|
if (EXISTS "${tor_path}")
|
||||||
message(STATUS "Tor found: ${tor_path}")
|
message(STATUS "Tor found: ${tor_path}")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "TOR_BIN is set, so the following file needs to be present: '${fn}'")
|
message(FATAL_ERROR "TOR_BIN is set, so the following file needs to be present: '${tor_path}'")
|
||||||
endif()
|
endif()
|
||||||
set(TOR_BIN "${tor_path}")
|
set(TOR_BIN "${tor_path}")
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -362,6 +352,11 @@ if(STATIC)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LINUX_ACTIVATION)
|
||||||
|
find_package(Cairo REQUIRED)
|
||||||
|
find_package(Xfixes REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
|
||||||
# is fixed in the code (Issue #847), force compiler to be conservative.
|
# is fixed in the code (Issue #847), force compiler to be conservative.
|
||||||
add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)
|
add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)
|
||||||
|
|||||||
+13
-13
@@ -17,7 +17,6 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
|
|||||||
cd openssl-1.1.1i && \
|
cd openssl-1.1.1i && \
|
||||||
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make test && \
|
|
||||||
make -j$THREADS install_sw && \
|
make -j$THREADS install_sw && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
@@ -66,10 +65,10 @@ RUN git clone -b tor-0.4.5.5-rc --depth 1 https://git.torproject.org/tor.git &&
|
|||||||
rm -rf $(pwd) && \
|
rm -rf $(pwd) && \
|
||||||
strip -s -D /usr/local/tor/bin/tor
|
strip -s -D /usr/local/tor/bin/tor
|
||||||
|
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=5.15.2
|
ARG QT_VERSION=v5.15.2
|
||||||
|
|
||||||
ENV CFLAGS="-fPIC"
|
ENV CFLAGS="-fPIC"
|
||||||
ENV CPPFLAGS="-fPIC"
|
ENV CPPFLAGS="-fPIC"
|
||||||
@@ -95,7 +94,7 @@ RUN apt-get update && \
|
|||||||
# libusb
|
# libusb
|
||||||
libudev-dev \
|
libudev-dev \
|
||||||
# fontconfig
|
# fontconfig
|
||||||
autopoint gettext gperf libpng12-dev \
|
autopoint gettext gperf libpng-dev \
|
||||||
# libxcb
|
# libxcb
|
||||||
libpthread-stubs0-dev \
|
libpthread-stubs0-dev \
|
||||||
# xorgproto
|
# xorgproto
|
||||||
@@ -161,7 +160,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
cd libxcb-util && \
|
cd libxcb-util && \
|
||||||
git reset --hard acf790d7752f36e450d476ad79807d4012ec863b && \
|
git reset --hard acf790d7752f36e450d476ad79807d4012ec863b && \
|
||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
@@ -172,7 +171,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
cd libxcb-image && \
|
cd libxcb-image && \
|
||||||
git reset --hard d882052fb2ce439c6483fce944ba8f16f7294639 && \
|
git reset --hard d882052fb2ce439c6483fce944ba8f16f7294639 && \
|
||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
@@ -183,7 +182,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
cd libxcb-keysyms && \
|
cd libxcb-keysyms && \
|
||||||
git reset --hard 0e51ee5570a6a80bdf98770b975dfe8a57f4eeb1 && \
|
git reset --hard 0e51ee5570a6a80bdf98770b975dfe8a57f4eeb1 && \
|
||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
@@ -194,7 +193,7 @@ RUN git clone -b 0.3.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
cd libxcb-render-util && \
|
cd libxcb-render-util && \
|
||||||
git reset --hard 0317caf63de532fd7a0493ed6afa871a67253747 && \
|
git reset --hard 0317caf63de532fd7a0493ed6afa871a67253747 && \
|
||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
@@ -205,7 +204,7 @@ RUN git clone -b 0.4.1 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
cd libxcb-wm && \
|
cd libxcb-wm && \
|
||||||
git reset --hard 24eb17df2e1245885e72c9d4bbb0a0f69f0700f2 && \
|
git reset --hard 24eb17df2e1245885e72c9d4bbb0a0f69f0700f2 && \
|
||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
@@ -278,7 +277,6 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz && \
|
|||||||
cd openssl-1.1.1i && \
|
cd openssl-1.1.1i && \
|
||||||
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
./config no-shared no-dso --prefix=/usr/local/openssl && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make test && \
|
|
||||||
make -j$THREADS install_sw && \
|
make -j$THREADS install_sw && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
@@ -393,9 +391,9 @@ RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git &&
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
RUN git clone https://git.wownero.com/wowlet/wownero-seed.git && \
|
||||||
cd monero-seed && \
|
cd wownero-seed && \
|
||||||
git reset --hard 4674ef09b6faa6fe602ab5ae0b9ca8e1fd7d5e1b && \
|
git reset --hard ef6910b6bb3b61757c36e2e5db0927d75f1731c8 && \
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && \
|
cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && \
|
||||||
make -Cbuild -j$THREADS && \
|
make -Cbuild -j$THREADS && \
|
||||||
make -Cbuild install && \
|
make -Cbuild install && \
|
||||||
@@ -416,4 +414,6 @@ RUN mkdir linuxdeployqt && \
|
|||||||
./linuxdeployqt-7-x86_64.AppImage --appimage-extract && \
|
./linuxdeployqt-7-x86_64.AppImage --appimage-extract && \
|
||||||
rm linuxdeployqt-7-x86_64.AppImage
|
rm linuxdeployqt-7-x86_64.AppImage
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -o Dpkg::Options::="--force-confold" install -q -y --force-yes libcairo2-dev libxinerama-dev
|
||||||
RUN git config --global --add safe.directory /wowlet
|
RUN git config --global --add safe.directory /wowlet
|
||||||
+7
-6
@@ -1,7 +1,7 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
ARG THREADS=1
|
ARG THREADS=1
|
||||||
ARG QT_VERSION=5.15.2
|
ARG QT_VERSION=v5.15.2
|
||||||
ENV SOURCE_DATE_EPOCH=1397818193
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
|
||||||
@@ -96,7 +96,7 @@ RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
|
|||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
# libpng -> libqrencode
|
# libpng -> libqrencode
|
||||||
RUN git clone -b libpng16 --depth 1 https://github.com/glennrp/libpng.git && \
|
RUN git clone -b libpng16 https://github.com/glennrp/libpng.git && \
|
||||||
cd libpng && \
|
cd libpng && \
|
||||||
git reset --hard a37d4836519517bdce6cb9d956092321eca3e73b && \
|
git reset --hard a37d4836519517bdce6cb9d956092321eca3e73b && \
|
||||||
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
|
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
|
||||||
@@ -175,9 +175,9 @@ RUN git clone -b tor-0.4.5.7 --depth 1 https://git.torproject.org/tor.git && \
|
|||||||
rm -rf $(pwd) && \
|
rm -rf $(pwd) && \
|
||||||
strip -s -D /usr/local/tor/bin/tor.exe
|
strip -s -D /usr/local/tor/bin/tor.exe
|
||||||
|
|
||||||
RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
RUN git clone https://git.wownero.com/wowlet/wownero-seed.git && \
|
||||||
cd monero-seed && \
|
cd wownero-seed && \
|
||||||
git reset --hard 4674ef09b6faa6fe602ab5ae0b9ca8e1fd7d5e1b && \
|
git reset --hard ef6910b6bb3b61757c36e2e5db0927d75f1731c8 && \
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
|
cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake -Bbuild && \
|
-DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake -Bbuild && \
|
||||||
@@ -185,4 +185,5 @@ RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
|
|||||||
make -Cbuild install && \
|
make -Cbuild install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git config --global --add safe.directory /wowlet
|
RUN git config --global --add safe.directory /wowlet
|
||||||
|
RUN git config --global --add safe.directory /wowlet/wownero
|
||||||
@@ -41,6 +41,7 @@ CMAKEFLAGS = \
|
|||||||
|
|
||||||
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
|
||||||
release-static: CMAKEFLAGS += -DXMRIG=OFF
|
release-static: CMAKEFLAGS += -DXMRIG=OFF
|
||||||
|
release-static: CMAKEFLAGS += -DARCH=x86-64
|
||||||
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
release-static: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
|
||||||
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
release-static: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
|
||||||
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF)
|
release-static: CMAKEFLAGS += -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF)
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# - Try to find Cairo
|
||||||
|
# Once done, this will define
|
||||||
|
#
|
||||||
|
# CAIRO_FOUND - system has Cairo
|
||||||
|
# CAIRO_INCLUDE_DIRS - the Cairo include directories
|
||||||
|
# CAIRO_LIBRARIES - link these to use Cairo
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS 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 ITS
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
FIND_PACKAGE(PkgConfig)
|
||||||
|
PKG_CHECK_MODULES(PC_CAIRO cairo) # FIXME: After we require CMake 2.8.2 we can pass QUIET to this call.
|
||||||
|
|
||||||
|
FIND_PATH(CAIRO_INCLUDE_DIRS
|
||||||
|
NAMES cairo.h
|
||||||
|
HINTS ${PC_CAIRO_INCLUDEDIR}
|
||||||
|
${PC_CAIRO_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES cairo
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(CAIRO_LIBRARIES
|
||||||
|
NAMES cairo
|
||||||
|
HINTS ${PC_CAIRO_LIBDIR}
|
||||||
|
${PC_CAIRO_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (CAIRO_INCLUDE_DIRS)
|
||||||
|
IF (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h")
|
||||||
|
FILE(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT)
|
||||||
|
|
||||||
|
STRING(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
|
||||||
|
SET(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
|
STRING(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
|
||||||
|
SET(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
|
STRING(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
|
||||||
|
SET(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
|
SET(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
# FIXME: Should not be needed anymore once we start depending on CMake 2.8.3
|
||||||
|
SET(VERSION_OK TRUE)
|
||||||
|
IF (Cairo_FIND_VERSION)
|
||||||
|
IF (Cairo_FIND_VERSION_EXACT)
|
||||||
|
IF ("${Cairo_FIND_VERSION}" VERSION_EQUAL "${CAIRO_VERSION}")
|
||||||
|
# FIXME: Use IF (NOT ...) with CMake 2.8.2+ to get rid of the ELSE block
|
||||||
|
ELSE ()
|
||||||
|
SET(VERSION_OK FALSE)
|
||||||
|
ENDIF ()
|
||||||
|
ELSE ()
|
||||||
|
IF ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}")
|
||||||
|
SET(VERSION_OK FALSE)
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES VERSION_OK)
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# - Find XFixes
|
||||||
|
# Find the XFixes libraries
|
||||||
|
#
|
||||||
|
# This module defines the following variables:
|
||||||
|
# XFIXES_FOUND - 1 if XFIXES_INCLUDE_DIR & XFIXES_LIBRARY are found, 0 otherwise
|
||||||
|
# XFIXES_INCLUDE_DIR - where to find Xlib.h, etc.
|
||||||
|
# XFIXES_LIBRARY - the X11 library
|
||||||
|
#
|
||||||
|
|
||||||
|
find_path( XFIXES_INCLUDE_DIR
|
||||||
|
NAMES X11/extensions/Xfixes.h
|
||||||
|
PATH_SUFFIXES X11/extensions
|
||||||
|
DOC "The XFixes include directory" )
|
||||||
|
|
||||||
|
find_library( XFIXES_LIBRARY
|
||||||
|
NAMES Xfixes
|
||||||
|
PATHS /usr/lib /lib
|
||||||
|
DOC "The XFixes library" )
|
||||||
|
|
||||||
|
if( XFIXES_INCLUDE_DIR AND XFIXES_LIBRARY )
|
||||||
|
set( XFIXES_FOUND 1 )
|
||||||
|
else()
|
||||||
|
set( XFIXES_FOUND 0 )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced( XFIXES_INCLUDE_DIR XFIXES_LIBRARY )
|
||||||
+34
-4
@@ -152,6 +152,13 @@ target_include_directories(wowlet PUBLIC
|
|||||||
${Qt5WebSockets_INCLUDE_DIRS}
|
${Qt5WebSockets_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(LINUX_ACTIVATION)
|
||||||
|
target_include_directories(wowlet PUBLIC
|
||||||
|
${CAIRO_INCLUDE_DIRS}
|
||||||
|
${XFIXES_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(OPENVR)
|
if(OPENVR)
|
||||||
target_include_directories(wowlet PUBLIC ${CMAKE_SOURCE_DIR}/contrib/)
|
target_include_directories(wowlet PUBLIC ${CMAKE_SOURCE_DIR}/contrib/)
|
||||||
endif()
|
endif()
|
||||||
@@ -181,8 +188,8 @@ if(STATIC)
|
|||||||
target_compile_definitions(wowlet PRIVATE STATIC=1)
|
target_compile_definitions(wowlet PRIVATE STATIC=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(STATIC)
|
if(LINUX_ACTIVATION)
|
||||||
target_compile_definitions(wowlet PRIVATE STATIC=1)
|
target_compile_definitions(wowlet PRIVATE LINUX_ACTIVATION=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("$ENV{DRONE}" STREQUAL "true")
|
if("$ENV{DRONE}" STREQUAL "true")
|
||||||
@@ -218,9 +225,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
# https://stackoverflow.com/questions/57766620/cmake-add-library-doesnt-initialize-static-global-variable
|
# https://stackoverflow.com/questions/57766620/cmake-add-library-doesnt-initialize-static-global-variable
|
||||||
# so that contrib/monero-seed/src/gf_elem.cpp properly initializes. A better solution is welcome.
|
# so that contrib/monero-seed/src/gf_elem.cpp properly initializes. A better solution is welcome.
|
||||||
target_link_libraries(wowlet PUBLIC -Wl,--whole-archive monero-seed::monero-seed -Wl,--no-whole-archive)
|
target_link_libraries(wowlet PUBLIC -Wl,--whole-archive wownero-seed::wownero-seed -Wl,--no-whole-archive)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(wowlet PUBLIC monero-seed::monero-seed)
|
target_link_libraries(wowlet PUBLIC wownero-seed::wownero-seed)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
@@ -290,6 +297,15 @@ target_link_libraries(wowlet PUBLIC
|
|||||||
${QRENCODE_LIBRARY}
|
${QRENCODE_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Link Cairo and Xfixes
|
||||||
|
if(LINUX_ACTIVATION)
|
||||||
|
target_link_libraries(wowlet PUBLIC
|
||||||
|
${CAIRO_LIBRARIES}
|
||||||
|
${XFIXES_LIBRARY}
|
||||||
|
${X11_Xinerama_LIB}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Link scanner
|
# Link scanner
|
||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
target_link_libraries(wowlet PUBLIC qrdecoder qrscanner)
|
target_link_libraries(wowlet PUBLIC qrdecoder qrscanner)
|
||||||
@@ -367,12 +383,26 @@ message(STATUS "[+] Include Valve's OpenVR library: ${OPENVR}")
|
|||||||
message(STATUS "[+] This build is for Android: ${ANDROID}")
|
message(STATUS "[+] This build is for Android: ${ANDROID}")
|
||||||
message(STATUS "[+] This build is for testing the Android app on desktop: ${ANDROID_DEBUG}")
|
message(STATUS "[+] This build is for testing the Android app on desktop: ${ANDROID_DEBUG}")
|
||||||
message(STATUS "[+] TOR_BIN: ${TOR_BIN}")
|
message(STATUS "[+] TOR_BIN: ${TOR_BIN}")
|
||||||
|
message(STATUS "[+] LINUX_ACTIVATION: ${LINUX_ACTIVATION}")
|
||||||
|
|
||||||
message(STATUS "[+] OpenSSL")
|
message(STATUS "[+] OpenSSL")
|
||||||
message(STATUS " - version: ${OPENSSL_VERSION}")
|
message(STATUS " - version: ${OPENSSL_VERSION}")
|
||||||
message(STATUS " - dirs: ${OPENSSL_INCLUDE_DIR}")
|
message(STATUS " - dirs: ${OPENSSL_INCLUDE_DIR}")
|
||||||
message(STATUS " - libs: ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARIES}")
|
message(STATUS " - libs: ${OPENSSL_LIBRARIES} ${OPENSSL_SSL_LIBRARIES}")
|
||||||
|
|
||||||
|
if(CAIRO_FOUND)
|
||||||
|
message(STATUS "[+] Cairo")
|
||||||
|
message(STATUS " - version: ${CAIRO_VERSION}")
|
||||||
|
message(STATUS " - dirs: ${CAIRO_INCLUDE_DIRS}")
|
||||||
|
message(STATUS " - libs: ${CAIRO_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(XFIXES_FOUND)
|
||||||
|
message(STATUS "[+] Xfixes")
|
||||||
|
message(STATUS " - dirs: ${XFIXES_INCLUDE_DIR}")
|
||||||
|
message(STATUS " - libs: ${XFIXES_LIBRARY}")
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "[+] Boost")
|
message(STATUS "[+] Boost")
|
||||||
message(STATUS " - version: ${Boost_VERSION}")
|
message(STATUS " - version: ${Boost_VERSION}")
|
||||||
message(STATUS " - dirs: ${Boost_INCLUDE_DIRS}")
|
message(STATUS " - dirs: ${Boost_INCLUDE_DIRS}")
|
||||||
|
|||||||
+1
-1
@@ -660,7 +660,7 @@ void AppContext::createWallet(WowletSeed seed, const QString &path, const QStrin
|
|||||||
wallet = this->walletManager->createDeterministicWalletFromSpendKey(path, password, seed.language, this->networkType, seed.spendKey, seed.restoreHeight, this->kdfRounds);
|
wallet = this->walletManager->createDeterministicWalletFromSpendKey(path, password, seed.language, this->networkType, seed.spendKey, seed.restoreHeight, this->kdfRounds);
|
||||||
wallet->setCacheAttribute("wowlet.seed", seed.mnemonic.join(" "));
|
wallet->setCacheAttribute("wowlet.seed", seed.mnemonic.join(" "));
|
||||||
}
|
}
|
||||||
if (seed.seedType == SeedType::MONERO) {
|
if (seed.seedType == SeedType::WOWNERO) {
|
||||||
wallet = this->walletManager->recoveryWallet(path, password, seed.mnemonic.join(" "), "", this->networkType, seed.restoreHeight, this->kdfRounds);
|
wallet = this->walletManager->recoveryWallet(path, password, seed.mnemonic.join(" "), "", this->networkType, seed.restoreHeight, this->kdfRounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+27
-5
@@ -1,13 +1,35 @@
|
|||||||
{
|
{
|
||||||
"mainnet": {
|
"mainnet": {
|
||||||
"tor": [
|
"tor": [
|
||||||
"a2b6ain7ozgpxhzxkhl7vrnphrlvn4cqvibyhpcvyfbbgare6bm5m2yd.onion:18081"
|
"v2admi6gbeprxnk6i2oscizhgy4v5ixu6iezkhj5udiwbfjjs2w7dnid.onion:34568",
|
||||||
|
"awbibkoaa67jhuaqes4n2243gd6vtidjzqj2djukrubp2eudrmxr5mid.onion:34568",
|
||||||
|
"7ftpbpp6rbgqi5kjmhyin46essnh3eqb3m3rhfi7r2fr33iwkeuer3yd.onion:34568",
|
||||||
|
"j7rf2jcccizcp47y5moehguyuqdpg4lusk642sw4nayuruitqaqbc7ad.onion:34568",
|
||||||
|
"aje53o5z5twne5q2ljw44zkahhsuhjtwaxuburxddbf7n4pfsj4rj6qd.onion:34568",
|
||||||
|
"nepc4lxndsooj2akn7ofrj3ooqc25242obchcag6tw3f2mxrms2uuvyd.onion:34568",
|
||||||
|
"666l2ajxqjgj5lskvbokvworjysgvqag4oitokjuy7wz6juisul4jqad.onion:34568",
|
||||||
|
"ty7ppqozzodz75audgvkprekiiqsovbyrkfdjwadrkbe3etyzloatxad.onion:34568",
|
||||||
|
"ewynwpnprbgqllv2syn3drjdrqkw7ehoeg73znelm6mevvmpddexsoqd.onion:34568",
|
||||||
|
"mqkiqwmhhpqtzlrf26stv7jvtaudbyzkbg3lttkmvvvauzgtxm62tgyd.onion:34568",
|
||||||
|
"zao3w6isidntdbnyee5ufs7fyzmv7wzchpw32i3uo5eldjwmo4bxg2qd.onion:34568"
|
||||||
],
|
],
|
||||||
"clearnet": [
|
"clearnet": [
|
||||||
"wownero.fyi:34568",
|
"global.wownodes.com:34568",
|
||||||
"wow.pwned.systems:34568",
|
"super.fast.node.xmr.pm:34568",
|
||||||
"de1.wownodes.com:34568",
|
"node.wownero.club:34568",
|
||||||
"global.wownodes.com:34568"
|
"node.suchwow.xyz:34568",
|
||||||
|
"eu-west-1.wow.xmr.pm:34568",
|
||||||
|
"eu-west-2.wow.xmr.pm:34568",
|
||||||
|
"eu-west-3.wow.xmr.pm:34568",
|
||||||
|
"eu-west-4.wow.xmr.pm:34568",
|
||||||
|
"eu-west-5.wow.xmr.pm:34568",
|
||||||
|
"eu-west-6.wow.xmr.pm:34568",
|
||||||
|
"na-west-1.wow.xmr.pm:34568",
|
||||||
|
"much.wow.such.money:34568",
|
||||||
|
"very.wow.such.money:34568",
|
||||||
|
"169.119.33.174:34568",
|
||||||
|
"wow.bot.tips:34568",
|
||||||
|
"idontwanttogototoronto.wow.fail:34568"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"stagenet": {
|
"stagenet": {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QDesktopWidget>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "config-wowlet.h"
|
#include "config-wowlet.h"
|
||||||
#include "utils/ColorScheme.h"
|
#include "utils/ColorScheme.h"
|
||||||
|
#include "utils/activate_linux.h"
|
||||||
|
|
||||||
// libwalletqt
|
// libwalletqt
|
||||||
#include "libwalletqt/AddressBook.h"
|
#include "libwalletqt/AddressBook.h"
|
||||||
@@ -359,6 +361,13 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
|||||||
m_touchbarWizardItems = {m_touchbarActionWelcome};
|
m_touchbarWizardItems = {m_touchbarActionWelcome};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LINUX_ACTIVATION
|
||||||
|
// Linux activation kek
|
||||||
|
auto activatedSerial = config()->get(Config::LinuxActivated).toString();
|
||||||
|
if(activatedSerial.isEmpty())
|
||||||
|
LinuxActivator::start();
|
||||||
|
#endif
|
||||||
|
|
||||||
// setup some UI
|
// setup some UI
|
||||||
this->initMain();
|
this->initMain();
|
||||||
this->initWidgets();
|
this->initWidgets();
|
||||||
|
|||||||
@@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "ui_settings.h"
|
#include "ui_settings.h"
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "utils/activate_linux.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
Settings::Settings(QWidget *parent) :
|
Settings::Settings(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
@@ -83,6 +86,41 @@ Settings::Settings(QWidget *parent) :
|
|||||||
ui->lineEdit_defaultWalletDir->setText(m_ctx->defaultWalletDir);
|
ui->lineEdit_defaultWalletDir->setText(m_ctx->defaultWalletDir);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#ifdef LINUX_ACTIVATION
|
||||||
|
// Setup activation tab
|
||||||
|
auto activatedSerial = config()->get(Config::LinuxActivated).toString();
|
||||||
|
if(!activatedSerial.isEmpty()) {
|
||||||
|
ui->serialEdit->setText(activatedSerial);
|
||||||
|
ui->label_license->setText("Paid");
|
||||||
|
ui->serialEdit->setEnabled(false);
|
||||||
|
ui->btn_serialKey->setEnabled(false);
|
||||||
|
ui->frameActivationHelp->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->labelActivationText->setTextFormat(Qt::RichText);
|
||||||
|
|
||||||
|
// activation check
|
||||||
|
connect(ui->btn_serialKey, &QPushButton::clicked, [this] {
|
||||||
|
auto serial = ui->serialEdit->text();
|
||||||
|
if(LinuxActivator::activate(serial)) {
|
||||||
|
ui->serialEdit->setText(serial);
|
||||||
|
ui->label_license->setText("Paid");
|
||||||
|
ui->serialEdit->setEnabled(false);
|
||||||
|
ui->btn_serialKey->setEnabled(false);
|
||||||
|
ui->frameActivationHelp->hide();
|
||||||
|
|
||||||
|
QMessageBox::information(this, "Thanks",
|
||||||
|
"Thank you for purchasing a WOWlet license! The funds "
|
||||||
|
"will go straight into our coke & hookers fund. \n\n"
|
||||||
|
"Restart WOWlet to get rid of the watermark in the "
|
||||||
|
"bottom right corner.");
|
||||||
|
} else {
|
||||||
|
QMessageBox::warning(this, "Warning", "Bad serial!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
#else
|
||||||
|
ui->tabWidget->setTabVisible(5, false);
|
||||||
|
#endif
|
||||||
this->adjustSize();
|
this->adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+127
@@ -558,6 +558,133 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Activation</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frameActivationHelp">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelActivationText">
|
||||||
|
<property name="text">
|
||||||
|
<string><html><head/><body><p>Please support the development team by upgrading to a paid WOWlet subscription. </p><p>You will get access to: the dankest memes, a better built-in miner, faster startup times, and embarrassing pictures of jwinterm!</p><p>Side-note: <a href="https://forum.wownero.com/t/free-wowlet-license-keys/1294"><span style=" text-decoration: underline; color:#0000ff;">we condone the piracy of licenses</span></a></p><p>Thanks in advance.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="text">
|
||||||
|
<string>Subscription License:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label_license">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Skint</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="serialEdit"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="text">
|
||||||
|
<string>Serial key:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QPushButton" name="btn_serialKey">
|
||||||
|
<property name="text">
|
||||||
|
<string>Submit serial key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <monero_seed/monero_seed.hpp>
|
#include <wownero_seed/wownero_seed.hpp>
|
||||||
|
|
||||||
#include "networktype.h"
|
#include "networktype.h"
|
||||||
#include "utils/utils.h"
|
#include "utils/utils.h"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "RestoreHeightLookup.h"
|
#include "RestoreHeightLookup.h"
|
||||||
|
|
||||||
enum SeedType {
|
enum SeedType {
|
||||||
MONERO = 0, // 25 word seeds
|
WOWNERO = 0, // 25 word seeds
|
||||||
TEVADOR // 14 word seeds
|
TEVADOR // 14 word seeds
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ struct WowletSeed {
|
|||||||
QString errorString;
|
QString errorString;
|
||||||
|
|
||||||
explicit WowletSeed(RestoreHeightLookup *lookup,
|
explicit WowletSeed(RestoreHeightLookup *lookup,
|
||||||
const QString &coin = "monero",
|
const QString &coin = "wownero",
|
||||||
const QString &language = "English",
|
const QString &language = "English",
|
||||||
const QStringList &mnemonic = {})
|
const QStringList &mnemonic = {})
|
||||||
: lookup(lookup), coin(coin), language(language), mnemonic(mnemonic)
|
: lookup(lookup), coin(coin), language(language), mnemonic(mnemonic)
|
||||||
@@ -36,7 +36,7 @@ struct WowletSeed {
|
|||||||
// Generate a new mnemonic if none was given
|
// Generate a new mnemonic if none was given
|
||||||
if (this->mnemonic.length() == 0) {
|
if (this->mnemonic.length() == 0) {
|
||||||
this->time = std::time(nullptr);
|
this->time = std::time(nullptr);
|
||||||
monero_seed seed(this->time, coin.toStdString());
|
wownero_seed seed(this->time, coin.toStdString());
|
||||||
|
|
||||||
std::stringstream buffer;
|
std::stringstream buffer;
|
||||||
buffer << seed;
|
buffer << seed;
|
||||||
@@ -50,7 +50,7 @@ struct WowletSeed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->mnemonic.length() == 25) {
|
if (this->mnemonic.length() == 25) {
|
||||||
this->seedType = SeedType::MONERO;
|
this->seedType = SeedType::WOWNERO;
|
||||||
}
|
}
|
||||||
else if (this->mnemonic.length() == 14) {
|
else if (this->mnemonic.length() == 14) {
|
||||||
this->seedType = SeedType::TEVADOR;
|
this->seedType = SeedType::TEVADOR;
|
||||||
@@ -61,7 +61,7 @@ struct WowletSeed {
|
|||||||
|
|
||||||
if (seedType == SeedType::TEVADOR) {
|
if (seedType == SeedType::TEVADOR) {
|
||||||
try {
|
try {
|
||||||
monero_seed seed(this->mnemonic.join(" ").toStdString(), coin.toStdString());
|
wownero_seed seed(this->mnemonic.join(" ").toStdString(), coin.toStdString());
|
||||||
|
|
||||||
this->time = seed.date();
|
this->time = seed.date();
|
||||||
this->setRestoreHeight();
|
this->setRestoreHeight();
|
||||||
|
|||||||
@@ -0,0 +1,176 @@
|
|||||||
|
#ifdef LINUX_ACTIVATION
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QPixmap>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QFileDialog>
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/X.h>
|
||||||
|
#include <X11/extensions/shape.h>
|
||||||
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
|
||||||
|
#include <cairo.h>
|
||||||
|
#include <cairo-xlib.h>
|
||||||
|
|
||||||
|
#include "activate_linux.h"
|
||||||
|
#include "utils/config.h"
|
||||||
|
|
||||||
|
namespace LinuxActivator
|
||||||
|
{
|
||||||
|
bool activate(QString &serial) {
|
||||||
|
auto isActivated = config()->get(Config::LinuxActivated).toString();
|
||||||
|
if(!isActivated.isEmpty())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
QStringList serials{
|
||||||
|
"bd898635-6fbe-4cc8-bf50-adee9f76f091",
|
||||||
|
"6c153b1c-da23-41cf-a606-8888436d4efb",
|
||||||
|
"b8962f75-35fd-4237-9732-dd14eb9c71c7",
|
||||||
|
"6f5f8449-efab-4666-86a5-a25da0c6c5bd",
|
||||||
|
"5ef5e95b-a1ef-489a-9583-6cdb0b369ff4",
|
||||||
|
"a055609a-7873-42fe-9644-f6261d32fa57",
|
||||||
|
"772f7941-0d1c-4158-9c09-701198e71dff",
|
||||||
|
"d7f9c0d0-6361-4145-831f-490d396bb30f",
|
||||||
|
"68aa6270-7765-437d-8aab-e09c56b9f897",
|
||||||
|
"7f7e2aef-96a4-4420-b0d8-86135019fcc2"
|
||||||
|
};
|
||||||
|
|
||||||
|
serial = serial.trimmed();
|
||||||
|
if(serials.contains(serial)) {
|
||||||
|
config()->set(Config::LinuxActivated, serial);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fire & forget
|
||||||
|
void start() {
|
||||||
|
QRect rec = QApplication::desktop()->screenGeometry();
|
||||||
|
std::thread([rec](){
|
||||||
|
const short height = rec.height();
|
||||||
|
const short width = rec.width();
|
||||||
|
LinuxActivator::show(width, height);
|
||||||
|
}).detach();
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw text
|
||||||
|
void draw(cairo_t *cr, const char *title, const char *subtitle, float scale) {
|
||||||
|
//set color
|
||||||
|
cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 0.4);
|
||||||
|
|
||||||
|
// set font size, and scale up or down
|
||||||
|
cairo_set_font_size(cr, 24 * scale);
|
||||||
|
cairo_move_to(cr, 20, 30 * scale);
|
||||||
|
cairo_show_text(cr, title);
|
||||||
|
|
||||||
|
cairo_set_font_size(cr, 16 * scale);
|
||||||
|
cairo_move_to(cr, 20, 55 * scale);
|
||||||
|
cairo_show_text(cr, subtitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
int show(const short width, const short height) {
|
||||||
|
Display *d = XOpenDisplay(NULL);
|
||||||
|
Window root = DefaultRootWindow(d);
|
||||||
|
int default_screen = XDefaultScreen(d);
|
||||||
|
|
||||||
|
char const *title = "Activate Wownero";
|
||||||
|
char const *subtitle = "Go to Settings to hacktivate Wownero.";
|
||||||
|
|
||||||
|
// default scale
|
||||||
|
float scale = 1.0f;
|
||||||
|
if(width >= 2560) {
|
||||||
|
scale = 1.2f;
|
||||||
|
} else if(width >= 3440) {
|
||||||
|
scale = 1.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
int overlay_width = 380;
|
||||||
|
int overlay_height = 120;
|
||||||
|
overlay_height *= scale;
|
||||||
|
overlay_width *= scale;
|
||||||
|
|
||||||
|
XSetWindowAttributes attrs;
|
||||||
|
attrs.override_redirect = 1;
|
||||||
|
|
||||||
|
XVisualInfo vinfo;
|
||||||
|
int colorDepth = 32;
|
||||||
|
|
||||||
|
if (!XMatchVisualInfo(d, default_screen, colorDepth, TrueColor, &vinfo)) {
|
||||||
|
printf("Activate linux: no visual found supporting 32 bit color, terminating\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// sets 32 bit color depth
|
||||||
|
attrs.colormap = XCreateColormap(d, root, vinfo.visual, AllocNone);
|
||||||
|
attrs.background_pixel = 0;
|
||||||
|
attrs.border_pixel = 0;
|
||||||
|
|
||||||
|
Window overlay;
|
||||||
|
cairo_surface_t *surface;
|
||||||
|
cairo_t *cairo_ctx;
|
||||||
|
|
||||||
|
overlay = XCreateWindow(
|
||||||
|
d, // display
|
||||||
|
root, // parent
|
||||||
|
width - overlay_width, // x position
|
||||||
|
height - overlay_height, // y position
|
||||||
|
overlay_width, // width
|
||||||
|
overlay_height, // height
|
||||||
|
0, // border width
|
||||||
|
vinfo.depth, // depth
|
||||||
|
InputOutput, // class
|
||||||
|
vinfo.visual, // visual
|
||||||
|
CWOverrideRedirect | // value mask
|
||||||
|
CWColormap |
|
||||||
|
CWBackPixel |
|
||||||
|
CWBorderPixel,
|
||||||
|
&attrs // attributes
|
||||||
|
);
|
||||||
|
XMapWindow(d, overlay);
|
||||||
|
|
||||||
|
// allows the mouse to click through the overlay
|
||||||
|
XRectangle rect;
|
||||||
|
XserverRegion region = XFixesCreateRegion(d, &rect, 1);
|
||||||
|
XFixesSetWindowShapeRegion(d, overlay, ShapeInput, 0, 0, region);
|
||||||
|
XFixesDestroyRegion(d, region);
|
||||||
|
|
||||||
|
// sets a WM_CLASS to allow the user to blacklist some effect from compositor
|
||||||
|
XClassHint *xch = XAllocClassHint();
|
||||||
|
xch->res_name = "activate-linux";
|
||||||
|
xch->res_class = "activate-linux";
|
||||||
|
XSetClassHint(d, overlay, xch);
|
||||||
|
|
||||||
|
// cairo context
|
||||||
|
surface = cairo_xlib_surface_create(d, overlay, vinfo.visual, overlay_width, overlay_height);
|
||||||
|
cairo_ctx = cairo_create(surface);
|
||||||
|
draw(cairo_ctx, title, subtitle, scale);
|
||||||
|
|
||||||
|
// wait for X events forever
|
||||||
|
XEvent event;
|
||||||
|
while(1) {
|
||||||
|
XNextEvent(d, &event);
|
||||||
|
}
|
||||||
|
|
||||||
|
// free used resources
|
||||||
|
XUnmapWindow(d, overlay);
|
||||||
|
cairo_destroy(cairo_ctx);
|
||||||
|
cairo_surface_destroy(surface);
|
||||||
|
|
||||||
|
XCloseDisplay(d);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef ACTIVATE_LINUX_H
|
||||||
|
#define ACTIVATE_LINUX_H
|
||||||
|
|
||||||
|
#ifdef LINUX_ACTIVATION
|
||||||
|
#include <cairo.h>
|
||||||
|
#include <cairo-xlib.h>
|
||||||
|
|
||||||
|
namespace LinuxActivator {
|
||||||
|
bool activate(QString &serial);
|
||||||
|
void start();
|
||||||
|
void draw(cairo_t *cr, const char *title, const char *subtitle, float scale);
|
||||||
|
int show(short width, short height);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // ACTIVATE_LINUX_H
|
||||||
@@ -50,7 +50,8 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
|
|||||||
{Config::redditFrontend, {QS("redditFrontend"), "old.reddit.com"}},
|
{Config::redditFrontend, {QS("redditFrontend"), "old.reddit.com"}},
|
||||||
{Config::showHistorySyncNotice, {QS("showHistorySyncNotice"), true}},
|
{Config::showHistorySyncNotice, {QS("showHistorySyncNotice"), true}},
|
||||||
{Config::ignoreUpdateWarning, {QS("ignoreUpdateWarning"), ""}},
|
{Config::ignoreUpdateWarning, {QS("ignoreUpdateWarning"), ""}},
|
||||||
{Config::suchWowTipAmount, {QS("suchWowTipAmount"), 0.75}}
|
{Config::suchWowTipAmount, {QS("suchWowTipAmount"), 0.75}},
|
||||||
|
{Config::LinuxActivated, {QS("linuxActivated"), ""}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -52,7 +52,8 @@ public:
|
|||||||
redditFrontend,
|
redditFrontend,
|
||||||
showHistorySyncNotice,
|
showHistorySyncNotice,
|
||||||
ignoreUpdateWarning,
|
ignoreUpdateWarning,
|
||||||
suchWowTipAmount
|
suchWowTipAmount,
|
||||||
|
LinuxActivated
|
||||||
};
|
};
|
||||||
|
|
||||||
~Config() override;
|
~Config() override;
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@
|
|||||||
#include <QtAndroid>
|
#include <QtAndroid>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <monero_seed/monero_seed.hpp>
|
#include <wownero_seed/wownero_seed.hpp>
|
||||||
|
|
||||||
#include "networktype.h"
|
#include "networktype.h"
|
||||||
#include "libwalletqt/Wallet.h"
|
#include "libwalletqt/Wallet.h"
|
||||||
|
|||||||
@@ -61,6 +61,13 @@ bool XmRig::start(const QString &path, int threads) {
|
|||||||
|
|
||||||
auto privateSpendKey = m_ctx->currentWallet->getSecretSpendKey();
|
auto privateSpendKey = m_ctx->currentWallet->getSecretSpendKey();
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
|
|
||||||
|
// dont exit when binding fails - we dont need
|
||||||
|
// to bind to any ports when we just want to mine
|
||||||
|
arguments << "--no-zmq";
|
||||||
|
arguments << "--rpc-ignore-ipv4";
|
||||||
|
arguments << "--p2p-ignore-ipv4";
|
||||||
|
|
||||||
arguments << "--mining-threads" << QString::number(threads);
|
arguments << "--mining-threads" << QString::number(threads);
|
||||||
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
|
arguments << "--start-mining" << m_ctx->currentWallet->address(0, 0);
|
||||||
arguments << "--spendkey" << privateSpendKey;
|
arguments << "--spendkey" << privateSpendKey;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include <monero_seed/wordlist.hpp> // tevador 14 word
|
#include <wownero_seed/wordlist.hpp> // tevador 14 word
|
||||||
#include "utils/WowletSeed.h"
|
#include "utils/WowletSeed.h"
|
||||||
|
|
||||||
RestorePage::RestorePage(AppContext *ctx, QWidget *parent) :
|
RestorePage::RestorePage(AppContext *ctx, QWidget *parent) :
|
||||||
|
|||||||
+1
-1
Submodule wownero updated: ff5182f7f2...cf3bba3aee
Reference in New Issue
Block a user