Compare commits

..
20 Commits
Author SHA1 Message Date
Mikaël Capelle aa1b0d725c Update translation file. 2021-02-02 20:39:12 +01:00
Jeremy Rimpo e508f7bcd7 [ci skip] Update artifacts paths for msbuild 2021-01-29 10:53:35 -06:00
Mikaël Capelle 477aa4c034 Merge pull request #13 from Holt59/better-log-files-detection
Consider file ending with .log0, .log1, ..., as proper log files.
2020-11-26 22:13:35 +01:00
Mikaël Capelle 33c2867336 Check for dot before extension of log files. 2020-11-24 09:20:35 +01:00
Mikaël Capelle dd93b7e35e Consider file ending with .log0, .log1, ..., as proper log files. 2020-11-22 18:03:55 +01:00
Mikaël Capelle c893767bb2 Merge pull request #12 from Holt59/imodlist-updates
IModList updates
2020-10-26 21:37:58 +01:00
Mikaël Capelle cccdc4ece9 Fix for getMod(). 2020-10-25 17:44:44 +01:00
Mikaël Capelle 6b1f817f29 Merge pull request #11 from Holt59/fix-ipluginlist-callbacks
Update following onPluginStateChanged change.
2020-09-27 14:55:56 +02:00
Jeremy Rimpo 409850c044 [skip ci] Use PR branch for umbrella repo (if it exists) 2020-09-25 00:34:16 -05:00
Jeremy Rimpo 1c8895ed3c [skip ci] Force exit PS with last exit code after umbrella build error 2020-09-21 06:25:03 -05:00
Jeremy Rimpo 9a9181621a [skip ci] Pull data from all branches 2020-09-21 05:02:22 -05:00
Jeremy Rimpo 9d4ba2d0d1 Finalize appveyor script update 2020-09-20 22:34:31 -05:00
Jeremy Rimpo 78b7a0a523 Trying to suppress git stderr is not working 2020-09-20 22:25:30 -05:00
Jeremy Rimpo ba0a2df34f Finalize build script updates 2020-09-20 22:13:03 -05:00
Jeremy Rimpo 6a037f89a3 Convert scripts to PowerShell 2020-09-20 19:56:37 -05:00
Jeremy Rimpo 253c2ad05f Need extra space for second command 2020-09-20 19:11:50 -05:00
Jeremy Rimpo 3e2067a185 Update to checkout current branch in umbrella if it exists 2020-09-20 19:02:33 -05:00
Mikaël Capelle 941ce462e1 Update following onPluginStateChanged change. 2020-09-05 13:59:19 +02:00
Al 9d9172b7d1 Merge pull request #10 from Holt59/modstatechanged-change
Update following onModStateChanged change.
2020-09-01 03:59:39 -07:00
Mikaël Capelle d0acab52df Update following onModStateChanged change. 2020-08-29 19:33:12 +02:00
4 changed files with 61 additions and 49 deletions
+15 -7
View File
@@ -5,20 +5,28 @@ environment:
WEBHOOK_URL:
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1Vbg57wBaeLhi49uGjxPw5GVujHku6kxN6ab89zhbS5GVeluR76GM83IbKV4Sh7udXzoYZZdg6YudtYHzdhCgUeiedpswbuczTq9ceIkkfSEWZuh/lMAAVVwvcGsJAnoPFw=
build_script:
- cmd: >-
git clone --depth=1 --branch=%APPVEYOR_REPO_BRANCH% https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella 2> $null
- pwsh: >-
$ErrorActionPreference = 'Stop'
mkdir c:\projects\modorganizer-build -type directory
git clone --depth=1 --no-single-branch https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella
New-Item -ItemType Directory -Path c:\projects\modorganizer-build
cd c:\projects\modorganizer-umbrella
($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH -eq $null) ? ($branch = $env:APPVEYOR_REPO_BRANCH) : ($branch = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH)
C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True %APPVEYOR_PROJECT_NAME%
git checkout $(git show-ref --verify --quiet refs/remotes/origin/${branch} || echo '-b') ${branch}
C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True ${env:APPVEYOR_PROJECT_NAME}
if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }
artifacts:
- path: build\src\diagnose_basic.dll
- path: vsbuild\src\RelWithDebInfo\diagnose_basic.dll
name: diagnose_basic_dll
- path: build\src\diagnose_basic.pdb
- path: vsbuild\src\RelWithDebInfo\diagnose_basic.pdb
name: diagnose_basic_pdb
- path: build\src\diagnose_basic.lib
- path: vsbuild\src\RelWithDebInfo\diagnose_basic.lib
name: diagnose_basic_lib
on_success:
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
File diff suppressed because one or more lines are too long
+9 -8
View File
@@ -55,6 +55,8 @@
using namespace MOBase;
const QRegularExpression DiagnoseBasic::RE_LOG_FILE(".*[.]log[0-9]*$");
DiagnoseBasic::DiagnoseBasic()
: m_MOInfo(nullptr)
{
@@ -64,8 +66,8 @@ bool DiagnoseBasic::init(IOrganizer *moInfo)
{
m_MOInfo = moInfo;
m_MOInfo->modList()->onModStateChanged([&] (const QString &modName, IModList::ModStates) {
if (modName == "Overwrite") invalidate();
m_MOInfo->modList()->onModStateChanged([&] (const std::map<QString, IModList::ModStates>& mods) {
if (mods.contains("Overwrite")) invalidate();
});
m_MOInfo->modList()->onModMoved([&] (const QString&, int, int) {
// invalidates only the assetOrder check but there is currently no way to recheck individual
@@ -76,7 +78,7 @@ bool DiagnoseBasic::init(IOrganizer *moInfo)
invalidate();
});
m_MOInfo->pluginList()->onRefreshed([&] () { invalidate(); });
m_MOInfo->pluginList()->onPluginStateChanged([&] (const QString &, IPluginList::PluginStates) {
m_MOInfo->pluginList()->onPluginStateChanged([&] (auto const& ) {
invalidate();
});
m_MOInfo->onAboutToRun([&] (const QString &executable) { return fileAttributes(executable); });
@@ -179,10 +181,9 @@ bool DiagnoseBasic::checkEmpty(QString const &path) const
dir.setFilter(QDir::Files | QDir::Hidden | QDir::System);
//Search files first
for (QString const &f : dir.entryList()) {
QString file(f);
if (! m_MOInfo->pluginSetting(name(), "ow_ignore_log").toBool() ||
! file.endsWith(".log", FileNameComparator::CaseSensitivity)) {
for (auto const &file : dir.entryList()) {
if (!m_MOInfo->pluginSetting(name(), "ow_ignore_log").toBool()
|| !RE_LOG_FILE.match(file).hasMatch()) {
return false;
}
}
@@ -486,7 +487,7 @@ bool DiagnoseBasic::fileAttributes(const QString &executable) const
// Find the active mods to search them too
for (QString mod : m_MOInfo->modList()->allMods()) {
if (m_MOInfo->modList()->state(mod) & MOBase::IModList::STATE_ACTIVE) {
directoriesToSearch << m_MOInfo->getMod(mod)->absolutePath();
directoriesToSearch << m_MOInfo->modList()->getMod(mod)->absolutePath();
}
}
+3
View File
@@ -27,6 +27,7 @@ along with this plugin. If not, see <http://www.gnu.org/licenses/>.
#include <imodlist.h>
#include <QString>
#include <QSet>
#include <QRegularExpression>
class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
@@ -82,6 +83,8 @@ private:
static const unsigned int NUM_CONTEXT_ROWS = 5;
static const QRegularExpression RE_LOG_FILE;
private:
struct ListElement {