mirror of
https://github.com/ModOrganizer2/modorganizer-diagnose_basic.git
synced 2026-07-27 14:03:10 -07:00
Compare commits
150
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51099bed28 | ||
|
|
5b3d2adac5 | ||
|
|
d56d51e37c | ||
|
|
8d4c514c4d | ||
|
|
aa1b0d725c | ||
|
|
e508f7bcd7 | ||
|
|
477aa4c034 | ||
|
|
33c2867336 | ||
|
|
dd93b7e35e | ||
|
|
c893767bb2 | ||
|
|
cccdc4ece9 | ||
|
|
6b1f817f29 | ||
|
|
409850c044 | ||
|
|
1c8895ed3c | ||
|
|
9a9181621a | ||
|
|
9d4ba2d0d1 | ||
|
|
78b7a0a523 | ||
|
|
ba0a2df34f | ||
|
|
6a037f89a3 | ||
|
|
253c2ad05f | ||
|
|
3e2067a185 | ||
|
|
941ce462e1 | ||
|
|
9d9172b7d1 | ||
|
|
d0acab52df | ||
|
|
8d46fd9725 | ||
|
|
3c71a048d7 | ||
|
|
76d722710c | ||
|
|
9bc94001ff | ||
|
|
a56e18142a | ||
|
|
ef723d00f6 | ||
|
|
c2ee9b8e96 | ||
|
|
6d8b834e78 | ||
|
|
ea4c9de3f9 | ||
|
|
366aee53c0 | ||
|
|
c80335182d | ||
|
|
953ce74950 | ||
|
|
56eee7d629 | ||
|
|
7716eae9a7 | ||
|
|
151f75b75e | ||
|
|
1428e898d3 | ||
|
|
ba5bf967cf | ||
|
|
d82f7fcc4b | ||
|
|
8990fd9cf8 | ||
|
|
5818f32c36 | ||
|
|
b75a1600e6 | ||
|
|
9f6f754bc7 | ||
|
|
b7f4cd75c4 | ||
|
|
7de65e7abf | ||
|
|
87c1e464c5 | ||
|
|
15bc7ff731 | ||
|
|
80d4b2374e | ||
|
|
4c59d53dd2 | ||
|
|
edf8e49475 | ||
|
|
f82b49bf28 | ||
|
|
7557a27acf | ||
|
|
85c5e4c5e5 | ||
|
|
6792102fc9 | ||
|
|
bfeb51ff15 | ||
|
|
fd86bd6501 | ||
|
|
e0543a5048 | ||
|
|
e44513c31b | ||
|
|
bbeb26b459 | ||
|
|
0e8e61c1dc | ||
|
|
e161beab23 | ||
|
|
cc69866248 | ||
|
|
c20f112f14 | ||
|
|
8c311f06cf | ||
|
|
fcc76b9436 | ||
|
|
e562c428ab | ||
|
|
b099c92188 | ||
|
|
0a11edc584 | ||
|
|
a9f50bc4a3 | ||
|
|
121e0d07ae | ||
|
|
353629500b | ||
|
|
f344672d9d | ||
|
|
50c13dd864 | ||
|
|
2e687bea6e | ||
|
|
bc24f6f3d7 | ||
|
|
8ea35f7a47 | ||
|
|
0cd3f8232e | ||
|
|
985fbb604d | ||
|
|
f712240fef | ||
|
|
72ab614431 | ||
|
|
d1c34257cd | ||
|
|
6d078bab60 | ||
|
|
d9e26399d1 | ||
|
|
a577d4a519 | ||
|
|
d349de2cac | ||
|
|
0a1be591d3 | ||
|
|
603b723b7a | ||
|
|
cfc7ea1ef5 | ||
|
|
5dc33c4dcd | ||
|
|
e1bdfcaaea | ||
|
|
043f45ab70 | ||
|
|
fb294651c3 | ||
|
|
f4e1b296ad | ||
|
|
bd55424d8e | ||
|
|
d56a520815 | ||
|
|
fe8966e279 | ||
|
|
98bd1d4780 | ||
|
|
c345cacbc9 | ||
|
|
b78ae57ed4 | ||
|
|
d983c908ee | ||
|
|
0cc077b8c4 | ||
|
|
b245bc2ce3 | ||
|
|
0a1707fa9c | ||
|
|
b10b1f28ff | ||
|
|
59c10d78cd | ||
|
|
7dd29a68e2 | ||
|
|
ce0dc685ca | ||
|
|
e426d8efb4 | ||
|
|
bf00944706 | ||
|
|
97c8769334 | ||
|
|
05d1782cf1 | ||
|
|
f114b3ee60 | ||
|
|
0320bd719a | ||
|
|
943689d5c3 | ||
|
|
ecf0ff0d02 | ||
|
|
182ec5f85d | ||
|
|
2632e79de7 | ||
|
|
41eb0d50d4 | ||
|
|
863233e1ab | ||
|
|
9cb9c2cc56 | ||
|
|
8529da255f | ||
|
|
dd2203f647 | ||
|
|
123d291dc1 | ||
|
|
926cdedf8c | ||
|
|
0cc55698f7 | ||
|
|
7ea85f751e | ||
|
|
2cf83c7681 | ||
|
|
fb4eacabed | ||
|
|
366b3854b8 | ||
|
|
4bf94e9fda | ||
|
|
016a2efb88 | ||
|
|
6f73fe05a4 | ||
|
|
4531207250 | ||
|
|
266b597e4c | ||
|
|
41bd8cc0cd | ||
|
|
06487c2653 | ||
|
|
9b0637fa66 | ||
|
|
f0957919a5 | ||
|
|
4bce131613 | ||
|
|
849e946284 | ||
|
|
58a8406335 | ||
|
|
c8308f1612 | ||
|
|
75d821c46a | ||
|
|
f784c34877 | ||
|
|
b529b1f6a8 | ||
|
|
be9382e684 | ||
|
|
35cc2bb91c |
@@ -0,0 +1,6 @@
|
||||
CMakeLists.txt.user
|
||||
edit
|
||||
*.bak
|
||||
/msbuild.log
|
||||
/*std*.log
|
||||
/*build
|
||||
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
if(DEFINED DEPENDENCIES_DIR)
|
||||
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake)
|
||||
else()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake)
|
||||
endif()
|
||||
|
||||
project(diagnose_basic)
|
||||
add_subdirectory(src)
|
||||
@@ -0,0 +1,40 @@
|
||||
version: 1.0.{build}
|
||||
skip_branch_with_pr: true
|
||||
image: Visual Studio 2019
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1Vbg57wBaeLhi49uGjxPw5GVujHku6kxN6ab89zhbS5GVeluR76GM83IbKV4Sh7udXzoYZZdg6YudtYHzdhCgUeiedpswbuczTq9ceIkkfSEWZuh/lMAAVVwvcGsJAnoPFw=
|
||||
build_script:
|
||||
- pwsh: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
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)
|
||||
|
||||
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: vsbuild\src\RelWithDebInfo\diagnose_basic.dll
|
||||
name: diagnose_basic_dll
|
||||
- path: vsbuild\src\RelWithDebInfo\diagnose_basic.pdb
|
||||
name: diagnose_basic_pdb
|
||||
- path: vsbuild\src\RelWithDebInfo\diagnose_basic.lib
|
||||
name: diagnose_basic_lib
|
||||
on_success:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 success $env:WEBHOOK_URL
|
||||
on_failure:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stdout.log
|
||||
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stderr.log
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 failure $env:WEBHOOK_URL
|
||||
@@ -0,0 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
add_library(diagnose_basic SHARED)
|
||||
mo2_configure_plugin(diagnose_basic WARNINGS OFF PRIVATE_DEPENDS boost)
|
||||
mo2_install_target(diagnose_basic)
|
||||
@@ -1,32 +0,0 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-04-05T21:08:10
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
TARGET = diagnoseBasic
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
DEFINES += DIAGNOSEBASIC_LIBRARY
|
||||
DEFINES += NOMINMAX
|
||||
|
||||
# suppress a few warnings caused by boost vs vc++ paranoia
|
||||
DEFINES += _SCL_SECURE_NO_WARNINGS
|
||||
|
||||
SOURCES += diagnosebasic.cpp
|
||||
|
||||
HEADERS += diagnosebasic.h
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
INCLUDEPATH += "$(BOOSTPATH)"
|
||||
|
||||
#CONFIG += dll
|
||||
|
||||
#DEFINES += INIEDITOR_LIBRARY
|
||||
|
||||
OTHER_FILES += \
|
||||
diagnosebasic.json
|
||||
File diff suppressed because one or more lines are too long
+698
-477
File diff suppressed because it is too large
Load Diff
+39
-4
@@ -25,9 +25,12 @@ along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <iplugindiagnose.h>
|
||||
#include <imoinfo.h>
|
||||
#include <imodlist.h>
|
||||
#include <QString>
|
||||
#include <QSet>
|
||||
#include <QRegularExpression>
|
||||
|
||||
|
||||
class DiagnoseBasic : public QObject, MOBase::IPlugin, MOBase::IPluginDiagnose
|
||||
class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
|
||||
@@ -64,6 +67,9 @@ private:
|
||||
bool invalidFontConfig() const;
|
||||
bool nitpickInstalled() const;
|
||||
bool assetOrder() const;
|
||||
bool missingMasters() const;
|
||||
bool alternateGame() const;
|
||||
bool fileAttributes(const QString &executable) const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -71,11 +77,14 @@ private:
|
||||
static const unsigned int PROBLEM_OVERWRITE = 2;
|
||||
static const unsigned int PROBLEM_INVALIDFONT = 3;
|
||||
static const unsigned int PROBLEM_NITPICKINSTALLED = 4;
|
||||
static const unsigned int PROBLEM_ASSETORDER = 5;
|
||||
static const unsigned int PROBLEM_MODLISTBACKUP = 6;
|
||||
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;
|
||||
|
||||
static const QRegularExpression RE_LOG_FILE;
|
||||
|
||||
private:
|
||||
|
||||
struct ListElement {
|
||||
@@ -83,6 +92,9 @@ private:
|
||||
QString modName;
|
||||
int pluginPriority;
|
||||
int modPriority;
|
||||
int sortGroup;
|
||||
bool avoidMove;
|
||||
QSet<QString> relevantScripts;
|
||||
};
|
||||
|
||||
struct Move {
|
||||
@@ -95,14 +107,37 @@ private:
|
||||
Move(const ListElement &initItem, const ListElement &initReference, EType initType)
|
||||
: item(initItem), reference(initReference), type(initType) {}
|
||||
};
|
||||
|
||||
struct Sorter {
|
||||
struct {
|
||||
int operator()(const ListElement &lhs, const ListElement &rhs)
|
||||
{
|
||||
return lhs.modPriority < rhs.modPriority;
|
||||
}
|
||||
} minMod;
|
||||
|
||||
std::vector<Move> moves;
|
||||
|
||||
void operator()(std::vector<ListElement> modList);
|
||||
private:
|
||||
void sortGroup(std::vector<ListElement> modList);
|
||||
};
|
||||
|
||||
|
||||
friend bool operator<(const Move &lhs, const Move &rhs);
|
||||
|
||||
private:
|
||||
|
||||
void topoSort(std::vector<ListElement> &list) const;
|
||||
bool checkEmpty(const QString &path) const;
|
||||
|
||||
private:
|
||||
|
||||
MOBase::IOrganizer *m_MOInfo;
|
||||
mutable QString m_ErrorMessage;
|
||||
mutable std::vector <Move> m_SuggestedMoves;
|
||||
mutable QString m_NewestModlistBackup;
|
||||
mutable std::set<QString> m_MissingMasters;
|
||||
mutable std::map<QString, std::set<QString>> m_PluginChildren;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user