diff options
| author | Tannin <devnull@localhost> | 2013-04-13 19:23:18 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-04-13 19:23:18 +0200 |
| commit | 1c9018e9fdba7878b0ef605f81529c20ef3bbffe (patch) | |
| tree | 7b52a5f7b9091ea68f03d06692bba4c240d30d49 /src/main.cpp | |
| parent | 528338d7bfb5479115511f77b70219eda1b32a62 (diff) | |
- 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)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>. #include <QDesktopServices> #include <eh.h> #include <windows_error.h> +#include <boost/scoped_array.hpp> #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<TCHAR> 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(); |
