mirror of
https://github.com/ModOrganizer2/modorganizer-installer_bain.git
synced 2026-07-27 14:02:47 -07:00
Move to VCPKG. (#17)
This commit is contained in:
@@ -1,16 +1,20 @@
|
|||||||
name: Build Installer BAIN Plugin
|
name: Build Installer BAIN
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: master
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
env:
|
||||||
|
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- name: Build Installer BAIN Plugin
|
- name: Build Installer BAIN
|
||||||
|
id: build-installer-bain
|
||||||
uses: ModOrganizer2/build-with-mob-action@master
|
uses: ModOrganizer2/build-with-mob-action@master
|
||||||
with:
|
with:
|
||||||
mo2-dependencies: cmake_common uibase
|
mo2-dependencies: uibase
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v5.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: v19.1.5
|
||||||
|
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
|
||||||
@@ -2,10 +2,4 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
|
|
||||||
project(installer_bain)
|
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)
|
add_subdirectory(src)
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
+5
-1
@@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
find_package(mo2-cmake CONFIG REQUIRED)
|
||||||
|
find_package(mo2-uibase CONFIG REQUIRED)
|
||||||
|
|
||||||
add_library(installer_bain SHARED)
|
add_library(installer_bain SHARED)
|
||||||
mo2_configure_plugin(installer_bain WARNINGS OFF)
|
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)
|
||||||
|
|||||||
@@ -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')
|
|
||||||
@@ -16,13 +16,14 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "baincomplexinstallerdialog.h"
|
|
||||||
#include "textviewer.h"
|
|
||||||
#include "ui_baincomplexinstallerdialog.h"
|
#include "ui_baincomplexinstallerdialog.h"
|
||||||
|
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
|
|
||||||
|
#include <uibase/textviewer.h>
|
||||||
|
|
||||||
|
#include "baincomplexinstallerdialog.h"
|
||||||
|
|
||||||
using namespace MOBase;
|
using namespace MOBase;
|
||||||
|
|
||||||
BainComplexInstallerDialog::BainComplexInstallerDialog(
|
BainComplexInstallerDialog::BainComplexInstallerDialog(
|
||||||
|
|||||||
@@ -20,10 +20,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef BAINCOMPLEXINSTALLERDIALOG_H
|
#ifndef BAINCOMPLEXINSTALLERDIALOG_H
|
||||||
#define BAINCOMPLEXINSTALLERDIALOG_H
|
#define BAINCOMPLEXINSTALLERDIALOG_H
|
||||||
|
|
||||||
#include "ifiletree.h"
|
#include <uibase/guessedvalue.h>
|
||||||
#include <guessedvalue.h>
|
#include <uibase/ifiletree.h>
|
||||||
|
#include <uibase/tutorabledialog.h>
|
||||||
#include "tutorabledialog.h"
|
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -60,22 +60,22 @@ If there is a component called "00 Core" it is usually required. Optio
|
|||||||
<context>
|
<context>
|
||||||
<name>InstallerBAIN</name>
|
<name>InstallerBAIN</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="installerbain.cpp" line="52"/>
|
<location filename="installerbain.cpp" line="51"/>
|
||||||
<source>BAIN Installer</source>
|
<source>BAIN Installer</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="installerbain.cpp" line="62"/>
|
<location filename="installerbain.cpp" line="61"/>
|
||||||
<source>Installer for BAIN archives (originally targeting Wrye Bash)</source>
|
<source>Installer for BAIN archives (originally targeting Wrye Bash)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="installerbain.cpp" line="175"/>
|
<location filename="installerbain.cpp" line="173"/>
|
||||||
<source>May be BAIN installer</source>
|
<source>May be BAIN installer</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="installerbain.cpp" line="176"/>
|
<location filename="installerbain.cpp" line="174"/>
|
||||||
<source>This installer looks like it may contain a BAIN installer but I'm not sure. Install as BAIN installer?</source>
|
<source>This installer looks like it may contain a BAIN installer but I'm not sure. Install as BAIN installer?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@@ -19,17 +19,16 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "installerbain.h"
|
#include "installerbain.h"
|
||||||
|
|
||||||
#include <igamefeatures.h>
|
#include <uibase/game_features/igamefeatures.h>
|
||||||
#include <iinstallationmanager.h>
|
#include <uibase/game_features/moddatachecker.h>
|
||||||
#include <iplugingame.h>
|
#include <uibase/iinstallationmanager.h>
|
||||||
#include <moddatachecker.h>
|
#include <uibase/iplugingame.h>
|
||||||
|
#include <uibase/log.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
#include <log.h>
|
|
||||||
|
|
||||||
#include "baincomplexinstallerdialog.h"
|
#include "baincomplexinstallerdialog.h"
|
||||||
|
|
||||||
using namespace MOBase;
|
using namespace MOBase;
|
||||||
@@ -82,8 +81,7 @@ bool InstallerBAIN::isManualInstaller() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallerBAIN::onInstallationStart(QString const& archive, bool reinstallation,
|
void InstallerBAIN::onInstallationStart(QString const&, bool, IModInterface* currentMod)
|
||||||
IModInterface* currentMod)
|
|
||||||
{
|
{
|
||||||
// We reset some field and fetch the previously installed options:
|
// We reset some field and fetch the previously installed options:
|
||||||
m_InstallerUsed = false;
|
m_InstallerUsed = false;
|
||||||
|
|||||||
+2
-2
@@ -20,14 +20,14 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef INSTALLERBAIN_H
|
#ifndef INSTALLERBAIN_H
|
||||||
#define INSTALLERBAIN_H
|
#define INSTALLERBAIN_H
|
||||||
|
|
||||||
#include <iplugininstallersimple.h>
|
#include <uibase/iplugininstallersimple.h>
|
||||||
|
|
||||||
class InstallerBAIN : public MOBase::IPluginInstallerSimple
|
class InstallerBAIN : public MOBase::IPluginInstallerSimple
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginInstaller MOBase::IPluginInstallerSimple)
|
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginInstaller MOBase::IPluginInstallerSimple)
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
#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
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
+15
@@ -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": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user