diff options
| -rw-r--r-- | .github/workflows/build.yml | 8 | ||||
| -rw-r--r-- | Dockerfile.android | 11 | ||||
| -rw-r--r-- | Dockerfile.linux | 22 | ||||
| -rw-r--r-- | Dockerfile.windows | 21 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | cmake/32-bit-toolchain.cmake | 50 | ||||
| -rw-r--r-- | cmake/64-bit-toolchain.cmake | 50 | ||||
| -rw-r--r-- | components/RemoteNodeEdit.qml | 6 | ||||
| -rw-r--r-- | components/TxConfirmationDialog.qml | 5 | ||||
| m--------- | external/quirc | 0 | ||||
| -rw-r--r-- | pages/History.qml | 2 | ||||
| -rw-r--r-- | pages/merchant/Merchant.qml | 2 | ||||
| -rw-r--r-- | pages/settings/SettingsInfo.qml | 2 | ||||
| -rw-r--r-- | src/QR-Code-scanner/Decoder.cpp | 14 | ||||
| -rw-r--r-- | src/libwalletqt/TransactionHistory.cpp | 31 | ||||
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 17 | ||||
| -rw-r--r-- | src/libwalletqt/Wallet.h | 1 | ||||
| -rw-r--r-- | src/main/oshelper.cpp | 6 | ||||
| -rw-r--r-- | src/main/oshelper.h | 1 | ||||
| -rw-r--r-- | src/p2pool/P2PoolManager.cpp | 24 | ||||
| -rw-r--r-- | src/qt/network.cpp | 12 | ||||
| -rw-r--r-- | wizard/WizardWalletInput.qml | 12 |
23 files changed, 128 insertions, 179 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e183613f..ef55788d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: with: submodules: recursive - name: install dependencies - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm libsodium miniupnpc expat libunwind-headers protobuf qt5 pkg-config + run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libsodium miniupnpc unbound libunwind-headers protobuf qt5 pkg-config - name: build run: DEV_MODE=ON make release -j3 - name: test qml @@ -57,8 +57,10 @@ jobs: submodules: recursive - uses: eine/setup-msys2@v2 with: + msystem: ucrt64 update: true - install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-pcre mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git mingw-w64-x86_64-qt5 mingw-w64-x86_64-libgcrypt mingw-w64-x86_64-angleproject + install: make + pacboy: toolchain:p pcre:p cmake:p boost:p openssl:p zeromq:p libsodium:p hidapi:p protobuf-c:p libusb:p unbound:p git qt5:p libgcrypt:p angleproject:p - name: add qmake.exe and windeployqt.exe run: | cp -f "$MSYSTEM_PREFIX/bin/qmake-qt5.exe" "$MSYSTEM_PREFIX/bin/qmake.exe" @@ -78,7 +80,7 @@ jobs: with: submodules: recursive - name: install dependencies - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf pkg-config + run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq miniupnpc unbound libunwind-headers protobuf pkg-config - name: clone qt repo run: git clone -b "${QT_TAG}" --recursive --depth 1 --shallow-submodules https://github.com/qt/qt5 - name: build qt from source diff --git a/Dockerfile.android b/Dockerfile.android index 9d1e9ab9..e3ac4bf1 100644 --- a/Dockerfile.android +++ b/Dockerfile.android @@ -5,7 +5,7 @@ ARG ANDROID_NDK_REVISION=23c ARG ANDROID_NDK_HASH=e5053c126a47e84726d9f7173a04686a71f9a67a ARG ANDROID_SDK_REVISION=7302050_latest ARG ANDROID_SDK_HASH=7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622 -ARG QT_VERSION=v5.15.18-lts-lgpl +ARG QT_VERSION=v5.15.19-lts-lgpl WORKDIR /opt/android ENV WORKDIR=/opt/android @@ -56,8 +56,9 @@ RUN wget -q https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zl && make -j${THREADS} install \ && rm -rf $(pwd) -RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \ +RUN git clone https://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \ && cd qt5 \ + && git reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea \ && perl init-repository --module-subset=default,-qtwebengine \ && PATH=${HOST_PATH} ./configure -v -developer-build -release \ -xplatform android-clang \ @@ -90,7 +91,7 @@ RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \ ARG ICONV_VERSION=1.16 ARG ICONV_HASH=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 -RUN wget -q http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ +RUN wget -q https://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \ && echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \ && tar -xzf libiconv-${ICONV_VERSION}.tar.gz \ && rm -f libiconv-${ICONV_VERSION}.tar.gz \ @@ -179,7 +180,7 @@ RUN set -ex \ && make -j${THREADS} install \ && rm -rf $(pwd) -RUN git clone -b libgpg-error-1.41 --depth 1 git://git.gnupg.org/libgpg-error.git \ +RUN git clone -b libgpg-error-1.41 --depth 1 https://github.com/gpg/libgpg-error \ && cd libgpg-error \ && git reset --hard 98032624ae89a67ee6fe3b1db5d95032e681d163 \ && ./autogen.sh \ @@ -188,7 +189,7 @@ RUN git clone -b libgpg-error-1.41 --depth 1 git://git.gnupg.org/libgpg-error.gi && make -j${THREADS} install \ && rm -rf $(pwd) -RUN git clone -b libgcrypt-1.10.1 --depth 1 git://git.gnupg.org/libgcrypt.git \ +RUN git clone -b libgcrypt-1.10.1 --depth 1 https://github.com/gpg/libgcrypt \ && cd libgcrypt \ && git reset --hard ae0e567820c37f9640440b3cff77d7c185aa6742 \ && ./autogen.sh \ diff --git a/Dockerfile.linux b/Dockerfile.linux index f6f75cef..24f6fd6c 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -1,7 +1,7 @@ FROM ubuntu:18.04 ARG THREADS=1 -ARG QT_VERSION=v5.15.18-lts-lgpl +ARG QT_VERSION=v5.15.19-lts-lgpl ENV CFLAGS="-fPIC" ENV CPPFLAGS="-fPIC" @@ -188,20 +188,10 @@ RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz && \ RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \ rm /usr/lib/x86_64-linux-gnu/libXext.a && \ rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \ - git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ + git clone https://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 reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea && \ + git submodule update --init --depth 1 qtbase qtdeclarative qtgraphicaleffects qtimageformats qtmultimedia qtquickcontrols qtquickcontrols2 qtsvg qttools qttranslations qtx11extras qtxmlpatterns && \ sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \ sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \ sed -ri s/\(Libs:.*\)/\\1\ -lXau/ /usr/local/lib/pkgconfig/xcb.pc && \ @@ -251,7 +241,7 @@ RUN git clone -b v4.3.4 --depth 1 https://github.com/zeromq/libzmq && \ make -j$THREADS install && \ rm -rf $(pwd) -RUN git clone -b libgpg-error-1.45 --depth 1 git://git.gnupg.org/libgpg-error.git && \ +RUN git clone -b libgpg-error-1.45 --depth 1 https://github.com/gpg/libgpg-error && \ cd libgpg-error && \ git reset --hard dbac537e5e865fb6f3aa8596d213aa8c47a9dea1 && \ ./autogen.sh && \ @@ -260,7 +250,7 @@ RUN git clone -b libgpg-error-1.45 --depth 1 git://git.gnupg.org/libgpg-error.gi make -j$THREADS install && \ rm -rf $(pwd) -RUN git clone -b libgcrypt-1.10.1 --depth 1 git://git.gnupg.org/libgcrypt.git && \ +RUN git clone -b libgcrypt-1.10.1 --depth 1 https://github.com/gpg/libgcrypt && \ cd libgcrypt && \ git reset --hard ae0e567820c37f9640440b3cff77d7c185aa6742 && \ ./autogen.sh && \ diff --git a/Dockerfile.windows b/Dockerfile.windows index aaf4e4d6..8bc4e2cd 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ARG THREADS=1 -ARG QT_VERSION=v5.15.18-lts-lgpl +ARG QT_VERSION=v5.15.19-lts-lgpl ENV SOURCE_DATE_EPOCH=1397818193 RUN apt update && \ @@ -21,19 +21,10 @@ RUN git clone -b v0.18.5.0 --depth 1 https://github.com/monero-project/monero && RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1 -RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ +RUN git clone https://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/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \ + git reset --hard dc2ac680fa9d0ef7b0d9520859593d13951bedea && \ + git submodule update --init --depth 1 qtbase qtdeclarative qtgraphicaleffects qtimageformats qtmultimedia qtquickcontrols qtquickcontrols2 qtsvg qttools qttranslations qtxmlpatterns && \ ./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \ -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ -I $(pwd)/qtbase/src/3rdparty/angle/include \ @@ -58,7 +49,7 @@ RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ cd ../../../.. && \ rm -rf $(pwd) -RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \ +RUN git clone -b libgpg-error-1.38 --depth 1 https://github.com/gpg/libgpg-error && \ cd libgpg-error && \ git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \ ./autogen.sh && \ @@ -69,7 +60,7 @@ RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.gi cd .. && \ rm -rf libgpg-error -RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \ +RUN git clone -b libgcrypt-1.8.5 --depth 1 https://github.com/gpg/libgcrypt && \ cd libgcrypt && \ git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \ ./autogen.sh && \ @@ -64,7 +64,7 @@ debug-static-mac64: cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE) release-static-win64: - mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE) + mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && $(MAKE) release-win64: - mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE) + mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=OFF -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && $(MAKE) @@ -219,9 +219,9 @@ Packaging for your favorite distribution would be a welcome contribution! 2. Install Qt: - *Note*: The Qt 5.9.7 or newer requirement makes **some** distributions (mostly based on Debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version. + *Note*: The Qt 5.12 or newer requirement makes **some** distributions (mostly based on Debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version. - The recommended way is to install 5.9.7 from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur. + The recommended way is to install 5.12 or newer from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur. The following instructions will fetch Qt from your distribution's repositories instead. Take note of what version it installs. Your mileage may vary. @@ -277,7 +277,7 @@ The executable can be found in the build/release/bin folder. 4. Install Qt: - `brew install qt5` (or download QT 5.9.7+ from [qt.io](https://www.qt.io/download-open-source/)) + `brew install qt5` (or download QT 5.12+ from [qt.io](https://www.qt.io/download-open-source/)) 5. Grab an up-to-date copy of the monero-gui repository diff --git a/cmake/32-bit-toolchain.cmake b/cmake/32-bit-toolchain.cmake deleted file mode 100644 index 852b151f..00000000 --- a/cmake/32-bit-toolchain.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-2024, The Monero Project -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are -# permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of -# conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list -# of conditions and the following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be -# used to endorse or promote products derived from this software without specific -# prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -if (NOT CMAKE_HOST_WIN32) - set (CMAKE_SYSTEM_NAME Windows) -endif() - -set (GCC_PREFIX i686-w64-mingw32) -set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc) -set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++) -set (CMAKE_AR ar CACHE FILEPATH "" FORCE) -set (CMAKE_NM nm CACHE FILEPATH "" FORCE) -set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE) -#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE) -set (CMAKE_RC_COMPILER windres) - -set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw32") - -# Ensure cmake doesn't find things in the wrong places -set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host -set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target -set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target - -set (MINGW_FLAG "-m32") -set (USE_LTO_DEFAULT false) diff --git a/cmake/64-bit-toolchain.cmake b/cmake/64-bit-toolchain.cmake deleted file mode 100644 index 81e226e3..00000000 --- a/cmake/64-bit-toolchain.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-2024, The Monero Project -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are -# permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of -# conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list -# of conditions and the following disclaimer in the documentation and/or other -# materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be -# used to endorse or promote products derived from this software without specific -# prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF -# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -if (NOT CMAKE_HOST_WIN32) - set (CMAKE_SYSTEM_NAME Windows) -endif() - -set (GCC_PREFIX x86_64-w64-mingw32) -set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc) -set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++) -set (CMAKE_AR ar CACHE FILEPATH "" FORCE) -set (CMAKE_NM nm CACHE FILEPATH "" FORCE) -set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE) -#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE) -set (CMAKE_RC_COMPILER windres) - -set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw64") - -# Ensure cmake doesn't find things in the wrong places -set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host -set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target -set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target - -set (MINGW_FLAG "-m64") -set (USE_LTO_DEFAULT false) diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 7d68cd2c..e6ce47f2 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -84,7 +84,8 @@ GridLayout { MoneroComponents.LineEdit { id: daemonAddr - Layout.preferredWidth: root.width/3 + Layout.fillWidth: true + Layout.minimumWidth: 220 placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString placeholderFontFamily: root.placeholderFontFamily placeholderFontBold: root.placeholderFontBold @@ -106,7 +107,8 @@ GridLayout { MoneroComponents.LineEdit { id: daemonPort - Layout.preferredWidth: root.width/3 + Layout.fillWidth: true + Layout.minimumWidth: 120 placeholderText: qsTr("Port") + translationManager.emptyString placeholderFontFamily: root.placeholderFontFamily placeholderFontBold: root.placeholderFontBold diff --git a/components/TxConfirmationDialog.qml b/components/TxConfirmationDialog.qml index 1700aa0a..51da022f 100644 --- a/components/TxConfirmationDialog.qml +++ b/components/TxConfirmationDialog.qml @@ -242,6 +242,7 @@ Rectangle { Layout.fillWidth: true font.pixelSize: 15 color: MoneroComponents.Style.defaultFontColor + textFormat: Text.RichText text: { if (currentWallet) { var walletTitle = function() { @@ -257,9 +258,9 @@ Rectangle { if (appWindow.currentWallet.numSubaddressAccounts() > 1) { var currentSubaddressAccount = currentWallet.currentSubaddressAccount; var currentAccountLabel = currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0); - return walletTitle() + " (" + walletName + ")" + "<br>" + qsTr("Account #") + currentSubaddressAccount + (currentAccountLabel !== "" ? " (" + currentAccountLabel + ")" : "") + translationManager.emptyString; + return walletTitle() + " (" + Utils.htmlEscape(walletName) + ")" + "<br>" + qsTr("Account #") + currentSubaddressAccount + (currentAccountLabel !== "" ? " (" + Utils.htmlEscape(currentAccountLabel) + ")" : "") + translationManager.emptyString; } else { - return walletTitle() + " (" + walletName + ")" + translationManager.emptyString; + return walletTitle() + " (" + Utils.htmlEscape(walletName) + ")" + translationManager.emptyString; } } else { return ""; diff --git a/external/quirc b/external/quirc -Subproject 7e7ab596e4d0988faf1c12ae89c354b114181c4 +Subproject 927d680904dc95fdff4cd9d022eb374b438ff8f diff --git a/pages/History.qml b/pages/History.qml index d9132e3b..6871405d 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -1746,7 +1746,7 @@ Rectangle { + (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "") + (integratedAddress ? trStart + qsTr("Integrated address") + ":" + trMiddle + integratedAddress + trEnd : "") + (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "") - + (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "") + + (tx_note ? trStart + qsTr("Tx note:") + trMiddle + Utils.htmlEscape(tx_note) + trEnd : "") + (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "") + (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "") + "</table>" diff --git a/pages/merchant/Merchant.qml b/pages/merchant/Merchant.qml index 560484b1..86d47560 100644 --- a/pages/merchant/Merchant.qml +++ b/pages/merchant/Merchant.qml @@ -295,7 +295,7 @@ Item { color: "white" text: "<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 12px;}</style>%1: %2 <a href='#'>(%3)</a>" .arg(qsTr("Currently selected address")) - .arg(addressLabel) + .arg(Utils.htmlEscape(addressLabel)) .arg(qsTr("Change")) + translationManager.emptyString textFormat: Text.RichText themeTransition: false diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml index ad152d63..e126383a 100644 --- a/pages/settings/SettingsInfo.qml +++ b/pages/settings/SettingsInfo.qml @@ -142,7 +142,7 @@ Rectangle { <style type='text/css'>\ a {cursor:pointer;text-decoration: none; color: #FF6C3C}\ </style>\ - <a href='#'>%1</a>".arg(walletPath) + <a href='#'>%1</a>".arg(Utils.htmlEscape(walletPath)) textFormat: Text.RichText onLinkActivated: oshelper.openContainingFolder(walletPath) diff --git a/src/QR-Code-scanner/Decoder.cpp b/src/QR-Code-scanner/Decoder.cpp index 25ef0f04..57100006 100644 --- a/src/QR-Code-scanner/Decoder.cpp +++ b/src/QR-Code-scanner/Decoder.cpp @@ -28,6 +28,7 @@ #include "Decoder.h" +#include <cstring> #include <limits> #include "quirc.h" @@ -67,11 +68,14 @@ std::vector<std::string> QrDecoder::decodeGrayscale8(const QImage &image) { throw std::runtime_error("QUIRC: failed to get image buffer"); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) - std::copy(image.constBits(), image.constBits() + image.sizeInBytes(), rawImage); -#else - std::copy(image.constBits(), image.constBits() + image.byteCount(), rawImage); -#endif + + const int width = image.width(); + const int height = image.height(); + for (int y = 0; y < height; ++y) + { + std::memcpy(rawImage + y * width, image.constScanLine(y), width); + } + quirc_end(m_qr); const int count = quirc_count(m_qr); diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp index 764a3178..f5c3b752 100644 --- a/src/libwalletqt/TransactionHistory.cpp +++ b/src/libwalletqt/TransactionHistory.cpp @@ -36,6 +36,31 @@ #include <QWriteLocker> #include <QtGlobal> +namespace { + QString sanitizeCSVField(QString field) + { + field.remove(QChar('"')); + + if (field.isEmpty()) { + return field; + } + + const QChar first = field.at(0); + const bool needsPrefix = + first == QChar('=') || + first == QChar('+') || + first == QChar('-') || + first == QChar('@') || + first.isSpace() || + first.category() == QChar::Other_Control; + + if (needsPrefix) { + field.prepend(QChar('\'')); + } + + return field; + } +} bool TransactionHistory::transaction(int index, std::function<void (TransactionInfo &)> callback) { @@ -196,10 +221,8 @@ QString TransactionHistory::writeCSV(quint32 accountIndex, QString out) else { continue; // skip TransactionInfo::Direction_Both } - QString label = info.label(); - label.remove(QChar('"')); // reserved - QString description = info.description(); - description.remove(QChar('"')); // reserved + QString label = sanitizeCSVField(info.label()); + QString description = sanitizeCSVField(info.description()); quint64 blockHeight = info.blockHeight(); QDateTime timeStamp = info.timestamp(); QString date = info.date() + " " + info.time(); diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index a5ac6925..bc086a16 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -536,7 +536,7 @@ void Wallet::setupBackgroundSync(const Wallet::BackgroundSyncType background_syn pauseRefresh(); // run inside scheduler because of lag when stopping/starting refresh - m_scheduler.run([this, refreshEnabled, background_sync_type, &wallet_password] { + m_scheduler.run([this, refreshEnabled, background_sync_type, wallet_password] { m_walletImpl->setupBackgroundSync( static_cast<Monero::Wallet::BackgroundSyncType>(background_sync_type), wallet_password.toStdString(), @@ -620,6 +620,19 @@ void Wallet::startRefresh() qDebug() << "Starting refresh"; m_refreshEnabled = true; m_refreshNow = true; + + if (!m_refreshThreadStarted.exchange(true)) + { + try + { + startRefreshThread(); + } + catch (...) + { + m_refreshThreadStarted.store(false); + throw; + } + } } void Wallet::pauseRefresh() @@ -1182,6 +1195,7 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent) , m_refreshNow(false) , m_refreshEnabled(false) , m_refreshing(false) + , m_refreshThreadStarted(false) , m_scheduler(this) { m_walletListener = new WalletListenerImpl(this); @@ -1195,7 +1209,6 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent) m_daemonUsername = ""; m_daemonPassword = ""; - startRefreshThread(); } Wallet::~Wallet() diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h index a5bb913c..e41540ea 100644 --- a/src/libwalletqt/Wallet.h +++ b/src/libwalletqt/Wallet.h @@ -493,6 +493,7 @@ private: std::atomic<bool> m_refreshNow; std::atomic<bool> m_refreshEnabled; std::atomic<bool> m_refreshing; + std::atomic<bool> m_refreshThreadStarted; WalletListenerImpl *m_walletListener; FutureScheduler m_scheduler; }; diff --git a/src/main/oshelper.cpp b/src/main/oshelper.cpp index 2ca0e400..cb9aca7a 100644 --- a/src/main/oshelper.cpp +++ b/src/main/oshelper.cpp @@ -248,6 +248,12 @@ QString OSHelper::temporaryPath() const return QDir::tempPath(); } +bool OSHelper::isWritableDirectory(const QString &path) const +{ + const QFileInfo info(path); + return info.exists() && info.isDir() && info.isWritable(); +} + QString OSHelper::randomPassword(int numBytes) const { numBytes = qBound(16, numBytes, 128); diff --git a/src/main/oshelper.h b/src/main/oshelper.h index 1c3aeb72..b6e98d32 100644 --- a/src/main/oshelper.h +++ b/src/main/oshelper.h @@ -51,6 +51,7 @@ public: Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const; Q_INVOKABLE QString temporaryFilename() const; Q_INVOKABLE QString temporaryPath() const; + Q_INVOKABLE bool isWritableDirectory(const QString &path) const; Q_INVOKABLE QString randomPassword(int numBytes = 32) const; Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const; Q_INVOKABLE bool isCapsLock() const; diff --git a/src/p2pool/P2PoolManager.cpp b/src/p2pool/P2PoolManager.cpp index cf1af558..64414f0c 100644 --- a/src/p2pool/P2PoolManager.cpp +++ b/src/p2pool/P2PoolManager.cpp @@ -55,21 +55,21 @@ void P2PoolManager::download() { QString fileName; QString validHash; #ifdef Q_OS_WIN - url = "https://github.com/SChernykh/p2pool/releases/download/v4.15/p2pool-v4.15-windows-x64.zip"; - fileName = m_p2poolPath + "/p2pool-v4.15-windows-x64.zip"; - validHash = "c131d1ebf8658780f632276db587866f9e0d6d7952c04135fb0559c76249541e"; + url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-windows-x64.zip"; + fileName = m_p2poolPath + "/p2pool-v4.17.1-windows-x64.zip"; + validHash = "984822dd8a4645ea68763888d2127085bbb53ed42b35e1f899883b3a35a40a76"; #elif defined(Q_OS_LINUX) - url = "https://github.com/SChernykh/p2pool/releases/download/v4.15/p2pool-v4.15-linux-x64.tar.gz"; - fileName = m_p2poolPath + "/p2pool-v4.15-linux-x64.tar.gz"; - validHash = "1611a159b4f60e12d9dc9650597cbe831961a123621216349d764f620cdff34b"; + url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-linux-x64.tar.gz"; + fileName = m_p2poolPath + "/p2pool-v4.17.1-linux-x64.tar.gz"; + validHash = "66b67fd8c7f00d33e76b3fa8373e67a5880a530ff1812aaf39aa85298d328f6c"; #elif defined(Q_OS_MACOS_AARCH64) - url = "https://github.com/SChernykh/p2pool/releases/download/v4.15/p2pool-v4.15-macos-aarch64.tar.gz"; - fileName = m_p2poolPath + "/p2pool-v4.15-macos-aarch64.tar.gz"; - validHash = "14211494a9d0adce8547c77eb75c5f86f8608dfbb4fa0e80b1967ece0dc916b5"; + url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-macos-aarch64.tar.gz"; + fileName = m_p2poolPath + "/p2pool-v4.17.1-macos-aarch64.tar.gz"; + validHash = "8b8454fb4d8330b4a039d4657be69c8543a22938a8957c083512be41e27016b1"; #elif defined(Q_OS_MACOS) - url = "https://github.com/SChernykh/p2pool/releases/download/v4.15/p2pool-v4.15-macos-x64.tar.gz"; - fileName = m_p2poolPath + "/p2pool-v4.15-macos-x64.tar.gz"; - validHash = "a358489a4b1a6addfcc86ff235a0ce50210899f5e3a6dc93ce0eb69e0d181564"; + url = "https://github.com/SChernykh/p2pool/releases/download/v4.17.1/p2pool-v4.17.1-macos-x64.tar.gz"; + fileName = m_p2poolPath + "/p2pool-v4.17.1-macos-x64.tar.gz"; + validHash = "64657dd2ae954d41880aef98193124d1d08dfa2e991f755a9d089a35f96def13"; #endif QFile file(fileName); epee::net_utils::http::http_simple_client http_client; diff --git a/src/qt/network.cpp b/src/qt/network.cpp index ba6c94d6..574369c9 100644 --- a/src/qt/network.cpp +++ b/src/qt/network.cpp @@ -144,7 +144,17 @@ QString Network::get( const QString &contentType /* = {} */) const { const QUrl urlParsed(url); - httpClient->set_server(urlParsed.host().toStdString(), urlParsed.scheme() == "https" ? "443" : "80", {}); + const bool isHttps = urlParsed.scheme() == "https"; + + const auto sslSupport = isHttps + ? epee::net_utils::ssl_support_t::e_ssl_support_enabled + : epee::net_utils::ssl_support_t::e_ssl_support_disabled; + + httpClient->set_server( + urlParsed.host().toStdString(), + std::to_string(urlParsed.port(isHttps ? 443 : 80)), + {}, + epee::net_utils::ssl_options_t{sslSupport}); const QString uri = (urlParsed.hasQuery() ? urlParsed.path() + "?" + urlParsed.query() : urlParsed.path()); const http_response_info *pri = NULL; diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml index 882145ab..2054fe52 100644 --- a/wizard/WizardWalletInput.qml +++ b/wizard/WizardWalletInput.qml @@ -71,7 +71,7 @@ GridLayout { ColumnLayout { MoneroComponents.LineEdit { id: walletName - Layout.preferredWidth: grid.width/5 + Layout.fillWidth: true function verify(){ if (walletName.text === "") { @@ -113,7 +113,7 @@ GridLayout { } RowLayout { - Layout.preferredWidth: grid.width/5 + Layout.fillWidth: true MoneroComponents.TextPlain { visible: errorMessageWalletName.text != "" @@ -147,13 +147,17 @@ GridLayout { MoneroComponents.LineEdit { id: walletLocation - Layout.preferredWidth: grid.width/3 + Layout.fillWidth: true function verify() { if (walletLocation.text == "") { errorMessageWalletLocation.text = qsTr("Wallet location is empty") + translationManager.emptyString; return false; } + if (!oshelper.isWritableDirectory(walletLocation.text)) { + errorMessageWalletLocation.text = qsTr("Wallet location does not exist or is not writable") + translationManager.emptyString; + return false; + } errorMessageWalletLocation.text = ""; return true; } @@ -200,7 +204,7 @@ GridLayout { } RowLayout { - Layout.preferredWidth: grid.width/3 + Layout.fillWidth: true MoneroComponents.TextPlain { visible: errorMessageWalletLocation.text != "" |
