Compare commits

..
28 Commits
Author SHA1 Message Date
Jeremy Rimpo 4987d478a8 Add fonts_cclub.swf to font config check 2024-08-05 10:14:48 -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
Mikaël Capelle 51099bed28 Merge pull request #15 from Liderate/master
Clear m_PluginChildren to prevent stale entries.
2023-10-13 18:59:06 +02:00
Liderate 5b3d2adac5 Clear m_PluginChildren to prevent stale entries. 2023-10-12 02:17:06 -04:00
Mikaël Capelle d56d51e37c Merge pull request #14 from ModOrganizer2/update-cmake-common-qt6
Update following cmake_common changes.
2022-04-28 17:55:15 +02:00
Mikaël Capelle 8d4c514c4d Update following cmake_common changes. 2022-04-19 23:30:01 +02:00
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
8 changed files with 73 additions and 121 deletions
+4 -6
View File
@@ -1,12 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(diagnose_basic)
set(project_type plugin)
set(enable_warnings OFF)
if(DEFINED DEPENDENCIES_DIR)
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/project.cmake)
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake)
else()
include(../cmake_common/project.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake)
endif()
project(diagnose_basic)
add_subdirectory(src)
+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
+4 -5
View File
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.16)
if(DEFINED DEPENDENCIES_DIR)
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/src.cmake)
else()
include(../../cmake_common/src.cmake)
endif()
add_library(diagnose_basic SHARED)
mo2_configure_plugin(diagnose_basic WARNINGS OFF PRIVATE_DEPENDS boost)
mo2_install_target(diagnose_basic)
-24
View File
@@ -1,24 +0,0 @@
Import('qt_env')
env = qt_env.Clone()
env.AppendUnique(CPPDEFINES = [
'DIAGNOSEBASIC_LIBRARY',
'NOMINMAX',
# suppress a few warnings caused by boost vs vc++ paranoia
'_SCL_SECURE_NO_WARNINGS'
])
# Boost produces very long names with msvc truncates. Doesn't seem to cause
# problems.
env.AppendUnique(CPPFLAGS = [ '-wd4503' ])
env.AppendUnique(CPPPATH = [
'${BOOSTPATH}'
])
lib = env.SharedLibrary('diagnoseBasic', env.Glob('*.cpp'))
env.InstallModule(lib)
res = env['QT_USED_MODULES']
Return('res')
-35
View File
@@ -1,35 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2013-04-05T21:08:10
#
#-------------------------------------------------
TARGET = diagnoseBasic
TEMPLATE = lib
CONFIG += plugins
CONFIG += dll
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
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\
SConscript
File diff suppressed because one or more lines are too long
+13 -10
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;
}
}
@@ -255,6 +256,7 @@ bool DiagnoseBasic::missingMasters() const
}
m_MissingMasters.clear();
m_PluginChildren.clear();
// for each required master in each esp, test if it's in the list of enabled masters.
for (const QString &esp : esps) {
QString baseName = QFileInfo(esp).fileName();
@@ -282,14 +284,15 @@ bool DiagnoseBasic::alternateGame() const
bool DiagnoseBasic::invalidFontConfig() const
{
if ((m_MOInfo->managedGame()->gameName() != "Skyrim") && (m_MOInfo->managedGame()->gameName() != "SkyrimSE")) {
if ((m_MOInfo->managedGame()->gameName() != "Skyrim") && (m_MOInfo->managedGame()->gameShortName() != "SkyrimSE")) {
// this check is only for skyrim
return false;
}
// files from skyrim_interface.bsa
static std::vector<QString> defaultFonts = boost::assign::list_of("interface\\fonts_console.swf")
("interface\\fonts_en.swf");
("interface\\fonts_en.swf")
("interface\\fonts_cclub.swf");
QString configPath = m_MOInfo->resolvePath("interface/fontconfig.txt");
if (configPath.isEmpty()) {
@@ -486,7 +489,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 {