diff --git a/client/common/changelog.txt b/client/common/changelog.txt index 36984c2e..33865a51 100644 --- a/client/common/changelog.txt +++ b/client/common/changelog.txt @@ -1,3 +1,12 @@ +2.10.7 (01/04/2024) +All: + * Fixed anti-censorship flag (TLS stuffing) does not work for server API. #951 +Windows: + * Fixed install may silently be overridden to default folder instead of custom folder. #950 +Linux: + * Fixed makepkg bug mangling the ctrld binary by specifying !debug in the PKGBUILD. #953 + + 2.10.6 (22/03/2024) All: * Added a limit of 50 split tunnel entries to ensure stability. #437 diff --git a/client/common/types/enginesettings.cpp b/client/common/types/enginesettings.cpp index 5be55ce3..7a0252a1 100644 --- a/client/common/types/enginesettings.cpp +++ b/client/common/types/enginesettings.cpp @@ -188,7 +188,6 @@ bool EngineSettings::loadFromSettings() qCDebug(LOG_BASIC) << "Automatically enabled anti-censorship feature due to locale"; // TODO: **JDRM** refactor this logic at some point so we don't have two sources of truth for the anti-censorship state. setIsAntiCensorship(true); - ExtraConfig::instance().setAntiCensorship(true); } } diff --git a/client/common/utils/extraconfig.cpp b/client/common/utils/extraconfig.cpp index 348107b5..3c7851eb 100644 --- a/client/common/utils/extraconfig.cpp +++ b/client/common/utils/extraconfig.cpp @@ -98,10 +98,6 @@ QString ExtraConfig::getExtraConfigForOpenVpn() if (isLegalOpenVpnCommand(line)) result += line + "\n"; } - if (getAntiCensorship()) { - result += "udp-stuffing\n"; - result += "tcp-split-reset\n"; - } return result; } @@ -162,11 +158,6 @@ QString ExtraConfig::modifyVerbParameter(const QString &ovpnData, QString &strEx return strOvpn; } -void ExtraConfig::setAntiCensorship(bool bEnable) -{ - isAntiCensorship_ = bEnable; -} - int ExtraConfig::getMtuOffsetIkev2(bool &success) { return getIntFromExtraConfigLines(WS_MTU_OFFSET_IKEV_STR, success); @@ -257,24 +248,19 @@ bool ExtraConfig::getUseICMPPings() return getFlagFromExtraConfigLines(WS_USE_ICMP_PINGS); } -bool ExtraConfig::getAntiCensorship() -{ - return isAntiCensorship_; -} - bool ExtraConfig::getStealthExtraTLSPadding() { - return getFlagFromExtraConfigLines(WS_STEALTH_EXTRA_TLS_PADDING) || getAntiCensorship(); + return getFlagFromExtraConfigLines(WS_STEALTH_EXTRA_TLS_PADDING); } bool ExtraConfig::getAPIExtraTLSPadding() { - return getFlagFromExtraConfigLines(WS_API_EXTRA_TLS_PADDING) || getAntiCensorship(); + return getFlagFromExtraConfigLines(WS_API_EXTRA_TLS_PADDING); } bool ExtraConfig::getWireGuardUdpStuffing() { - return getFlagFromExtraConfigLines(WS_WG_UDP_STUFFING) || getAntiCensorship(); + return getFlagFromExtraConfigLines(WS_WG_UDP_STUFFING); } std::optional ExtraConfig::serverlistCountryOverride() @@ -357,8 +343,7 @@ bool ExtraConfig::useOpenVpnDCO() ExtraConfig::ExtraConfig() : path_(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/windscribe_extra.conf"), - regExp_("(?m)^(?i)(verb)(\\s+)(\\d+$)"), - isAntiCensorship_(false) + regExp_("(?m)^(?i)(verb)(\\s+)(\\d+$)") { } diff --git a/client/common/utils/extraconfig.h b/client/common/utils/extraconfig.h index 5c7d941d..efb70421 100644 --- a/client/common/utils/extraconfig.h +++ b/client/common/utils/extraconfig.h @@ -22,8 +22,6 @@ class ExtraConfig void logExtraConfig(); void writeConfig(const QString &cfg); - void setAntiCensorship(bool bEnable); - bool getAntiCensorship(); QString getExtraConfig(bool bWithLog = false); QString getExtraConfigForOpenVpn(); @@ -71,7 +69,6 @@ class ExtraConfig QString path_; QRegularExpression regExp_; QString detectedIp_; - bool isAntiCensorship_; int getIntFromExtraConfigLines(const QString &variableName, bool &success); bool getFlagFromExtraConfigLines(const QString &flagName); diff --git a/client/common/version/windscribe_version.h b/client/common/version/windscribe_version.h index d1dcfe62..1c177ca6 100644 --- a/client/common/version/windscribe_version.h +++ b/client/common/version/windscribe_version.h @@ -2,7 +2,7 @@ #define WINDSCRIBE_MAJOR_VERSION 2 #define WINDSCRIBE_MINOR_VERSION 10 -#define WINDSCRIBE_BUILD_VERSION 6 +#define WINDSCRIBE_BUILD_VERSION 7 // only one of these should be enabled; neither -> stable //#define WINDSCRIBE_IS_BETA diff --git a/client/engine/engine/connectionmanager/connectionmanager.cpp b/client/engine/engine/connectionmanager/connectionmanager.cpp index 9e2e0d57..8216f05d 100644 --- a/client/engine/engine/connectionmanager/connectionmanager.cpp +++ b/client/engine/engine/connectionmanager/connectionmanager.cpp @@ -151,7 +151,7 @@ void ConnectionManager::clickConnect(const QString &ovpnConfig, const apiinfo::S QSharedPointer bli, const types::ConnectionSettings &connectionSettings, const api_responses::PortMap &portMap, const types::ProxySettings &proxySettings, - bool bEmitAuthError, const QString &customConfigPath) + bool bEmitAuthError, const QString &customConfigPath, bool isAntiCensorship) { WS_ASSERT(state_ == STATE_DISCONNECTED); @@ -160,6 +160,7 @@ void ConnectionManager::clickConnect(const QString &ovpnConfig, const apiinfo::S lastProxySettings_ = proxySettings; bEmitAuthError_ = bEmitAuthError; customConfigPath_ = customConfigPath; + isAntiCensorship_ = isAntiCensorship; bli_ = bli; bWasSuccessfullyConnectionAttempt_ = false; @@ -1009,7 +1010,7 @@ void ConnectionManager::doConnectPart2() lastOvpnConfig_, currentConnectionDescr_.ip, currentConnectionDescr_.protocol, currentConnectionDescr_.port, localPort, mss, defaultAdapterInfo_.gateway(), currentConnectionDescr_.verifyX509name, - dnsServersFromConnectedDnsInfo()); + dnsServersFromConnectedDnsInfo(), isAntiCensorship_); if (!bOvpnSuccess) { qCDebug(LOG_CONNECTION) << "Failed create ovpn config"; WS_ASSERT(false); @@ -1017,7 +1018,8 @@ void ConnectionManager::doConnectPart2() } if (currentConnectionDescr_.protocol == types::Protocol::STUNNEL) { - if (!stunnelManager_->runProcess(currentConnectionDescr_.ip, currentConnectionDescr_.port)) { + if (!stunnelManager_->runProcess(currentConnectionDescr_.ip, currentConnectionDescr_.port, + ExtraConfig::instance().getStealthExtraTLSPadding() || isAntiCensorship_)) { disconnect(); timerReconnection_.stop(); emit errorDuringConnection(CONNECT_ERROR::EXE_VERIFY_STUNNEL_ERROR); @@ -1176,7 +1178,7 @@ void ConnectionManager::doConnectPart3() wireGuardConfig_.setPeerPublicKey(currentConnectionDescr_.wgPeerPublicKey); wireGuardConfig_.setPeerEndpoint(endpointAndPort); - if (ExtraConfig::instance().getWireGuardUdpStuffing()) { + if (ExtraConfig::instance().getWireGuardUdpStuffing() || isAntiCensorship_) { QString localPort = udpStuffingWithNtp(currentConnectionDescr_.ip, currentConnectionDescr_.port); wireGuardConfig_.setClientListenPort(localPort); } diff --git a/client/engine/engine/connectionmanager/connectionmanager.h b/client/engine/engine/connectionmanager/connectionmanager.h index d43bb799..a1926582 100644 --- a/client/engine/engine/connectionmanager/connectionmanager.h +++ b/client/engine/engine/connectionmanager/connectionmanager.h @@ -46,7 +46,7 @@ class ConnectionManager : public QObject QSharedPointer bli, const types::ConnectionSettings &connectionSettings, const api_responses::PortMap &portMap, const types::ProxySettings &proxySettings, - bool bEmitAuthError, const QString &customConfigPath); + bool bEmitAuthError, const QString &customConfigPath, bool isAntiCensorship); void clickDisconnect(); void blockingDisconnect(); @@ -165,6 +165,7 @@ private slots: QString lastOvpnConfig_; apiinfo::ServerCredentials lastServerCredentials_; types::ProxySettings lastProxySettings_; + bool isAntiCensorship_ = false; bool bEmitAuthError_; QString customConfigPath_; diff --git a/client/engine/engine/connectionmanager/makeovpnfile.cpp b/client/engine/engine/connectionmanager/makeovpnfile.cpp index a4c03eb4..98e6002d 100644 --- a/client/engine/engine/connectionmanager/makeovpnfile.cpp +++ b/client/engine/engine/connectionmanager/makeovpnfile.cpp @@ -21,7 +21,7 @@ MakeOVPNFile::~MakeOVPNFile() bool MakeOVPNFile::generate(const QString &ovpnData, const QString &ip, types::Protocol protocol, uint port, uint portForStunnelOrWStunnel, int mss, const QString &defaultGateway, - const QString &openVpnX509, const QString &customDns) + const QString &openVpnX509, const QString &customDns, bool isAntiCensorship) { #ifdef Q_OS_WIN Q_UNUSED(defaultGateway); @@ -102,5 +102,10 @@ bool MakeOVPNFile::generate(const QString &ovpnData, const QString &ip, types::P config_ += strExtraConfig; } + if (isAntiCensorship) { + config_ += "udp-stuffing\n"; + config_ += "tcp-split-reset\n"; + } + return true; } diff --git a/client/engine/engine/connectionmanager/makeovpnfile.h b/client/engine/engine/connectionmanager/makeovpnfile.h index 0623d0e8..aaee2093 100644 --- a/client/engine/engine/connectionmanager/makeovpnfile.h +++ b/client/engine/engine/connectionmanager/makeovpnfile.h @@ -9,7 +9,8 @@ class MakeOVPNFile virtual ~MakeOVPNFile(); bool generate(const QString &ovpnData, const QString &ip, types::Protocol protocol, uint port, - uint portForStunnelOrWStunnel, int mss, const QString &defaultGateway, const QString &openVpnX509, const QString &customDns); + uint portForStunnelOrWStunnel, int mss, const QString &defaultGateway, const QString &openVpnX509, + const QString &customDns, bool isAntiCensorship); QString config() { return config_; } private: diff --git a/client/engine/engine/connectionmanager/stunnelmanager.cpp b/client/engine/engine/connectionmanager/stunnelmanager.cpp index 6c1704ed..4c35ea43 100644 --- a/client/engine/engine/connectionmanager/stunnelmanager.cpp +++ b/client/engine/engine/connectionmanager/stunnelmanager.cpp @@ -30,10 +30,9 @@ StunnelManager::~StunnelManager() killProcess(); } -bool StunnelManager::runProcess(const QString &hostname, unsigned int port) +bool StunnelManager::runProcess(const QString &hostname, unsigned int port, bool isExtraPadding) { bool ret = false; - bool extraPadding = ExtraConfig::instance().getStealthExtraTLSPadding(); #if defined(Q_OS_WIN) ExecutableSignature sigCheck; @@ -50,7 +49,7 @@ bool StunnelManager::runProcess(const QString &hostname, unsigned int port) args << "--remoteAddress" << hostaddr; args << "--logFilePath" << ""; args << "--tunnelType" << "2"; - if (extraPadding) { + if (isExtraPadding) { args << "--extraTlsPadding"; } @@ -59,7 +58,7 @@ bool StunnelManager::runProcess(const QString &hostname, unsigned int port) #else Helper_posix *helper_posix = dynamic_cast(helper_); - ret = !helper_posix->startStunnel(hostname, port, port_, extraPadding); + ret = !helper_posix->startStunnel(hostname, port, port_, isExtraPadding); if (ret) { emit stunnelStarted(); } diff --git a/client/engine/engine/connectionmanager/stunnelmanager.h b/client/engine/engine/connectionmanager/stunnelmanager.h index b73b8ff1..562e0034 100644 --- a/client/engine/engine/connectionmanager/stunnelmanager.h +++ b/client/engine/engine/connectionmanager/stunnelmanager.h @@ -11,7 +11,7 @@ class StunnelManager : public QObject explicit StunnelManager(QObject *parent, IHelper *helper); virtual ~StunnelManager(); - bool runProcess(const QString &hostname, unsigned int port); + bool runProcess(const QString &hostname, unsigned int port, bool isExtraPadding); void killProcess(); unsigned int getPort(); diff --git a/client/engine/engine/emergencycontroller/emergencycontroller.cpp b/client/engine/engine/emergencycontroller/emergencycontroller.cpp index be8cd5a4..473a2afa 100644 --- a/client/engine/engine/emergencycontroller/emergencycontroller.cpp +++ b/client/engine/engine/emergencycontroller/emergencycontroller.cpp @@ -39,12 +39,14 @@ EmergencyController::~EmergencyController() SAFE_DELETE(makeOVPNFile_); } -void EmergencyController::clickConnect(const types::ProxySettings &proxySettings) +void EmergencyController::clickConnect(const types::ProxySettings &proxySettings, bool isAntiCensorship) { WS_ASSERT(state_ == STATE_DISCONNECTED); state_= STATE_CONNECTING_FROM_USER_CLICK; proxySettings_ = proxySettings; + isAntiCensorship_ = isAntiCensorship; + auto callback = [this](std::vector> endpoints) { QMetaObject::invokeMethod(this, [this, endpoints] @@ -280,7 +282,8 @@ void EmergencyController::doConnect() QString ovpnConfig = QString::fromStdString(WSNet::instance()->emergencyConnect()->ovpnConfig()); WS_ASSERT(!ovpnConfig.isEmpty()); - bool bOvpnSuccess = makeOVPNFile_->generate(ovpnConfig, QString::fromStdString(endpoint->ip()), types::Protocol::fromString(protocol), endpoint->port(), 0, mss, defaultAdapterInfo_.gateway(), "", ""); + bool bOvpnSuccess = makeOVPNFile_->generate(ovpnConfig, QString::fromStdString(endpoint->ip()), types::Protocol::fromString(protocol), + endpoint->port(), 0, mss, defaultAdapterInfo_.gateway(), "", "", isAntiCensorship_); if (!bOvpnSuccess ) { qCDebug(LOG_EMERGENCY_CONNECT) << "Failed create ovpn config"; diff --git a/client/engine/engine/emergencycontroller/emergencycontroller.h b/client/engine/engine/emergencycontroller/emergencycontroller.h index 57c07298..776ec66e 100644 --- a/client/engine/engine/emergencycontroller/emergencycontroller.h +++ b/client/engine/engine/emergencycontroller/emergencycontroller.h @@ -21,7 +21,7 @@ class EmergencyController : public QObject explicit EmergencyController(QObject *parent, IHelper *helper); virtual ~EmergencyController(); - void clickConnect(const types::ProxySettings &proxySettings); + void clickConnect(const types::ProxySettings &proxySettings, bool isAntiCensorship); void clickDisconnect(); bool isDisconnected(); void blockingDisconnect(); @@ -49,6 +49,7 @@ private slots: IConnection *connector_; MakeOVPNFile *makeOVPNFile_; types::ProxySettings proxySettings_; + bool isAntiCensorship_ = false; std::vector> endpoints_; diff --git a/client/engine/engine/engine.cpp b/client/engine/engine/engine.cpp index 32eda5e2..0e991d81 100644 --- a/client/engine/engine/engine.cpp +++ b/client/engine/engine/engine.cpp @@ -94,9 +94,6 @@ Engine::Engine() : QObject(nullptr), bool bWsnetSuccess = WSNet::initialize(Utils::getPlatformNameSafe().toStdString(), AppVersion::instance().semanticVersionString().toStdString(), AppVersion::instance().isStaging(), wsnetSettings); WS_ASSERT(bWsnetSuccess); - engineSettings_.loadFromSettings(); - qCDebug(LOG_BASIC) << "Engine settings" << engineSettings_; - // Skip printing the engine settings if we loaded the defaults. if (engineSettings_.loadFromSettings()) { qCDebug(LOG_BASIC) << "Engine settings" << engineSettings_; @@ -1244,6 +1241,7 @@ void Engine::setSettingsImpl(const types::EngineSettings &engineSettings) } WSNet::instance()->serverAPI()->setIgnoreSslErrors(engineSettings_.isIgnoreSslErrors()); + WSNet::instance()->advancedParameters()->setAPIExtraTLSPadding(ExtraConfig::instance().getAPIExtraTLSPadding() || engineSettings_.isAntiCensorship()); if (isCustomOvpnConfigsPathChanged) customConfigs_->changeDir(engineSettings_.customOvpnConfigsPath()); @@ -1251,7 +1249,6 @@ void Engine::setSettingsImpl(const types::EngineSettings &engineSettings) keepAliveManager_->setEnabled(engineSettings_.isKeepAliveEnabled()); WSNet::instance()->serverAPI()->setApiResolutionsSettings(engineSettings_.apiResolutionSettings().getIsAutomatic(), engineSettings_.apiResolutionSettings().getManualAddress().toStdString()); - updateProxySettings(); } @@ -1707,7 +1704,7 @@ void Engine::onConnectionManagerRequestPrivKeyPassword(const QString &pathCustom void Engine::emergencyConnectClickImpl() { - emergencyController_->clickConnect(ProxyServerController::instance().getCurrentProxySettings()); + emergencyController_->clickConnect(ProxyServerController::instance().getCurrentProxySettings(), engineSettings_.isAntiCensorship()); } void Engine::emergencyDisconnectClickImpl() @@ -1768,7 +1765,7 @@ void Engine::updateAdvancedParamsImpl() } // send some parameters to wsnet - WSNet::instance()->advancedParameters()->setAPIExtraTLSPadding(ExtraConfig::instance().getAPIExtraTLSPadding()); + WSNet::instance()->advancedParameters()->setAPIExtraTLSPadding(ExtraConfig::instance().getAPIExtraTLSPadding() || engineSettings_.isAntiCensorship()); WSNet::instance()->advancedParameters()->setLogApiResponce(ExtraConfig::instance().getLogAPIResponse()); std::optional countryOverride = ExtraConfig::instance().serverlistCountryOverride(); WSNet::instance()->advancedParameters()->setCountryOverrideValue(countryOverride.has_value() ? countryOverride->toStdString() : ""); @@ -2389,7 +2386,7 @@ void Engine::doConnect(bool bEmitAuthError) connectionManager_->setLastKnownGoodProtocol(engineSettings_.networkLastKnownGoodProtocol(networkInterface.networkOrSsid)); connectionManager_->clickConnect(apiResourcesManager_->ovpnConfig(), apiResourcesManager_->serverCredentials(), bli, connectionSettings, apiResourcesManager_->portMap(), ProxyServerController::instance().getCurrentProxySettings(), - bEmitAuthError, engineSettings_.customOvpnConfigsPath()); + bEmitAuthError, engineSettings_.customOvpnConfigsPath(), engineSettings_.isAntiCensorship()); } // for custom configs without login else @@ -2398,7 +2395,7 @@ void Engine::doConnect(bool bEmitAuthError) qCDebug(LOG_CONNECTION) << "Connecting to" << locationName_; connectionManager_->clickConnect("", apiinfo::ServerCredentials(), bli, engineSettings_.connectionSettingsForNetworkInterface(networkInterface.networkOrSsid), api_responses::PortMap(), - ProxyServerController::instance().getCurrentProxySettings(), bEmitAuthError, engineSettings_.customOvpnConfigsPath()); + ProxyServerController::instance().getCurrentProxySettings(), bEmitAuthError, engineSettings_.customOvpnConfigsPath(), engineSettings_.isAntiCensorship()); } } diff --git a/client/gui/backend/preferences/preferences.cpp b/client/gui/backend/preferences/preferences.cpp index b706009b..9542542f 100644 --- a/client/gui/backend/preferences/preferences.cpp +++ b/client/gui/backend/preferences/preferences.cpp @@ -426,7 +426,6 @@ void Preferences::setAntiCensorship(bool b) if (engineSettings_.isAntiCensorship() != b) { engineSettings_.setIsAntiCensorship(b); - ExtraConfig::instance().setAntiCensorship(b); emitEngineSettingsChanged(); emit isAntiCensorshipChanged(engineSettings_.isAntiCensorship()); } diff --git a/installer/common/installer_shim.h b/installer/common/installer_shim.h index bce6e750..a98a9340 100644 --- a/installer/common/installer_shim.h +++ b/installer/common/installer_shim.h @@ -7,7 +7,7 @@ class InstallerShim { public: enum INSTALLER_STATE { STATE_INIT, STATE_EXTRACTING, STATE_CANCELED, STATE_FINISHED, STATE_ERROR, STATE_LAUNCHED }; - enum INSTALLER_ERROR { ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_OTHER }; + enum INSTALLER_ERROR { ERROR_OTHER = 1, ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_MOVE_CUSTOM_DIR }; static InstallerShim &instance() { diff --git a/installer/common/mainwindow.cpp b/installer/common/mainwindow.cpp index 8c824397..ed563f80 100644 --- a/installer/common/mainwindow.cpp +++ b/installer/common/mainwindow.cpp @@ -195,6 +195,11 @@ void MainWindow::onInstallerCallback() Q_ARG(QString, tr("Installation failed")), Q_ARG(QString, tr("The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again.")), Q_ARG(bool, true)); + } else if (error == InstallerShim::ERROR_MOVE_CUSTOM_DIR) { + QMetaObject::invokeMethod(this, "showError", Qt::QueuedConnection, + Q_ARG(QString, tr("Installation failed")), + Q_ARG(QString, tr("The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again.")), + Q_ARG(bool, true)); } else { QMetaObject::invokeMethod(this, "showError", Qt::QueuedConnection, Q_ARG(QString, tr("Installation failed")), diff --git a/installer/common/translations/windscribe_installer_ar.ts b/installer/common/translations/windscribe_installer_ar.ts index b3f8588e..0d647334 100644 --- a/installer/common/translations/windscribe_installer_ar.ts +++ b/installer/common/translations/windscribe_installer_ar.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. تعذر العثور على برنامج إلغاء التثبيت للتثبيت الحالي ل Windscribe. الرجاء إلغاء تثبيت التطبيق يدويا والمحاولة مرة أخرى. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + يحتوي مجلد التثبيت على بيانات تعذر إلغاء تثبيتها. الرجاء إلغاء تثبيت التطبيق يدويا والمحاولة مرة أخرى. + QObject diff --git a/installer/common/translations/windscribe_installer_cs.ts b/installer/common/translations/windscribe_installer_cs.ts index 139e5aa6..c4815c2e 100644 --- a/installer/common/translations/windscribe_installer_cs.ts +++ b/installer/common/translations/windscribe_installer_cs.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Odinstalační program pro stávající instalaci aplikace Windscribe nebyl nalezen. Odinstalujte aplikaci ručně a zkuste to znovu. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Instalační složka obsahuje data, která nelze odinstalovat. Odinstalujte aplikaci ručně a zkuste to znovu. + QObject diff --git a/installer/common/translations/windscribe_installer_de.ts b/installer/common/translations/windscribe_installer_de.ts index 8dd76be6..0f7d9efb 100644 --- a/installer/common/translations/windscribe_installer_de.ts +++ b/installer/common/translations/windscribe_installer_de.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Das Deinstallationsprogramm für die bestehende Installation von Windscribe konnte nicht gefunden werden. Bitte deinstallieren Sie die Anwendung manuell und versuchen Sie es erneut. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Der Installationsordner enthält Daten, die nicht deinstalliert werden konnten. Bitte deinstallieren Sie die Anwendung manuell und versuchen Sie es erneut. + QObject diff --git a/installer/common/translations/windscribe_installer_en.ts b/installer/common/translations/windscribe_installer_en.ts index 58492f8b..2dc9433d 100644 --- a/installer/common/translations/windscribe_installer_en.ts +++ b/installer/common/translations/windscribe_installer_en.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + QObject diff --git a/installer/common/translations/windscribe_installer_es.ts b/installer/common/translations/windscribe_installer_es.ts index 197079bf..254ed01d 100644 --- a/installer/common/translations/windscribe_installer_es.ts +++ b/installer/common/translations/windscribe_installer_es.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. No se pudo encontrar el desinstalador de la instalación existente de Windscribe. Desinstale la aplicación manualmente e inténtelo de nuevo. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + La carpeta de instalación contiene datos que no se han podido desinstalar. Desinstale la aplicación manualmente e inténtelo de nuevo. + QObject diff --git a/installer/common/translations/windscribe_installer_fa.ts b/installer/common/translations/windscribe_installer_fa.ts index 7148fd33..b6ed001e 100644 --- a/installer/common/translations/windscribe_installer_fa.ts +++ b/installer/common/translations/windscribe_installer_fa.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. حذف نصب برای نصب موجود Windscribe یافت نشد. لطفا برنامه را به صورت دستی حذف کنید و دوباره امتحان کنید. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + پوشه نصب حاوی داده هایی است که نمی توان انها را حذف نصب کرد. لطفا برنامه را به صورت دستی حذف کنید و دوباره امتحان کنید. + QObject diff --git a/installer/common/translations/windscribe_installer_fr.ts b/installer/common/translations/windscribe_installer_fr.ts index ae33ca8f..5049849b 100644 --- a/installer/common/translations/windscribe_installer_fr.ts +++ b/installer/common/translations/windscribe_installer_fr.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Le programme de désinstallation de l’installation existante de Windscribe est introuvable. Veuillez désinstaller l’application manuellement et réessayer. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Le dossier d’installation contient des données qui n’ont pas pu être désinstallées. Veuillez désinstaller l’application manuellement et réessayer. + QObject diff --git a/installer/common/translations/windscribe_installer_hi.ts b/installer/common/translations/windscribe_installer_hi.ts index 82467f35..c98ffe20 100644 --- a/installer/common/translations/windscribe_installer_hi.ts +++ b/installer/common/translations/windscribe_installer_hi.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Windscribe की मौजूदा स्थापना के लिए अनइंस्टालर नहीं मिल सका। कृपया अनुप्रयोग की स्थापना मैन्युअल रूप से रद्द करें और पुन: प्रयास करें. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + स्थापना फ़ोल्डर में वह डेटा है जिसकी स्थापना रद्द नहीं की जा सकी. कृपया अनुप्रयोग की स्थापना मैन्युअल रूप से रद्द करें और पुन: प्रयास करें. + QObject diff --git a/installer/common/translations/windscribe_installer_id.ts b/installer/common/translations/windscribe_installer_id.ts index ac955f4d..90aec313 100644 --- a/installer/common/translations/windscribe_installer_id.ts +++ b/installer/common/translations/windscribe_installer_id.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Uninstaller untuk instalasi Windscribe yang ada tidak dapat ditemukan. Hapus instalan aplikasi secara manual dan coba lagi. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Folder instalasi berisi data yang tidak dapat dihapus. Hapus instalan aplikasi secara manual dan coba lagi. + QObject diff --git a/installer/common/translations/windscribe_installer_it.ts b/installer/common/translations/windscribe_installer_it.ts index 2bf87cd6..76c821c2 100644 --- a/installer/common/translations/windscribe_installer_it.ts +++ b/installer/common/translations/windscribe_installer_it.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Non è stato possibile trovare il programma di disinstallazione per l'installazione esistente di Windscribe. Disinstallare l'applicazione manualmente e riprovare. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + La cartella di installazione contiene dati che non è stato possibile disinstallare. Disinstallare l'applicazione manualmente e riprovare. + QObject diff --git a/installer/common/translations/windscribe_installer_ja.ts b/installer/common/translations/windscribe_installer_ja.ts index 59e56745..6e952e99 100644 --- a/installer/common/translations/windscribe_installer_ja.ts +++ b/installer/common/translations/windscribe_installer_ja.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Windscribeの既存のインストールのアンインストーラーが見つかりませんでした。アプリケーションを手動でアンインストールして、もう一度やり直してください。 + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + インストールフォルダには、アンインストールできなかったデータが含まれています。アプリケーションを手動でアンインストールして、もう一度やり直してください。 + QObject diff --git a/installer/common/translations/windscribe_installer_ko.ts b/installer/common/translations/windscribe_installer_ko.ts index bb3c24a1..1277d6a8 100644 --- a/installer/common/translations/windscribe_installer_ko.ts +++ b/installer/common/translations/windscribe_installer_ko.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Windscribe의 기존 설치에 대한 제거 프로그램을 찾을 수 없습니다. 응용 프로그램을 수동으로 제거하고 다시 시도하십시오. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + 설치 폴더에는 제거할 수 없는 데이터가 포함되어 있습니다. 응용 프로그램을 수동으로 제거하고 다시 시도하십시오. + QObject diff --git a/installer/common/translations/windscribe_installer_pl.ts b/installer/common/translations/windscribe_installer_pl.ts index 6b816fce..ce7c93af 100644 --- a/installer/common/translations/windscribe_installer_pl.ts +++ b/installer/common/translations/windscribe_installer_pl.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Nie można odnaleźć deinstalatora istniejącej instalacji Windscribe. Odinstaluj aplikację ręcznie i spróbuj ponownie. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Folder instalacyjny zawiera dane, których nie można odinstalować. Odinstaluj aplikację ręcznie i spróbuj ponownie. + QObject diff --git a/installer/common/translations/windscribe_installer_pt.ts b/installer/common/translations/windscribe_installer_pt.ts index ba78d496..1cdc00b2 100644 --- a/installer/common/translations/windscribe_installer_pt.ts +++ b/installer/common/translations/windscribe_installer_pt.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. O desinstalador para a instalação existente do Windscribe não pôde ser encontrado. Desinstale o aplicativo manualmente e tente novamente. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + A pasta de instalação contém dados que não puderam ser desinstalados. Desinstale o aplicativo manualmente e tente novamente. + QObject diff --git a/installer/common/translations/windscribe_installer_ru.ts b/installer/common/translations/windscribe_installer_ru.ts index ffceadd3..bd05075a 100644 --- a/installer/common/translations/windscribe_installer_ru.ts +++ b/installer/common/translations/windscribe_installer_ru.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Не удалось найти деинсталлятор для существующей установки Windscribe. Удалите приложение вручную и повторите попытку. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Папка установки содержит данные, которые не удалось удалить. Удалите приложение вручную и повторите попытку. + QObject diff --git a/installer/common/translations/windscribe_installer_tr.ts b/installer/common/translations/windscribe_installer_tr.ts index 478f7088..b34c01ea 100644 --- a/installer/common/translations/windscribe_installer_tr.ts +++ b/installer/common/translations/windscribe_installer_tr.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Windscribe'ın mevcut kurulumu için kaldırıcı bulunamadı. Lütfen uygulamayı manuel olarak kaldırın ve tekrar deneyin. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Yükleme klasörü kaldırılamayan veriler içeriyor. Lütfen uygulamayı manuel olarak kaldırın ve tekrar deneyin. + QObject diff --git a/installer/common/translations/windscribe_installer_uk.ts b/installer/common/translations/windscribe_installer_uk.ts index e5ea7fb7..0b38e12a 100644 --- a/installer/common/translations/windscribe_installer_uk.ts +++ b/installer/common/translations/windscribe_installer_uk.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Не вдалося знайти деінсталятор для існуючої інсталяції Windscribe. Будь ласка, видаліть програму вручну та повторіть спробу. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Папка інсталяції містить дані, які не вдалося видалити. Будь ласка, видаліть програму вручну та повторіть спробу. + QObject diff --git a/installer/common/translations/windscribe_installer_vi.ts b/installer/common/translations/windscribe_installer_vi.ts index 7cc927a0..6059c222 100644 --- a/installer/common/translations/windscribe_installer_vi.ts +++ b/installer/common/translations/windscribe_installer_vi.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. Không thể tìm thấy trình gỡ cài đặt cho cài đặt Windscribe hiện có. Vui lòng gỡ cài đặt ứng dụng theo cách thủ công và thử lại. + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + Thư mục cài đặt chứa dữ liệu không thể gỡ cài đặt. Vui lòng gỡ cài đặt ứng dụng theo cách thủ công và thử lại. + QObject diff --git a/installer/common/translations/windscribe_installer_zh-CN.ts b/installer/common/translations/windscribe_installer_zh-CN.ts index 0769344e..6c9d90a8 100644 --- a/installer/common/translations/windscribe_installer_zh-CN.ts +++ b/installer/common/translations/windscribe_installer_zh-CN.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. 无法找到现有安装的 Windscribe 的卸载程序。请手动卸载应用程序,然后重试。 + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + 安装文件夹包含无法卸载的数据。请手动卸载应用程序,然后重试。 + QObject diff --git a/installer/common/translations/windscribe_installer_zh-TW.ts b/installer/common/translations/windscribe_installer_zh-TW.ts index daca2e4a..b52978b7 100644 --- a/installer/common/translations/windscribe_installer_zh-TW.ts +++ b/installer/common/translations/windscribe_installer_zh-TW.ts @@ -88,6 +88,10 @@ The uninstaller for the existing installation of Windscribe could not be found. Please uninstall the application manually and try again. 無法找到現有安裝的Windscribe的卸載程式。請手動卸載應用程式,然後重試。 + + The installation folder contains data which could not be uninstalled. Please uninstall the application manually and try again. + 安裝資料夾包含無法卸載的數據。請手動卸載應用程式,然後重試。 + QObject diff --git a/installer/linux/arch_package/PKGBUILD b/installer/linux/arch_package/PKGBUILD index 0eefa9f0..ee8d7853 100644 --- a/installer/linux/arch_package/PKGBUILD +++ b/installer/linux/arch_package/PKGBUILD @@ -14,7 +14,7 @@ depends=('nftables' 'c-ares' 'freetype2' 'hicolor-icon-theme' 'systemd' 'glibc>= 'iputils') conflicts=('windscribe-cli') provides=('windscribe') -options=('!strip' '!emptydirs') +options=('!strip' '!emptydirs' '!debug') install=${pkgname}.install source=($APP_DOWNLOAD_URL) sha512sums=('SKIP') diff --git a/installer/mac/installer/installer/base_installer.h b/installer/mac/installer/installer/base_installer.h index 78899e8e..158f105f 100644 --- a/installer/mac/installer/installer/base_installer.h +++ b/installer/mac/installer/installer/base_installer.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN enum INSTALLER_CURRENT_STATE { STATE_INIT, STATE_EXTRACTING, STATE_CANCELED, STATE_FINISHED, STATE_ERROR, STATE_LAUNCHED }; -enum INSTALLER_ERROR { ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_OTHER }; +enum INSTALLER_ERROR { ERROR_OTHER = 1, ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_MOVE_CUSTOM_DIR }; @interface BaseInstaller : NSObject { diff --git a/installer/windows/installer/installer/blocks/files.cpp b/installer/windows/installer/installer/blocks/files.cpp index 7c03b76b..92ef5adb 100644 --- a/installer/windows/installer/installer/blocks/files.cpp +++ b/installer/windows/installer/installer/blocks/files.cpp @@ -3,6 +3,7 @@ #include #include +#include "../installer_base.h" #include "../settings.h" #include "../../../utils/applicationinfo.h" #include "../../../utils/logger.h" @@ -37,7 +38,7 @@ int Files::executeStep() auto result = ::SHCreateDirectoryEx(NULL, installPath_.c_str(), NULL); if (result != ERROR_SUCCESS) { Log::instance().out(L"Failed to create default install directory (%d)", result); - return -1; + return -ERROR_OTHER; } } @@ -50,7 +51,7 @@ int Files::executeStep() if (res != SZ_OK) { Log::instance().out(L"Failed to extract file list from archive."); - return -1; + return -ERROR_OTHER; } fillPathList(); @@ -66,7 +67,7 @@ int Files::executeStep() { archive_->finish(); Log::instance().out(L"Failed to extract file at index %u.", curFileInd_); - return -1; + return -ERROR_OTHER; } if (curFileInd_ >= (archive_->getNumFiles() - 1)) @@ -74,7 +75,7 @@ int Files::executeStep() archive_->finish(); if (!copyLibs()) { Log::instance().out(L"Failed to copy libs"); - return -1; + return -ERROR_OTHER; } return moveFiles(); } @@ -132,9 +133,26 @@ int Files::moveFiles() } } catch (system_error& ex) { - // Update the install path that will be used by the subsequent blocks. - Settings::instance().setPath(installPath_); - Log::instance().out("Files::moveFiles() %s (%lu)", ex.what(), ex.code().value()); + Log::instance().out(L"Could not move installed files: %hs", ex.what()); + + // Delete "C:\Program Files\Windscribe" since we don't want to leave files behind. + // SHFileOperation requires the path to be double-null terminated. + std::wstring installPathDoubleNull = installPath_ + L"\0"s; + SHFILEOPSTRUCT fileOp = { + NULL, + FO_DELETE, + installPathDoubleNull.c_str(), + NULL, + FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT, + FALSE, + NULL, + NULL + }; + int ret = SHFileOperation(&fileOp); + if (ret) { + Log::instance().out(L"Could not delete partial install: %lu", ret); + } + return -ERROR_MOVE_CUSTOM_DIR; } return 100; diff --git a/installer/windows/installer/installer/blocks/install_authhelper.cpp b/installer/windows/installer/installer/blocks/install_authhelper.cpp index 14a72f27..fa59ec92 100644 --- a/installer/windows/installer/installer/blocks/install_authhelper.cpp +++ b/installer/windows/installer/installer/blocks/install_authhelper.cpp @@ -1,5 +1,6 @@ #include "install_authhelper.h" +#include "../installer_base.h" #include "../settings.h" #include "../../../Utils/logger.h" #include "../../../Utils/path.h" @@ -29,7 +30,7 @@ int InstallAuthHelper::executeStep() if (hProxyStubLib == NULL) { Log::instance().out("Failed to load Auth Helper Proxy Stub Library"); lastError_ = L"An error occurred when loading the Auth Helper Proxy Stub library"; - return -1; + return -ERROR_OTHER; } typedef HRESULT(*simpleFunc) (void); @@ -41,13 +42,13 @@ int InstallAuthHelper::executeStep() Log::instance().out("Call to Proxy Stub DllRegisterServer failed"); lastError_ = L"An error occurred when calling Proxy Stub DllRegisterServer"; FreeLibrary(hProxyStubLib); - return -1; + return -ERROR_OTHER; } } else { Log::instance().out("Failed to get proxy stub DllRegisterServer"); lastError_ = L"An error occurred when getting proxy stub DllRegisterServer"; FreeLibrary(hProxyStubLib); - return -1; + return -ERROR_OTHER; } FreeLibrary(hProxyStubLib); @@ -59,7 +60,7 @@ int InstallAuthHelper::executeStep() if (hLib == NULL) { Log::instance().out("Failed to load Auth Helper Library"); lastError_ = L"An error occurred when loading the Auth Helper library: "; - return -1; + return -ERROR_OTHER; } typedef HRESULT(__stdcall *someFunc) (const std::wstring &, const std::wstring &, const std::wstring &); @@ -73,13 +74,13 @@ int InstallAuthHelper::executeStep() Log::instance().out("Call to RegisterServerWithTargetPaths failed"); lastError_ = L"An error occurred when calling RegisterServerWithTargetPaths: "; FreeLibrary(hLib); - return -1; + return -ERROR_OTHER; } } else { Log::instance().out("Failed to get reg server function"); lastError_ = L"An error occurred when getting RegisterServerWithTargetPaths: "; FreeLibrary(hLib); - return -1; + return -ERROR_OTHER; } FreeLibrary(hLib); Log::instance().out("Auth helper installed successfully"); diff --git a/installer/windows/installer/installer/blocks/install_openvpn_dco.cpp b/installer/windows/installer/installer/blocks/install_openvpn_dco.cpp index d4006017..db5ef5b1 100644 --- a/installer/windows/installer/installer/blocks/install_openvpn_dco.cpp +++ b/installer/windows/installer/installer/blocks/install_openvpn_dco.cpp @@ -5,6 +5,7 @@ #include #include +#include "../installer_base.h" #include "../settings.h" #include "../../../utils/applicationinfo.h" #include "../../../utils/logger.h" @@ -25,7 +26,7 @@ int InstallOpenVPNDCO::executeStep() Log::instance().out( "WARNING: OS version is not compatible with the OpenVPN DCO driver. Windows 10 build %lu or newer is required" " to use this driver.", kMinWindowsBuildNumberForOpenVPNDCO); - return -1; + return -ERROR_OTHER; } const QString installPath = QString::fromStdWString(Settings::instance().getPath()); @@ -42,7 +43,7 @@ int InstallOpenVPNDCO::executeStep() if (process.exitCode() != 0) { Log::instance().out(L"InstallOpenVPNDCO: devcon.exe returned exit code %d", process.exitCode()); Log::instance().out(L"InstallOpenVPNDCO: devcon.exe output (%S)", appOutput.constData()); - return -1; + return -ERROR_OTHER; } // Parse the OEM identifier from the output and store it for use during uninstall. @@ -50,7 +51,7 @@ int InstallOpenVPNDCO::executeStep() const QRegularExpressionMatch match = re.match(appOutput); if (!match.hasMatch()) { Log::instance().out(L"InstallOpenVPNDCO: failed to find OEM indentifier in devcon.exe output (%S)", appOutput.constData()); - return -1; + return -ERROR_OTHER; } QString adapterOEMIdentifier = match.captured(0); diff --git a/installer/windows/installer/installer/blocks/install_splittunnel.cpp b/installer/windows/installer/installer/blocks/install_splittunnel.cpp index 21e32ebb..da902510 100644 --- a/installer/windows/installer/installer/blocks/install_splittunnel.cpp +++ b/installer/windows/installer/installer/blocks/install_splittunnel.cpp @@ -2,6 +2,7 @@ #include +#include "../installer_base.h" #include "../settings.h" #include "../../../utils/logger.h" #include "../../../utils/path.h" @@ -48,7 +49,7 @@ int InstallSplitTunnel::executeStep() } catch (system_error& ex) { Log::instance().out(ex.what()); - result = -1; + result = -ERROR_OTHER; } if (hService != NULL) { diff --git a/installer/windows/installer/installer/blocks/uninstallprev.cpp b/installer/windows/installer/installer/blocks/uninstallprev.cpp index 7e9cfc0c..2eb149ee 100644 --- a/installer/windows/installer/installer/blocks/uninstallprev.cpp +++ b/installer/windows/installer/installer/blocks/uninstallprev.cpp @@ -7,6 +7,7 @@ #include #include +#include "../installer_base.h" #include "../../../utils/applicationinfo.h" #include "../../../utils/logger.h" #include "../../../utils/path.h" @@ -57,11 +58,11 @@ int UninstallPrev::executeStep() const auto result = Utils::InstExec(appName, commandLine, INFINITE, SW_HIDE); if (!result.has_value()) { Log::instance().out("WARNING: an error was encountered attempting to start taskkill.exe."); - return -1; + return -ERROR_OTHER; } else if (result.value() != NO_ERROR && result.value() != ERROR_WAIT_NO_CHILDREN) { Log::instance().out("WARNING: unable to kill Windscribe (%lu).", result.value()); - return -1; + return -ERROR_OTHER; } else { Log::instance().out(L"Windscribe was successfully killed."); @@ -90,19 +91,17 @@ int UninstallPrev::executeStep() if (!uninstallOldVersion(uninstallString, lastError)) { Log::instance().out("UninstallPrev::executeStep: uninstallOldVersion failed: %lu", lastError); if (lastError != 2) { // Any error other than "Not found" - return -1; + return -ERROR_OTHER; } // Uninstall failed because the uninstaller doesn't exist. if (!isPrevInstall64Bit()) { - // A little hacky to pass a special code here, but this is the only way to indicate to caller. - // If the previous version is using the 32-bit hive, don't try to use the current (64-bit) uninstaller. - return -2; + return -ERROR_UNINSTALL; } if (!extractUninstaller()) { Log::instance().out("UninstallPrev::executeStep: could not extract uninstaller."); - return -1; + return -ERROR_OTHER; } Log::instance().out("UninstallPrev::executeStep: successfully extracted uninstaller, trying again."); return 65; diff --git a/installer/windows/installer/installer/installer.cpp b/installer/windows/installer/installer/installer.cpp index 090ed541..8ab79db5 100644 --- a/installer/windows/installer/installer/installer.cpp +++ b/installer/windows/installer/installer/installer.cpp @@ -97,11 +97,7 @@ void Installer::executionImpl() // error from block? else if (progressOfBlock < 0) { progress_ = overallProgress; - if (progressOfBlock == -2) { - error_ = ERROR_UNINSTALL; - } else { - error_ = ERROR_OTHER; - } + error_ = static_cast(-progressOfBlock); state_ = STATE_ERROR; callback_(); Log::instance().out(block->getLastError()); diff --git a/installer/windows/installer/installer/installer_base.h b/installer/windows/installer/installer/installer_base.h index 8b70397f..2fec3efe 100644 --- a/installer/windows/installer/installer/installer_base.h +++ b/installer/windows/installer/installer/installer_base.h @@ -12,7 +12,7 @@ enum INSTALLER_CURRENT_STATE { STATE_LAUNCHED, }; -enum INSTALLER_ERROR { ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_OTHER }; +enum INSTALLER_ERROR { ERROR_OTHER = 1, ERROR_PERMISSION, ERROR_KILL, ERROR_CONNECT_HELPER, ERROR_DELETE, ERROR_UNINSTALL, ERROR_MOVE_CUSTOM_DIR }; class InstallerBase {