summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLePresidente <brian.alexander.munro@gmail.com>2018-12-12 16:01:50 +0200
committerLePresidente <brian.alexander.munro@gmail.com>2018-12-12 16:01:50 +0200
commit571347d2de03e25f35bb5d6010313ce9710da58b (patch)
treeeb05adb3abf8fcead48b0850239de6ba4c3a3718
parent346bc630f8986e52101d51ac93e70154915c450a (diff)
Pass DIR parameter to install exe, so installation directory matches current directory.
-rw-r--r--src/selfupdater.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp
index 2b051b09..7c0682bf 100644
--- a/src/selfupdater.cpp
+++ b/src/selfupdater.cpp
@@ -327,8 +327,10 @@ void SelfUpdater::installUpdate()
const QString mopath
= QDir::fromNativeSeparators(qApp->property("dataPath").toString());
+ const std::wstring params = L"/DIR=" + qApp->applicationDirPath().toStdWString();
+
HINSTANCE res = ::ShellExecuteW(
- nullptr, L"open", m_UpdateFile.fileName().toStdWString().c_str(), nullptr,
+ nullptr, L"open", m_UpdateFile.fileName().toStdWString().c_str(), params.c_str(),
nullptr, SW_SHOW);
if (res > (HINSTANCE)32) {