diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 24dfc31..7f259d5 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -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: @@ -40,8 +40,11 @@ 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: | @@ -49,32 +52,11 @@ jobs: 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 + name: Install UPX, NSIS, 7Zip, Resource Hacker # make optionally installable if user decides so run: | - choco install nsis -y --no-progress + choco install upx nsis 7zip resourcehacker.portable -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 - run: | - choco install resourcehacker.portable -y --no-progress - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 - sleep 8 - name: Install DotNetCompressor env: @@ -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: @@ -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: @@ -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 @@ -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 + #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 + & "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 WTF + # ERRORS AT 'DO' IN FOR BLOCK IN CMD WTF test: runs-on: self-hosted env: @@ -153,9 +140,18 @@ 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" + 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 diff --git a/.github/workflows/testSongs.ps1 b/.github/workflows/testSongs.ps1 index cb1e8a7..faa5ffb 100644 --- a/.github/workflows/testSongs.ps1 +++ b/.github/workflows/testSongs.ps1 @@ -4,11 +4,16 @@ AutoStart=1 Hyperspeed=5 ExitOnSongEnd=1 +NoFail=1 [Launcher] SongCaching=0 +VerboseLogging=1 [Player1] Bot=1 Device=3 +[Player2] +Bot=1 +Device=0 [Misc] Debug=1 @@ -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 -} \ No newline at end of file +} diff --git a/.github/workflows/visualDeps.ps1 b/.github/workflows/visualDeps.ps1 index 7210eb9..50b83c9 100644 --- a/.github/workflows/visualDeps.ps1 +++ b/.github/workflows/visualDeps.ps1 @@ -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 } @@ -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] } diff --git a/.gitignore b/.gitignore index ca47946..c05f873 100644 --- a/.gitignore +++ b/.gitignore @@ -75,7 +75,7 @@ disabled/ !/DATA/MODS/disabled /SOURCE/q/test /SOURCE/Misc/verify_build.sh -/FINALPKG.* +/FINALPKG* stats_*.txt /DATA/HIGHWAYS diff --git a/DATA/MUSIC/TOOLS/bt.bin b/DATA/MUSIC/TOOLS/bt.bin index e51ecae..26c9858 100644 --- a/DATA/MUSIC/TOOLS/bt.bin +++ b/DATA/MUSIC/TOOLS/bt.bin @@ -1 +1 @@ -fݼR \ No newline at end of file +f)2 \ No newline at end of file diff --git a/DATA/MUSIC/TOOLS/c128ks.exe b/DATA/MUSIC/TOOLS/c128ks.exe index 012664b..67d8934 100644 Binary files a/DATA/MUSIC/TOOLS/c128ks.exe and b/DATA/MUSIC/TOOLS/c128ks.exe differ diff --git a/FastGH3.exe b/FastGH3.exe index 2c07121..cac06bc 100644 Binary files a/FastGH3.exe and b/FastGH3.exe differ diff --git a/FastGH3.pdb b/FastGH3.pdb index a1870b5..832fef4 100644 Binary files a/FastGH3.pdb and b/FastGH3.pdb differ diff --git a/PLUGINS/FastGH3.dll b/PLUGINS/FastGH3.dll index 8cb52e4..c646e95 100644 Binary files a/PLUGINS/FastGH3.dll and b/PLUGINS/FastGH3.dll differ diff --git a/PLUGINS/Logger.dll b/PLUGINS/Logger.dll index a9a3647..22899f9 100644 Binary files a/PLUGINS/Logger.dll and b/PLUGINS/Logger.dll differ diff --git a/PLUGINS/NoteLimitFix.dll b/PLUGINS/NoteLimitFix.dll index 4b4e417..fc556bb 100644 Binary files a/PLUGINS/NoteLimitFix.dll and b/PLUGINS/NoteLimitFix.dll differ diff --git a/PLUGINS/SongLimitFix.dll b/PLUGINS/SongLimitFix.dll index c22ba0a..b950fa3 100644 Binary files a/PLUGINS/SongLimitFix.dll and b/PLUGINS/SongLimitFix.dll differ diff --git a/PLUGINS/TapHopoChord.dll b/PLUGINS/TapHopoChord.dll index 0629279..9807870 100644 Binary files a/PLUGINS/TapHopoChord.dll and b/PLUGINS/TapHopoChord.dll differ diff --git a/PLUGINS/core.dll b/PLUGINS/core.dll index cf2a793..dd1fb21 100644 Binary files a/PLUGINS/core.dll and b/PLUGINS/core.dll differ diff --git a/PLUGINS/modifiers.dll b/PLUGINS/modifiers.dll index 8f798ce..03c13ab 100644 Binary files a/PLUGINS/modifiers.dll and b/PLUGINS/modifiers.dll differ diff --git a/SOURCE/FastGH3.sln b/SOURCE/FastGH3.sln index 0fff0ea..cc49c17 100644 --- a/SOURCE/FastGH3.sln +++ b/SOURCE/FastGH3.sln @@ -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 diff --git a/SOURCE/FastGH3/FastGH3.csproj b/SOURCE/FastGH3/FastGH3.csproj index fba9750..98e06ae 100644 --- a/SOURCE/FastGH3/FastGH3.csproj +++ b/SOURCE/FastGH3/FastGH3.csproj @@ -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 diff --git a/SOURCE/GH3Plus b/SOURCE/GH3Plus index 00e8505..bb94e49 160000 --- a/SOURCE/GH3Plus +++ b/SOURCE/GH3Plus @@ -1 +1 @@ -Subproject commit 00e850545981288efefac0d4271448a81229e35a +Subproject commit bb94e491746a449a48feaf41348ec69a126de544 diff --git a/SOURCE/Misc/stripversion.bat b/SOURCE/Misc/stripversion.bat index 6f5fdfe..670884f 100644 --- a/SOURCE/Misc/stripversion.bat +++ b/SOURCE/Misc/stripversion.bat @@ -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!!!!!! diff --git a/SOURCE/build-project.bat b/SOURCE/build-project.bat index 08652ac..5c48b5d 100644 --- a/SOURCE/build-project.bat +++ b/SOURCE/build-project.bat @@ -2,8 +2,13 @@ pushd "%~dp0" set MSB="C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" set CONF=Release +:: TODO: check if VC++ installed, and change configuration if it isn't echo ########## FASTGH3 ########## -%MSB% "%~dp0FastGH3.sln" /p:Configuration=%CONF% +%MSB% "%~dp0FastGH3.sln" /p:Configuration=%CONF% /t:Rebuild || ( pause & exit /b ) +pushd ..\PLUGINS +upx -9 --ultra-brute *.dll +upx -d core.dll TapHopoChord.dll RichPresence.dll FastGH3.dll +popd ::echo ########## FASTGH3 ########## ::%MSB% "%~dp0FastGH3\FastGH3.csproj" "/p:SolutionDir=%~dp0" /p:Configuration=Release ::echo ########## C128KS ########## diff --git a/SOURCE/q/pakdir.exe b/SOURCE/q/pakdir.exe index 641bb27..bd082c7 100644 Binary files a/SOURCE/q/pakdir.exe and b/SOURCE/q/pakdir.exe differ