fix(update): enable self-update for installed app via release tarball
The update dialog offered a disabled button when running from an install prefix without a source checkout, and the version file lagged behind the release tag. Add a tarball download + rebuild + reinstall path to the same prefix (sudo only for system prefixes) and bump the version file to 1.3.1.
This commit is contained in:
1 parent
4200f63b4f
commit
40a01b0060
4 files changed
+215
-43
No files matched your search
@@ -9,9 +9,12 @@
|
|||||||
|
|
||||||
// Checks the Gitea repository for new releases and tracks the last check
|
// Checks the Gitea repository for new releases and tracks the last check
|
||||||
// state in a JSON file so the app only queries the API once per day.
|
// state in a JSON file so the app only queries the API once per day.
|
||||||
// When the user accepts, the app updates itself by pulling + rebuilding
|
// Self-update works in two modes:
|
||||||
// the source repository in the background; the running binary stays
|
// - source checkout present (dev): git pull + rebuild in place;
|
||||||
// untouched until the next launch.
|
// - installed without the repo (~/.local/bin, /usr/...): download the
|
||||||
|
// release tarball, build it in /tmp and `cmake --install` to the same
|
||||||
|
// prefix the running binary was installed to (sudo when needed).
|
||||||
|
// The running binary stays untouched until the next launch.
|
||||||
class UpdateManager : public QObject {
|
class UpdateManager : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -38,16 +41,26 @@ public:
|
|||||||
static bool isNewerVersion(const QString& remote, const QString& local);
|
static bool isNewerVersion(const QString& remote, const QString& local);
|
||||||
|
|
||||||
// Path of the source repository, or empty when the app is installed
|
// Path of the source repository, or empty when the app is installed
|
||||||
// without the repo (e.g. ~/.local/bin). Used for self-update.
|
// without the repo (e.g. ~/.local/bin).
|
||||||
QString repoPath() const;
|
QString repoPath() const;
|
||||||
|
|
||||||
// Whether the source repository is present so a self-update is possible.
|
// Download URL of the source tarball for the pending update (empty until
|
||||||
|
// a check completes), plus the human-readable release page.
|
||||||
|
QString tarballUrl() const;
|
||||||
|
QString releasePageUrl() const;
|
||||||
|
|
||||||
|
// Install prefix the running binary was installed to (e.g. ~/.local,
|
||||||
|
// /usr/local, /usr). Used to reinstall the fresh build at the same place.
|
||||||
|
QString installPrefix() const;
|
||||||
|
|
||||||
|
// Whether a self-update is possible. True when running from a source
|
||||||
|
// checkout, or when a tarball URL is known (installed mode).
|
||||||
bool canSelfUpdate() const;
|
bool canSelfUpdate() const;
|
||||||
|
|
||||||
// Pulls the latest code from the remote and rebuilds the app in the
|
// Rebuilds + reinstalls the app in the background. Pass the sudo password
|
||||||
// background. The current running binary is left untouched; the new
|
// when the install prefix is not user-writable (empty = no sudo pipe,
|
||||||
// version takes effect at the next launch. Emits selfUpdateFinished.
|
// `sudo` will prompt on its own if needed). Emits selfUpdateFinished.
|
||||||
void performSelfUpdate();
|
void performSelfUpdate(const QString& sudoPassword = QString());
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// Emitted after a check completes. hasUpdate is true when a newer
|
// Emitted after a check completes. hasUpdate is true when a newer
|
||||||
@@ -69,5 +82,7 @@ private:
|
|||||||
QString m_lastCheckDate; // ISO date of the last successful check
|
QString m_lastCheckDate; // ISO date of the last successful check
|
||||||
QString m_lastKnownRemoteVersion; // latest version seen on the server
|
QString m_lastKnownRemoteVersion; // latest version seen on the server
|
||||||
QString m_latestVersion; // version of the pending update
|
QString m_latestVersion; // version of the pending update
|
||||||
|
QString m_tarballUrl; // source tarball for the pending update
|
||||||
|
QString m_releasePageUrl; // human-readable release page
|
||||||
QString m_repoPath; // source repo dir when found
|
QString m_repoPath; // source repo dir when found
|
||||||
};
|
};
|
||||||
+49
-10
@@ -5,10 +5,13 @@
|
|||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QUrl>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
@@ -2158,9 +2161,10 @@ void MainWindow::onUpdateCheckFinished(bool hasUpdate, const QString& latestVers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the user whether to update now or skip. When the source repo is
|
// Ask the user whether to update now or skip. The update runs in the
|
||||||
// available the update runs in the background (git pull + build); the
|
// background (git pull + rebuild from a checkout, or tarball download +
|
||||||
// running binary stays untouched until the next launch.
|
// rebuild + reinstall when installed); the running binary stays
|
||||||
|
// untouched until the next launch.
|
||||||
QMessageBox box(this);
|
QMessageBox box(this);
|
||||||
box.setWindowTitle("Mise à jour disponible");
|
box.setWindowTitle("Mise à jour disponible");
|
||||||
box.setIcon(QMessageBox::Information);
|
box.setIcon(QMessageBox::Information);
|
||||||
@@ -2170,25 +2174,60 @@ void MainWindow::onUpdateCheckFinished(bool hasUpdate, const QString& latestVers
|
|||||||
.arg(latestVersion, UpdateManager::currentVersion()));
|
.arg(latestVersion, UpdateManager::currentVersion()));
|
||||||
|
|
||||||
QPushButton* updateBtn = box.addButton("Mettre à jour", QMessageBox::AcceptRole);
|
QPushButton* updateBtn = box.addButton("Mettre à jour", QMessageBox::AcceptRole);
|
||||||
QPushButton* skipBtn = box.addButton("Plus tard", QMessageBox::RejectRole);
|
box.addButton("Plus tard", QMessageBox::RejectRole);
|
||||||
|
|
||||||
if (!m_updateManager->canSelfUpdate()) {
|
if (!m_updateManager->canSelfUpdate()) {
|
||||||
// No source checkout: only point to the releases page.
|
// No source checkout and no tarball URL: fall back to the releases
|
||||||
|
// page instead of a disabled button.
|
||||||
|
updateBtn->setText("Ouvrir la page des releases");
|
||||||
box.setInformativeText(
|
box.setInformativeText(
|
||||||
"Le dépôt source n'est pas disponible sur ce système.\n"
|
"Le dépôt source n'est pas disponible sur ce système.\n"
|
||||||
"Téléchargez la nouvelle version depuis la page des releases.");
|
"Téléchargez la nouvelle version depuis la page des releases.");
|
||||||
updateBtn->setEnabled(false);
|
} else if (m_updateManager->repoPath().isEmpty()) {
|
||||||
|
// Installed mode: tarball download + local build + reinstall to the
|
||||||
|
// same prefix (sudo only for system prefixes).
|
||||||
|
box.setInformativeText(
|
||||||
|
QString("La mise à jour va télécharger les sources, les compiler "
|
||||||
|
"et réinstaller l'application dans %1.\n"
|
||||||
|
"Redémarrez PacManager ensuite pour utiliser la nouvelle version.")
|
||||||
|
.arg(m_updateManager->installPrefix()));
|
||||||
}
|
}
|
||||||
|
|
||||||
box.exec();
|
box.exec();
|
||||||
|
|
||||||
if (box.clickedButton() == updateBtn) {
|
if (box.clickedButton() != updateBtn) {
|
||||||
|
// "Plus tard" (or closing the dialog) simply skips the update.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_updateManager->canSelfUpdate()) {
|
||||||
|
QDesktopServices::openUrl(QUrl(m_updateManager->releasePageUrl()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// System prefixes (/usr, /usr/local) need sudo for `cmake --install`.
|
||||||
|
// Prompt once for the password; user prefixes install without sudo.
|
||||||
|
QString sudoPassword;
|
||||||
|
const QString prefix = m_updateManager->installPrefix();
|
||||||
|
const bool prefixWritable =
|
||||||
|
QFileInfo(prefix).isWritable() || QFileInfo(prefix + "/bin").isWritable();
|
||||||
|
if (m_updateManager->repoPath().isEmpty() && !prefixWritable
|
||||||
|
&& m_pacman && m_pacman->isAvailable()) {
|
||||||
|
bool ok = false;
|
||||||
|
sudoPassword = QInputDialog::getText(
|
||||||
|
this, "Mise à jour",
|
||||||
|
QString("Mot de passe sudo pour installer dans %1 :").arg(prefix),
|
||||||
|
QLineEdit::Password, QString(), &ok);
|
||||||
|
if (!ok) {
|
||||||
|
statusBar()->showMessage("Mise à jour annulée.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
statusBar()->showMessage("Mise à jour en cours en arrière-plan...");
|
statusBar()->showMessage("Mise à jour en cours en arrière-plan...");
|
||||||
connect(m_updateManager, &UpdateManager::selfUpdateFinished,
|
connect(m_updateManager, &UpdateManager::selfUpdateFinished,
|
||||||
this, &MainWindow::onSelfUpdateFinished);
|
this, &MainWindow::onSelfUpdateFinished);
|
||||||
m_updateManager->performSelfUpdate();
|
m_updateManager->performSelfUpdate(sudoPassword);
|
||||||
}
|
|
||||||
// "Plus tard" (or closing the dialog) simply skips the update.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the background git pull + build finishes. Reports the result in
|
// Called when the background git pull + build finishes. Reports the result in
|
||||||
|
|||||||
+141
-23
@@ -21,16 +21,18 @@ static const char* kRepoUrl =
|
|||||||
UpdateManager::UpdateManager(QObject* parent) : QObject(parent) {
|
UpdateManager::UpdateManager(QObject* parent) : QObject(parent) {
|
||||||
loadState();
|
loadState();
|
||||||
|
|
||||||
// The running executable is expected to live in the build/ directory when
|
// Detect a source checkout around the running executable so the dev
|
||||||
// launched from a source checkout. Walk up two levels to find the repo.
|
// workflow (git pull + rebuild in place) keeps working. Supported
|
||||||
// When installed to ~/.local/bin there is no source tree, so update
|
// layouts: <repo>/build/PacManager and <repo>/build/<cfg>/PacManager.
|
||||||
// becomes impossible and the dialog simply points to the releases page.
|
const QDir appDir(QCoreApplication::applicationDirPath());
|
||||||
QDir dir(QCoreApplication::applicationDirPath());
|
QDir dir = appDir;
|
||||||
if (dir.dirName() == QLatin1String("build")) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
dir.cdUp();
|
if (dir.exists(QLatin1String("CMakeLists.txt")) &&
|
||||||
if (dir.exists(QLatin1String("CMakeLists.txt"))) {
|
dir.exists(QLatin1String("src/main.cpp"))) {
|
||||||
m_repoPath = dir.absolutePath();
|
m_repoPath = dir.absolutePath();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
if (!dir.cdUp()) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(&m_process, &QProcess::finished, this, [this](int exitCode) {
|
connect(&m_process, &QProcess::finished, this, [this](int exitCode) {
|
||||||
@@ -87,11 +89,29 @@ QString UpdateManager::repoPath() const {
|
|||||||
return m_repoPath;
|
return m_repoPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UpdateManager::canSelfUpdate() const {
|
QString UpdateManager::tarballUrl() const {
|
||||||
if (m_repoPath.isEmpty()) return false;
|
return m_tarballUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString UpdateManager::releasePageUrl() const {
|
||||||
|
return m_releasePageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString UpdateManager::installPrefix() const {
|
||||||
|
// Infer the install prefix from the running binary location:
|
||||||
|
// <prefix>/bin/PacManager -> <prefix>. Falls back to ~/.local.
|
||||||
|
QDir dir(QCoreApplication::applicationDirPath());
|
||||||
|
if (dir.dirName() == QLatin1String("bin")) {
|
||||||
|
dir.cdUp();
|
||||||
|
return dir.absolutePath();
|
||||||
|
}
|
||||||
|
return QDir::homePath() + "/.local";
|
||||||
|
}
|
||||||
|
|
||||||
|
bool UpdateManager::canSelfUpdate() const {
|
||||||
|
if (!m_repoPath.isEmpty()) {
|
||||||
QDir repo(m_repoPath);
|
QDir repo(m_repoPath);
|
||||||
if (!repo.exists(QLatin1String(".git"))) return false;
|
if (!repo.exists(QLatin1String(".git"))) return !m_tarballUrl.isEmpty();
|
||||||
|
|
||||||
// The remote must point to the same FWS repo, otherwise we would build
|
// The remote must point to the same FWS repo, otherwise we would build
|
||||||
// someone else's code on the user's machine.
|
// someone else's code on the user's machine.
|
||||||
@@ -102,7 +122,9 @@ bool UpdateManager::canSelfUpdate() const {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
}
|
||||||
|
// Installed mode: a tarball download + local build needs no git checkout.
|
||||||
|
return !m_tarballUrl.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateManager::loadState() {
|
void UpdateManager::loadState() {
|
||||||
@@ -167,7 +189,10 @@ void UpdateManager::checkForUpdates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Gitea returns the release tag (e.g. "V1.2.1") as `tag_name`.
|
// Gitea returns the release tag (e.g. "V1.2.1") as `tag_name`.
|
||||||
QString tag = doc.object().value("tag_name").toString().trimmed();
|
// Keep the tarball + release page so an installed app (no git
|
||||||
|
// checkout) can still self-update by downloading the sources.
|
||||||
|
const QJsonObject obj = doc.object();
|
||||||
|
QString tag = obj.value("tag_name").toString().trimmed();
|
||||||
if (tag.isEmpty()) {
|
if (tag.isEmpty()) {
|
||||||
emit checkFinished(false, QString(),
|
emit checkFinished(false, QString(),
|
||||||
QStringLiteral("Aucune release trouvée sur le serveur."));
|
QStringLiteral("Aucune release trouvée sur le serveur."));
|
||||||
@@ -179,6 +204,23 @@ void UpdateManager::checkForUpdates() {
|
|||||||
tag = tag.mid(1);
|
tag = tag.mid(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prefer an attached source archive; fall back to the auto-generated
|
||||||
|
// tarball Gitea always provides (releases here ship no assets).
|
||||||
|
QString tarball = obj.value("tarball_url").toString().trimmed();
|
||||||
|
const QJsonArray assets = obj.value("assets").toArray();
|
||||||
|
for (const QJsonValue& v : assets) {
|
||||||
|
const QString dl = v.toObject().value("browser_download_url").toString().trimmed();
|
||||||
|
if (dl.endsWith(QLatin1String(".tar.gz")) || dl.endsWith(QLatin1String(".zip"))) {
|
||||||
|
tarball = dl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_tarballUrl = tarball;
|
||||||
|
m_releasePageUrl = obj.value("html_url").toString().trimmed();
|
||||||
|
if (m_releasePageUrl.isEmpty()) {
|
||||||
|
m_releasePageUrl = QStringLiteral("https://gitea.nocode-var.tech/FWS/FWS-PacManage/releases");
|
||||||
|
}
|
||||||
|
|
||||||
saveState(tag);
|
saveState(tag);
|
||||||
|
|
||||||
bool hasUpdate = isNewerVersion(tag, currentVersion());
|
bool hasUpdate = isNewerVersion(tag, currentVersion());
|
||||||
@@ -212,16 +254,15 @@ bool UpdateManager::isNewerVersion(const QString& remote, const QString& local)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pulls the latest source and rebuilds the app in the background. The script
|
// Rebuilds + reinstalls the app in the background.
|
||||||
// exits with a non-zero code on failure so the caller can report it. The new
|
// - Source checkout present: git pull + rebuild in place.
|
||||||
// binary replaces the old one only when the build completes — the currently
|
// - Installed without the repo: download the release tarball to /tmp,
|
||||||
// running process is untouched and picks it up on its next launch.
|
// build it there and `cmake --install` to the prefix the running binary
|
||||||
void UpdateManager::performSelfUpdate() {
|
// came from (sudo when that prefix is not user-writable).
|
||||||
if (m_repoPath.isEmpty()) {
|
// The new binary takes effect at the next launch; the running process is
|
||||||
emit selfUpdateFinished(false, QStringLiteral("Dépôt source introuvable."));
|
// untouched. Exits non-zero on failure so the caller can report it.
|
||||||
return;
|
void UpdateManager::performSelfUpdate(const QString& sudoPassword) {
|
||||||
}
|
if (!m_repoPath.isEmpty()) {
|
||||||
|
|
||||||
QString script = QStringLiteral(
|
QString script = QStringLiteral(
|
||||||
"set -e\n"
|
"set -e\n"
|
||||||
"echo 'Mise à jour de PacManager...'\n"
|
"echo 'Mise à jour de PacManager...'\n"
|
||||||
@@ -232,7 +273,84 @@ void UpdateManager::performSelfUpdate() {
|
|||||||
" cmake -B build -DCMAKE_BUILD_TYPE=Release . 2>&1\n"
|
" cmake -B build -DCMAKE_BUILD_TYPE=Release . 2>&1\n"
|
||||||
" cmake --build build -j$(nproc) 2>&1\n"
|
" cmake --build build -j$(nproc) 2>&1\n"
|
||||||
"fi\n"
|
"fi\n"
|
||||||
|
"cmake --install build 2>&1\n"
|
||||||
"echo 'Mise à jour terminée. Redémarrez PacManager pour utiliser la nouvelle version.'");
|
"echo 'Mise à jour terminée. Redémarrez PacManager pour utiliser la nouvelle version.'");
|
||||||
|
|
||||||
runShell(script, m_repoPath);
|
runShell(script, m_repoPath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_tarballUrl.isEmpty() || m_latestVersion.isEmpty()) {
|
||||||
|
emit selfUpdateFinished(false, QStringLiteral("Dépôt source introuvable."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Quote the password for the shell pipe; never log it.
|
||||||
|
QString quoted;
|
||||||
|
{
|
||||||
|
QString p = sudoPassword;
|
||||||
|
p.replace(QLatin1String("'"), QLatin1String("'\\''"));
|
||||||
|
quoted = QStringLiteral("'") + p + QStringLiteral("'");
|
||||||
|
}
|
||||||
|
const bool useSudoPipe = !sudoPassword.isEmpty();
|
||||||
|
|
||||||
|
// Installed mode: fetch the release tarball, compile in /tmp, reinstall
|
||||||
|
// to the same prefix. `cmake --install` needs sudo only for system
|
||||||
|
// prefixes; ~/.local stays a plain user install.
|
||||||
|
QString script = QStringLiteral(
|
||||||
|
"set -e\n"
|
||||||
|
"echo 'Mise à jour de PacManager...'\n"
|
||||||
|
"command -v cmake >/dev/null || { echo 'cmake est requis pour la mise à jour (pacman -S cmake)'; exit 1; }\n"
|
||||||
|
"WORK=$(mktemp -d /tmp/pacmanager-update-XXXXXX)\n"
|
||||||
|
"trap 'rm -rf \"$WORK\"' EXIT\n"
|
||||||
|
"TARBALL_URL=%1\n"
|
||||||
|
"VERSION=%2\n"
|
||||||
|
"PREFIX=%3\n"
|
||||||
|
"ARCHIVE=\"$WORK/src.tar.gz\"\n"
|
||||||
|
"if command -v curl >/dev/null; then curl -fsSL -o \"$ARCHIVE\" \"$TARBALL_URL\" 2>&1;\n"
|
||||||
|
"elif command -v wget >/dev/null; then wget -O \"$ARCHIVE\" \"$TARBALL_URL\" 2>&1;\n"
|
||||||
|
"else echo 'curl ou wget est requis pour télécharger la mise à jour'; exit 1; fi\n"
|
||||||
|
"if ! tar xzf \"$ARCHIVE\" -C \"$WORK\" 2>/dev/null; then\n"
|
||||||
|
" command -v unzip >/dev/null || { echo 'unzip est requis pour cette archive'; exit 1; }\n"
|
||||||
|
" unzip -q \"$ARCHIVE\" -d \"$WORK\" 2>&1 || { echo 'Archive invalide'; exit 1; }\n"
|
||||||
|
"fi\n"
|
||||||
|
// NOTE: single %h here — QString::arg() leaves %h untouched (only
|
||||||
|
// %1..%99 are placeholders), so find receives the correct -printf.
|
||||||
|
"SRC=$(find \"$WORK\" -maxdepth 2 -name CMakeLists.txt -printf '%h\\n' | head -n 1)\n"
|
||||||
|
"[ -n \"$SRC\" ] || { echo 'Archive invalide: CMakeLists.txt introuvable'; exit 1; }\n"
|
||||||
|
"cmake -S \"$SRC\" -B \"$WORK/build\" -DCMAKE_BUILD_TYPE=Release 2>&1\n"
|
||||||
|
"cmake --build \"$WORK/build\" -j$(nproc) 2>&1\n"
|
||||||
|
"if [ -w \"$PREFIX\" ] || [ -w \"$PREFIX/bin\" ]; then\n"
|
||||||
|
" cmake --install \"$WORK/build\" --prefix \"$PREFIX\" 2>&1\n"
|
||||||
|
"else\n"
|
||||||
|
"%4"
|
||||||
|
"fi\n"
|
||||||
|
"echo 'Mise à jour terminée. Redémarrez PacManager pour utiliser la nouvelle version.'");
|
||||||
|
|
||||||
|
// Install step: pipe the sudo password when provided, otherwise let sudo
|
||||||
|
// prompt on its own terminal (graphical sudo may pop up its dialog).
|
||||||
|
QString installStep;
|
||||||
|
if (useSudoPipe) {
|
||||||
|
// NOTE: single %s — QString::arg() only substitutes %1..%99, so
|
||||||
|
// printf keeps its format specifier intact.
|
||||||
|
installStep = QStringLiteral(
|
||||||
|
" printf '%s\\n' %1 | sudo -S cmake --install \"$WORK/build\" --prefix \"$PREFIX\" 2>&1\n")
|
||||||
|
.arg(quoted);
|
||||||
|
} else {
|
||||||
|
installStep = QStringLiteral(
|
||||||
|
" sudo cmake --install \"$WORK/build\" --prefix \"$PREFIX\" 2>&1\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
auto quoteShell = [](const QString& s) {
|
||||||
|
QString q = s;
|
||||||
|
q.replace(QLatin1String("'"), QLatin1String("'\\''"));
|
||||||
|
return QStringLiteral("'") + q + QStringLiteral("'");
|
||||||
|
};
|
||||||
|
|
||||||
|
script = script.arg(quoteShell(m_tarballUrl))
|
||||||
|
.arg(quoteShell(m_latestVersion))
|
||||||
|
.arg(quoteShell(installPrefix()))
|
||||||
|
.arg(installStep);
|
||||||
|
|
||||||
|
runShell(script, QDir::homePath());
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user