Skip to content

Commit f9e809a

Browse files
committed
Move mo2-cmake to standalone feature.
1 parent ea527ab commit f9e809a

9 files changed

Lines changed: 40 additions & 40 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,19 @@ name: Build Installer OMOD
22

33
on:
44
push:
5-
branches: master
5+
branches: [master]
66
pull_request:
77
types: [opened, synchronize, reopened]
88

99
env:
10-
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
10+
VCPKG_BINARY_SOURCES: clear;x-azblob,${{ vars.AZ_BLOB_VCPKG_URL }},${{ secrets.AZ_BLOB_SAS }},readwrite
1111

1212
jobs:
1313
build:
1414
runs-on: windows-2022
1515
steps:
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 Installer OMOD
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-
4516
- name: Build Installer OMOD
46-
run: cmake --build vsbuild --config RelWithDebInfo --target INSTALL
17+
id: build-installer-omod
18+
uses: ModOrganizer2/build-with-mob-action@dev/vcpkg
19+
with:
20+
mo2-dependencies: uibase

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-merge-conflict
8+
- id: check-case-conflict
9+
# - repo: https://github.com/pre-commit/mirrors-clang-format
10+
# rev: v19.1.5
11+
# hooks:
12+
# - id: clang-format
13+
# 'types_or': [c++, c]
14+
15+
ci:
16+
autofix_commit_msg: "[pre-commit.ci] Auto fixes from pre-commit.com hooks."
17+
autofix_prs: true
18+
autoupdate_commit_msg: "[pre-commit.ci] Pre-commit autoupdate."
19+
autoupdate_schedule: quarterly
20+
submodules: false

CMakePresets.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,12 @@
4848
"name": "vs2022-windows-standalone"
4949
}
5050
],
51+
"buildPresets": [
52+
{
53+
"name": "vs2022-windows",
54+
"resolvePackageReferences": "on",
55+
"configurePreset": "vs2022-windows"
56+
}
57+
],
5158
"version": 4
5259
}

src/DummyCSFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ static void Stub2()
1313
Rtf.ToHtml("");
1414
}
1515
}
16-
}
16+
}

src/OMODFrameworkWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected slots:
5353
void pickModNameSlot(bool& successOut, MOBase::GuessedValue<QString>& modName);
5454
void createModSlot(MOBase::IModInterface*& modInterfaceOut, MOBase::GuessedValue<QString>& modName);
5555
void displayReadmeSlot(const QString& modName, const QString& readme);
56-
56+
5757
void showWaitDialogSlot(QString message);
5858
void hideWaitDialogSlot();
5959

src/implementations/ScriptFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ScriptFunctionsHelper::ScriptFunctionsHelper() : mMessageBoxHelper(make_unique<MessageBoxHelper>())
2121
{
2222
moveToThread(QApplication::instance()->thread());
23-
23+
2424
connect(this, &ScriptFunctionsHelper::DialogSelectSignal, this, &ScriptFunctionsHelper::DialogSelectSlot, Qt::BlockingQueuedConnection);
2525
connect(this, &ScriptFunctionsHelper::InputStringSignal, this, &ScriptFunctionsHelper::InputStringSlot, Qt::BlockingQueuedConnection);
2626
connect(this, &ScriptFunctionsHelper::DisplayImageSignal, this, &ScriptFunctionsHelper::DisplayImageSlot, Qt::BlockingQueuedConnection);

src/oldstuff/DialogSelect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ std::optional<QVector<int>> DialogSelect(
230230
rightInner = new QWidget(right);
231231
rightScrollArea->setWidget(rightInner);
232232
rightScrollArea->setWidgetResizable(true);
233-
233+
234234
rightInnerLayout = new QVBoxLayout(rightInner);
235235
}
236236
else

src/oldstuff/folder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This is stuff I'm just lifting from my original attempt at an OMOD installer. It's probably terrible and I'm barely going to fix it. I expect and want other MO2 devs to rework/replace it with something better.
1+
This is stuff I'm just lifting from my original attempt at an OMOD installer. It's probably terrible and I'm barely going to fix it. I expect and want other MO2 devs to rework/replace it with something better.

vcpkg.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
2-
"dependencies": ["mo2-cmake"],
32
"features": {
43
"standalone": {
54
"description": "Build Standalone.",
6-
"dependencies": ["mo2-uibase"]
5+
"dependencies": ["mo2-cmake", "mo2-uibase"]
76
}
87
},
98
"vcpkg-configuration": {
109
"default-registry": {
1110
"kind": "git",
1211
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
13-
"baseline": "d194ec4e14052784518d5e9f1c5ccac16de49c2c"
12+
"baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673"
1413
}
1514
}
1615
}

0 commit comments

Comments
 (0)