Skip to content

Commit 8e12fd7

Browse files
Holt59mikael-capelle
authored andcommitted
Move to VCPKG.
* Remove SConscript related files. * Update for libbsarch. * Force-load translations from uibase and gamebryo/creation. * Set option to use deprecated uibase include paths. * Bring githubpp here and add a standalone preset. * Full standalone build.
1 parent 8f1dbe9 commit 8e12fd7

30 files changed

+642
-3810
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,47 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
env:
10+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
11+
912
jobs:
1013
build:
1114
runs-on: windows-2022
1215
steps:
13-
- name: Build ModOrganizer 2
14-
uses: ModOrganizer2/build-with-mob-action@master
16+
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
23+
24+
- name: Install Qt
25+
uses: jurplel/install-qt-action@v3
26+
with:
27+
version: 6.7.0
28+
modules:
29+
cache: true
30+
31+
- uses: actions/checkout@v4
32+
33+
- name: "Set environmental variables"
34+
shell: bash
35+
run: |
36+
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
37+
38+
- name: Configure ModOrganizer
39+
shell: pwsh
40+
run: |
41+
cmake --preset vs2022-windows-standalone `
42+
"-DCMAKE_PREFIX_PATH=${env:QT_ROOT_DIR}\msvc2019_64" `
43+
"-DCMAKE_INSTALL_PREFIX=install"
44+
45+
- name: Build ModOrganizer
46+
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
47+
48+
- name: Package ModOrganizer
49+
uses: actions/upload-artifact@master
1550
with:
16-
qt-modules: qtpositioning qtwebchannel qtwebengine qtwebsockets
17-
mo2-third-parties:
18-
7z zlib gtest libbsarch libloot openssl bzip2 python lz4 spdlog
19-
boost boost-di sip pyqt pybind11 ss licenses explorerpp DirectXTex
20-
mo2-dependencies: usvfs cmake_common uibase githubpp bsatk esptk archive lootcli game_gamebryo
51+
name: modorganizer
52+
path: ./install

.hgignore

Lines changed: 0 additions & 46 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
cmake_minimum_required(VERSION 3.16)
22

3-
# TODO: move these to cmake_common?
4-
set(OPENSSL_USE_STATIC_LIBS FALSE CACHE STRING "" FORCE)
5-
set(MySQL_INCLUDE_DIRS CACHE STRING "" FORCE)
3+
# TODO: clean include directives
4+
set(MO2_CMAKE_DEPRECATED_UIBASE_INCLUDE ON)
65

7-
if(DEFINED DEPENDENCIES_DIR)
8-
include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake)
6+
project(organizer)
7+
8+
# if MO2_INSTALL_IS_BIN is set, this means that we should install directly into the
9+
# installation prefix, without the bin/ subfolder, typically for a standalone build
10+
# to update an existing install
11+
if (MO2_INSTALL_IS_BIN)
12+
set(_bin ".")
913
else()
10-
include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake)
14+
set(_bin bin)
1115
endif()
1216

13-
project(organizer)
1417
add_subdirectory(src)
1518

16-
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION bin)
19+
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT organizer)
20+
21+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dump_running_process.bat DESTINATION ${_bin})

CMakePresets.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"configurePresets": [
3+
{
4+
"errors": {
5+
"deprecated": true
6+
},
7+
"hidden": true,
8+
"name": "cmake-dev",
9+
"warnings": {
10+
"deprecated": true,
11+
"dev": true
12+
}
13+
},
14+
{
15+
"cacheVariables": {
16+
"VCPKG_MANIFEST_NO_DEFAULT_FEATURES": {
17+
"type": "BOOL",
18+
"value": "ON"
19+
}
20+
},
21+
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
22+
"hidden": true,
23+
"name": "vcpkg"
24+
},
25+
{
26+
"binaryDir": "${sourceDir}/vsbuild",
27+
"architecture": {
28+
"strategy": "set",
29+
"value": "x64"
30+
},
31+
"cacheVariables": {
32+
"CMAKE_CXX_FLAGS": "/EHsc /MP /W4",
33+
"VCPKG_TARGET_TRIPLET": {
34+
"type": "STRING",
35+
"value": "x64-windows-static-md"
36+
}
37+
},
38+
"generator": "Visual Studio 17 2022",
39+
"inherits": ["cmake-dev", "vcpkg"],
40+
"name": "vs2022-windows",
41+
"toolset": "v143"
42+
},
43+
{
44+
"cacheVariables": {
45+
"VCPKG_MANIFEST_FEATURES": {
46+
"type": "STRING",
47+
"value": "standalone"
48+
},
49+
"MO2_INSTALL_IS_BIN": {
50+
"type": "BOOL",
51+
"value": "ON"
52+
}
53+
},
54+
"inherits": "vs2022-windows",
55+
"name": "vs2022-windows-standalone"
56+
}
57+
],
58+
"version": 4
59+
}

0 commit comments

Comments
 (0)