diff options
| author | Tannin <devnull@localhost> | 2014-11-05 23:48:06 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-05 23:48:06 +0100 |
| commit | 7a7c464b18f2977c3a7aa7e80c4041732b19ba26 (patch) | |
| tree | d1740340efbed742e3e83b71ce329f4d61c29e38 /src/main.cpp | |
| parent | a62ecc5bf1e92e6dd2ba8e6e61a797641c254d92 (diff) | |
- archive library can now query for password during extraction (seems to be necessary for rars)
- process blacklist is now taken from a file if there is one, not hardcoded
- removed workaround for the papyrus compiler
- updated loot client to work with the actual api
- loot client now links with loot32.dll at runtime
- loot client now produces its output in a (json-)file which includes all plugin messages and dirty flags
- fomod installer now tries to parse the xml with several encodings
- fomod installer will now display a diagnostics warning if the jpg imageformat isn't supported
- base preview plugin now tries to be a bit smarter about resizing images to fit the screen
- bugfix: fomod installer no longer tries to open an image even after detecting its invalid
- bugfix: potential null-pointer dereferentiation in getprivateprofile... hooks
- bugfix: potential null-pointer dereferentiation in download manager
- bugfix: internal origin name showed up in one more place
- bugfix: ToString function produced strings that were one (zero-termination-)character too long
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 84efc65f..02335f9b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -317,7 +317,37 @@ int main(int argc, char *argv[]) {
MOApplication application(argc, argv);
- application.addLibraryPath(application.applicationDirPath() + "/dlls");
+ qDebug("application name: %s", qPrintable(application.applicationName()));
+
+ QString instanceID;
+ QFile instanceFile(application.applicationDirPath() + "/INSTANCE");
+ if (instanceFile.open(QIODevice::ReadOnly)) {
+ instanceID = instanceFile.readAll().trimmed();
+ }
+
+ QString dataPath = instanceID.isEmpty() ? application.applicationDirPath()
+ : QDir::fromNativeSeparators(
+#if QT_VERSION >= 0x050000
+ QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+#else
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+#endif
+ ) + "/" + instanceID;
+ application.setProperty("dataPath", dataPath);
+
+#if QT_VERSION >= 0x050000
+ qDebug("ssl support: %d", QSslSocket::supportsSsl());
+#endif
+
+ qDebug("data path: %s", qPrintable(dataPath));
+ if (!QDir(dataPath).exists()) {
+ if (!QDir().mkpath(dataPath)) {
+ qCritical("failed to create %s", qPrintable(dataPath));
+ return 1;
+ }
+ }
+
+ application.setLibraryPaths(QStringList() << (application.applicationDirPath() + "/dlls"));
SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);
|
