Compare commits

..
Author SHA1 Message Date
Jeremy Rimpo ece19dddad Update vcpkg targets 2026-04-14 11:35:39 -05:00
pre-commit-ci[bot] af299cb9d4 [pre-commit.ci] Pre-commit autoupdate. (#25) 2026-04-07 07:59:03 +02:00
pre-commit-ci[bot] 7cc4a80665 [pre-commit.ci] Pre-commit autoupdate. (#24)
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.2 → v21.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.2...v21.1.8)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-05 19:25:46 +01:00
pre-commit-ci[bot] 3a820002dd [pre-commit.ci] Pre-commit autoupdate. (#23)
updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/pre-commit/mirrors-clang-format: v20.1.7 → v21.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v20.1.7...v21.1.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-07 15:01:33 +02:00
pre-commit-ci[bot] ec6d8560bb [pre-commit.ci] Pre-commit autoupdate. (#22)
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.5 → v20.1.7](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.5...v20.1.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-07-07 20:30:16 +02:00
Mikaël Capelle 9b73803f9c Add Github action and fix line ending (#21) 2025-05-29 11:30:13 +02:00
Mikaël Capelle 97f88f15e3 Move to VCPKG. (#17) 2025-05-29 10:59:43 +02:00
Jeremy Rimpo 10dbfa673f Merge pull request #20 from ModOrganizer2/obvrem
Add support for the new mod directory mappings
2025-05-22 14:55:14 -05:00
Jeremy Rimpo 13143dbb80 Add fonts_cclub.swf to font config check (#19) 2025-05-22 10:49:18 +02:00
Jeremy Rimpo 9531efe2f0 Skip empty mod dirs when evaluating overwrite 2025-05-03 02:47:57 -05:00
Mikaël Capelle 7fc98c5d4e Update translations. (#18) 2024-07-21 15:56:54 +02:00
Mikaël Capelle 3b0e5c44ed Merge pull request #16 from Liderate/SSE_InvalidFontConfig
Fix SSE check in invalidFontConfig
2024-05-25 14:32:39 +02:00
Liderate cde4731e5e Fix SSE check in invalidFontConfig 2023-11-29 14:24:14 -05:00
14 changed files with 666 additions and 452 deletions
+41
View File
@@ -0,0 +1,41 @@
---
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 2
---
Language: Cpp
DeriveLineEnding: false
UseCRLF: true
DerivePointerAlignment: false
PointerAlignment: Left
AlignConsecutiveAssignments: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Empty
AlwaysBreakTemplateDeclarations: Yes
AccessModifierOffset: -2
AlignTrailingComments: true
SpacesBeforeTrailingComments: 2
NamespaceIndentation: Inner
MaxEmptyLinesToKeep: 1
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
ColumnLimit: 88
ForEachMacros: ['Q_FOREACH', 'foreach']
+7
View File
@@ -0,0 +1,7 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.cpp text eol=crlf
*.h text eol=crlf
+20
View File
@@ -0,0 +1,20 @@
name: Build Diagnose Basic
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
env:
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
jobs:
build:
runs-on: windows-2022
steps:
- name: Build Diagnose Basic
id: build-diagnose-basic
uses: ModOrganizer2/build-with-mob-action@master
with:
mo2-dependencies: uibase
+16
View File
@@ -0,0 +1,16 @@
name: Lint Diagnose Basic
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check format
uses: ModOrganizer2/check-formatting-action@master
with:
check-path: "."
+20
View File
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.2
hooks:
- id: clang-format
'types_or': [c++, c]
ci:
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
autoupdate_schedule: quarterly
submodules: false
+1 -6
View File
@@ -1,10 +1,5 @@
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)
+52
View File
@@ -0,0 +1,52 @@
{
"configurePresets": [
{
"errors": {
"deprecated": true
},
"hidden": true,
"name": "cmake-dev",
"warnings": {
"deprecated": true,
"dev": true
}
},
{
"cacheVariables": {
"VCPKG_MANIFEST_NO_DEFAULT_FEATURES": {
"type": "BOOL",
"value": "ON"
}
},
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"hidden": true,
"name": "vcpkg"
},
{
"binaryDir": "${sourceDir}/vsbuild",
"architecture": {
"strategy": "set",
"value": "x64"
},
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/EHsc /MP /W4",
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "x64-windows-static-md"
}
},
"generator": "Visual Studio 17 2022",
"inherits": ["cmake-dev", "vcpkg"],
"name": "vs2022-windows",
"toolset": "v143"
}
],
"buildPresets": [
{
"name": "vs2022-windows",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows"
}
],
"version": 4
}
-40
View File
@@ -1,40 +0,0 @@
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
+6 -2
View File
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16)
find_package(mo2-cmake CONFIG REQUIRED)
find_package(mo2-uibase CONFIG REQUIRED)
add_library(diagnose_basic SHARED)
mo2_configure_plugin(diagnose_basic WARNINGS OFF PRIVATE_DEPENDS boost)
mo2_install_target(diagnose_basic)
mo2_configure_plugin(diagnose_basic WARNINGS OFF)
target_link_libraries(diagnose_basic PRIVATE mo2::uibase)
mo2_install_plugin(diagnose_basic)
File diff suppressed because one or more lines are too long
+304 -225
View File
File diff suppressed because it is too large Load Diff
+142 -144
View File
@@ -1,144 +1,142 @@
/*
Copyright (C) 2013 Sebastian Herbord. All rights reserved.
This file is part of basic diagnosis plugin for MO
This plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DIAGNOSEBASIC_H
#define DIAGNOSEBASIC_H
#include <iplugin.h>
#include <iplugindiagnose.h>
#include <imoinfo.h>
#include <imodlist.h>
#include <QString>
#include <QSet>
#include <QRegularExpression>
class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic" FILE "diagnosebasic.json")
#endif
public:
DiagnoseBasic();
public: // IPlugin
virtual bool init(MOBase::IOrganizer *moInfo);
virtual QString name() const;
virtual QString author() const;
virtual QString description() const;
virtual MOBase::VersionInfo version() const;
virtual bool isActive() const;
virtual QList<MOBase::PluginSetting> settings() const;
public: // IPluginDiagnose
virtual std::vector<unsigned int> activeProblems() const;
virtual QString shortDescription(unsigned int key) const;
virtual QString fullDescription(unsigned int key) const;
virtual bool hasGuidedFix(unsigned int key) const;
virtual void startGuidedFix(unsigned int key) const;
private:
bool errorReported() const;
bool overwriteFiles() const;
bool invalidFontConfig() const;
bool nitpickInstalled() const;
bool assetOrder() const;
bool missingMasters() const;
bool alternateGame() const;
bool fileAttributes(const QString &executable) const;
private:
static const unsigned int PROBLEM_ERRORLOG = 1;
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_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 {
QString espName;
QString modName;
int pluginPriority;
int modPriority;
int sortGroup;
bool avoidMove;
QSet<QString> relevantScripts;
};
struct Move {
ListElement item;
ListElement reference;
enum EType {
BEFORE,
AFTER
} type;
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 QString m_NewestModlistBackup;
mutable std::set<QString> m_MissingMasters;
mutable std::map<QString, std::set<QString>> m_PluginChildren;
};
#endif // DIAGNOSEBASIC_H
/*
Copyright (C) 2013 Sebastian Herbord. All rights reserved.
This file is part of basic diagnosis plugin for MO
This plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This plugin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DIAGNOSEBASIC_H
#define DIAGNOSEBASIC_H
#include <QRegularExpression>
#include <QSet>
#include <QString>
#include <uibase/imodlist.h>
#include <uibase/imoinfo.h>
#include <uibase/iplugin.h>
#include <uibase/iplugindiagnose.h>
class DiagnoseBasic : public QObject,
public MOBase::IPlugin,
public MOBase::IPluginDiagnose
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic")
#endif
public:
DiagnoseBasic();
public: // IPlugin
virtual bool init(MOBase::IOrganizer* moInfo);
virtual QString name() const;
virtual QString author() const;
virtual QString description() const;
virtual MOBase::VersionInfo version() const;
virtual bool isActive() const;
virtual QList<MOBase::PluginSetting> settings() const;
public: // IPluginDiagnose
virtual std::vector<unsigned int> activeProblems() const;
virtual QString shortDescription(unsigned int key) const;
virtual QString fullDescription(unsigned int key) const;
virtual bool hasGuidedFix(unsigned int key) const;
virtual void startGuidedFix(unsigned int key) const;
private:
bool errorReported() const;
bool overwriteFiles() const;
bool invalidFontConfig() const;
bool nitpickInstalled() const;
bool assetOrder() const;
bool missingMasters() const;
bool alternateGame() const;
bool fileAttributes(const QString& executable) const;
private:
static const unsigned int PROBLEM_ERRORLOG = 1;
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_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
{
QString espName;
QString modName;
int pluginPriority;
int modPriority;
int sortGroup;
bool avoidMove;
QSet<QString> relevantScripts;
};
struct Move
{
ListElement item;
ListElement reference;
enum EType
{
BEFORE,
AFTER
} type;
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 QString m_NewestModlistBackup;
mutable std::set<QString> m_MissingMasters;
mutable std::map<QString, std::set<QString>> m_PluginChildren;
};
#endif // DIAGNOSEBASIC_H
-1
View File
@@ -1 +0,0 @@
{}
+23
View File
@@ -0,0 +1,23 @@
{
"features": {
"standalone": {
"description": "Build Standalone.",
"dependencies": ["mo2-cmake", "mo2-uibase"]
}
},
"vcpkg-configuration": {
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "74e6536215718009aae747d86d84b78376bf9e09"
},
"registries": [
{
"kind": "git",
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
"baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673",
"packages": ["mo2-*"]
}
]
}
}