-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.cmd
More file actions
49 lines (45 loc) · 1.3 KB
/
launch.cmd
File metadata and controls
49 lines (45 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
:<<'::CMDLITERAL'
@echo off
setlocal
set "HERE=%~dp0"
set "EXE=%HERE%bin\ryubing-win\Ryujinx.exe"
if not exist "%EXE%" (
echo Error: "%EXE%" not found - run build.cmd first
echo %CMDCMDLINE% | findstr /i /c:" /c " >nul && pause
exit /b 1
)
if not exist "%HERE%user\Ryujinx" mkdir "%HERE%user\Ryujinx"
set "SR_ROOT=%HERE%"
echo Launching Ryujinx...
"%EXE%" -r "%HERE%user\Ryujinx" %*
set "ec=%ERRORLEVEL%"
if "%ec%"=="0" ( echo Ryujinx exited cleanly ) else ( echo Ryujinx exited with code %ec% )
echo %CMDCMDLINE% | findstr /i /c:" /c " >nul && pause
exit /b %ec%
::CMDLITERAL
HERE="$(cd "$(dirname "$0")" && pwd)"
OS="$(uname -s)"
mkdir -p "$HERE/user/Ryujinx"
case "$OS" in
Linux) EXE="$HERE/bin/ryubing/Ryujinx" ;;
Darwin) EXE="$HERE/bin/ryubing-mac/Ryujinx.app/Contents/MacOS/Ryujinx" ;;
*) echo "Error: unsupported OS: $OS" >&2; exit 1 ;;
esac
if [[ ! -x "$EXE" ]]; then
echo "Error: \"$EXE\" not found - run build.cmd first" >&2
exit 1
fi
export SR_ROOT="$HERE"
echo "Launching Ryujinx..."
if [[ "$OS" == "Darwin" ]]; then
"$EXE" -r "$HERE/user/Ryujinx" "$@"
else
LANG=C.UTF-8 DOTNET_EnableAlternateStackCheck=1 "$EXE" -r "$HERE/user/Ryujinx" "$@"
fi
ec=$?
if [[ "$ec" == "0" ]]; then
echo "Ryujinx exited cleanly"
else
echo "Ryujinx exited with code $ec"
fi
exit "$ec"