summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-27 17:07:04 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-10-05 07:05:47 -0400
commit633ef81972139f3c082429ada10ffb27d9f07898 (patch)
tree05ddb816714294bdbb2768c8b57cf4201acfb8ea /src/main.cpp
parent2fe50f2ff366ea850eb70a85c6ea7d6c936bf08a (diff)
moved checks to sanitychecks.cpp
added check for blocked files, only logs
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp46
1 files changed, 3 insertions, 43 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ba988ae3..fe5fd87a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -91,6 +91,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
using namespace MOBase;
using namespace MOShared;
+
+void sanityChecks(const env::Environment& env);
+
bool createAndMakeWritable(const std::wstring &subPath) {
QString const dataPath = qApp->property("dataPath").toString();
QString fullPath = dataPath + "/" + QString::fromStdWString(subPath);
@@ -496,49 +499,6 @@ static QString getVersionDisplayString()
return createVersionInfo().displayString(3);
}
-void checkMissingFiles()
-{
- // files that are likely to be eaten
- static const QStringList files({
- "helper.exe", "nxmhandler.exe",
- "usvfs_proxy_x64.exe", "usvfs_proxy_x86.exe",
- "usvfs_x64.dll", "usvfs_x86.dll"
- });
-
- const auto dir = QCoreApplication::applicationDirPath();
-
- for (const auto& name : files) {
- const QFileInfo file(dir + QDir::separator() + name);
- if (!file.exists()) {
- log::warn(
- "'{}' seems to be missing, an antivirus may have deleted it",
- file.absoluteFilePath());
- }
- }
-}
-
-void checkNahimic(const env::Environment& e)
-{
- for (auto&& m : e.loadedModules()) {
- const QFileInfo file(m.path());
-
- if (file.fileName().compare("NahimicOSD.dll", Qt::CaseInsensitive) == 0) {
- log::warn(
- "NahimicOSD.dll is loaded. Nahimic is known to cause issues with "
- "Mod Organizer, such as freezing or blank windows. Consider "
- "uninstalling it.");
-
- break;
- }
- }
-}
-
-void sanityChecks(const env::Environment& e)
-{
- checkMissingFiles();
- checkNahimic(e);
-}
-
int runApplication(MOApplication &application, SingleInstance &instance,
const QString &splashPath)