Skip to content

Commit d9648c9

Browse files
committed
Move to VCPKG.
1 parent fc263f2 commit d9648c9

18 files changed

Lines changed: 203 additions & 178 deletions

.github/workflows/build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
name: Build Installer FOMOD Plugin
1+
name: Build Installer FOMOD
22

33
on:
44
push:
5-
branches: master
5+
branches: [master]
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
env:
10+
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
11+
912
jobs:
1013
build:
1114
runs-on: windows-2022
1215
steps:
13-
- name: Build Installer FOMOD Plugin
14-
uses: ModOrganizer2/build-with-mob-action@master
16+
- name: Build Installer FOMOD
17+
id: build-installer-fomod
18+
uses: ModOrganizer2/build-with-mob-action@dev/vcpkg
1519
with:
16-
mo2-dependencies: cmake_common uibase
20+
mo2-dependencies: uibase

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-merge-conflict
8+
- id: check-case-conflict
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: v19.1.5
11+
hooks:
12+
- id: clang-format
13+
'types_or': [c++, c]
14+
15+
ci:
16+
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
17+
autofix_prs: true
18+
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
19+
autoupdate_schedule: quarterly
20+
submodules: false

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,4 @@ cmake_minimum_required(VERSION 3.16)
22

33
project(installer_fomod)
44

5-
if(DEFINED DEPENDENCIES_DIR)
6-
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake)
7-
else()
8-
include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake)
9-
endif()
10-
115
add_subdirectory(src)

CMakePresets.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"configurePresets": [
3+
{
4+
"errors": {
5+
"deprecated": true
6+
},
7+
"hidden": true,
8+
"name": "cmake-dev",
9+
"warnings": {
10+
"deprecated": true,
11+
"dev": true
12+
}
13+
},
14+
{
15+
"cacheVariables": {
16+
"VCPKG_MANIFEST_NO_DEFAULT_FEATURES": {
17+
"type": "BOOL",
18+
"value": "ON"
19+
}
20+
},
21+
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
22+
"hidden": true,
23+
"name": "vcpkg"
24+
},
25+
{
26+
"hidden": true,
27+
"inherits": ["vcpkg"],
28+
"name": "vcpkg-dev"
29+
},
30+
{
31+
"binaryDir": "${sourceDir}/vsbuild",
32+
"architecture": {
33+
"strategy": "set",
34+
"value": "x64"
35+
},
36+
"cacheVariables": {
37+
"CMAKE_CXX_FLAGS": "/EHsc /MP /W4",
38+
"VCPKG_TARGET_TRIPLET": {
39+
"type": "STRING",
40+
"value": "x64-windows-static-md"
41+
}
42+
},
43+
"generator": "Visual Studio 17 2022",
44+
"inherits": ["cmake-dev", "vcpkg-dev"],
45+
"name": "vs2022-windows",
46+
"toolset": "v143"
47+
},
48+
{
49+
"cacheVariables": {
50+
"VCPKG_MANIFEST_FEATURES": {
51+
"type": "STRING",
52+
"value": "standalone"
53+
}
54+
},
55+
"inherits": "vs2022-windows",
56+
"name": "vs2022-windows-standalone"
57+
}
58+
],
59+
"buildPresets": [
60+
{
61+
"name": "vs2022-windows",
62+
"resolvePackageReferences": "on",
63+
"configurePreset": "vs2022-windows"
64+
}
65+
],
66+
"version": 4
67+
}

src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22

3+
find_package(mo2-cmake CONFIG REQUIRED)
4+
find_package(mo2-uibase CONFIG REQUIRED)
5+
36
add_library(installer_fomod SHARED)
47
mo2_configure_plugin(installer_fomod WARNINGS OFF)
5-
mo2_install_target(installer_fomod)
8+
target_link_libraries(installer_fomod PRIVATE mo2::uibase)
9+
mo2_install_plugin(installer_fomod)

src/SConscript

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/fomodinstallerdialog.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
2020
#include "fomodinstallerdialog.h"
2121
#include "ui_fomodinstallerdialog.h"
2222

23-
#include "fomodscreenshotdialog.h"
24-
#include "igamefeatures.h"
25-
#include "imoinfo.h"
26-
#include "iplugingame.h"
27-
#include "log.h"
28-
#include "report.h"
29-
#include "scopeguard.h"
30-
#include "scriptextender.h"
31-
#include "utility.h"
32-
#include "xmlreader.h"
23+
#include <array>
24+
#include <sstream>
25+
#include <utility>
26+
#include <vector>
3327

3428
#include <QCheckBox>
3529
#include <QCompleter>
@@ -43,10 +37,17 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
4337

4438
#include <Shellapi.h>
4539

46-
#include <array>
47-
#include <sstream>
48-
#include <utility>
49-
#include <vector>
40+
#include <uibase/game_features/igamefeatures.h>
41+
#include <uibase/game_features/scriptextender.h>
42+
#include <uibase/imoinfo.h>
43+
#include <uibase/iplugingame.h>
44+
#include <uibase/log.h>
45+
#include <uibase/report.h>
46+
#include <uibase/scopeguard.h>
47+
#include <uibase/utility.h>
48+
49+
#include "fomodscreenshotdialog.h"
50+
#include "xmlreader.h"
5051

5152
using namespace MOBase;
5253

src/fomodinstallerdialog.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
1919

2020
#pragma once
2121

22-
#include "guessedvalue.h"
23-
#include "ifiletree.h"
24-
#include "imoinfo.h"
25-
#include "iplugininstaller.h"
26-
#include "ipluginlist.h"
27-
2822
#include <QDialog>
2923
#include <QGroupBox>
3024
#include <QMetaType>
@@ -34,6 +28,12 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
3428
#include <functional>
3529
#include <vector>
3630

31+
#include <uibase/guessedvalue.h>
32+
#include <uibase/ifiletree.h>
33+
#include <uibase/imoinfo.h>
34+
#include <uibase/iplugininstaller.h>
35+
#include <uibase/ipluginlist.h>
36+
3737
#include "installerfomod.h"
3838

3939
class QAbstractButton;

src/fomodscreenshotdialog.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ GNU General Public License for more details.
1616
You should have received a copy of the GNU General Public License
1717
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19-
2019
#include "fomodscreenshotdialog.h"
2120
#include "ui_fomodscreenshotdialog.h"
2221

23-
#include "scalelabel.h"
24-
2522
#include <QDirIterator>
2623
#include <QFrame>
2724
#include <QProxyStyle>
@@ -30,6 +27,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
3027
#include <QTableWidget>
3128
#include <QWindow>
3229

30+
#include "scalelabel.h"
31+
3332
constexpr int kScreenshotTileWidth = 100;
3433
constexpr int kScreenshotTileHeight = 80;
3534
constexpr int kScreenshotTileSpacing = 16;

src/fomodscreenshotdialog.ui

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@
256256
</property>
257257
<property name="styleSheet">
258258
<string notr="true">QTableWidget {
259-
background-color:transparent;
259+
background-color:transparent;
260260
outline:none;
261-
}
261+
}
262262

263263
QTableWidget::item {
264-
selection-background-color:transparent;
264+
selection-background-color:transparent;
265265
background: none;
266266
}
267267

0 commit comments

Comments
 (0)