Skip to content

Commit 0327cc9

Browse files
committed
Implemented CI workflow
1 parent 0d21364 commit 0327cc9

File tree

5 files changed

+144
-2
lines changed

5 files changed

+144
-2
lines changed

.github/workflows/Code-Mods.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Code Mods
2+
on:
3+
push:
4+
branches: [ main ]
5+
jobs:
6+
build:
7+
name: ${{matrix.configuration}}
8+
runs-on: windows-2025-vs2026
9+
strategy:
10+
matrix:
11+
configuration: [ Debug, Release ]
12+
steps:
13+
- name: Clone
14+
uses: actions/checkout@v6
15+
with:
16+
submodules: true
17+
- name: Install .NET
18+
uses: actions/setup-dotnet@v5
19+
with:
20+
dotnet-version: 10.0.x
21+
- name: Install Node
22+
uses: actions/setup-node@v6
23+
with:
24+
node-version: 24
25+
- name: Install artifact client
26+
uses: lhotari/gh-actions-artifact-client@v2
27+
- name: Build solutions
28+
working-directory: ${{github.workspace}}
29+
run: ./Build.ps1 -Archive -BlockedSolutions "Project '06" -Configuration "${{matrix.configuration}}" -Clean
30+
- name: Upload artifacts
31+
run: |
32+
foreach ($filePath in [System.IO.Directory]::EnumerateFiles("./${{github.workspace}}/Artifacts/", "*.zip", [System.IO.SearchOption]::AllDirectories))
33+
{
34+
$fileName = [System.IO.Path]::GetFileName($filePath)
35+
echo "Uploading ${fileName}..."
36+
type "${filePath}" | node gh-actions-artifact-client.js upload "${fileName}"
37+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,6 @@ MigrationBackup/
347347

348348
# Ionide (cross platform F# VS Code tools) working folder
349349
.ionide/
350+
351+
# Build artifacts
352+
Artifacts/

Build.ps1

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
param
2+
(
3+
[Switch]$Archive,
4+
[String]$BlockedSolutions,
5+
[String]$Configuration = "Release",
6+
[Switch]$Clean,
7+
[Switch]$Help
8+
)
9+
10+
$work = $pwd
11+
$blockedSolutionsList = $BlockedSolutions.Split(";");
12+
$artifactsDir = [System.IO.Directory]::CreateDirectory([System.IO.Path]::Combine($work, "Artifacts"))
13+
14+
if ($Help)
15+
{
16+
Write-Host "Code Mods Build Script"
17+
Write-Host
18+
Write-Host "Parameters:"
19+
Write-Host "-Archive - archives the build artifacts."
20+
Write-Host "-BlockedSolutions - semi-colon separated list of solutions not to build."
21+
Write-Host "-Configuration [name] - build with a specific configuration."
22+
Write-Host "-Clean - clean the solutions before building."
23+
Write-Host "-Help - display help."
24+
exit
25+
}
26+
27+
$vs = ./Tools/vswhere.exe -nologo -latest -prerelease -property installationPath
28+
$vsCommonTools = [System.IO.Path]::Combine($vs, "Common7", "Tools")
29+
30+
pushd $vsCommonTools
31+
cmd /c "VsDevCmd.bat > nul 2> nul &set" |
32+
foreach {
33+
if ($_ -match "=") {
34+
$v = $_.split("=", 2)
35+
Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])"
36+
}
37+
}
38+
popd
39+
40+
function GetProjectProperty([String]$in_projectPath, [String]$in_propertyName)
41+
{
42+
return & msbuild /NoLogo /p:Configuration="${Configuration}" -getProperty:"${in_propertyName}" "${in_projectPath}"
43+
}
44+
45+
foreach ($solutionPath in [System.IO.Directory]::EnumerateFiles("${work}/Games/", "*.sln", [System.IO.SearchOption]::AllDirectories))
46+
{
47+
$solutionDir = Split-Path $solutionPath
48+
$solutionName = [System.IO.Path]::GetFileNameWithoutExtension($solutionPath)
49+
50+
if ($blockedSolutionsList.Contains($solutionName))
51+
{
52+
continue
53+
}
54+
55+
$target = "Build"
56+
57+
if ($Clean)
58+
{
59+
$target = "Clean;" + $target
60+
}
61+
62+
Write-Host
63+
Write-Host ("**************" + '*' * $solutionPath.Length) -ForegroundColor DarkGreen
64+
Write-Host "* Solution: ${solutionPath} *" -ForegroundColor DarkGreen
65+
Write-Host ("**************" + '*' * $solutionPath.Length) -ForegroundColor DarkGreen
66+
67+
& msbuild /NoLogo /v:m /t:"${target}" /Restore /p:RestorePackagesConfig=true /p:Configuration="${Configuration}" "${solutionPath}"
68+
69+
if ($Archive)
70+
{
71+
$projects = dotnet sln "${solutionPath}" list |
72+
Select-Object -Skip 2 |
73+
ForEach-Object {
74+
Join-Path $solutionDir $_.Trim()
75+
}
76+
77+
foreach ($project in $projects)
78+
{
79+
$projectDir = GetProjectProperty $project "ProjectDir"
80+
$projectName = GetProjectProperty $project "ProjectName"
81+
$binDir = [System.IO.Path]::Combine($projectDir, "bin")
82+
83+
if (![System.IO.Directory]::Exists($binDir))
84+
{
85+
Write-Host
86+
Write-Host ("***********************" + '*' * $binDir.Length) -ForegroundColor DarkRed
87+
Write-Host "* Cannot archive project binaries." -ForegroundColor DarkRed
88+
Write-Host "* Directory not found: ${binDir}" -ForegroundColor DarkRed
89+
Write-Host ("***********************" + '*' * $binDir.Length) -ForegroundColor DarkRed
90+
91+
exit -1
92+
}
93+
94+
$solutionArtifactsDir = [System.IO.Directory]::CreateDirectory([System.IO.Path]::Combine($artifactsDir.FullName, $solutionName))
95+
$projectArtifactPath = [System.IO.Path]::Combine($solutionArtifactsDir.FullName, "${projectName}.zip")
96+
97+
cd $binDir
98+
Compress-Archive -Force * $projectArtifactPath
99+
cd $work
100+
}
101+
}
102+
}

Games/Yakuza/FixAnalogDeadzone/DllMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ DECLARE_HOOK(void, __fastcall, ProcessInputs, Sig_ProcessInputs(), void* a1, voi
1313
original_ProcessInputs(a1, a2, a3);
1414
}
1515

16-
DECLARE_HOOK(bool, __fastcall, IsKeyDown, Sig_IsKeyDown(), uint32_t keyCode)
16+
DECLARE_HOOK(bool, __fastcall, IsKeyDown, Sig_IsKeyDown(), uint32_t in_keyCode)
1717
{
18-
auto result = original_IsKeyDown(keyCode);
18+
auto result = original_IsKeyDown(in_keyCode);
1919

2020
// Use keyboard deadzone.
2121
if (result && g_pAnalogDeadzone)

Tools/vswhere.exe

458 KB
Binary file not shown.

0 commit comments

Comments
 (0)