From cc69866248140ab39904f5b7871af4ed24009cef Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 19 Apr 2018 01:43:54 -0500 Subject: [PATCH 1/7] Remove remnants of QtScript and fix some CMake issues --- src/CMakeLists.txt | 10 ++++++---- src/diagnosebasic.cpp | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d9dc1a0..4b345c2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,11 +41,13 @@ TARGET_LINK_LIBRARIES(${PROJ_NAME} ${Boost_LIBRARIES} uibase) -IF(MSVC) +IF (MSVC) + SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES COMPILE_FLAGS "/std:c++latest") +ENDIF() +IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4) + # 32 bits SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES LINK_FLAGS "/LARGEADDRESSAWARE") -ELSE(MSVC) - SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES LINK_FLAGS "-std=c++11") -ENDIF(MSVC) +ENDIF() IF (NOT "${OPTIMIZE_COMPILE_FLAGS}" STREQUAL "") SET_TARGET_PROPERTIES(${PROJ_NAME} PROPERTIES COMPILE_FLAGS_RELWITHDEBINFO ${OPTIMIZE_COMPILE_FLAGS}) diff --git a/src/diagnosebasic.cpp b/src/diagnosebasic.cpp index b5aa10c..b6b7ad2 100644 --- a/src/diagnosebasic.cpp +++ b/src/diagnosebasic.cpp @@ -284,11 +284,11 @@ bool DiagnoseBasic::invalidFontConfig() const return false; } - std::tr1::regex exp("^fontlib \"([^\"]*)\"$"); + std::regex exp("^fontlib \"([^\"]*)\"$"); while (!config.atEnd()) { QByteArray row = config.readLine(); - std::tr1::cmatch match; - if (std::tr1::regex_search(row.constData(), match, exp)) { + std::cmatch match; + if (std::regex_search(row.constData(), match, exp)) { std::string temp = match[1]; QString path(temp.c_str()); bool isDefault = false; From e161beab23f527a8babfdc78a9c169194454956d Mon Sep 17 00:00:00 2001 From: Silarn Date: Fri, 27 Apr 2018 01:57:58 -0500 Subject: [PATCH 2/7] Add alternative game flag and check --- src/diagnosebasic.cpp | 20 ++++++++++++++++++++ src/diagnosebasic.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/diagnosebasic.cpp b/src/diagnosebasic.cpp index b6b7ad2..e5c56f2 100644 --- a/src/diagnosebasic.cpp +++ b/src/diagnosebasic.cpp @@ -113,6 +113,7 @@ QList DiagnoseBasic::settings() const << PluginSetting("check_font", tr("Warn when the font configuration refers to files that aren't installed"), true) << PluginSetting("check_conflict", tr("Warn when mods are installed that conflict with MO functionality"), true) << PluginSetting("check_missingmasters", tr("Warn when there are esps with missing masters"), true) + << PluginSetting("check_alternategames", tr("Warn when an installed mod came from an alternative game source"), true) << PluginSetting("ow_ignore_empty", tr("Ignore empty directories when checking overwrite directory"), false) << PluginSetting("ow_ignore_log", tr("Ignore .log files and empty directories when checking overwrite directory"), false) ; @@ -263,6 +264,16 @@ bool DiagnoseBasic::missingMasters() const return !m_MissingMasters.empty(); } +bool DiagnoseBasic::alternateGame() const +{ + QStringList mods = m_MOInfo->modList()->allMods(); + for (QString mod : mods) { + if (m_MOInfo->modList()->state(mod) & MOBase::IModList::STATE_ALTERNATE && + m_MOInfo->modList()->state(mod) & MOBase::IModList::STATE_ACTIVE) return true; + } + return false; +} + bool DiagnoseBasic::invalidFontConfig() const { if ((m_MOInfo->managedGame()->gameName() != "Skyrim") && (m_MOInfo->managedGame()->gameName() != "SkyrimSE")) { @@ -326,6 +337,9 @@ std::vector DiagnoseBasic::activeProblems() const if (m_MOInfo->pluginSetting(name(), "check_missingmasters").toBool() && missingMasters()) { result.push_back(PROBLEM_MISSINGMASTERS); } + if (m_MOInfo->pluginSetting(name(), "check_alternategames").toBool() && alternateGame()) { + result.push_back(PROBLEM_ALTERNATE); + } if (QFile::exists(m_MOInfo->profilePath() + "/profile_tweaks.ini")) { result.push_back(PROBLEM_PROFILETWEAKS); } @@ -348,6 +362,8 @@ QString DiagnoseBasic::shortDescription(unsigned int key) const return tr("Ini Tweaks overwritten"); case PROBLEM_MISSINGMASTERS: return tr("Missing Masters"); + case PROBLEM_ALTERNATE: + return tr("At least one mod is using an alternative game source"); default: throw MyException(tr("invalid problem key %1").arg(key)); } @@ -387,6 +403,10 @@ QString DiagnoseBasic::fullDescription(unsigned int key) const "The game will crash unless you install and enable the following plugins: ") + "
  • " + SetJoin(m_MissingMasters, "
  • ") + "
