From a732ccbed18fbfb7d75770d957ddab1b401e4052 Mon Sep 17 00:00:00 2001 From: Aiwe Date: Fri, 1 May 2020 16:41:20 +0300 Subject: [PATCH] Bump core to 1.7.3, rename misc global wallet constants and variables not to interfere with core (like version, project name etc.) this fixes warnings about makro redefinition, tell Windows where Boost is --- .github/workflows/release.yml | 2 +- CMakeLists.txt | 14 +++++++++----- CryptoNoteWallet.cmake | 24 ++++++++++++------------ cryptonote | 2 +- src/CryptoNoteWalletConfig.h.in | 18 +++++++++--------- src/Info.plist.in | 10 +++++----- src/Settings.cpp | 3 ++- src/WindowsInstall.nsi.in | 10 +++++----- src/cryptonotewallet.rc | 12 ++++++------ src/gui/AboutDialog.cpp | 4 ++-- src/karbowanecwallet.desktop.in | 4 ++-- 11 files changed, 54 insertions(+), 49 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8ae58ba6..dfaaa3a8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: git clone https://github.com/seredat/karbowanec cryptonote mkdir "$build_folder" cd "$build_folder" - Start-Process cmake -ArgumentList "-G ""Visual Studio 16 2019"" -A x64",".." -NoNewWindow -Wait + Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT_1_69_0"" -G ""Visual Studio 16 2019"" -A x64",".." -NoNewWindow -Wait Start-Process msbuild -ArgumentList "KarbowanecWallet.sln","/p:Configuration=Release" -NoNewWindow -Wait $build_path = "./$build_folder" echo "::set-output name=build_path::${build_path}" diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c43b213c..6d8fa0daa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 2.8) +# Required for finding Threads on ARM +enable_language(C) +enable_language(CXX) + include(CryptoNoteWallet.cmake) include(external/ext.cmake) @@ -33,7 +37,7 @@ if(ARCH_ID STREQUAL "ppc64le") set(PPC64LE 1) endif() -project(${CN_PROJECT_NAME}) +project(${WALLET_NAME}) execute_process(COMMAND git log -1 --pretty=format:%h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} @@ -87,7 +91,7 @@ configure_file( @ONLY ) -add_definitions(-DVERSION=\"${CN_VERSION}\") +add_definitions(-DVERSION=\"${WALLET_VERSION}\") add_definitions(-DGIT_REVISION=\"${GIT_REVISION}\") add_definitions(-DUPNP_STATIC -DMINIUPNP_STATICLIB -DUPNPC_BUILD_STATIC) @@ -471,8 +475,8 @@ qt5_use_modules(${PROJECT_NAME} Widgets Gui Network) # Installation -set(CPACK_PACKAGE_NAME ${CN_PROJECT_NAME}) -set(CPACK_PACKAGE_VERSION ${CN_VERSION}) +set(CPACK_PACKAGE_NAME ${WALLET_NAME}) +set(CPACK_PACKAGE_VERSION ${WALLET_VERSION}) set(CPACK_PACKAGE_VENDOR "Karbowanec-project") set(CPACK_PACKAGE_CONTACT "https://karbo.org") set(CPACK_STRIP_FILES ON) @@ -494,7 +498,7 @@ elseif (UNIX) if (RPMBUILD) set(CPACK_GENERATOR "RPM;DEB") set(CPACK_SYSTEM_NAME x86_64) - set(CPACK_RPM_PACKAGE_RELEASE ${CN_VERSION}) + set(CPACK_RPM_PACKAGE_RELEASE ${WALLET_VERSION}) set(CPACK_RPM_PACKAGE_LICENSE "MIT") set(CPACK_RPM_PACKAGE_GROUP Office) set(CPACK_RPM_PACKAGE_REQUIRES "qt5-qtbase >= 5.3.2, qt5-qtbase-gui >= 5.3.2") diff --git a/CryptoNoteWallet.cmake b/CryptoNoteWallet.cmake index fe2784112..8aeb6ff54 100644 --- a/CryptoNoteWallet.cmake +++ b/CryptoNoteWallet.cmake @@ -1,5 +1,5 @@ -set(CN_PROJECT_NAME "KarbowanecWallet") +set(WALLET_NAME "KarbowanecWallet") set(CN_CURRENCY_DISPLAY_NAME "Karbo") set(CN_CURRENCY_TICKER "KRB") @@ -17,9 +17,9 @@ if(GIT_FOUND) ERROR_STRIP_TRAILING_WHITESPACE) if(NOT WALLET_GIT_RESULT EQUAL 0) set(WALLET_GIT_TAG "0.0.0") - set(PROJECT_VER_MAJOR 0) - set(PROJECT_VER_MINOR 0) - set(PROJECT_VER_PATCH 0) + set(WALLET_VER_MAJOR 0) + set(WALLET_VER_MINOR 0) + set(WALLET_VER_PATCH 0) message(WARNING "Failed to execute Git: ${WALLET_GIT_ERROR}") else() string(REPLACE "v." "" WALLET_GIT_TAG ${WALLET_GIT_TAG}) @@ -27,20 +27,20 @@ if(GIT_FOUND) # Parse and split a version number into separate components string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?" "\\1;\\2;\\3;\\4" VERSION_MATCHES ${WALLET_GIT_TAG}) list(GET VERSION_MATCHES 0 version_major) - set(PROJECT_VER_MAJOR ${version_major}) + set(WALLET_VER_MAJOR ${version_major}) list(GET VERSION_MATCHES 1 version_minor) - set(PROJECT_VER_MINOR ${version_minor}) + set(WALLET_VER_MINOR ${version_minor}) list(GET VERSION_MATCHES 2 version_patch) - set(PROJECT_VER_PATCH ${version_patch}) + set(WALLET_VER_PATCH ${version_patch}) message(STATUS "Wallet git tag: ${WALLET_GIT_TAG}") endif() endif() -set(PROJECT_VER_BUILD 1) # this one was always 1 anyways +set(WALLET_VER_BUILD 1) # this one was always 1 anyways -set(PROJECT_VENDOR_NAME "Karbo Developers") -set(PROJECT_COPYRIGHT "Copyright 2016-2020 ${PROJECT_VENDOR_NAME}") -set(PROJECT_VENDOR_URL "https://karbo.org") +set(WALLET_VENDOR_NAME "Karbo Developers") +set(WALLET_COPYRIGHT "Copyright 2016-2020 ${PROJECT_VENDOR_NAME}") +set(WALLET_VENDOR_URL "https://karbo.org") -set(CN_VERSION "${PROJECT_VER_MAJOR}.${PROJECT_VER_MINOR}.${PROJECT_VER_PATCH}") +set(WALLET_VERSION "${WALLET_VER_MAJOR}.${WALLET_VER_MINOR}.${WALLET_VER_PATCH}") diff --git a/cryptonote b/cryptonote index 98a464860..e663d78d0 160000 --- a/cryptonote +++ b/cryptonote @@ -1 +1 @@ -Subproject commit 98a4648607ad6fb5dcdb47b03df53875471cd02d +Subproject commit e663d78d08d0b4b373f95273ba8b0b3788f22878 diff --git a/src/CryptoNoteWalletConfig.h.in b/src/CryptoNoteWalletConfig.h.in index f053f398d..51d9e4e4d 100644 --- a/src/CryptoNoteWalletConfig.h.in +++ b/src/CryptoNoteWalletConfig.h.in @@ -6,14 +6,14 @@ namespace WalletGui { const char WALLET_CURRENCY_DISPLAY_NAME[] = "@CN_CURRENCY_DISPLAY_NAME@"; const char WALLET_CURRENCY_TICKER[] = "@CN_CURRENCY_TICKER@"; -#define PROJECT_NAME "@CN_PROJECT_NAME@" -#define PROJECT_DESCRIPTION "@CN_CURRENCY_DISPLAY_NAME@ Wallet v. @CN_VERSION@" -#define PROJECT_SITE "@PROJECT_VENDOR_URL@" -#define PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@" -#define PROJECT_VERSION "@CN_VERSION@" -#define PROJECT_VER_MAJOR @PROJECT_VER_MAJOR@ -#define PROJECT_VER_MINOR @PROJECT_VER_MINOR@ -#define PROJECT_VER_PATCH @PROJECT_VER_PATCH@ -#define PROJECT_VER_BUILD @PROJECT_VER_BUILD@ +#define WALLET_NAME "@WALLET_NAME@" +#define WALLET_DESCRIPTION "@CN_CURRENCY_DISPLAY_NAME@ Wallet v. @WALLET_VERSION@" +#define WALLET_SITE "@WALLET_VENDOR_URL@" +#define WALLET_COPYRIGHT "@WALLET_COPYRIGHT@" +#define WALLET_VERSION "@WALLET_VERSION@" +#define WALLET_VER_MAJOR @WALLET_VER_MAJOR@ +#define WALLET_VER_MINOR @WALLET_VER_MINOR@ +#define WALLET_VER_PATCH @WALLET_VER_PATCH@ +#define WALLET_VER_BUILD @WALLET_VER_BUILD@ } diff --git a/src/Info.plist.in b/src/Info.plist.in index 7946a7f74..3a843fd9c 100644 --- a/src/Info.plist.in +++ b/src/Info.plist.in @@ -5,9 +5,9 @@ CFBundleDevelopmentRegion English CFBundleExecutable - @CN_PROJECT_NAME@ + @WALLET_NAME@ CFBundleGetInfoString - Karbo Wallet v. @CN_VERSION@ + Karbo Wallet v. @WALLET_VERSION@ CFBundleIconFile karbowanec.icns CFBundleIdentifier @@ -15,17 +15,17 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - @CN_VERSION@ + @WALLET_VERSION@ CFBundleName Karbo Wallet CFBundlePackageType APPL CFBundleShortVersionString - @CN_VERSION@ + @WALLET_VERSION@ CFBundleSignature ???? CFBundleVersion - karbowanec@CN_VERSION@ + karbowanec@WALLET_VERSION@ CSResourcesFileMapped NSHumanReadableCopyright diff --git a/src/Settings.cpp b/src/Settings.cpp index 1cbf46190..0f675f116 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -15,6 +15,7 @@ #include #include "CommandLineParser.h" #include "CurrencyAdapter.h" +#include "CryptoNoteWalletConfig.h" #include "Settings.h" namespace WalletGui { @@ -217,7 +218,7 @@ bool Settings::isTrackingMode() const { } QString Settings::getVersion() const { - return VERSION; + return WALLET_VERSION; } QString Settings::getCurrentTheme() const { diff --git a/src/WindowsInstall.nsi.in b/src/WindowsInstall.nsi.in index 6541fee28..256cf2c70 100644 --- a/src/WindowsInstall.nsi.in +++ b/src/WindowsInstall.nsi.in @@ -1,11 +1,11 @@ Name "Karbo Wallet (64-bit)" # General Symbol Definitions -!define PROJECT_NAME "@CN_PROJECT_NAME@" -!define PROJECT_VERSION "@CN_VERSION@" +!define PROJECT_NAME "@WALLET_NAME@" +!define PROJECT_VERSION "@WALLET_VERSION@" !define REGKEY "SOFTWARE\$(^Name)" -!define COMPANY "@PROJECT_VENDOR_NAME@" -!define URL "@PROJECT_VENDOR_URL@" +!define COMPANY "@WALLET_VENDOR_NAME@" +!define URL "@WALLET_VENDOR_URL@" RequestExecutionLevel highest SetCompressor /SOLID lzma @@ -55,7 +55,7 @@ InstallDir $PROGRAMFILES64\Karbowanec CRCCheck on BrandingText "@CN_CURRENCY_DISPLAY_NAME@ Wallet" ShowInstDetails show -VIProductVersion @PROJECT_VER_MAJOR@.@PROJECT_VER_MINOR@.@PROJECT_VER_PATCH@.@PROJECT_VER_BUILD@ +VIProductVersion @WALLET_VER_MAJOR@.@WALLET_VER_MINOR@.@WALLET_VER_PATCH@.@WALLET_VER_BUILD@ VIAddVersionKey ProductName "${PROJECT_NAME}" VIAddVersionKey ProductVersion "${PROJECT_VERSION}" VIAddVersionKey CompanyName "${COMPANY}" diff --git a/src/cryptonotewallet.rc b/src/cryptonotewallet.rc index 721ae96b1..4eb15e7e5 100644 --- a/src/cryptonotewallet.rc +++ b/src/cryptonotewallet.rc @@ -9,19 +9,19 @@ IDI_ICON1 ICON "images\karbowanez.ico" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -PRODUCTVERSION PROJECT_VER_MAJOR,PROJECT_VER_MINOR,PROJECT_VER_PATCH,PROJECT_VER_BUILD +PRODUCTVERSION WALLET_VER_MAJOR,WALLET_VER_MINOR,WALLET_VER_PATCH,WALLET_VER_BUILD BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN - VALUE "FileDescription", PROJECT_DESCRIPTION + VALUE "FileDescription", WALLET_DESCRIPTION VALUE "FileVersion", VER_FILEVERSION_STR - VALUE "InternalName", PROJECT_NAME - VALUE "LegalCopyright", PROJECT_COPYRIGHT + VALUE "InternalName", WALLET_NAME + VALUE "LegalCopyright", WALLET_COPYRIGHT VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR - VALUE "ProductName", PROJECT_NAME - VALUE "ProductVersion", PROJECT_VERSION + VALUE "ProductName", WALLET_NAME + VALUE "ProductVersion", WALLET_VERSION END END diff --git a/src/gui/AboutDialog.cpp b/src/gui/AboutDialog.cpp index c1d3bea30..8d3d70f88 100644 --- a/src/gui/AboutDialog.cpp +++ b/src/gui/AboutDialog.cpp @@ -16,8 +16,8 @@ AboutDialog::AboutDialog(QWidget* _parent) : QDialog(_parent), m_ui(new Ui::Abou m_ui->setupUi(this); setWindowTitle(QString(tr("About %1 Wallet")).arg(CurrencyAdapter::instance().getCurrencyDisplayName())); QString aboutText = m_ui->m_aboutLabel->text(); - m_ui->m_aboutLabel->setText(aboutText.arg(VERSION)); - m_ui->m_aboutLabel->setText(aboutText.arg(VERSION " (" GIT_REVISION ")").arg(PROJECT_VERSION_LONG)); + m_ui->m_aboutLabel->setText(aboutText.arg(WALLET_VERSION)); + m_ui->m_aboutLabel->setText(aboutText.arg(WALLET_VERSION " (" GIT_REVISION ")").arg(PROJECT_VERSION_LONG)); } AboutDialog::~AboutDialog() { diff --git a/src/karbowanecwallet.desktop.in b/src/karbowanecwallet.desktop.in index fa13eed2a..ae9085fc3 100644 --- a/src/karbowanecwallet.desktop.in +++ b/src/karbowanecwallet.desktop.in @@ -23,10 +23,10 @@ Comment[fr]=Portefeuille Karbo Comment[jp]=カルボ財布 Comment[cn]=卡博币钱包 Comment[kr]=카르보 지갑 -Exec=@CN_PROJECT_NAME@ %U +Exec=@WALLET_NAME@ %U Terminal=false Type=Application Icon=karbowanec MimeType=x-scheme-handler/karbowanec; Categories=Office;Finance; -Version=@CN_VERSION@ +Version=@WALLET_VERSION@