Last active
August 27, 2023 02:06
-
-
Save n0samu/3afcef44f87a1f65f8b4aa0ac1905160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL EnableDelayedExpansion | |
SET RUST_LOG=warn,ruffle_core=debug,avm_trace=trace,symphonia_bundle_mp3=error | |
SET ARGS=%* | |
SET "ARG1=%~1" | |
IF "%ARG1:~0,3%"=="202" ( | |
SET "BUILD_PATH=Old Desktop Builds\Nightly %ARG1%" | |
SET ARGS=!ARGS:%ARG1% =! | |
) ELSE ( | |
START "" ruffle-win64\ruffle.exe %ARGS% | |
GOTO MemCheck | |
) | |
IF EXIST "%BUILD_PATH%\ruffle.exe" ( | |
START "" "%BUILD_PATH%\ruffle.exe" %ARGS% | |
) ELSE ( | |
ECHO Build %ARG1% not found. Try one of these: | |
CALL :ListSimilar | |
) | |
:MemCheck | |
taskkill /f /fi "memusage gt 4000000" /im ruffle.exe > NUL | |
timeout 1 > NUL | |
tasklist | "%WINDIR%\System32\find.exe" /c "ruffle.exe" > NUL | |
IF %ERRORLEVEL%==0 (GOTO MemCheck) | |
EXIT /b | |
:ListSimilar | |
SET "BUILD_PATH=%BUILD_PATH:~0,-1%" | |
DIR /b "%BUILD_PATH%*" 2>NUL | "%WINDIR%\System32\find.exe" /v /c "" > NUL | |
IF %ERRORLEVEL%==1 ( | |
GOTO ListSimilar | |
) | |
DIR /b "%BUILD_PATH%*" | |
EXIT /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment