mirror of
https://github.com/ModOrganizer2/modorganizer-installer_quick.git
synced 2026-07-27 14:02:22 -07:00
Move to VCPKG. (#21)
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
name: Build Installer Quick Plugin
|
||||
name: Build Installer Quick
|
||||
|
||||
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 Installer Quick Plugin
|
||||
- name: Build Installer Quick
|
||||
id: build-installer-quick
|
||||
uses: ModOrganizer2/build-with-mob-action@master
|
||||
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
|
||||
@@ -1,10 +1,4 @@
|
||||
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(installer_quick)
|
||||
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
|
||||
}
|
||||
+6
-2
@@ -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_quick SHARED)
|
||||
mo2_configure_plugin(installer_quick WARNINGS OFF)
|
||||
mo2_install_target(installer_quick)
|
||||
mo2_configure_plugin(installer_quick WARNINGS 4)
|
||||
target_link_libraries(installer_quick PRIVATE mo2::uibase)
|
||||
mo2_install_plugin(installer_quick)
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Import('qt_env')
|
||||
|
||||
env = qt_env.Clone()
|
||||
|
||||
env.AppendUnique(CPPDEFINES = [ 'INSTALLERQUICK_LIBRARY' ])
|
||||
|
||||
# Le sigh
|
||||
env['CPPPATH'] += [ '.' ]
|
||||
|
||||
env.Uic(env.Glob('*.ui'))
|
||||
|
||||
lib = env.SharedLibrary('installerQuick', env.Glob('*.cpp'))
|
||||
env.InstallModule(lib)
|
||||
|
||||
res = env['QT_USED_MODULES']
|
||||
Return('res')
|
||||
@@ -1,35 +0,0 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2012-12-22T22:13:35
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
TARGET = installerQuick
|
||||
TEMPLATE = lib
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
CONFIG(release, debug|release) {
|
||||
QMAKE_CXXFLAGS += /Zi
|
||||
QMAKE_LFLAGS += /DEBUG
|
||||
}
|
||||
|
||||
DEFINES += INSTALLERQUICK_LIBRARY
|
||||
|
||||
SOURCES += installerquick.cpp \
|
||||
simpleinstalldialog.cpp
|
||||
|
||||
HEADERS += installerquick.h \
|
||||
simpleinstalldialog.h
|
||||
|
||||
FORMS += \
|
||||
simpleinstalldialog.ui
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
OTHER_FILES += \
|
||||
installerquick.json\
|
||||
SConscript
|
||||
@@ -1,12 +1,12 @@
|
||||
#include "installerquick.h"
|
||||
|
||||
#include "igamefeatures.h"
|
||||
#include "iplugingame.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QtPlugin>
|
||||
|
||||
#include <uibase/game_features/igamefeatures.h>
|
||||
#include <uibase/iplugingame.h>
|
||||
#include <uibase/log.h>
|
||||
|
||||
#include "simpleinstalldialog.h"
|
||||
|
||||
using namespace MOBase;
|
||||
@@ -65,7 +65,7 @@ bool InstallerQuick::isManualInstaller() const
|
||||
|
||||
bool InstallerQuick::isDataTextArchiveTopLayer(std::shared_ptr<const IFileTree> tree,
|
||||
QString const& dataFolderName,
|
||||
ModDataChecker* checker) const
|
||||
ModDataChecker*) const
|
||||
{
|
||||
// A "DataText" archive is defined as having exactly one folder named like
|
||||
// `dataFolderName` and one or more "useless" files (text files, pdf, or images).
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#ifndef INSTALLERQUICK_H
|
||||
#define INSTALLERQUICK_H
|
||||
|
||||
#include <iplugininstallersimple.h>
|
||||
#include <moddatachecker.h>
|
||||
#include <uibase/game_features/moddatachecker.h>
|
||||
#include <uibase/iplugininstallersimple.h>
|
||||
|
||||
class InstallerQuick : 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.InstallerQuick" FILE "installerquick.json")
|
||||
Q_PLUGIN_METADATA(IID "org.tannin.InstallerQuick")
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -16,9 +16,9 @@ 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "simpleinstalldialog.h"
|
||||
#include "ui_simpleinstalldialog.h"
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
#include <QComboBox>
|
||||
|
||||
@@ -21,7 +21,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define SIMPLEINSTALLDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <guessedvalue.h>
|
||||
#include <uibase/guessedvalue.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
||||
+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