Skip to content

Commit

Permalink
Move to VCPKG.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jul 11, 2024
1 parent 3b0e5c4 commit 39f1b0a
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 86 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 changes: 52 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -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 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

9 changes: 7 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.16)

find_package(mo2-cmake CONFIG REQUIRED)
find_package(mo2-uibase CONFIG REQUIRED)
find_package(Boost CONFIG REQUIRED COMPONENTS graph assign)

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 Boost::assign Boost::graph)
mo2_install_plugin(diagnose_basic)
48 changes: 24 additions & 24 deletions src/diagnose_basic_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,123 +54,123 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="506"/>
<location filename="diagnosebasic.cpp" line="507"/>
<source>File attribute checker
Searching for problems...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="536"/>
<location filename="diagnosebasic.cpp" line="537"/>
<source>Invalid file attributes found</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="537"/>
<location filename="diagnosebasic.cpp" line="538"/>
<source>One or more of your files has attributes that may prevent the game from reading the files. This can result in missing plugins, missing textures, and other such problems.

Fix the file attributes?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="550"/>
<location filename="diagnosebasic.cpp" line="551"/>
<source>File attribute checker
Fixing file attributes...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="563"/>
<location filename="diagnosebasic.cpp" line="564"/>
<source>Unable to set file attributes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="564"/>
<location filename="diagnosebasic.cpp" line="565"/>
<source>Mod Organizer was unable to fix the file attributes of at least one file.

Continue launching %1?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="607"/>
<location filename="diagnosebasic.cpp" line="608"/>
<source>There was an error reported recently</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="609"/>
<location filename="diagnosebasic.cpp" line="610"/>
<source>There are files in your Overwrite mod directory</source>
<oldsource>There are files in your overwrite mod</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="611"/>
<location filename="diagnosebasic.cpp" line="612"/>
<source>Your font configuration may be broken</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="613"/>
<location filename="diagnosebasic.cpp" line="614"/>
<source>Nitpick installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="615"/>
<location filename="diagnosebasic.cpp" line="616"/>
<source>INI Tweaks overwritten</source>
<oldsource>Ini Tweaks overwritten</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="617"/>
<location filename="diagnosebasic.cpp" line="618"/>
<source>Missing Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="619"/>
<location filename="diagnosebasic.cpp" line="620"/>
<source>At least one unverified mod is using an alternative game source</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="621"/>
<location filename="diagnosebasic.cpp" line="679"/>
<location filename="diagnosebasic.cpp" line="695"/>
<location filename="diagnosebasic.cpp" line="622"/>
<location filename="diagnosebasic.cpp" line="680"/>
<location filename="diagnosebasic.cpp" line="696"/>
<source>invalid problem key %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="631"/>
<location filename="diagnosebasic.cpp" line="632"/>
<source>There are currently files in your &lt;span style=&quot;color: red;&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/span&gt; directory. These files are typically newly created files, usually generated by an external mod tool (i.e. Wrye Bash, xEdit, FNIS, ...). Creation Club ESL files will also end up here when downloaded. Any files in &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; will take top priority when loading your mod files and will always overwrite any other mod in your profile.&lt;br&gt;&lt;br&gt;It is recommended that you review the files in &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; and move any relevant files to a new or existing mod. You can do this by double-clicking the &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; mod and dragging files from the Overwrite window to a mod entry in the main mod list. It is also possible to move all current &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; files to a new mod by right-clicking on the Overwrite mod.&lt;br&gt;&lt;br&gt;Not all files in &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; need to be removed, but there are several reasons to do so. Some generated files will be directly related to the active mods in your profile and will be incompatible with different mod setups. Since &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; is always active, this could cause conflicts between profiles. Additionally, moving relevant game files into a normal mod will give you greater control over those files. Some files can live safely in &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt;, such as basic logs and cache files. It is up to you to understand how best to manage these files.&lt;br&gt;&lt;br&gt;If you do not wish to see this warning and understand how to handle your &lt;span style=&quot;font-weight: bold;&quot;&gt;Overwrite&lt;/span&gt; directory, you can open the Mod Organizer settings and disable this warning under the &quot;Diagnose Basic&quot; plugin configuration.</source>
<oldsource>There are currently files in your &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; directory. These files are typically newly created files, usually generated by an external mod tool (i.e. Wrye Bash, xEdit, FNIS, ...). Creation Club ESL files will also end up here when downloaded. Any files in &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; will take top priority when loading your mod files and will always overwrite any other mod in your profile.&lt;br&gt;&lt;br&gt;It is recommended that you review the files in &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; and move any relevant files to a new or 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 dragging files from the &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; window to a mod entry in the main mod list. It is also possible to move all current &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; files to a new mod by right-clicking on the &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; mod.&lt;br&gt;&lt;br&gt;Not all files in &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; need to be removed, but there are several reasons to do so. Some generated files will be directly related to the active mods in your profile and will be incompatible with different mod setups. Since &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; is always active, this could cause conflicts between profiles. Additionally, moving relevant game files into a normal mod will give you greater control over those files. Some files can live safely in &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt;, such as basic logs and cache files. It is up to you to understand how best to manage these files.&lt;br&gt;&lt;br&gt;If you do not wish to see this warning and understand how to handle your &lt;font color=&quot;red&quot;&gt;&lt;i&gt;Overwrite&lt;/i&gt;&lt;/font&gt; directory, you can open the Mod Organizer settings and disable this warning under the &quot;Diagnose Basic&quot; plugin configuration.</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="639"/>
<location filename="diagnosebasic.cpp" line="640"/>
<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="642"/>
<location filename="diagnosebasic.cpp" line="643"/>
<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="646"/>
<location filename="diagnosebasic.cpp" line="647"/>
<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="663"/>
<location filename="diagnosebasic.cpp" line="664"/>
<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="666"/>
<location filename="diagnosebasic.cpp" line="667"/>
<source>Master</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="667"/>
<location filename="diagnosebasic.cpp" line="668"/>
<source>Required By</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="diagnosebasic.cpp" line="671"/>
<location filename="diagnosebasic.cpp" line="672"/>
<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>
Expand Down
14 changes: 7 additions & 7 deletions src/diagnosebasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

#include "diagnosebasic.h"

#include "ifiletree.h"
#include "iplugingame.h"
#include <report.h>
#include <utility.h>
#include <imodlist.h>
#include <ipluginlist.h>
#include <imodinterface.h>
#include <uibase/ifiletree.h>
#include <uibase/iplugingame.h>
#include <uibase/report.h>
#include <uibase/utility.h>
#include <uibase/imodlist.h>
#include <uibase/ipluginlist.h>
#include <uibase/imodinterface.h>

#include <QtPlugin>
#include <QFile>
Expand Down
11 changes: 5 additions & 6 deletions src/diagnosebasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,21 @@ 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>

#include <uibase/iplugin.h>
#include <uibase/iplugindiagnose.h>
#include <uibase/imoinfo.h>
#include <uibase/imodlist.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" FILE "diagnosebasic.json")
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic")
#endif

public:
Expand Down
1 change: 0 additions & 1 deletion src/diagnosebasic.json

This file was deleted.

21 changes: 21 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7"
},
"registries": [
{
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7",
"packages": ["boost*", "boost-*"]
},
{
"kind": "git",
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
"baseline": "b826771be1e4507f28daffa5f2d8ae0bcfa7bf13",
"packages": ["mo2-*"]
}
]
}
3 changes: 3 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dependencies": ["mo2-cmake", "boost-assign", "boost-graph"]
}

0 comments on commit 39f1b0a

Please sign in to comment.