diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 97b78c6..1c93cd3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-name: Build Installer BAIN Plugin
+name: Build Installer BAIN
on:
push:
@@ -6,11 +6,42 @@ on:
pull_request:
types: [opened, synchronize, reopened]
+env:
+ VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
+
jobs:
build:
runs-on: windows-2022
steps:
- - name: Build Installer BAIN Plugin
- uses: ModOrganizer2/build-with-mob-action@master
+ # https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
+ - name: Export GitHub Actions cache environment variables
+ uses: actions/github-script@v7
+ with:
+ script: |
+ core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
+ core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
+
+ - name: Install Qt
+ uses: jurplel/install-qt-action@v3
with:
- mo2-dependencies: cmake_common uibase
+ setup-python: false
+ version: 6.7.0
+ modules:
+ cache: true
+
+ - uses: actions/checkout@v4
+
+ - name: "Set environmental variables"
+ shell: bash
+ run: |
+ echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
+
+ - name: Configure Installer BAIN
+ shell: pwsh
+ run: |
+ cmake --preset vs2022-windows-standalone `
+ "-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
+ "-DCMAKE_INSTALL_PREFIX=install"
+
+ - name: Build Installer BAIN
+ run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eca028c..4834057 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,10 +2,4 @@ cmake_minimum_required(VERSION 3.16)
project(installer_bain)
-if(DEFINED DEPENDENCIES_DIR)
- include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake)
-else()
- include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake)
-endif()
-
add_subdirectory(src)
diff --git a/CMakePresets.json b/CMakePresets.json
new file mode 100644
index 0000000..16e1e6f
--- /dev/null
+++ b/CMakePresets.json
@@ -0,0 +1,60 @@
+{
+ "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"
+ }
+ ],
+ "version": 4
+}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 56f10ee..8c2a034 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16)
+find_package(mo2-cmake CONFIG REQUIRED)
+find_package(mo2-uibase CONFIG REQUIRED)
+
add_library(installer_bain SHARED)
mo2_configure_plugin(installer_bain WARNINGS OFF)
-mo2_install_target(installer_bain)
+target_link_libraries(installer_bain PRIVATE mo2::uibase)
+mo2_install_plugin(installer_bain)
diff --git a/src/SConscript b/src/SConscript
deleted file mode 100644
index 7a4bc89..0000000
--- a/src/SConscript
+++ /dev/null
@@ -1,18 +0,0 @@
-Import('qt_env')
-
-env = qt_env.Clone()
-
-env.EnableQtModules('Qml', 'Script','QuickWidgets')
-
-env.AppendUnique(CPPDEFINES = [ 'INSTALLERBAIN_LIBRARY' ])
-
-# Sigh
-env['CPPPATH'] += [ '.' ]
-
-env.Uic(env.Glob('*.ui'))
-
-lib = env.SharedLibrary('installerBAIN', env.Glob('*.cpp'))
-env.InstallModule(lib)
-
-res = env['QT_USED_MODULES']
-Return('res')
diff --git a/src/baincomplexinstallerdialog.cpp b/src/baincomplexinstallerdialog.cpp
index a2a0ec5..2c25d76 100644
--- a/src/baincomplexinstallerdialog.cpp
+++ b/src/baincomplexinstallerdialog.cpp
@@ -16,13 +16,14 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mod Organizer. If not, see .
*/
-
-#include "baincomplexinstallerdialog.h"
-#include "textviewer.h"
#include "ui_baincomplexinstallerdialog.h"
#include
+#include
+
+#include "baincomplexinstallerdialog.h"
+
using namespace MOBase;
BainComplexInstallerDialog::BainComplexInstallerDialog(
diff --git a/src/baincomplexinstallerdialog.h b/src/baincomplexinstallerdialog.h
index a88cb11..f657627 100644
--- a/src/baincomplexinstallerdialog.h
+++ b/src/baincomplexinstallerdialog.h
@@ -20,10 +20,9 @@ along with Mod Organizer. If not, see .
#ifndef BAINCOMPLEXINSTALLERDIALOG_H
#define BAINCOMPLEXINSTALLERDIALOG_H
-#include "ifiletree.h"
-#include
-
-#include "tutorabledialog.h"
+#include
+#include
+#include
namespace Ui
{
diff --git a/src/installerBAIN.pro b/src/installerBAIN.pro
deleted file mode 100644
index 6b89510..0000000
--- a/src/installerBAIN.pro
+++ /dev/null
@@ -1,39 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2013-01-01T18:46:50
-#
-#-------------------------------------------------
-
-TARGET = installerBAIN
-TEMPLATE = lib
-
-CONFIG += plugins
-CONFIG += dll
-
-CONFIG(release, debug|release) {
- QMAKE_CXXFLAGS += /Zi
- QMAKE_LFLAGS += /DEBUG
-}
-
-greaterThan(QT_MAJOR_VERSION, 4) {
- QT += widgets declarative script
-} else {
- QT += declarative script
-}
-
-DEFINES += INSTALLERBAIN_LIBRARY
-
-SOURCES += installerbain.cpp \
- baincomplexinstallerdialog.cpp
-
-HEADERS += installerbain.h \
- baincomplexinstallerdialog.h
-
-include(../plugin_template.pri)
-
-FORMS += \
- baincomplexinstallerdialog.ui
-
-OTHER_FILES += \
- installerbain.json\
- SConscript
diff --git a/src/installer_bain_en.ts b/src/installer_bain_en.ts
index 154c6d6..c9a4df8 100644
--- a/src/installer_bain_en.ts
+++ b/src/installer_bain_en.ts
@@ -60,22 +60,22 @@ If there is a component called "00 Core" it is usually required. Optio
InstallerBAIN
-
+
-
+
-
+
-
+
diff --git a/src/installerbain.cpp b/src/installerbain.cpp
index 67dad6d..22a8901 100644
--- a/src/installerbain.cpp
+++ b/src/installerbain.cpp
@@ -19,17 +19,16 @@ along with Mod Organizer. If not, see .
#include "installerbain.h"
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
#include
#include
#include
-#include
-
#include "baincomplexinstallerdialog.h"
using namespace MOBase;
diff --git a/src/installerbain.h b/src/installerbain.h
index bcfaaa0..535a31a 100644
--- a/src/installerbain.h
+++ b/src/installerbain.h
@@ -20,14 +20,14 @@ along with Mod Organizer. If not, see .
#ifndef INSTALLERBAIN_H
#define INSTALLERBAIN_H
-#include
+#include
class InstallerBAIN : public MOBase::IPluginInstallerSimple
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginInstaller MOBase::IPluginInstallerSimple)
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- Q_PLUGIN_METADATA(IID "org.tannin.InstallerBAIN" FILE "installerbain.json")
+ Q_PLUGIN_METADATA(IID "org.tannin.InstallerBAIN")
#endif
public:
diff --git a/src/installerbain.json b/src/installerbain.json
deleted file mode 100644
index 69a88e3..0000000
--- a/src/installerbain.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/vcpkg.json b/vcpkg.json
new file mode 100644
index 0000000..486b0fd
--- /dev/null
+++ b/vcpkg.json
@@ -0,0 +1,15 @@
+{
+ "features": {
+ "standalone": {
+ "description": "Build Standalone.",
+ "dependencies": ["mo2-cmake", "mo2-uibase"]
+ }
+ },
+ "vcpkg-configuration": {
+ "default-registry": {
+ "kind": "git",
+ "repository": "https://github.com/ModOrganizer2/vcpkg-registry",
+ "baseline": "d194ec4e14052784518d5e9f1c5ccac16de49c2c"
+ }
+ }
+}