mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
MorphToken: allow disabling module
This commit is contained in:
parent
e9a4a828d6
commit
39c1d3bbf7
5 changed files with 15 additions and 0 deletions
|
@ -11,6 +11,7 @@ set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||||
|
|
||||||
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
||||||
option(XMRTO "Include Xmr.To module" 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(XMRIG "Path to XMRig binary to embed inside Feather" OFF)
|
||||||
option(TOR "Path to Tor 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")
|
option(TOR_VERSION "Optional git hash or tag of embedded Tor version" "tor-0.4.3.5")
|
||||||
|
|
|
@ -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:
|
There are some Monero/Feather related options/definitions that you may pass:
|
||||||
|
|
||||||
- `-DXMRTO=OFF` - disable Xmr.To feature
|
- `-DXMRTO=OFF` - disable Xmr.To feature
|
||||||
|
- `-DMORPHTOKEN=OFF` - diable MorphToken feature
|
||||||
- `-DTOR=/path/to/tor` - Embed a Tor executable inside Feather
|
- `-DTOR=/path/to/tor` - Embed a Tor executable inside Feather
|
||||||
- `-DXMRIG=/path/to/xmrig` - Embed a XMRig executable inside Feather
|
- `-DXMRIG=/path/to/xmrig` - Embed a XMRig executable inside Feather
|
||||||
- `-DDONATE_BEG=OFF` - disable the dreaded donate requests
|
- `-DDONATE_BEG=OFF` - disable the dreaded donate requests
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -31,6 +31,7 @@ CMAKEFLAGS = \
|
||||||
-DBUILD_64=On \
|
-DBUILD_64=On \
|
||||||
-DBUILD_TESTS=Off \
|
-DBUILD_TESTS=Off \
|
||||||
-DXMRTO=ON \
|
-DXMRTO=ON \
|
||||||
|
-DMORPHTOKEN=ON \
|
||||||
-DXMRIG=Off \
|
-DXMRIG=Off \
|
||||||
-DTOR=Off \
|
-DTOR=Off \
|
||||||
-DCMAKE_CXX_STANDARD=11 \
|
-DCMAKE_CXX_STANDARD=11 \
|
||||||
|
|
|
@ -129,6 +129,10 @@ if(XMRTO)
|
||||||
target_compile_definitions(feather PRIVATE XMRTO=1)
|
target_compile_definitions(feather PRIVATE XMRTO=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(MORPHTOKEN)
|
||||||
|
target_compile_definitions(feather PRIVATE HAS_MORPHTOKEN=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(TOR)
|
if(TOR)
|
||||||
target_compile_definitions(feather PRIVATE HAS_TOR=1)
|
target_compile_definitions(feather PRIVATE HAS_TOR=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -122,6 +122,10 @@ MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
|
||||||
ui->tabWidget->setTabVisible(Tabs::XMR_TO, false);
|
ui->tabWidget->setTabVisible(Tabs::XMR_TO, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_MORPHTOKEN
|
||||||
|
ui->tabWidget->setTabVisible(Tabs::MORPHTOKEN, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
// system tray
|
// system tray
|
||||||
m_trayIcon = new QSystemTrayIcon(QIcon(":/assets/images/appicons/64x64.png"));
|
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_tabShowHideMapper["Calc"] = new ToggleTab(ui->tabCalc, "Calc", "Calc", ui->actionShow_calc, Config::showTabCalc);
|
||||||
m_tabShowHideSignalMapper->setMapping(ui->actionShow_calc, "Calc");
|
m_tabShowHideSignalMapper->setMapping(ui->actionShow_calc, "Calc");
|
||||||
|
|
||||||
|
#if defined(HAS_MORPHTOKEN)
|
||||||
connect(ui->actionShow_MorphToken, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
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_tabShowHideMapper["MorphToken"] = new ToggleTab(ui->tabMorphToken, "MorphToken", "MorphToken", ui->actionShow_MorphToken, Config::showTabMorphToken);
|
||||||
m_tabShowHideSignalMapper->setMapping(ui->actionShow_MorphToken, "MorphToken");
|
m_tabShowHideSignalMapper->setMapping(ui->actionShow_MorphToken, "MorphToken");
|
||||||
|
#else
|
||||||
|
ui->actionShow_MorphToken->setVisible(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(XMRTO)
|
#if defined(XMRTO)
|
||||||
connect(ui->actionShow_xmr_to, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
connect(ui->actionShow_xmr_to, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
|
||||||
|
|
Loading…
Reference in a new issue