57 lines
2.6 KiB
YAML
57 lines
2.6 KiB
YAML
name: Build DevourUnlocker
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# media-server is the only runner on git.mithraic.cloud (no windows-latest/ubuntu-latest). Forgejo Act: runs-on must exactly match runner labels.
|
|
windows-cross:
|
|
runs-on: media-server
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with: { submodules: recursive }
|
|
- name: Install mingw + cmake (if apt available, else skip)
|
|
run: |
|
|
if command -v apt-get >/dev/null 2>&1; then
|
|
sudo apt-get update && sudo apt-get install -y cmake ninja-build mingw-w64 g++-mingw-w64-x86-64 || true
|
|
else
|
|
echo "apt not found — assuming cmake/mingw already on media-server"
|
|
fi
|
|
- name: CMake Configure (MinGW cross)
|
|
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DBUILD_WINHTTP_PROXY=ON
|
|
- name: Build (MinGW)
|
|
run: cmake --build build --config Release || (cat build/CMakeFiles/CMakeError.log; cat build/CMakeFiles/CMakeOutput.log; exit 1)
|
|
- name: Package
|
|
run: |
|
|
mkdir -p dist
|
|
cp build/winhttp.dll dist/ 2>/dev/null || cp build/*.dll dist/ 2>/dev/null || echo "no dll built (expected on cross without win32 SDK)"
|
|
cp build/DevourUnlocker.dll dist/ 2>/dev/null || true
|
|
cp DevourUnlocker.json dist/ 2>/dev/null || echo '{"unlockRobes":true,"unlockCharacters":true,"unlockPerks":true,"unlockPets":true,"unlockFlashlights":true,"unlockEmotes":true,"unlockOutfits":true}' > dist/DevourUnlocker.json
|
|
zip -j DevourUnlocker_winhttp_${{ github.ref_name }}.zip dist/* || true
|
|
ls -lh dist/
|
|
- uses: actions/upload-artifact@v4
|
|
with: { name: winhttp-cross, path: DevourUnlocker_winhttp_*.zip }
|
|
|
|
linux:
|
|
runs-on: media-server
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install deps if apt
|
|
run: |
|
|
if command -v apt-get >/dev/null 2>&1; then
|
|
sudo apt-get update && sudo apt-get install -y cmake ninja-build || true
|
|
fi
|
|
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WINHTTP_PROXY=OFF
|
|
- run: cmake --build build
|
|
- uses: actions/upload-artifact@v4
|
|
with: { name: linux-so, path: build/*.so }
|
|
|
|
standalone:
|
|
runs-on: media-server
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: python3 -m py_compile standalone/devour_unlocker.py standalone/gui.py tools/dump_metadata.py standalone/injector.py 2>&1 || python3 -m py_compile standalone/devour_unlocker.py standalone/gui.py tools/dump_metadata.py
|