Compare commits

...
Author SHA1 Message Date
Jeremy Rimpo 9ba1daac88 Update vcpkg targets 2026-04-14 11:35:41 -05:00
pre-commit-ci[bot] b89b52296a [pre-commit.ci] Pre-commit autoupdate. (#17)
updates:
- [github.com/pre-commit/mirrors-clang-format: v21.1.8 → v22.1.2](https://github.com/pre-commit/mirrors-clang-format/compare/v21.1.8...v22.1.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-07 09:02:02 +02:00
pre-commit-ci[bot] 11b4d13da8 [pre-commit.ci] Pre-commit autoupdate. (#16)
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:26:46 +01:00
pre-commit-ci[bot] be7c5f0d0b [pre-commit.ci] Pre-commit autoupdate. (#15)
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:00:43 +02:00
pre-commit-ci[bot] 27718aecc2 [pre-commit.ci] Pre-commit autoupdate. (#14)
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:31:09 +02:00
Mikaël Capelle 4deb451f14 Merge pull request #12 from ModOrganizer2/dev/vcpkg 2025-05-29 11:02:09 +02:00
10 changed files with 136 additions and 23 deletions
+8 -4
View File
@@ -1,16 +1,20 @@
name: Build Preview Base Plugin
name: Build Preview Base
on:
push:
branches: master
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 Preview Base Plugin
- name: Build Preview Base
id: build-preview-base
uses: ModOrganizer2/build-with-mob-action@master
with:
mo2-dependencies: cmake_common uibase
mo2-dependencies: uibase
+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(preview_base)
add_subdirectory(src)
+67
View File
@@ -0,0 +1,67 @@
{
"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"
},
{
"hidden": true,
"inherits": ["vcpkg"],
"name": "vcpkg-dev"
},
{
"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-dev"],
"name": "vs2022-windows",
"toolset": "v143"
},
{
"cacheVariables": {
"VCPKG_MANIFEST_FEATURES": {
"type": "STRING",
"value": "standalone"
}
},
"inherits": "vs2022-windows",
"name": "vs2022-windows-standalone"
}
],
"buildPresets": [
{
"name": "vs2022-windows",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows"
}
],
"version": 4
}
+7 -3
View File
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16)
add_library(preview_base SHARED)
mo2_configure_plugin(preview_base WARNINGS OFF)
mo2_install_target(preview_base)
find_package(mo2-cmake CONFIG REQUIRED)
find_package(mo2-uibase CONFIG REQUIRED)
add_library(preview_base SHARED previewbase.cpp previewbase.h)
mo2_configure_plugin(preview_base NO_SOURCES WARNINGS 4)
target_link_libraries(preview_base PRIVATE mo2::uibase)
mo2_install_plugin(preview_base)
+4 -4
View File
@@ -4,22 +4,22 @@
<context>
<name>PreviewBase</name>
<message>
<location filename="previewbase.cpp" line="84"/>
<location filename="previewbase.cpp" line="86"/>
<source>Preview Base</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="previewbase.cpp" line="94"/>
<location filename="previewbase.cpp" line="96"/>
<source>Supports previewing various types of data files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="previewbase.cpp" line="107"/>
<location filename="previewbase.cpp" line="109"/>
<source>Enable previewing of basic file types, such as images and text files.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="previewbase.cpp" line="111"/>
<location filename="previewbase.cpp" line="113"/>
<source>Specify a list of comma separated extensions (without &quot;.&quot;) that should not be previewed by this plugin.</source>
<translation type="unfinished"></translation>
</message>
+3 -1
View File
@@ -18,6 +18,7 @@ along with Base Preview plugin. If not, see <http://www.gnu.org/licenses/>.
*/
#include "previewbase.h"
#include <QApplication>
#include <QFileInfo>
#include <QImageReader>
@@ -25,7 +26,8 @@ along with Base Preview plugin. If not, see <http://www.gnu.org/licenses/>.
#include <QScreen>
#include <QTextEdit>
#include <QtPlugin>
#include <utility.h>
#include <uibase/utility.h>
using namespace MOBase;
+3 -4
View File
@@ -21,16 +21,15 @@ along with Base Preview plugin. If not, see <http://www.gnu.org/licenses/>.
#define PREVIEWBASE_H
#include <functional>
#include <ipluginpreview.h>
#include <uibase/ipluginpreview.h>
class PreviewBase : public MOBase::IPluginPreview
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginPreview)
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Q_PLUGIN_METADATA(IID "org.tannin.PreviewBase" FILE "previewbase.json")
#endif
Q_PLUGIN_METADATA(IID "org.tannin.PreviewBase")
public:
PreviewBase();
-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-*"]
}
]
}
}