Move to VCPKG. (#7)

This commit is contained in:
Mikaël Capelle
2025-05-29 11:03:34 +02:00
committed by GitHub
parent af4c65d941
commit d38019a994
7 changed files with 107 additions and 6 deletions
+6
View File
@@ -0,0 +1,6 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.py text eol=crlf
+39
View File
@@ -0,0 +1,39 @@
name: Build Installer Wizard Plugin
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set environmental variables
shell: bash
run: |
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Configure Installer Wizard Plugin build
shell: pwsh
run: |
cmake --preset vs2022-windows "-DCMAKE_INSTALL_PREFIX=install" "-DVCPKG_MANIFEST_FEATURES=standalone"
- name: Build Installer Wizard Plugin
run: cmake --build vsbuild --config RelWithDebInfo
- name: Install Installer Wizard Plugin
run: cmake --install vsbuild --config RelWithDebInfo
- name: Upload Installer Wizard Plugin artifact
uses: actions/upload-artifact@master
with:
name: installer_wizard
path: ./install/bin/plugins
+1
View File
@@ -7,6 +7,7 @@ src/ui/*.py
**/.mypy_cache
.tox
.vscode
venv
# MO2 build files:
vsbuild
+25
View File
@@ -0,0 +1,25 @@
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-yaml
- id: check-toml
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7 # must match pyproject.toml
hooks:
- id: ruff
args: [--extend-select, I, --fix]
- id: ruff-format
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 -6
View File
@@ -1,11 +1,7 @@
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_wizard LANGUAGES NONE)
find_package(mo2-cmake CONFIG REQUIRED)
add_subdirectory(src)
+17
View File
@@ -0,0 +1,17 @@
{
"configurePresets": [
{
"binaryDir": "${sourceDir}/vsbuild",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"generator": "Visual Studio 17 2022",
"name": "vs2022-windows"
}
],
"buildPresets": [
{
"name": "vs2022-windows",
"configurePreset": "vs2022-windows"
}
],
"version": 4
}
+17
View File
@@ -0,0 +1,17 @@
{
"features": {
"standalone": {
"description": "Build Standalone.",
"dependencies": [
"mo2-cmake"
]
}
},
"vcpkg-configuration": {
"default-registry": {
"kind": "git",
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
"baseline": "69db61b22147b14ad66fd05cf798d855f6d68c12"
}
}
}