]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Cmake: add SELF_CONTAINED
authortobtoht <thotbot@protonmail.com>
Fri, 25 Feb 2022 19:48:14 +0000 (20:48 +0100)
committertobtoht <thotbot@protonmail.com>
Fri, 25 Feb 2022 19:48:14 +0000 (20:48 +0100)
CMakeLists.txt
src/CMakeLists.txt
src/MainWindow.cpp

index 9bd8c2b72b2fe4fa4a8ee4162f306d4afbd1c523..a5339f8499369a10e00b91074d5545646a3bfee7 100644 (file)
@@ -10,6 +10,7 @@ set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
 
 option(STATIC "Link libraries statically, requires static Qt")
 
+option(SELF_CONTAINED "Disable when building Feather for packages" OFF)
 option(LOCALMONERO "Include LocalMonero module" ON)
 option(XMRIG "Include XMRig module" ON)
 option(TOR_BIN "Path to Tor binary to embed inside Feather" OFF)
index 3c6461dff09d50fe7e21b0e79df4a04de8719313..d21d2f20087747e4bb4a01b23ff53b7eaba379c6 100644 (file)
@@ -144,6 +144,10 @@ if(WITH_SCANNER)
     )
 endif()
 
+if(SELF_CONTAINED)
+    target_compile_definitions(feather PRIVATE SELF_CONTAINED=1)
+endif()
+
 if(DONATE_BEG)
     target_compile_definitions(feather PRIVATE DONATE_BEG=1)
 endif()
index ce48323621d1d45e6396d35ed0eff665ac364eec..d9c33f4054bd0452bd966cf89daa550eeeb0ff1a 100644 (file)
@@ -317,6 +317,10 @@ void MainWindow::initMenu() {
     ui->actionCreateDesktopEntry->setDisabled(true);
 #endif
 
+#ifndef SELF_CONTAINED
+    ui->actionCreateDesktopEntry->setVisible(false);
+#endif
+
     // [Help]
     connect(ui->actionAbout,             &QAction::triggered, this, &MainWindow::menuAboutClicked);
     connect(ui->actionOfficialWebsite,   &QAction::triggered, [this](){Utils::externalLinkWarning(this, "https://featherwallet.org");});