From 1c9018e9fdba7878b0ef605f81529c20ef3bbffe Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 13 Apr 2013 19:23:18 +0200 Subject: - bugfix: wrong multibyte to widechar conversion in hookdll breaks internationalization - bugfix: mod names not checked for validity on rename - bugfix: mod list wasn't invalidated after rename (regression?) - problem reports moved to separate dialog - ncc plugin now does the check for dotNet - python plugin wrapper started (only supports tools currently) - new ini editor plugin in python (non-functional currently) --- src/main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 268bb98f..ab740467 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -64,6 +64,7 @@ along with Mod Organizer. If not, see . #include #include #include +#include #pragma comment(linker, "/manifestDependency:\"name='dlls' processorArchitecture='x86' version='1.0.0.0' type='win32' \"") @@ -284,6 +285,24 @@ int main(int argc, char *argv[]) QSplashScreen splash(pixmap); splash.show(); + { // extend path to include dll directory so plugins don't need a manifest + static const int BUFSIZE = 4096; + + boost::scoped_array oldPath(new TCHAR[BUFSIZE]); + DWORD offset = ::GetEnvironmentVariable(TEXT("PATH"), oldPath.get(), BUFSIZE); + if (offset > BUFSIZE) { + oldPath.reset(new TCHAR[offset]); + ::GetEnvironmentVariable(TEXT("PATH"), oldPath.get(), offset); + } + + std::tstring newPath(oldPath.get()); + newPath += TEXT(";"); + newPath += ToWString(QDir::toNativeSeparators(QCoreApplication::applicationDirPath())).c_str(); + newPath += TEXT("\\dlls"); + + ::SetEnvironmentVariable(TEXT("PATH"), newPath.c_str()); + } + registerMetaTypes(); QStringList arguments = application.arguments(); -- cgit v1.3.1