"; } break; + case PROBLEM_ALTERNATE: { + return tr("You have at least one active mod installed from an alternative game source.
" + "Depending on the type of mod, this may require converting various files to run correctly."); + } break; default: throw MyException(tr("invalid problem key %1").arg(key)); } diff --git a/src/diagnosebasic.h b/src/diagnosebasic.h index c7935f6..ebeb24f 100644 --- a/src/diagnosebasic.h +++ b/src/diagnosebasic.h @@ -67,6 +67,7 @@ private: bool nitpickInstalled() const; bool assetOrder() const; bool missingMasters() const; + bool alternateGame() const; private: @@ -76,6 +77,7 @@ private: static const unsigned int PROBLEM_NITPICKINSTALLED = 4; static const unsigned int PROBLEM_PROFILETWEAKS = 7; static const unsigned int PROBLEM_MISSINGMASTERS = 8; + static const unsigned int PROBLEM_ALTERNATE = 9; static const unsigned int NUM_CONTEXT_ROWS = 5; From 0e8e61c1dc2736323f84ce373a156f876a4642fd Mon Sep 17 00:00:00 2001 From: Silarn Date: Tue, 1 May 2018 12:43:27 -0500 Subject: [PATCH 3/7] Disable the alternate game check by default --- src/diagnosebasic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnosebasic.cpp b/src/diagnosebasic.cpp index e5c56f2..df37c34 100644 --- a/src/diagnosebasic.cpp +++ b/src/diagnosebasic.cpp @@ -113,7 +113,7 @@ QList DiagnoseBasic::settings() const << PluginSetting("check_font", tr("Warn when the font configuration refers to files that aren't installed"), true) << PluginSetting("check_conflict", tr("Warn when mods are installed that conflict with MO functionality"), true) << PluginSetting("check_missingmasters", tr("Warn when there are esps with missing masters"), true) - << PluginSetting("check_alternategames", tr("Warn when an installed mod came from an alternative game source"), true) + << PluginSetting("check_alternategames", tr("Warn when an installed mod came from an alternative game source"), false) << PluginSetting("ow_ignore_empty", tr("Ignore empty directories when checking overwrite directory"), false) << PluginSetting("ow_ignore_log", tr("Ignore .log files and empty directories when checking overwrite directory"), false) ; From bbeb26b4594b980ae6367b1543655e28efcc34f5 Mon Sep 17 00:00:00 2001 From: Silarn Date: Tue, 1 May 2018 16:59:34 -0500 Subject: [PATCH 4/7] Update translation files --- src/diagnose_basic_en.ts | 45 ++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/diagnose_basic_en.ts b/src/diagnose_basic_en.ts index 00a548c..928e556 100644 --- a/src/diagnose_basic_en.ts +++ b/src/diagnose_basic_en.ts @@ -35,75 +35,90 @@ - Ignore empty directories when checking overwrite directory + Warn when an installed mod came from an alternative game source + Ignore empty directories when checking overwrite directory + + + + Ignore .log files and empty directories when checking overwrite directory - + There was an error reported recently - + There are files in your overwrite mod - + Your font configuration may be broken - + Nitpick installed - + Ini Tweaks overwritten - + Missing Masters - - - + + At least one mod is using an alternative game source + + + + + + invalid problem key %1 - + Files in the <font color="red"><i>Overwrite</i></font> mod are are usually files created by an external tool (i.e. Wrye Bash, Automatic Variants, ...).<br>It is advisable you empty the Overwrite directory by moving those files to an existing mod. You can do this by double-clicking the <font color="red"><i>Overwrite</i></font> mod and use drag&drop to move the files to a mod.<br>Alternatively, right-click on <font color="red"><i>Overwrite</i></font> and create a new regular mod from the files there.<br><br>Why is this necessary? Generated files may depend on the other mods active in a profile and may thus be incompatible with a different profile (i.e. bashed patches from Wrye Bash). On the other hand the file may be necessary in all profiles (i.e. dlc esms after cleaning with TESVEdit)<br>This can NOT be automated you HAVE to read up on the tools you use and make an educated decision. - + Your current configuration seems to reference a font that is not installed. You may see only boxes instead of letters.<br>The font configuration is in Data\interface\fontconfig.txt. Most likely you have a broken installation of a font replacer mod. - + You have the nitpick skse plugin installed. This plugin is not needed with Mod Organizer because MO already offers the same functionality. Worse: The two solutions may conflict so it's strongly suggested you remove this plugin. - + Settings provided in ini tweaks have been overwritten in-game or in an applications.<br>These overwrites are stored in a separate file (<i>profile_tweaks.ini</i> within the profile directory)<br>to keep ini-tweaks in their original state but you should really get rid of this file as there is<br>no tool support in MO to work on it. <br>Advice: Copy settings you want to keep to an appropriate ini tweak, then delete <i>profile_tweaks.ini</i>.<br>Hitting the <i>Fix</i> button will delete that file - + The masters for some plugins (esp/esl/esm) are not enabled.<br>The game will crash unless you install and enable the following plugins: + + + You have at least one active mod installed from an alternative game source.<br>Depending on the type of mod, this may require converting various files to run correctly. + + From e44513c31b73e4021a13033f1a471db816cbebe9 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 3 May 2018 16:17:38 -0500 Subject: [PATCH 5/7] Allow for primary game sources and marking mods as converted/working --- src/diagnosebasic.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/diagnosebasic.cpp b/src/diagnosebasic.cpp index df37c34..96bd174 100644 --- a/src/diagnosebasic.cpp +++ b/src/diagnosebasic.cpp @@ -363,7 +363,7 @@ QString DiagnoseBasic::shortDescription(unsigned int key) const case PROBLEM_MISSINGMASTERS: return tr("Missing Masters"); case PROBLEM_ALTERNATE: - return tr("At least one mod is using an alternative game source"); + return tr("At least one unverified mod is using an alternative game source"); default: throw MyException(tr("invalid problem key %1").arg(key)); } @@ -405,7 +405,11 @@ QString DiagnoseBasic::fullDescription(unsigned int key) const } break; case PROBLEM_ALTERNATE: { return tr("You have at least one active mod installed from an alternative game source.
" - "Depending on the type of mod, this may require converting various files to run correctly."); + "This means that the mod was downloaded from a game source which does not match
" + "the expected primary game.

" + "Depending on the type of mod, this may require converting various files to run correctly.

" + "Advice: Once you have verified the mod is working correctly, you can use the context menu
" + "and select \"Mark as converted/working\" to remove the flag and warning."); } break; default: throw MyException(tr("invalid problem key %1").arg(key)); From e0543a504848478ac3e2da3860ce3edf92e162f1 Mon Sep 17 00:00:00 2001 From: Silarn Date: Thu, 3 May 2018 17:15:09 -0500 Subject: [PATCH 6/7] Updated strings. --- src/diagnose_basic_en.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/diagnose_basic_en.ts b/src/diagnose_basic_en.ts index 928e556..4e4da81 100644 --- a/src/diagnose_basic_en.ts +++ b/src/diagnose_basic_en.ts @@ -80,13 +80,14 @@ - At least one mod is using an alternative game source + At least one unverified mod is using an alternative game source + At least one mod is using an alternative game source - - + + invalid problem key %1 @@ -117,7 +118,7 @@ - You have at least one active mod installed from an alternative game source.<br>Depending on the type of mod, this may require converting various files to run correctly. + You have at least one active mod installed from an alternative game source.<br>This means that the mod was downloaded from a game source which does not match<br>the expected primary game.<br><br>Depending on the type of mod, this may require converting various files to run correctly.<br><br>Advice: Once you have verified the mod is working correctly, you can use the context menu<br>and select "Mark as converted/working" to remove the flag and warning. From fd86bd650158202b1642936845ca85f790f3b23f Mon Sep 17 00:00:00 2001 From: Silarn Date: Fri, 4 May 2018 00:28:39 -0500 Subject: [PATCH 7/7] Updating gitignore --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c753125..40c636d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -std*.log -build CMakeLists.txt.user edit *.bak +/msbuild.log +/*std*.log +/*build