Skip to content

Commit

Permalink
BUILD
Browse files Browse the repository at this point in the history
BUILD IN FRONT OF ME- wait can i even quote that

ALSO REALIZED I FILTERED HIGHWAY TEX CONFIG
WHAT IS WRONG WITH ME
  • Loading branch information
donnaken15 committed Sep 10, 2024
1 parent 0b5601e commit 35b83e5
Show file tree
Hide file tree
Showing 22 changed files with 1,665 additions and 57 deletions.
65 changes: 31 additions & 34 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DO NOT TEST YOURSELF
# MIGHT ONLY WORK IN A VERY CONTROLLED ENVIRONMENT AS OF NOW

# only running this in a very small windows VM

name: "Build, test, bundle FastGH3"
on:
Expand Down Expand Up @@ -40,41 +40,23 @@ jobs:
}
"C:\Program Files\Git\bin\" | Out-File -FilePath $env:GITHUB_PATH -Append
"C:\Program Files\Git\usr\" | Out-File -FilePath $env:GITHUB_PATH -Append
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\" | Out-File -FilePath $env:GITHUB_PATH -Append
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
pushd "C:\Program Files\Git"
compact /c /f /s /a /i /exe:lzx *.exe *.dll *.txt *.pm *. | Select-Object -Last 3
popd
-
name: Install Node.js or Bun
run: |
where.exe $env:node /q; if (-not $?) {
choco install $env:node -y --no-progress
} else { "Node environment is already installed" }
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
-
name: Install UPX
run: |
choco install upx
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
# i need functions
-
name: Install NSIS
run: |
choco install nsis -y --no-progress
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
-
name: Install 7-Zip
run: |
choco install 7zip -y --no-progress
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
-
name: Install Resource Hacker
name: Install UPX, NSIS, 7Zip, Resource Hacker # make optionally installable if user decides so
run: |
choco install resourcehacker.portable -y --no-progress
choco install upx nsis 7zip resourcehacker.portable -y --no-progress
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
-
name: Install DotNetCompressor
env:
Expand All @@ -91,7 +73,6 @@ jobs:
run: |
choco install mpress -y --no-progress
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
sleep 8
-
name: Install stripreloc
env:
Expand All @@ -106,6 +87,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: recursive
# manual checkout all repositories: *
# for manual testing:
# set "PATH=%PATH%;C:\Program Files\git\bin;C:\Program Files\git\usr\bin"
# & "C:\Program Files\Git\bin\git" submodule update --init --recursive --remote
# & "C:\Program Files\Git\bin\git" pull --recurse-submodules
-
name: Set up MSBuild, Visual C# and C++
env:
Expand All @@ -115,7 +101,7 @@ jobs:
#uses: microsoft/setup-msbuild@v1 # NOT WORKING!!
#with:
# vs-version: 'latest'
run: | # this whole thing should probably be a for loop, AND CHECK IF ALREADY INSTALLED ANY OF THESE!!!!!!!!!!!!
run: |
.\.github\workflows\visualDeps.ps1
#choco install microsoft-build-tools netfx-4.6.2-devpack visualcpp-build-tools -y
# NOPE: visualcpp-build-tools
Expand All @@ -133,15 +119,16 @@ jobs:
conf: ${{vars.GH3PLUS == true && 'Release' || 'NoVC++'}}
STUPID: true # STRIPRELOC BREAKS EXE ON SELF HOSTED RUNNER SOMEHOW
GH3PLUS: ${{vars.GH3PLUS}}
NORELOC: ${{vars.NORELOC}} # run stripreloc if true, need to override from here to the event script, glhf
RCASSETS: ${{vars.RCASSETS}} # recompile assets, NOT WORKING RIGHT NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#NORELOC: ${{vars.NORELOC}} # BREAKS EXE ON VM
#RCASSETS: ${{vars.RCASSETS}} # recompile assets, NOT WORKING RIGHT NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
VCTargetsPath: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140
# *
run: |
& "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" SOURCE\FastGH3.sln /p:Configuration=$env:conf /t:Rebuild
if ($env:RCASSETS) {
cmd.exe /c "SOURCE\build-assets.bat"
}
# ERRORS AT 'DO' IN FOR BLOCK WTF
& "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" SOURCE\FastGH3.sln /p:Configuration=$env:CONF /p:WindowsTargetPlatformVersion=10.0.18362.0 /p:PlatformToolset=v140 /p:AdditionalIncludePaths="$env:INCLUDE" /t:Rebuild
#if ($env:RCASSETS) {
# cmd.exe /c "SOURCE\build-assets.bat"
#}
# ERRORS AT 'DO' IN FOR BLOCK IN CMD WTF, BROKEN POS!!!
test:
runs-on: self-hosted
env:
Expand All @@ -153,9 +140,19 @@ jobs:
# uses: actions/checkout@v2
# with:
# submodules: recursive
# directx 9 only
# https://archive.org/download/directx_9c/directx_9c_redist.exe
# http://software.oldversion.com/download.php?f=YTo1OntzOjQ6InRpbWUiO2k6MTcyNTg5MzYyOTtzOjI6ImlkIjtpOjE4NTU1O3M6NDoiZmlsZSI7czozNDoiZGlyZWN0eC05LTBjLWRpcmVjdHhfOWNfcmVkaXN0LmV4ZSI7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly93d3cub2xkdmVyc2lvbi5jb20vd2luZG93cy9kaXJlY3R4LTktMGMiO3M6NDoicGFzcyI7czozMjoiMmNmOGE1YzIzNTc5ZjEwYzUyM2Q4ZjI0NDFiZTZjZjAiO30%3D
# june 2010 https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe
-
name: Playtest songs
run: |
$DXTEMP = "C:\DXTEMP"
rm "$DXTEMP" -r -force
iwr -OutFile "DX9.EXE" -Uri "https://archive.org/download/directx_9c/directx_9c_redist.exe"
start -Wait -FilePath "DX9.EXE" -Args "/Q /T:$DXTEMP"
start -Wait -FilePath "$DXTEMP\DXSETUP.EXE" -Args "/silent"
rm "$DXTEMP" -r -force
cmd /c dir
cmd /c register.bat
.\.github\workflows\testSongs.ps1
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/testSongs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
AutoStart=1
Hyperspeed=5
ExitOnSongEnd=1
NoFail=1
[Launcher]
SongCaching=0
VerboseLog=1
[Player1]
Bot=1
Device=3
[Player2]
Bot=1
Device=0
[Misc]
Debug=1
Expand All @@ -18,17 +23,20 @@ $songs = @(
,@("1EQ8rvcxhv-Xq7T0FT62ZLOZ3rR2gcx9O","[ZIP] Squarepusher - Dark Steering")
,@("13gt3k5WsiRkIthf9V5i6dAAmFK5poyFX","[ZIP] Kommisar - Springtime")
,@("16Ipd-4SV1IqBzAVDA26P-42tWN4twvL7"," [7Z] The Used - Take It Away")
,@("1_F-7Hv7YbF-sw9l_tS3FyjRmpKICa8lp"," [7Z] QOTSA - 3's & 7's (Metal Track Pack)")
# "BROKEN" MIDI (these comments are a cry for help)
#,@("1_F-7Hv7YbF-sw9l_tS3FyjRmpKICa8lp"," [7Z] QOTSA - 3's & 7's (Metal Track Pack)")
,@("16thK1ivFdKqsxd5TscRVh6DYZcQn23dA","[SNG] Fearofdark - TABNY (Jarvis)")
)
# also test random modes every song
for ($i = 0; $i -lt $songs.length; $i++) {
"* "+($songs[$i][1].ToString())
"********************** "+($songs[$i][1].ToString())
$arg = "dl fastgh3://drive.google.com/uc?id="+($songs[$i][0].ToString()) # STUPID CRINGE THING WHY
start -Wait "FastGH3.exe" -WorkingDirectory "." -Args $arg
start -NoNewWindow -Wait "FastGH3.exe" -WorkingDirectory "." -Args $arg -PassThru
sleep 5
Wait-Process -Name "game.exe" -Timeout 600 -ErrorAction SilentlyContinue -ErrorVariable to
# forgot: how am i even going to know when a crash occurs
if (-not $to) {
kill -Name "game.exe" -Force
}
sleep 15
}
}
69 changes: 61 additions & 8 deletions .github/workflows/visualDeps.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
# my first powershell script i guess, i hate it already
function StopWastingMySpace
{
param(
[Parameter(Mandatory=$true)]$dir,
[array]$filter
)

if (Test-Path -Path $dir)
{
pushd $dir
if ($?) {
# stop wasting my space
compact.exe /c /f /s /a /i /exe:lzx $filter | Select-Object -Last 3
popd
}
}
}
$pkg = @(
,@("Visual C# 2015 Build Tools", "BuildTools_Full.exe", "/q /full /passive /norestart /log C:\tmp.log", $true, $true, 0,
"https://download.microsoft.com/download/E/E/D/EEDF18A8-4AED-4CE0-BEBE-70A83094FC5A/BuildTools_Full.exe")
,@(".NET Framework 4.6.2 Targeting Pack for .NET Framework 4.0", "NDP462.exe", "/install /passive /norestart /log C:\tmp.log", $true, $true, 0,
"https://download.microsoft.com/download/e/e/c/eec79116-8305-4bd0-aa83-27610987eec6/NDP462-DevPack-KB3151934-ENU.exe")
,@("Visual C++ 2015 Build Tools", "vc15bt_full.exe",
"install --add Microsoft.VisualStudio.Component.VC.140,Microsoft.VisualStudio.Component.Windows10SDK.18362 --passive --norestart --nickname stupid --theme Light",
"install --add Microsoft.VisualStudio.Component.VC.140 --passive --norestart --nickname stupid --theme Light",
$env:GH3PLUS, $false, 600, "https://aka.ms/vs/17/release/vs_BuildTools.exe")
,@("Windows 10 SDK", "vc15bt_full.exe", # not enough space to install both at once because i suck
"install --add Microsoft.VisualStudio.Component.Windows10SDK.18362 --passive --norestart --nickname stupid --theme Light",
$env:GH3PLUS, $false, 600, "https://aka.ms/vs/17/release/vs_BuildTools.exe")
,@("DirectX SDK", "DXSDK_Jun10.exe", "/U", $env:GH3PLUS, $false, 600, "https://archive.org/download/dxsdk_jun10/DXSDK_Jun10.exe")
# wish i could exclude features for this one
)
for ($i = 0; $i -lt $pkg.length; $i++) {
# CHECK IF ALREADY INSTALLED
if (-not $pkg[$i][3]) {
continue
}
Expand All @@ -18,20 +40,51 @@ for ($i = 0; $i -lt $pkg.length; $i++) {
iwr -Uri $pkg[$i][6] -OutFile $pkg[$i][1]
"Installing..."
if ($pkg[$i][4]) {
$null > "C:\tmp.log"
$vsi = start -NoNewWindow -FilePath $pkg[$i][1] -WorkingDirectory "." -Args $pkg[$i][2] -PassThru
$killorbekilled = sajb {
if ($pkg[$i][5] -gt 0) {
$vsi | Wait-Process -Timeout $pkg[$i][5] -ErrorAction SilentlyContinue -ErrorVariable to
Set-Content -Path "C:\tmp.log" -Value "" -Encoding UTF8
$killorbekilled = sajb `
-Init ([ScriptBlock]::Create("Set-Location '$pwd'")) `
-Name Installer -ArgumentList $pkg[$i] -ScriptBlock {
$vsi = start -PassThru -FilePath $(Convert-Path $args[1]) -Args $args[2] # actual unironic cancer
if ($args[5] -gt 0) {
$vsi | Wait-Process -Timeout $args[5] -ErrorAction SilentlyContinue -ErrorVariable to
if ($to) {
$vsi | kill -Force
}
} else {
$vsi | Wait-Process
}
del "C:\tmp.log" -Force -Confirm
sleep 2
del "C:\tmp.log" -Force
}
#Get-Content -Path "C:\tmp.log" -Wait
try {
Get-Content -Path "C:\tmp.log" -Encoding UTF8 -Wait -ErrorAction Stop
} catch { }
$killorbekilled | Wait-Job
$killorbekilled | Receive-Job
} else {
start -NoNewWindow -Wait -FilePath $(Convert-Path $pkg[$i][1]) -WorkingDirectory "." -Args $pkg[$i][2]
}
"Making space..."
switch ($i) {
0 {
StopWastingMySpace "C:\Program Files (x86)\MSBuild\14.0\Bin" *.exe, *.dll
break
}
1 {
StopWastingMySpace "C:\Program Files (x86)\Microsoft Visual Studio" *.exe, *.dll, *targets, *.txt
break
}
2 {
StopWastingMySpace "C:\Program Files (x86)\Microsoft Visual Studio 14.0" *.exe, *.h, *.lib, *.cpp, *.hpp, *.dll, *.rc, *.inl, *.pdb, *.obj
}
3 {
StopWastingMySpace "C:\Program Files (x86)\Windows Kits" *.exe, *.h, *.lib, *.cpp, *.hpp, *.dll, *.xml
break
}
4 {
StopWastingMySpace "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" *.exe, *.dll, *.lib, *.h, *.sdkmesh, *.mt, *.dds, *.x, *.bmp, *.cpp, *.vcproj, *.vcxproj, *.obj, *.jpg, *.xwb, *.xml
break
}
}
del $pkg[$i][1]
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ disabled/
!/DATA/MODS/disabled
/SOURCE/q/test
/SOURCE/Misc/verify_build.sh
/FINALPKG.*
/FINALPKG*

# AAAAAAAAAAAAAAHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHASDFFFDHGJSKSLFDHJAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
!/SOURCE/Zones/highway/__config.ini

stats_*.txt
/DATA/HIGHWAYS
Expand Down
2 changes: 1 addition & 1 deletion DATA/MUSIC/TOOLS/bt.bin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fݼR
f�)2
Binary file modified DATA/MUSIC/TOOLS/c128ks.exe
Binary file not shown.
Binary file modified FastGH3.exe
Binary file not shown.
Binary file modified FastGH3.pdb
Binary file not shown.
Binary file modified PLUGINS/FastGH3.dll
Binary file not shown.
Binary file modified PLUGINS/Logger.dll
Binary file not shown.
Binary file modified PLUGINS/NoteLimitFix.dll
Binary file not shown.
Binary file modified PLUGINS/SongLimitFix.dll
Binary file not shown.
Binary file modified PLUGINS/TapHopoChord.dll
Binary file not shown.
Binary file modified PLUGINS/core.dll
Binary file not shown.
Binary file modified PLUGINS/modifiers.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions SOURCE/FastGH3.sln
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ Global
{EEFF0E58-CD15-4D7B-945C-2C2F0584D43B}.Release|x86.ActiveCfg = Release|Any CPU
{CBBF2D18-BCFD-4BF0-8626-09CCFCE1BF2A}.NoVC++|x86.ActiveCfg = Release|Any CPU
{CBBF2D18-BCFD-4BF0-8626-09CCFCE1BF2A}.Release|x86.ActiveCfg = Release|Any CPU
{822E3318-036A-42E1-A2ED-7C2382DF5557}.NoVC++|x86.ActiveCfg = Release|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.NoVC++|x86.Build.0 = Release|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.Release|x86.ActiveCfg = Release|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.Release|x86.Build.0 = Release|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.NoVC++|x86.ActiveCfg = Debug|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.NoVC++|x86.Build.0 = Debug|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.Release|x86.ActiveCfg = Debug|x86
{822E3318-036A-42E1-A2ED-7C2382DF5557}.Release|x86.Build.0 = Debug|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion SOURCE/FastGH3/FastGH3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ set "RES_HACK=start /b /wait "" "ResourceHacker""
%25RES_HACK%25 -open "$(TargetPath)" -save "$(TargetPath)" -action delete VERSIONINFO,, -action delete MANIFEST,,
%25RES_HACK%25 -open "$(TargetPath)" -save "$(TargetPath)" -action add -res "$(ProjectDir)res\Version.res"
%25RES_HACK%25 -open "$(TargetPath)" -save "$(TargetPath)" -action add -res "$(ProjectDir)res\note.ico" -mask ICONGROUP,32512,
if "%25NC%25"=="NetCompressor" ( stripreloc /b /c "$(TargetPath)" )
if "%25NC%25"=="NetCompressor" ( ping localhost -n 3 >NUL & stripreloc /b /c "$(TargetPath)" )
popd
set SH=sh
where /q dash &&set SH=dash||where /q %25SH%25
Expand Down
2 changes: 1 addition & 1 deletion SOURCE/GH3Plus
5 changes: 3 additions & 2 deletions SOURCE/Misc/stripversion.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off
start /b /wait "" "resourcehacker" -open "%~1" -save "%~1" -action delete VERSIONINFO,, -action delete MANIFEST,,
:: COMPLETELY MORONIC
if "%STUPID%"=="true" ( exit /b )
call stripreloc /b "%~1"
if /I "%STUPID%"=="true" ( exit /b )
ping localhost -n 3 >NUL
call stripreloc /b "%~1" || ( exit /b 0 ) & rem "I/O error 32 ☝️🤓" DON'T CARE STUPID!!!!!!
Loading

0 comments on commit 35b83e5

Please sign in to comment.