Merge pull request #2 from Modorganizer2/Develop

Stage for 2.1.3 release
This commit is contained in:
Brian Munro
2018-05-08 12:20:16 +02:00
committed by GitHub
5 changed files with 69 additions and 24 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
std*.log
build
CMakeLists.txt.user
edit
*.bak
/msbuild.log
/*std*.log
/*build
+6 -4
View File
@@ -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})
+31 -15
View File
@@ -35,75 +35,91 @@
</message>
<message>
<location filename="diagnosebasic.cpp" line="116"/>
<source>Ignore empty directories when checking overwrite directory</source>
<source>Warn when an installed mod came from an alternative game source</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="117"/>
<source>Ignore empty directories when checking overwrite directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="118"/>
<source>Ignore .log files and empty directories when checking overwrite directory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="340"/>
<location filename="diagnosebasic.cpp" line="354"/>
<source>There was an error reported recently</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="342"/>
<location filename="diagnosebasic.cpp" line="356"/>
<source>There are files in your overwrite mod</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="344"/>
<location filename="diagnosebasic.cpp" line="358"/>
<source>Your font configuration may be broken</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="346"/>
<location filename="diagnosebasic.cpp" line="360"/>
<source>Nitpick installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="348"/>
<location filename="diagnosebasic.cpp" line="362"/>
<source>Ini Tweaks overwritten</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="350"/>
<location filename="diagnosebasic.cpp" line="364"/>
<source>Missing Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="352"/>
<location filename="diagnosebasic.cpp" line="391"/>
<location filename="diagnosebasic.cpp" line="407"/>
<location filename="diagnosebasic.cpp" line="366"/>
<source>At least one unverified mod is using an alternative game source</source>
<oldsource>At least one mod is using an alternative game source</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="368"/>
<location filename="diagnosebasic.cpp" line="415"/>
<location filename="diagnosebasic.cpp" line="431"/>
<source>invalid problem key %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="362"/>
<location filename="diagnosebasic.cpp" line="378"/>
<source>Files in the &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; mod are are usually files created by an external tool (i.e. Wrye Bash, Automatic Variants, ...).&lt;br&gt;It is advisable you empty the Overwrite directory by moving those files to an existing mod. You can do this by double-clicking the &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; mod and use drag&amp;drop to move the files to a mod.&lt;br&gt;Alternatively, right-click on &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; and create a new regular mod from the files there.&lt;br&gt;&lt;br&gt;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)&lt;br&gt;This can NOT be automated you HAVE to read up on the tools you use and make an educated decision.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="370"/>
<location filename="diagnosebasic.cpp" line="386"/>
<source>Your current configuration seems to reference a font that is not installed. You may see only boxes instead of letters.&lt;br&gt;The font configuration is in Data\interface\fontconfig.txt. Most likely you have a broken installation of a font replacer mod.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="373"/>
<location filename="diagnosebasic.cpp" line="389"/>
<source>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&apos;s strongly suggested you remove this plugin.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="377"/>
<location filename="diagnosebasic.cpp" line="393"/>
<source>Settings provided in ini tweaks have been overwritten in-game or in an applications.&lt;br&gt;These overwrites are stored in a separate file (&lt;i&gt;profile_tweaks.ini&lt;/i&gt; within the profile directory)&lt;br&gt;to keep ini-tweaks in their original state but you should really get rid of this file as there is&lt;br&gt;no tool support in MO to work on it. &lt;br&gt;Advice: Copy settings you want to keep to an appropriate ini tweak, then delete &lt;i&gt;profile_tweaks.ini&lt;/i&gt;.&lt;br&gt;Hitting the &lt;i&gt;Fix&lt;/i&gt; button will delete that file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="386"/>
<location filename="diagnosebasic.cpp" line="402"/>
<source>The masters for some plugins (esp/esl/esm) are not enabled.&lt;br&gt;The game will crash unless you install and enable the following plugins: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="407"/>
<source>You have at least one active mod installed from an alternative game source.&lt;br&gt;This means that the mod was downloaded from a game source which does not match&lt;br&gt;the expected primary game.&lt;br&gt;&lt;br&gt;Depending on the type of mod, this may require converting various files to run correctly.&lt;br&gt;&lt;br&gt;Advice: Once you have verified the mod is working correctly, you can use the context menu&lt;br&gt;and select &quot;Mark as converted/working&quot; to remove the flag and warning.</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
+27 -3
View File
@@ -113,6 +113,7 @@ QList<PluginSetting> 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"), 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)
;
@@ -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")) {
@@ -284,11 +295,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;
@@ -326,6 +337,9 @@ std::vector<unsigned int> 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 unverified mod is using an alternative game source");
default:
throw MyException(tr("invalid problem key %1").arg(key));
}
@@ -387,6 +403,14 @@ QString DiagnoseBasic::fullDescription(unsigned int key) const
"The game will crash unless you install and enable the following plugins: ")
+ "<ul><li>" + SetJoin(m_MissingMasters, "</li><li>") + "</li></ul>";
} break;
case PROBLEM_ALTERNATE: {
return tr("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.");
} break;
default:
throw MyException(tr("invalid problem key %1").arg(key));
}
+2
View File
@@ -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;