@echo off
rem	gh_portable.bat
rem	Sun,24 Sep,2017 - Mon,25 Sep,2017
rem	Sat,27 May,2023
rem	Copyright(C)2017 G-HAL

set ARG_DIR=%~dp0
set BAT_NAME=%~n0

set GAME_BASENAME=gharena.
if not "x%BAT_NAME:gh1=%" == "x%BAT_NAME%" set GAME_BASENAME=gharena.
if not "x%BAT_NAME:gearhead1=%" == "x%BAT_NAME%" set GAME_BASENAME=gharena.
if not "x%BAT_NAME:gharena=%" == "x%BAT_NAME%" set GAME_BASENAME=gharena.
if not "x%BAT_NAME:gh2=%" == "x%BAT_NAME%" set GAME_BASENAME=gearhead2.
if not "x%BAT_NAME:gearhead2=%" == "x%BAT_NAME%" set GAME_BASENAME=gearhead2.
if not "x%BAT_NAME:gh1ch=%" == "x%BAT_NAME%" set GAME_BASENAME=gearheart.
if not "x%BAT_NAME:gearhead1ch=%" == "x%BAT_NAME%" set GAME_BASENAME=gearheart.
if not "x%BAT_NAME:gearheart=%" == "x%BAT_NAME%" set GAME_BASENAME=gearheart.
if not "x%BAT_NAME:qrlmaker=%" == "x%BAT_NAME%" set GAME_BASENAME=qrlmaker.

set UI_MODE=ascii.
if not "x%BAT_NAME:sdl=%" == "x%BAT_NAME%" set UI_MODE=sdl.
if not "x%BAT_NAME:ascii=%" == "x%BAT_NAME%" set UI_MODE=ascii.
if not "x%BAT_NAME:ascii_mswingdi=%" == "x%BAT_NAME%" set UI_MODE=ascii_mswingdi.
if not "x%BAT_NAME:ascii_sdl=%" == "x%BAT_NAME%" set UI_MODE=ascii_sdl.
if not "x%BAT_NAME:qrlmaker=%" == "x%BAT_NAME%" set UI_MODE=

set OS_IDENT=unknown
if "%PROCESSOR_ARCHITECTURE%" EQU "x86" set OS_IDENT=MSWin32
if "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" set OS_IDENT=MSWin64

start "" "%ARG_DIR%%GAME_BASENAME%%UI_MODE%%OS_IDENT%.exe" "%ARG_DIR%" %*

rem [ End of File ]
