Move installer launch logic to client side for Windows
This commit is contained in:
parent
caa5132355
commit
11f9c7bc7c
1 changed files with 14 additions and 4 deletions
|
|
@ -15,7 +15,8 @@ namespace
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
const QString installerPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN.dmg";
|
const QString installerPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN.dmg";
|
||||||
#elif defined Q_OS_WINDOWS
|
#elif defined Q_OS_WINDOWS
|
||||||
const QString installerPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN.exe";
|
const QString installerPath =
|
||||||
|
QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN_installer.exe";
|
||||||
#elif defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
#elif defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||||
const QString installerPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN.tar.zip";
|
const QString installerPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/AmneziaVPN.tar.zip";
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -152,9 +153,18 @@ void UpdateController::runInstaller()
|
||||||
#if defined(Q_OS_WINDOWS)
|
#if defined(Q_OS_WINDOWS)
|
||||||
int UpdateController::runWindowsInstaller(const QString &installerPath)
|
int UpdateController::runWindowsInstaller(const QString &installerPath)
|
||||||
{
|
{
|
||||||
qDebug() << "Windows installer path:" << installerPath;
|
// Start the installer process
|
||||||
// TODO: Implement Windows installation logic
|
qint64 pid;
|
||||||
return -1;
|
bool success = QProcess::startDetached(installerPath, QStringList(), QString(), &pid);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
qDebug() << "Installation process started with PID:" << pid;
|
||||||
|
} else {
|
||||||
|
qDebug() << "Failed to start installation process";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue