diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2018-03-08 15:55:24 -0600 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2018-03-08 15:55:24 -0600 |
| commit | c7f660e061f92901b80558c2bfe7640944fc1840 (patch) | |
| tree | 09c9282734a769430e91ac2570f7719aac92894f /src/main.cpp | |
| parent | 5b565b56340adbadbab2ad3d3c3d7112c6b2b34c (diff) | |
Remove outdated namespacing and correct the PATH setting to appends dlls
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 935b7404..0464ca9a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -402,6 +402,8 @@ void setupPath() qDebug("MO at: %s", qPrintable(QDir::toNativeSeparators(
QCoreApplication::applicationDirPath())));
+ QCoreApplication::setLibraryPaths(QStringList(QCoreApplication::applicationDirPath() + "/dlls") + QCoreApplication::libraryPaths());
+
boost::scoped_array<TCHAR> oldPath(new TCHAR[BUFSIZE]);
DWORD offset = ::GetEnvironmentVariable(TEXT("PATH"), oldPath.get(), BUFSIZE);
if (offset > BUFSIZE) {
@@ -409,12 +411,10 @@ void setupPath() ::GetEnvironmentVariable(TEXT("PATH"), oldPath.get(), offset);
}
- std::wstring newPath(oldPath.get());
+ std::wstring newPath(ToWString(QDir::toNativeSeparators(
+ QCoreApplication::applicationDirPath())) + L"\\dlls");
newPath += L";";
- newPath += ToWString(QDir::toNativeSeparators(
- QCoreApplication::applicationDirPath()))
- .c_str();
- newPath += L"\\dlls";
+ newPath += oldPath.get();
::SetEnvironmentVariableW(L"PATH", newPath.c_str());
}
|
