mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-15 15:09:30 +00:00
rename to gmod, drop gui (#1)
* remove GUI parts as those will not be updated * move to header/source * add cmakelist to create solution * Change Readme * Implement modlist.txt loading * Setup versioning and CD pipeline * Setup DirectX in pipeline * Make uMod load from uMod.dll directory * Fix file loading * Remove break * Fix CD pipeline (#1) * Test cd pipeline * See what's in Lib directory * See inside lib/x86 * Manually adjust the build environment * Disable CD pipeline in PRs Create CI pipeline * Fix slashes in path * Fix build call * Attempt to fix paths * Copy dx headers inside the /header folder * Use ps * Change cache location * Path changes * Improve CMake to look for lib and header files * Fix missing Lib folder * Move changes to CD pipeline * Disable CI on merge and fix CD (#2) * Fix CD tag (#4) * Hijack existing DirectX calls (#5) * Create a dll without listener (#6) * Fix asset creation in CD pipeline (#7) * Setup file loading * create necessary files * merge latest changes, set output dir * Change main to master in pipelines Add fallback for DX libs in CMakeLists * Setup new generator * formatting * remove listener * Change CD to pick the dll from bin Change release name to gMod * more formatting * add editorconfig * Setup versioning * Remove CODEOWNERS --------- Co-authored-by: Alex Macocian <amacocian@yahoo.com>
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
|
||||
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
|
||||
name: uMod CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
targetplatform: [x86]
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
Configuration: Release
|
||||
Actions_Allow_Unsecure_Commands: true
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Config
|
||||
run: echo "DXSDK_DIR=DXSDK" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Cache
|
||||
id: cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: DXSDK
|
||||
key: DXSDK
|
||||
|
||||
- name: Cache create
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o _DX2010_.exe
|
||||
7z x _DX2010_.exe DXSDK/Include
|
||||
7z x _DX2010_.exe DXSDK/Lib/x86
|
||||
shell: bash
|
||||
|
||||
- name: Echo cache
|
||||
run: echo ${{ env.DXSDK_DIR }}
|
||||
|
||||
- name: List dxsdk files
|
||||
run: |
|
||||
cd DXSDK
|
||||
ls
|
||||
cd Include
|
||||
ls
|
||||
cd ../Lib/x86
|
||||
ls
|
||||
|
||||
- name: Copy DirectX headers to project include directory
|
||||
run: Copy-Item -Path "${{ env.DXSDK_DIR }}/Include/*" -Destination header/ -Recurse -Force
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Ensure Lib directory exists and copy DirectX libraries
|
||||
run: |
|
||||
$libDir = "Lib/"
|
||||
if (-Not (Test-Path -Path $libDir)) {
|
||||
New-Item -ItemType Directory -Path $libDir
|
||||
}
|
||||
Copy-Item -Path "${{ env.DXSDK_DIR }}/Lib/x86/*" -Destination $libDir -Recurse -Force
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1
|
||||
|
||||
- name: Build CMake Files
|
||||
run: cmake -S . -B build -A Win32
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
|
||||
- name: Build binaries
|
||||
run: cmake --build build --config Release
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
|
||||
- name: Retrieve version
|
||||
id: set_version
|
||||
run: |
|
||||
$fileVersionInfo = (Get-Item -Path .\bin\Release\gMod.dll).VersionInfo.FileVersion
|
||||
if ([string]::IsNullOrEmpty($fileVersionInfo)) {
|
||||
Write-Host "The DLL file version information could not be retrieved."
|
||||
exit 1
|
||||
} else {
|
||||
Write-Host "FileVersionInfo: $fileVersionInfo"
|
||||
echo "::set-output name=version::$fileVersionInfo"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: Publish release
|
||||
uses: Xotl/cool-github-releases@v1.1.8
|
||||
with:
|
||||
mode: update
|
||||
tag_name: v${{ steps.set_version.outputs.version }}
|
||||
release_name: gMod v${{ steps.set_version.outputs.version }}
|
||||
assets: .\bin\Release\gMod.dll
|
||||
github_token: ${{ env.GITHUB_TOKEN }}
|
||||
replace_assets: true
|
||||
body_mrkdwn: ${{ env.Changelog }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
|
||||
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
|
||||
name: uMod CI Pipeline
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
targetplatform: [x86]
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
Configuration: Release
|
||||
Actions_Allow_Unsecure_Commands: true
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
#https://stackoverflow.com/questions/61037714/how-to-install-an-old-version-of-the-direct-x-api-in-github-actions
|
||||
- name: Config
|
||||
run: echo "DXSDK_DIR=DXSDK" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Cache
|
||||
id: cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: DXSDK
|
||||
key: DXSDK
|
||||
|
||||
- name: Cache create
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -L https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o _DX2010_.exe
|
||||
7z x _DX2010_.exe DXSDK/Include
|
||||
7z x _DX2010_.exe DXSDK/Lib/x86
|
||||
shell: bash
|
||||
|
||||
- name: Echo cache
|
||||
run: echo ${{ env.DXSDK_DIR }}
|
||||
|
||||
- name: List dxsdk files
|
||||
run: |
|
||||
cd DXSDK
|
||||
ls
|
||||
cd Include
|
||||
ls
|
||||
cd ../Lib/x86
|
||||
ls
|
||||
|
||||
- name: Copy DirectX headers to project include directory
|
||||
run: Copy-Item -Path "${{ env.DXSDK_DIR }}/Include/*" -Destination header/ -Recurse -Force
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Ensure Lib directory exists and copy DirectX libraries
|
||||
run: |
|
||||
$libDir = "Lib/"
|
||||
if (-Not (Test-Path -Path $libDir)) {
|
||||
New-Item -ItemType Directory -Path $libDir
|
||||
}
|
||||
Copy-Item -Path "${{ env.DXSDK_DIR }}/Lib/x86/*" -Destination $libDir -Recurse -Force
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
shell: pwsh
|
||||
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/setup-msbuild@v1.3.1
|
||||
|
||||
- name: Build CMake Files
|
||||
run: cmake -S . -B build -A Win32
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
|
||||
- name: Build binaries
|
||||
run: cmake --build build --config Release
|
||||
env:
|
||||
DXSDK_DIR: ${{ env.DXSDK_DIR }}
|
||||
|
||||
Reference in New Issue
Block a user