4 Commits

Author SHA1 Message Date
Dusk f41a452ef9 Actualiser .github/workflows/build-test.yml
Windows Test Build / build (push) Has been cancelled
2026-09-12 14:08:38 +00:00
Dusk 9c1d997cb6 Téléverser les fichiers vers ".github/workflows"
Windows Test Build / build (push) Has been cancelled
2026-09-12 14:07:49 +00:00
Dusk-92 1f1581d3ea Add Windows test build workflow
Build and Release / build-and-release (release) Has been cancelled
2026-09-12 15:29:00 +02:00
Dusk-92 6c6349deb9 Fix OctoWoW cloning behind BlazingFastWeb 2026-09-12 15:28:30 +02:00
4 changed files with 221 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
name: Windows Test Build
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: qt-6.8.3-msvc2022_64
- name: Install Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install aqtinstall
python -m aqt install-qt windows desktop 6.8.3 win64_msvc2022_64 --outputdir ${{ github.workspace }}/Qt
- name: Add Qt to PATH
run: echo "${{ github.workspace }}/Qt/6.8.3/msvc2022_64/bin" >> $GITHUB_PATH
- name: Install libgit2
run: vcpkg install libgit2:x64-windows
- name: Configure CMake
run: |
cmake -B build -S . `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/6.8.3/msvc2022_64" `
-DLIBGIT2_INCLUDE_DIR="C:/vcpkg/installed/x64-windows/include" `
-DLIBGIT2_LIBRARY="C:/vcpkg/installed/x64-windows/lib/git2.lib" `
-DCPACK_PACKAGE_VERSION="test"
- name: Build
run: cmake --build build --config Release
- name: Install NSIS
run: choco install nsis -y
- name: Package
working-directory: build
run: cpack -C Release
- name: Upload test installer
uses: actions/upload-artifact@v4
with:
name: GitAddonsManager-OctoWoW-test
path: build/GitAddonsManager-*.exe
if-no-files-found: error
+29
View File
@@ -0,0 +1,29 @@
name: Fix v1.0.6 asset name
on:
push:
branches:
- fix-v1.0.6-asset
permissions:
contents: write
jobs:
rename-asset:
runs-on: windows-latest
steps:
- name: Download current release asset
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download v1.0.6 --repo $env:GITHUB_REPOSITORY --pattern 'GitAddonsManager-.exe'
Rename-Item 'GitAddonsManager-.exe' 'GitAddonsManager-1.0.6.exe'
- name: Replace release asset with clean filename
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release delete-asset v1.0.6 'GitAddonsManager-.exe' --repo $env:GITHUB_REPOSITORY --yes
gh release upload v1.0.6 'GitAddonsManager-1.0.6.exe' --repo $env:GITHUB_REPOSITORY --clobber
+110
View File
@@ -0,0 +1,110 @@
name: Publish v1.0.6
on:
push:
branches:
- publish-v1.0.6
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache Qt
id: cache-qt
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/Qt
key: qt-6.8.3-msvc2022_64
- name: Install Qt
if: steps.cache-qt.outputs.cache-hit != 'true'
shell: pwsh
run: |
python -m pip install --upgrade pip
pip install aqtinstall
python -m aqt install-qt windows desktop 6.8.3 win64_msvc2022_64 --outputdir ${{ github.workspace }}/Qt
- name: Add Qt to PATH
shell: pwsh
run: echo "${{ github.workspace }}/Qt/6.8.3/msvc2022_64/bin" >> $env:GITHUB_PATH
- name: Install libgit2
shell: pwsh
run: vcpkg install libgit2:x64-windows
- name: Configure CMake
shell: pwsh
run: |
cmake -B build -S . `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/Qt/6.8.3/msvc2022_64" `
-DLIBGIT2_INCLUDE_DIR="C:/vcpkg/installed/x64-windows/include" `
-DLIBGIT2_LIBRARY="C:/vcpkg/installed/x64-windows/lib/git2.lib" `
-DCPACK_PACKAGE_VERSION="1.0.6"
- name: Build
shell: pwsh
run: cmake --build build --config Release
- name: Install NSIS
shell: pwsh
run: choco install nsis -y
- name: Package
shell: pwsh
working-directory: build
run: cpack -C Release
- name: Write release notes
shell: pwsh
run: |
@'
## GitAddonsManager v1.0.6
### OctoWoW compatibility
- Fixed cloning repositories hosted on `octowow.st` behind BlazingFastWeb.
- libgit2 now uses a compatible HTTP User-Agent so OctoWoW returns the expected Git Smart HTTP response instead of an HTML challenge page.
- Fixes the `received unexpected content-type` error when adding OctoWoW repositories.
- Clone, fetch and addon update operations continue to use libgit2 normally.
- Git protocol v2 remains enabled; only the HTTP User-Agent handling was changed.
### Build
- Windows build uses Qt 6.8.3 and a modern libgit2 installed through vcpkg.
- Added an automated Windows test-build workflow for easier validation of future changes.
### Tested with
`https://octowow.st/git/Dusk/OctoLauncher.git`
Intended target:
`https://octowow.st/git/Dusk/ShaguTweaks-ClassicAPI.git`
'@ | Set-Content -Path release-notes.md -Encoding utf8
- name: Publish GitHub release
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
$asset = Get-ChildItem -Path build -Filter 'GitAddonsManager-*.exe' | Select-Object -First 1
if (-not $asset) { throw 'GitAddonsManager installer not found.' }
gh release create v1.0.6 $asset.FullName `
--repo $env:GITHUB_REPOSITORY `
--target master `
--title 'v1.0.6 - OctoWoW compatibility' `
--notes-file release-notes.md
+14
View File
@@ -28,6 +28,8 @@
#include <QCommandLineParser>
#include <QtLogging>
#include <QWindow>
#include <git2.h>
#include <git2/version.h>
QtMessageHandler originalHandler = nullptr;
@@ -90,6 +92,18 @@ int main(int argc, char *argv[])
engine.load(QUrl(QStringLiteral("qrc:/Update.qml")));
} else {
Control::instance()->init();
#ifdef LIBGIT2_VERSION_CHECK
#if LIBGIT2_VERSION_CHECK(1, 8, 1)
// OctoWoW is protected by BlazingFastWeb, which serves an HTML
// challenge to clients using the default git/* User-Agent.
// Use the curl User-Agent that the server accepts while keeping
// libgit2's normal Git Smart HTTP implementation unchanged.
git_libgit2_opts(GIT_OPT_SET_USER_AGENT_PRODUCT, "curl/8.21.0");
git_libgit2_opts(GIT_OPT_SET_USER_AGENT, "");
#endif
#endif
qmlRegisterUncreatableType<Addon>("GitAddonsManager.engine",1,0,"Addon","");
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (parser.isSet("oneshot")) {