diff --git a/CMakeLists.txt b/CMakeLists.txt index 441dc75..e9fe4f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}") option(FETCH_DEPS "Download dependencies if they are not found" ON) option(XMRTO "Include Xmr.To module" ON) +option(MORPHTOKEN "Include MorphToken module" ON) option(XMRIG "Path to XMRig binary to embed inside Feather" OFF) option(TOR "Path to Tor binary to embed inside Feather" OFF) option(TOR_VERSION "Optional git hash or tag of embedded Tor version" "tor-0.4.3.5") diff --git a/HACKING.md b/HACKING.md index 8285c63..e7112bf 100644 --- a/HACKING.md +++ b/HACKING.md @@ -42,6 +42,7 @@ via the `CMAKE_PREFIX_PATH` definition. For me this is: There are some Monero/Feather related options/definitions that you may pass: - `-DXMRTO=OFF` - disable Xmr.To feature +- `-DMORPHTOKEN=OFF` - diable MorphToken feature - `-DTOR=/path/to/tor` - Embed a Tor executable inside Feather - `-DXMRIG=/path/to/xmrig` - Embed a XMRig executable inside Feather - `-DDONATE_BEG=OFF` - disable the dreaded donate requests diff --git a/Makefile b/Makefile index 53684c4..046705f 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ CMAKEFLAGS = \ -DBUILD_64=On \ -DBUILD_TESTS=Off \ -DXMRTO=ON \ + -DMORPHTOKEN=ON \ -DXMRIG=Off \ -DTOR=Off \ -DCMAKE_CXX_STANDARD=11 \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1ac2797..321a4c2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -129,6 +129,10 @@ if(XMRTO) target_compile_definitions(feather PRIVATE XMRTO=1) endif() +if(MORPHTOKEN) + target_compile_definitions(feather PRIVATE HAS_MORPHTOKEN=1) +endif() + if(TOR) target_compile_definitions(feather PRIVATE HAS_TOR=1) endif() diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8ab6dd8..05587de 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -122,6 +122,10 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) : ui->tabWidget->setTabVisible(Tabs::XMR_TO, false); #endif +#ifndef HAS_MORPHTOKEN + ui->tabWidget->setTabVisible(Tabs::MORPHTOKEN, false); +#endif + #if defined(Q_OS_LINUX) // system tray m_trayIcon = new QSystemTrayIcon(QIcon(":/assets/images/appicons/64x64.png")); @@ -406,9 +410,13 @@ void MainWindow::initMenu() { m_tabShowHideMapper["Calc"] = new ToggleTab(ui->tabCalc, "Calc", "Calc", ui->actionShow_calc, Config::showTabCalc); m_tabShowHideSignalMapper->setMapping(ui->actionShow_calc, "Calc"); +#if defined(HAS_MORPHTOKEN) connect(ui->actionShow_MorphToken, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map)); m_tabShowHideMapper["MorphToken"] = new ToggleTab(ui->tabMorphToken, "MorphToken", "MorphToken", ui->actionShow_MorphToken, Config::showTabMorphToken); m_tabShowHideSignalMapper->setMapping(ui->actionShow_MorphToken, "MorphToken"); +#else + ui->actionShow_MorphToken->setVisible(false); +#endif #if defined(XMRTO) connect(ui->actionShow_xmr_to, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));