Revert "CMake: add TOR_INSTALLED"

This reverts commit be5fd97fe0.
This commit is contained in:
tobtoht
2023-05-24 21:53:39 +02:00
parent 12aa36a1e3
commit 8f4a306267
5 changed files with 18 additions and 27 deletions
+7 -3
View File
@@ -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