Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to VCPKG. #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
name: Build Installer Bundle Plugin
name: Build Installer Bundle

on:
push:
branches: master
pull_request:
types: [opened, synchronize, reopened]

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
build:
runs-on: windows-2022
steps:
- name: Build Installer Bundle 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 Bundle
shell: pwsh
run: |
cmake --preset vs2022-windows-standalone `
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
"-DCMAKE_INSTALL_PREFIX=install"

- name: Build Installer Bundle
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@ cmake_minimum_required(VERSION 3.16)

project(installer_bundle)

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)
60 changes: 60 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -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
}
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.16)

find_package(mo2-cmake CONFIG REQUIRED)
find_package(mo2-uibase CONFIG REQUIRED)

add_library(installer_bundle SHARED)
mo2_configure_plugin(installer_bundle WARNINGS OFF)
mo2_install_target(installer_bundle)
target_link_libraries(installer_bundle PRIVATE mo2::uibase)
mo2_install_plugin(installer_bundle)
15 changes: 0 additions & 15 deletions src/SConscript

This file was deleted.

31 changes: 0 additions & 31 deletions src/installerBundle.pro

This file was deleted.

4 changes: 2 additions & 2 deletions src/installer_bundle_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<context>
<name>InstallerBundle</name>
<message>
<location filename="installerbundle.cpp" line="44"/>
<location filename="installerbundle.cpp" line="45"/>
<source>Bundle Installer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="installerbundle.cpp" line="54"/>
<location filename="installerbundle.cpp" line="55"/>
<source>Proxy-Installer to handle bundles containing the actual mod archive</source>
<translation type="unfinished"></translation>
</message>
Expand Down
3 changes: 2 additions & 1 deletion src/installerbundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/

#include "installerbundle.h"
#include "iinstallationmanager.h"

#include <QtPlugin>

#include <uibase/iinstallationmanager.h>

#include "multiarchivedialog.h"

using namespace MOBase;
Expand Down
4 changes: 2 additions & 2 deletions src/installerbundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#ifndef INSTALLERBUNDLE_H
#define INSTALLERBUNDLE_H

#include <iplugininstallersimple.h>
#include <uibase/iplugininstallersimple.h>

class InstallerBundle : 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.InstallerBundle" FILE "installerbundle.json")
Q_PLUGIN_METADATA(IID "org.tannin.InstallerBundle")
#endif

public:
Expand Down
Empty file removed src/installerbundle.json
Empty file.
2 changes: 1 addition & 1 deletion src/multiarchivedialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.

#include <QDialog>

#include "ifiletree.h"
#include <uibase/ifiletree.h>

namespace Ui
{
Expand Down
15 changes: 15 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Loading