mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 15:21:30 +02:00
+1
-5
@@ -187,10 +187,6 @@ if(TOR_DIR)
|
||||
target_compile_definitions(feather PRIVATE HAS_TOR_BIN=1)
|
||||
endif()
|
||||
|
||||
if(TOR_INSTALLED)
|
||||
target_compile_definitions(feather PRIVATE TOR_INSTALLED=1)
|
||||
endif()
|
||||
|
||||
if(XMRIG)
|
||||
target_compile_definitions(feather PRIVATE HAS_XMRIG=1)
|
||||
endif()
|
||||
@@ -322,4 +318,4 @@ else()
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/feather.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/assets/images/appicons/256x256.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/256x256/apps RENAME "feather.png")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -21,7 +21,7 @@ TorManager::TorManager(QObject *parent)
|
||||
connect(m_checkConnectionTimer, &QTimer::timeout, this, &TorManager::checkConnection);
|
||||
|
||||
this->torDir = Config::defaultConfigDir().filePath("tor");
|
||||
#if defined(TOR_INSTALLED)
|
||||
#if defined(PLATFORM_INSTALLER)
|
||||
// When installed, use directory relative to application path.
|
||||
this->torDir = QDir(Utils::applicationPath()).filePath("tor");
|
||||
#endif
|
||||
@@ -73,6 +73,10 @@ void TorManager::start() {
|
||||
}
|
||||
|
||||
QFile torFile{this->torPath};
|
||||
QString alternativeTorFile = QCoreApplication::applicationDirPath() + "/tor";
|
||||
if (!torFile.exists() && QFileInfo(alternativeTorFile).isFile()) {
|
||||
this->torPath = alternativeTorFile;
|
||||
}
|
||||
|
||||
qDebug() << QString("Start process: %1").arg(this->torPath);
|
||||
|
||||
@@ -186,7 +190,7 @@ bool TorManager::unpackBins() {
|
||||
|
||||
this->torPath = QDir(this->torDir).filePath(torBin);
|
||||
|
||||
#if defined(TOR_INSTALLED)
|
||||
#if defined(PLATFORM_INSTALLER)
|
||||
// We don't need to unpack if Tor was installed using the installer
|
||||
return true;
|
||||
#endif
|
||||
@@ -250,7 +254,7 @@ bool TorManager::shouldStartTorDaemon() {
|
||||
}
|
||||
|
||||
// Don't start a Tor daemon if we don't have one
|
||||
#if !defined(HAS_TOR_BIN) && !defined(TOR_INSTALLED)
|
||||
#if !defined(HAS_TOR_BIN) && !defined(PLATFORM_INSTALLER)
|
||||
qWarning() << "Feather built without embedded Tor. Assuming --use-local-tor";
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@ NetworkProxyWidget::NetworkProxyWidget(QWidget *parent)
|
||||
|
||||
// [Tor settings]
|
||||
// [Let Feather start and manage a Tor daemon]
|
||||
#if !defined(HAS_TOR_BIN) && !defined(TOR_INSTALLED)
|
||||
#if !defined(HAS_TOR_BIN) && !defined(PLATFORM_INSTALLER)
|
||||
ui->checkBox_torManaged->setChecked(false);
|
||||
ui->checkBox_torManaged->setEnabled(false);
|
||||
ui->checkBox_torManaged->setToolTip("Feather was bundled without Tor");
|
||||
@@ -69,7 +69,7 @@ NetworkProxyWidget::NetworkProxyWidget(QWidget *parent)
|
||||
|
||||
// [Show Tor logs]
|
||||
ui->frame_torShowLogs->setVisible(!config()->get(Config::useLocalTor).toBool());
|
||||
#if !defined(HAS_TOR_BIN) && !defined(TOR_INSTALLED)
|
||||
#if !defined(HAS_TOR_BIN) && !defined(PLATFORM_INSTALLER)
|
||||
ui->frame_torShowLogs->setVisible(false);
|
||||
#endif
|
||||
connect(ui->btn_torShowLogs, &QPushButton::clicked, [this]{
|
||||
|
||||
Reference in New Issue
Block a user