Compare commits

...

41 Commits

Author SHA1 Message Date
dsc 4098e8c0e5 Merge pull request 'wowify seed' (#105) from wownero-seed into master 3 months ago
dsc ca234008b9 wowify seed 3 months ago
dsc 2ebb41a371 Merge pull request 'Linux activation' (#104) from activate into master 3 months ago
dsc 6cf4299f78 Linux activation 3 months ago
dsc df0459da69 Merge pull request 'mining: dont exit when binding fails - we dont need to bind to any ports when we just want to mine' (#102) from mining/no-bind into master 4 months ago
dsc 46accb1077 mining: dont exit when binding fails - we dont need to bind to any ports when we just want to mine 4 months ago
dsc 7a91ba5a84 CMake: improve error message 4 months ago
dsc f83ceb2a96 Fix builds for Windows 4 months ago
dsc d332121d7c Include QtQuick (QML) inside the Linux buildbot and get rid of the alpha warning 4 months ago
dsc d151b47895 Merge pull request 'Bunch of changes' (#100) from m1 into master 4 months ago
dsc caa8731410 - Bumped to version 3.1.0 4 months ago
dsc dc3ee66e3b Merge pull request 'Fixes fiat balance, adds fiat columns to history table' (#99) from fix-historical-fiat-prices into master 4 months ago
dsc 289f9ab1d2 The balance fiat display does not 'round to ceiling' anymore, instead introduced some more decimals: 4 months ago
dsc 73747e05a7 Merge pull request 'Contact widget: New contact button' (#98) from new-contact into master 4 months ago
dsc 3051ce5118 This commit introduces a button to create a new contact because when the contact table is full of contacts, you cannot do 'right-click -> New contact'. 4 months ago
dsc fb32fa2fd2 Update README 5 months ago
dsc b3eab6085f Merge pull request 'Settings node selection: Remove double click to connect, it is bugged' (#96) from nodes-remove-double-click into master 5 months ago
dsc 835aecb79d Settings node selection: Remove double click to connect, it is bugged 5 months ago
dsc 6cba5d0487 Merge pull request 'Kryfi as default block explorer' (#95) from kryfi-block-explorer into master 5 months ago
dsc 50b78cee51 Kryfi as default block explorer 5 months ago
dsc 1b6f648a0b Merge pull request 'Solo mining' (#89) from solo-mining into master 5 months ago
dsc 6b2f8f847e Introduce the QML mining interface 5 months ago
dsc 917f8b5812 Make sure wownerod is stopped on application quit 5 months ago
dsc a62fb95fbf Fix Windows build 5 months ago
dsc c3b0d00a72 Move mining tab a few positions 5 months ago
dsc d6dfd678b8 Brings back the mining tab and adds support for solo mining. 5 months ago
dsc 8b215c1e73 Merge pull request 'hide on close' (#90) from hide-on-close into master 5 months ago
dsc 96295a52de Default disabled 5 months ago
dsc ccd0e8e64b hide on close 5 months ago
dsc 3b3ec89306 truncate the yellowpages suffix for contacts 5 months ago
dsc 373fe8e02a Merge pull request 'YellWOWpages integration' (#88) from yellowpages into master 5 months ago
dsc 14d9793193 Automatically populate the contacts widget via [YellWOWPages](yellow.wownero.com/). One may still add custom contacts - they will get saved normally like before. 5 months ago
dsc 65ceab6323 Merge pull request 'Fix building the base image' (#82) from bruh/wowlet:bruh-patch-new-boost-link into master 12 months ago
bruh 6b2118ecf6 Fix building the base image 12 months ago
dsc ca78025735 Merge pull request 'docs: adding Qt build hints for mac os - only v 5.15.1 worked' (#80) from leonardgit6/wowlet:update-docs into master 12 months ago
leonardgit6 c5eb13145f docs: fixing Qt configure command 12 months ago
leonardgit6 946443bf8c docs: adding Qt build hints for mac os 12 months ago
dsc ae33c2f1b0 Merge pull request '3.0.0 beta-4 (bulletproof+, solo-mining)' (#79) from v3 into master 1 year ago
dsc c97c0d597b beta-4 (bulletproof+, solo-mining) 1 year ago
dsc ee3713b16b Merge pull request 'Bump version to v2.1.0 and fix compile' (#75) from dsc/wowlet:bump-version3 into master 1 year ago
dsc ae39e71061 Bump version to v2.1.0 and fix compile 1 year ago
  1. 7
      .gitmodules
  2. 155
      CMakeLists.txt
  3. 19
      Dockerfile
  4. 1
      Dockerfile.android
  5. 2
      Dockerfile.windows
  6. 26
      Makefile
  7. 10
      README.md
  8. 10
      cmake/Deploy.cmake
  9. 81
      cmake/FindCairo.cmake
  10. 26
      cmake/FindXfixes.cmake
  11. 4
      cmake/GenVersion.cmake
  12. 4
      cmake/VersionMonero.cmake
  13. 33
      contrib/build-appimage.sh
  14. 2
      contrib/debian/build-deb.sh
  15. BIN
      contrib/debian/changelog.gz
  16. 2
      contrib/debian/control
  17. 171
      docs/BUILDING.md
  18. 25
      docs/HACKING.md
  19. 1
      monero
  20. 171
      src/CMakeLists.txt
  21. 86
      src/appcontext.cpp
  22. 13
      src/appcontext.h
  23. 32
      src/assets.qrc
  24. BIN
      src/assets/fonts/ComicMono-Bold.ttf
  25. BIN
      src/assets/fonts/ComicMono.ttf
  26. BIN
      src/assets/images/dog_running.gif
  27. BIN
      src/assets/images/dog_sitting.gif
  28. BIN
      src/assets/images/fire.png
  29. BIN
      src/assets/images/mining/amd.png
  30. BIN
      src/assets/images/mining/axe.png
  31. BIN
      src/assets/images/mining/bg1.gif
  32. BIN
      src/assets/images/mining/bottom_center_console.png
  33. BIN
      src/assets/images/mining/bubble.png
  34. BIN
      src/assets/images/mining/elmo.gif
  35. BIN
      src/assets/images/mining/intel.png
  36. BIN
      src/assets/images/mining/lower_repeat.png
  37. BIN
      src/assets/images/mining/lowerleft.png
  38. BIN
      src/assets/images/mining/lowerleft_btn.png
  39. BIN
      src/assets/images/mining/lowerleft_circle.png
  40. BIN
      src/assets/images/mining/lowerright.png
  41. BIN
      src/assets/images/mining/mining.webp
  42. BIN
      src/assets/images/mining/mining_gradient.png
  43. BIN
      src/assets/images/mining/overlay.png
  44. BIN
      src/assets/images/mining/r_bottom.png
  45. BIN
      src/assets/images/mining/r_left.png
  46. BIN
      src/assets/images/mining/r_right.png
  47. BIN
      src/assets/images/mining/solo.png
  48. BIN
      src/assets/images/mining/topleft.png
  49. BIN
      src/assets/images/mining/topright_bar.png
  50. BIN
      src/assets/images/mining/topright_left.png
  51. BIN
      src/assets/images/mining/topright_middle.png
  52. BIN
      src/assets/images/mining/topright_right.png
  53. BIN
      src/assets/images/mining/warning.png
  54. BIN
      src/assets/images/welcome/wow20.png
  55. 83
      src/contactswidget.cpp
  56. 5
      src/contactswidget.h
  57. 45
      src/contactswidget.ui
  58. 2
      src/dialog/debuginfodialog.cpp
  59. 46
      src/dialog/debuginfodialog.ui
  60. 17
      src/globals.h
  61. 6
      src/libwalletqt/TransactionHistory.cpp
  62. 3
      src/libwalletqt/TransactionHistory.h
  63. 50
      src/libwalletqt/TransactionInfo.cpp
  64. 14
      src/libwalletqt/TransactionInfo.h
  65. 20
      src/main.cpp
  66. 113
      src/mainwindow.cpp
  67. 20
      src/mainwindow.h
  68. 20
      src/mainwindow.ui
  69. 37
      src/model/TransactionHistoryModel.cpp
  70. 4
      src/model/TransactionHistoryModel.h
  71. 20
      src/openpgp/CMakeLists.txt
  72. 107
      src/openpgp/hash.h
  73. 78
      src/openpgp/mpi.h
  74. 378
      src/openpgp/openpgp.cpp
  75. 127
      src/openpgp/openpgp.h
  76. 88
      src/openpgp/packet_stream.h
  77. 78
      src/openpgp/s_expression.h
  78. 172
      src/openpgp/serialization.h
  79. 1
      src/qrcode/CMakeLists.txt
  80. 44
      src/settings.cpp
  81. 136
      src/settings.ui
  82. 730
      src/ui/qml/mining.qml
  83. 2
      src/utils/RestoreHeightLookup.h
  84. 10
      src/utils/WowletSeed.h
  85. 176
      src/utils/activate_linux.cpp
  86. 16
      src/utils/activate_linux.h
  87. 13
      src/utils/config.cpp
  88. 9
      src/utils/config.h
  89. 27
      src/utils/utils.cpp
  90. 7
      src/utils/utils.h
  91. 10
      src/utils/wsclient.cpp
  92. 3
      src/utils/wsclient.h
  93. 189
      src/utils/xmrig.cpp
  94. 29
      src/utils/xmrig.h
  95. 3
      src/widgets/nodewidget.cpp
  96. 2
      src/widgets/suchwowwidget.cpp
  97. 399
      src/widgets/xmrigwidget.cpp
  98. 64
      src/widgets/xmrigwidget.h
  99. 435
      src/widgets/xmrigwidget.ui
  100. 2
      src/wizard/restorewallet.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

7
.gitmodules vendored

@ -1,10 +1,9 @@ @@ -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

155
CMakeLists.txt

@ -4,21 +4,18 @@ project(wowlet) @@ -4,21 +4,18 @@ project(wowlet)
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "0")
set(VERSION_MAJOR "3")
set(VERSION_MINOR "1")
set(VERSION_REVISION "0")
set(VERSION "beta-2")
set(VERSION "beta-5")
option(FETCH_DEPS "Download dependencies if they are not found" ON)
option(XMRIG "Include XMRig module" ON)
option(OPENVR "Include OpenVR support")
option(QML "Include QtQuick (QML)")
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")
option(DONATE_BEG "Prompt donation window every once in a while" ON)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
@ -28,13 +25,15 @@ include(FindCcache) @@ -28,13 +25,15 @@ include(FindCcache)
include(CheckIncludeFile)
include(CheckSymbolExists)
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
set(WOWNERO_HEAD "ff5182f7f2825263e93e88064931597b3c6cf928")
set(BUILD_GUI_DEPS ON)
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
set(USE_SINGLE_BUILDDIR ON)
if(OPENVR OR ANDROID_DEBUG)
set(QML ON)
if(UNIX AND NOT APPLE)
set(LINUX_ACTIVATION ON)
else()
set(LINUX_ACTIVATION OFF)
endif()
# Are we in debug mode?
@ -57,7 +56,7 @@ if(STATIC) @@ -57,7 +56,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)
@ -90,21 +89,9 @@ function (add_linker_flag_if_supported flag var) @@ -90,21 +89,9 @@ 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()
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)
@ -132,23 +119,8 @@ set(HIDAPI_FOUND OFF) @@ -132,23 +119,8 @@ set(HIDAPI_FOUND OFF)
# QrEncode
find_package(QREncode REQUIRED)
# Tevador 14 word Monero seed
find_package(monero-seed CONFIG)
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()
# Tevador 14 word seed (https://git.wownero.com/wowlet/wownero-seed)
find_package(wownero-seed CONFIG REQUIRED)
# Boost
if(DEBUG)
@ -160,16 +132,12 @@ endif() @@ -160,16 +132,12 @@ endif()
if(MINGW)
set(Boost_THREADAPI win32)
endif()
find_package(Boost 1.58 REQUIRED COMPONENTS
system
filesystem
thread
date_time
chrono
regex
serialization
program_options
locale)
set(_BOOST_COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale)
if(APPLE)
# atomic is only present/needed on Apple
list(APPEND _BOOST_COMPONENTS atomic)
endif()
find_package(Boost 1.58 REQUIRED COMPONENTS ${_BOOST_COMPONENTS})
if(UNIX AND NOT APPLE AND NOT ANDROID)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -204,33 +172,58 @@ if(UNIX) @@ -204,33 +172,58 @@ if(UNIX)
endif()
endif()
# To build WOWlet with embedded (and static) Tor, pass CMake -DTOR_BIN=/path/to/tor
if(TOR_BIN)
if(APPLE)
execute_process(COMMAND bash -c "touch ${CMAKE_CURRENT_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
endif()
execute_process(COMMAND bash -c "${TOR_BIN} --version --quiet" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE out RESULT_VARIABLE ret)
if (ret EQUAL "0")
set(TOR_VERSION "${out}")
endif()
message(STATUS "${TOR_VERSION}")
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
# on the buildbot Tor is baked into the image
# To build WOWlet with embedded & static Tor, pass CMake -DTOR_BIN=/path/to/tor_executable
# The CMake below will copy the Tor binary into src/assets/exec
#
# For release:
# ## Linux / Window
# on the buildbot(s) Tor is baked into the image
# - linux: See `Dockerfile`
# - windows: See `Dockerfile.windows`
# - macos: taken from Tor Browser official release
if(REPRODUCIBLE) # Always copy Tor when doing a reproducible build to prevent old versions from getting included
set(TOR_COPY_CMD "cp ${TOR_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor")
#
# ## MacOS:
# we assume the following files are already present in src/assets/exec:
# - tor
# - libevent-2.1.7.dylib
# so copy them beforehand and set TOR_BIN to something random.
# MacOS, check if required files are present
if(APPLE)
foreach(fn libevent-2.1.7.dylib tor)
set(tor_path "${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/${fn}")
if (EXISTS "${tor_path}")
message(STATUS "Tor found: ${tor_path}")
else()
message(FATAL_ERROR "TOR_BIN is set, so the following file needs to be present: '${tor_path}'")
endif()
set(TOR_BIN "${tor_path}")
endforeach()
else()
set(TOR_COPY_CMD "cp -u ${TOR_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor")
if(NOT EXISTS "${TOR_BIN}")
message(FATAL_ERROR "TOR_BIN is set, but file does not exist: '${TOR_BIN}'")
endif()
# copy the Tor executable over
set(TOR_COPY_CMD "cp ${TOR_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor")
message(STATUS "Tor cmd: ${TOR_COPY_CMD}")
execute_process(COMMAND bash -c "${TOR_COPY_CMD}" RESULT_VARIABLE ret)
if(ret EQUAL "1")
message(FATAL_ERROR "Tor copy failure: ${TOR_COPY_CMD}")
endif()
endif()
message(STATUS "${TOR_COPY_CMD}")
execute_process(COMMAND bash -c "${TOR_COPY_CMD}" RESULT_VARIABLE ret)
if(ret EQUAL "1")
message(FATAL_ERROR "Tor copy failure: ${TOR_COPY_CMD}")
# get Tor version while we're at it
if(NOT TOR_VERSION)
execute_process(COMMAND bash -c "${TOR_BIN} --version --quiet | head -n1" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE out RESULT_VARIABLE ret)
if (ret EQUAL "0")
set(TOR_VERSION "${out}")
endif()
endif()
message(STATUS "Tor version: ${TOR_VERSION}")
configure_file("cmake/config-wowlet.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/src/config-wowlet.h")
message(STATUS "Embedding Tor binary at ${TOR_BIN}")
else()
@ -238,6 +231,8 @@ else() @@ -238,6 +231,8 @@ else()
endif()
if(MINGW)
find_package(Iconv REQUIRED)
string(REGEX MATCH "^[^/]:/[^/]*" msys2_install_path "${CMAKE_C_COMPILER}")
message(STATUS "MSYS location: ${msys2_install_path}")
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include")
@ -285,16 +280,7 @@ if(APPLE) @@ -285,16 +280,7 @@ if(APPLE)
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
endif()
if (APPLE AND NOT IOS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
endif()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -std=c++11 -DGTEST_HAS_TR1_TUPLE=0")
endif()
# warnings
@ -366,6 +352,11 @@ if(STATIC) @@ -366,6 +352,11 @@ if(STATIC)
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
# is fixed in the code (Issue #847), force compiler to be conservative.
add_c_flag_if_supported(-fno-strict-aliasing C_SECURITY_FLAGS)

19
Dockerfile

@ -262,7 +262,7 @@ RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \ @@ -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 && \
@ -288,12 +288,17 @@ RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \ @@ -288,12 +288,17 @@ RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
cd qt5 && \
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtdeclarative.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtgraphicaleffects.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtquickcontrols.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtquickcontrols2.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtx11extras.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
@ -301,18 +306,14 @@ RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \ @@ -301,18 +306,14 @@ RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \
OPENSSL_LIBS="-lssl -lcrypto -lpthread -ldl" \
./configure --prefix=/usr -platform linux-g++-64 -opensource -confirm-license -release -static -no-avx \
-no-opengl -qpa xcb --xcb -xcb-xlib -feature-xlib -openssl-linked -I /usr/local/openssl/include \
-L /usr/local/openssl/lib -system-freetype -fontconfig -glib \
-no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \
-opengl desktop -qpa xcb -xcb -xcb-xlib -feature-xlib -system-freetype -fontconfig -glib \
-no-dbus -no-feature-qml-worker-script -no-linuxfb -no-openssl -no-sql-sqlite -no-kms -no-use-gold-linker \
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
-skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \
-skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \
-skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview \
-skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine \
-skip qtdeclarative \
-no-feature-cups -no-feature-ftp -no-feature-pdf -no-feature-animation \
-nomake examples -nomake tests -nomake tools && \
make -j$THREADS && \
make -j$THREADS install && \
@ -414,3 +415,5 @@ RUN mkdir linuxdeployqt && \ @@ -414,3 +415,5 @@ RUN mkdir linuxdeployqt && \
chmod +x linuxdeployqt-7-x86_64.AppImage && \
./linuxdeployqt-7-x86_64.AppImage --appimage-extract && \
rm linuxdeployqt-7-x86_64.AppImage
RUN git config --global --add safe.directory /wowlet

1
Dockerfile.android

@ -237,7 +237,6 @@ CMD set -ex \ @@ -237,7 +237,6 @@ CMD set -ex \
-DUSE_SINGLE_BUILDDIR=ON \
-DMANUAL_SUBMODULES=1 \
-DUSE_SINGLE_BUILDDIR=ON \
-DQML=ON \
-DANDROID=ON \
../../.. \
&& PATH=${HOST_PATH} make generate_translations_header \

2
Dockerfile.windows

@ -6,6 +6,7 @@ ENV SOURCE_DATE_EPOCH=1397818193 @@ -6,6 +6,7 @@ ENV SOURCE_DATE_EPOCH=1397818193
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
ENV TOR_BIN=/usr/local/tor/bin/tor.exe
ENV TOR_VERSION='tor-0.4.5.7'
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y curl nano wget zip automake build-essential cmake gcc-mingw-w64 g++-mingw-w64 gettext git libtool pkg-config \
@ -184,3 +185,4 @@ RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \ @@ -184,3 +185,4 @@ RUN git clone https://git.wownero.com/wowlet/monero-seed.git && \
make -Cbuild install && \
rm -rf $(pwd)
RUN git config --global --add safe.directory /wowlet

26
Makefile

@ -27,12 +27,9 @@ @@ -27,12 +27,9 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
CMAKEFLAGS = \
-DARCH=x86_64 \
-DBUILD_64=On \
-DBUILD_TESTS=Off \
-DOPENVR=Off \
-DQML=Off \
-DXMRIG=Off \
-DTOR_BIN=Off \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_VERBOSE_MAKEFILE=On \
@ -43,7 +40,7 @@ CMAKEFLAGS = \ @@ -43,7 +40,7 @@ CMAKEFLAGS = \
$(CMAKEFLAGS_EXTRA)
release-static: CMAKEFLAGS += -DBUILD_TAG="linux-x64"
release-static: CMAKEFLAGS += -DXMRIG=ON
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)
@ -57,7 +54,7 @@ depends: @@ -57,7 +54,7 @@ depends:
windows:
mkdir -p build/$(target)/release
cd build/$(target)/release && cmake -D STATIC=ON -DZLIB_ROOT=/usr/x86_64-w64-mingw32/ -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DOPENVR=ON -DQML=ON -DWITH_SCANNER=ON -DTOR_BIN=$(or ${TOR_BIN},OFF) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Debug -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
cd build/$(target)/release && cmake -D STATIC=ON -DZLIB_ROOT=/usr/x86_64-w64-mingw32/ -DREPRODUCIBLE=$(or ${SOURCE_DATE_EPOCH},OFF) -DTOR_VERSION=$(or ${TOR_VERSION}, OFF) -DOPENVR=ON -DWITH_SCANNER=ON -DTOR_BIN=$(or ${TOR_BIN},OFF) -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_TAG=$(tag) -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$(root)/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
windows-mxe-release: CMAKEFLAGS += -DBUILD_TAG="win-x64"
@ -76,10 +73,27 @@ windows-mxe-debug: @@ -76,10 +73,27 @@ windows-mxe-debug:
cmake -Bbuild $(CMAKEFLAGS)
$(MAKE) -Cbuild
mac: CMAKEFLAGS += -DSTATIC=Off
mac: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
mac: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
mac: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
mac:
cmake -Bbuild $(CMAKEFLAGS)
$(MAKE) -Cbuild
$(MAKE) -Cbuild deploy
# used for release, covers both intel and M1
# 1) assumes a *static* BOOST has been compiled at BOOST_ROOT, see docs/BUILDING.md
# 2) assumes a *static* Tor and libevent at src/assets/exec, see docs/BUILDING.md
mac-release: CMAKEFLAGS += -DARCH=default
mac-release: CMAKEFLAGS += -DCMAKE_OSX_ARCHITECTURES="x86_64"
mac-release: CMAKEFLAGS += -DSTATIC=Off
mac-release: CMAKEFLAGS += -DTOR_BIN=$(or ${TOR_BIN},OFF)
mac-release: CMAKEFLAGS += -DTOR_BIN="foo"
mac-release: CMAKEFLAGS += -DBUILD_TAG="mac-x64"
mac-release: CMAKEFLAGS += -DCMAKE_BUILD_TYPE=Release
mac-release: CMAKEFLAGS += -DBoost_USE_STATIC_RUNTIME=ON
mac-release: CMAKEFLAGS += -DBoost_USE_STATIC_LIBS=ON
mac-release: CMAKEFLAGS += -DBOOST_ROOT=/Users/${USER}/build/boost
mac-release:
cmake -Bbuild $(CMAKEFLAGS)
$(MAKE) -Cbuild

10
README.md

@ -1,12 +1,14 @@ @@ -1,12 +1,14 @@
[![Build Status](https://ci.wownero.com/api/badges/wowlet/wowlet/status.svg)](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.
![https://i.imgur.com/l7fUf0f.png](https://i.imgur.com/l7fUf0f.png)
## 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.

10
cmake/Deploy.cmake

@ -7,7 +7,7 @@ if(APPLE OR (WIN32 AND NOT STATIC)) @@ -7,7 +7,7 @@ if(APPLE OR (WIN32 AND NOT STATIC))
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
add_custom_command(TARGET deploy
POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:wowlet>/../.." -always-overwrite
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$<TARGET_FILE_DIR:wowlet>/../.." -always-overwrite -qmldir="${CMAKE_SOURCE_DIR}"
COMMENT "Running macdeployqt..."
)
@ -17,12 +17,8 @@ if(APPLE OR (WIN32 AND NOT STATIC)) @@ -17,12 +17,8 @@ if(APPLE OR (WIN32 AND NOT STATIC))
add_custom_command(TARGET deploy
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${_qt_svg_dylib} $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtGui.framework/Versions/5/QtGui" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtSvg.framework/Versions/5/QtSvg" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "${CMAKE_PREFIX_PATH}/lib/QtCore.framework/Versions/5/QtCore" "@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui" $<TARGET_FILE_DIR:wowlet>/../PlugIns/imageformats/libqsvg.dylib
COMMENT "Copying libqsvg.dylib, running install_name_tool"
COMMENT "Copying libqsvg.dylib"
)
endif()
endif()
endif()
endif()

81
cmake/FindCairo.cmake

@ -0,0 +1,81 @@ @@ -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)

26
cmake/FindXfixes.cmake

@ -0,0 +1,26 @@ @@ -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 )

4
cmake/GenVersion.cmake

@ -35,7 +35,7 @@ if(RET) @@ -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() @@ -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
cmake/VersionMonero.cmake

@ -4,7 +4,7 @@ @@ -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() @@ -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.")

33
contrib/build-appimage.sh

@ -1,33 +0,0 @@ @@ -1,33 +0,0 @@
#!/bin/bash
set -e
unset SOURCE_DATE_EPOCH
APPDIR="$PWD/wowlet.AppDir"
mkdir -p "$APPDIR"
mkdir -p "$APPDIR/usr/share/applications/"
mkdir -p "$APPDIR/usr/bin"
cp "$PWD/src/assets/org.wowlet.wowlet.desktop" "$APPDIR/usr/share/applications/org.wowlet.wowlet.desktop"
cp "$PWD/src/assets/images/appicons/64x64.png" "$APPDIR/wowlet.png"
cp "$PWD/build/bin/wowlet" "$APPDIR/usr/bin/wowlet"
LD_LIBRARY_PATH=/usr/local/lib /linuxdeployqt/squashfs-root/AppRun wowlet.AppDir/usr/share/applications/org.wowlet.wowlet.desktop -bundle-non-qt-libs
find wowlet.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
# Manually create AppImage (reproducibly)
# download runtime
wget -nc https://github.com/AppImage/AppImageKit/releases/download/12/runtime-x86_64
echo "24da8e0e149b7211cbfb00a545189a1101cb18d1f27d4cfc1895837d2c30bc30 runtime-x86_64" | sha256sum -c
mksquashfs wowlet.AppDir wowlet.squashfs -info -root-owned -no-xattrs -noappend -fstime 0
# mksquashfs writes a timestamp to the header
printf '\x00\x00\x00\x00' | dd conv=notrunc of=wowlet.squashfs bs=1 seek=$((0x8))
rm -f wowlet.AppImage
cat runtime-x86_64 >> wowlet.AppImage
cat wowlet.squashfs >> wowlet.AppImage
chmod a+x wowlet.AppImage

2
contrib/debian/build-deb.sh vendored

@ -43,4 +43,4 @@ cp "$PWD/src/assets/images/appicons/256x256.png" "$DEBDIR/usr/share/icons/hicolo @@ -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_2.0_amd64.deb
mv wowlet.DebDir.deb wowlet_2.1_amd64.deb

BIN
contrib/debian/changelog.gz vendored

Binary file not shown.

2
contrib/debian/control vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Package: wowlet
Version: 2.0
Version: 2.1
Section: net
Priority: optional
Architecture: amd64

171
docs/BUILDING.md

@ -1,108 +1,191 @@ @@ -1,108 +1,191 @@
## Buildbot builds
# Building WOWlet
The docker build bins can be found here: https://build.wownero.org/files/
## Docker static builds
Static builds via Docker are done in 3 steps:
Building for Linux and Windows via Docker is done in 3 steps:
1. Cloning this repository (+submodules)
2. Creating a base Docker image
3. Using the base image to compile a build
### Linux (reproducible)
**important:** you only have to do step 2 (base docker image) once.
For Mac OS, scroll down.
The docker image for reproducible Linux static builds uses Ubuntu 16.04 and compiles the required libraries statically
so that the resulting `wowlet` binary is static. For more information, check the Dockerfile: `Dockerfile`.
# Linux
#### 1. Clone
For more information, check the Dockerfile: `Dockerfile`.
### 1. Clone
```bash
git clone --branch master --recursive https://git.wownero.com/wowlet/wowlet.git
cd wowlet
```
Replace `master` with the desired version tag (e.g. `beta-4`) to build the release binary.
Replace `master` with the desired version tag (e.g. `v3.1.0`) to build the release binary.
#### 2. Base image
### 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.
#### 3. Build
Building the base image takes a while. **You only need to build the base image once.**
##### Standalone binary
### 3. Build
```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.
The resulting binary can be found in `build/bin/wowlet`.
##### AppImage
First create the standalone binary using the Docker command in the previous step.
# Windows
```bash
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:linux contrib/build-appimage.sh
```
### Windows (reproducible)
#### 1. Clone
### 1. Clone
```bash
git clone --branch master --recursive https://git.wownero.com/wowlet/wowlet.git
cd wowlet
```
Replace `master` with the desired version tag (e.g. `beta-4`) to build the release binary.
#### 2. Base image
Replace `master` with the desired version tag (e.g. `v3.1.0`) to build the release binary.
### 2. Base image
```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.
Building the base image takes a while. **You only need to build the base image once.**
#### 3. Build
### 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.
The resulting binary can be found in `build/x86_64-w64-mingw32/release/bin/wowlet.exe`.
## macOS
# Mac OS
## method 1 (easiest)
For MacOS it's easiest to leverage [brew](https://brew.sh) to install the required dependencies.
### 1. Get homebrew
Get [brew](https://brew.sh) to install the required dependencies.
```bash
HOMEBREW_OPTFLAGS="-march=core2" HOMEBREW_OPTIMIZATION_LEVEL="O0" \
brew install boost zmq openssl libpgm miniupnpc libsodium expat libunwind-headers protobuf libgcrypt qrencode ccache cmake pkgconfig git
```
Clone the repository.
### 2. Compile WOWlet
```bash
CMAKE_PREFIX_PATH=/usr/local/opt/qt5/ make -j4 mac
```
The resulting Mac OS application can be found `build/bin/wowlet.app` and will **not** have Tor embedded.
Since WOWlet needs Tor, install it, start it, and start at Mac OS boot:
```bash
brew install tor
brew services start tor
```
## method 2 (advanced, intel/m1 release binaries)
This assumes you have homebrew installed with the packages defined in the previous step ("Get homebrew").
### 1. Get Qt
Install Qt `5.15.2` from [the open-source Qt installer](https://www.qt.io/download).
### 2. Get static Boost
We'll install boost under `/Users/$USER/build/boost/`
```bash
mkdir -p "/Users/$USER/build/boost"
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 && \
cd boost_1_73_0
./bootstrap.sh --without-icu
./b2 --disable-icu --with-atomic --with-system --with-filesystem --with-thread \
--with-date_time --with-chrono --with-regex --with-serialization \
--with-program_options --with-locale variant=release link=static \
runtime-link=static cxxflags='-std=c++11' install -a --prefix="/Users/$USER/build/boost/"
```
### 3. Get static Tor
1. Download the official Tor Browser `.dmg`
2. Steal `tor.real` and `libevent-2.1.7.dylib` from the `.dmg`
3. Place them both in `src/assets/exec/`
- `src/assets/exec/tor`
- `src/assets/exec/libevent-2.1.7.dylib`
### 4. Get static Tor
```bash
git clone --recursive https://git.wownero.com/wowlet/wowlet.git
```
CMAKE_PREFIX_PATH=/Users/dsc/Qt5.15.2/5.15.2/clang_64 TOR_BIN="foo" make -j10 mac-release
```
Resulting *static* Mac OS package: `build/bin/wowlet.app`
Get the latest LTS from here: https://www.qt.io/offline-installers and install.
## method 3 (from source, WIP, does not work yet)
Build WOWlet.
Download Qt `https://download.qt.io/archive/qt/5.15/5.15.3/single/`, unpack it somewhere.
Patch Qt 5.15.3 source.
- Context: [#1](https://github.com/microsoft/vcpkg/pull/21056) [#2](https://code.qt.io/cgit/qt/qtbase.git/diff/?id=dece6f5840463ae2ddf927d65eb1b3680e34a547)
```
diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
index 5d4b6d6a71..cc7193d8b7 100644
--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
+++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
@@ -43,6 +43,7 @@
#include <qpa/qplatformgraphicsbuffer.h>
#include <private/qcore_mac_p.h>
+#include <CoreGraphics/CGColorSpace.h>
#include <IOSurface/IOSurface.h>
QT_BEGIN_NAMESPACE
```
Build Qt:
```bash
CMAKE_PREFIX_PATH=~/Qt5.15.1/5.15.1/clang_64 make mac-release
./configure -prefix $PWD/qtbase -release -opensource -confirm-license -ccache \
-no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
-skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \
-skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \
-skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools \
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview \
-skip qtwinextras -skip qtx11extras -skip gamepad -skip serialbus -skip location -skip webengine -skip qtdeclarative \
-no-feature-cups -no-feature-ftp -no-feature-pdf -no-feature-animation -nomake examples -nomake tests -nomake tools
./configure -prefix $PWD/qtbase -release -nomake examples -nomake tests -skip qtwebchannel -skip qtpurchasing -skip webengine -skip qtwebview
make -j 4
```
The resulting Mac OS application can be found `build/bin/wowlet.app` and will **not** have Tor embedded.
Problem: QtQuick does not seem to be compiled, `Qt5QuickConfig.cmake` missing.
Build:
```bash
CMAKE_PREFIX_PATH=/Users/$USER/Downloads/qt-everywhere-src-5.15.3/qtbase/ make -j4 mac
```

25
docs/HACKING.md

@ -22,6 +22,8 @@ by running this command: `pandoc wowlet.1.md -s -t man -o wowlet.1 && gzip wowle @@ -22,6 +22,8 @@ by running this command: `pandoc wowlet.1.md -s -t man -o wowlet.1 && gzip wowle
## Requirements
(Possibly out-of-date)
### Ubuntu/Debian
```bash
@ -40,29 +42,20 @@ protobuf libgcrypt qrencode ccache cmake pkgconfig git @@ -40,29 +42,20 @@ protobuf libgcrypt qrencode ccache cmake pkgconfig git
## CMake
After installing Qt you might have a folder called `/home/$user/Qt/`. You need to pass this to CMake
After installing Qt you might have a folder called `/home/$USER/Qt/`. You need to pass this to CMake
via the `CMAKE_PREFIX_PATH` definition.
```
-DCMAKE_PREFIX_PATH=/home/$user/QtNew/5.15.0/gcc_64
-DCMAKE_PREFIX_PATH=/home/$USER/QtFooBar/5.15.0/gcc_64
```
There are some Wownero/WOWlet related options/definitions that you may pass:
- `-DXMRIG=OFF` - disable XMRig feature
- `-DTOR_BIN=/path/to/tor` - Embed a Tor executable inside WOWlet
- `-DDONATE_BEG=OFF` - disable the dreaded donate requests
There are some Wownero/WOWlet related options/definitions that you may pass, see also `CMakeLists.txt`.
And:
At a bare minimum, recommended:
```
-DMANUAL_SUBMODULES=1
-DUSE_DEVICE_TREZOR=OFF
-DUSE_SINGLE_BUILDDIR=ON
-DDEV_MODE=ON
```
`-DMANUAL_SUBMODULES=1 -DUSE_DEVICE_TREZOR=OFF -DUSE_SINGLE_BUILDDIR=ON -DDEV_MODE=ON`
If you have OpenSSL installed in a custom location, try:
If you have OpenSSL installed at a custom location, try:
```
-DOPENSSL_INCLUDE_DIR=/usr/local/lib/openssl-1.1.1g/include
@ -85,7 +78,7 @@ Enable debugging symbols: @@ -85,7 +78,7 @@ Enable debugging symbols:
## Wowlet
It's best to install Tor locally as a service and start `wowlet` with `--use-local-tor`, this
prevents the child process from starting up and saves time.
prevents the child process from starting up each time you launch WOWlet and thus saves time.
#### Ubuntu/Debian

1
monero

@ -1 +0,0 @@ @@ -1 +0,0 @@
Subproject commit f611d5c9e32bc62f1735f6571b0bdb95cc020531

171
src/CMakeLists.txt

@ -2,14 +2,9 @@ set(CMAKE_AUTOMOC ON) @@ -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 @@ -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
@ -71,7 +62,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-deprecated-declarations @@ -71,7 +62,6 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-deprecated-declarations
add_subdirectory(libwalletqt)
add_subdirectory(model)
add_subdirectory(utils)
add_subdirectory(openpgp)
if(WITH_SCANNER)
add_subdirectory(QR-Code-scanner)
@ -136,10 +126,10 @@ file(GLOB_RECURSE SRC_HEADERS *.h) @@ -136,10 +126,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
@ -149,7 +139,9 @@ target_include_directories(wowlet PUBLIC @@ -149,7 +139,9 @@ target_include_directories(wowlet PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/tor
${CMAKE_CURRENT_SOURCE_DIR}/qrcode
${X11_INCLUDE_DIR}
${QRENCODE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${Iconv_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIR}
${Qt5Core_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
@ -160,22 +152,21 @@ target_include_directories(wowlet PUBLIC @@ -160,22 +152,21 @@ target_include_directories(wowlet PUBLIC
${Qt5WebSockets_INCLUDE_DIRS}
)
if(OPENVR)
target_include_directories(wowlet PUBLIC ${CMAKE_SOURCE_DIR}/contrib/)
if(LINUX_ACTIVATION)
target_include_directories(