Files
2025-09-29 00:52:08 +02:00

78 lines
2.2 KiB
Batchfile
Executable File

set nonrtmbuild=%build:_=%
set batch_dir=%~dp0
set build_dir=%cd%
:: Add user specified command line args very last, so that they can override auto generated args.
set cmdline=%autoGeneratedCmdline% %userSpecifiedCmdline%
echo.
echo Launching Scarlett %build%
echo Command line:
echo [%cmdline%]
echo.
if "%RS_RTM_DISABLE%" == "" (
if not "%enablerl%" == "" (
set XsxLooseDirOverride=-DXsxLooseDir=%build_dir%\xbsx_loose
) else (
set XsxLooseDirOverride=""
)
"%batch_dir%\Rockstar Target Manager.exe" -DRS_BUILDBRANCH=%RS_BUILDBRANCH% !XsxLooseDirOverride! --launch=scarlett:%target_ip% %RS_RTM_LAUNCH_BRANCH%/%build% %cmdline% | findstr ^^
if errorlevel 1 (
echo Failed to launch Scarlett %build% executable
exit 1
)
) else (
call "%build_dir%\xbs_scripts\set_package_name.bat"
set aumid=!packagefamilyname!^^^!!appidprefix!%nonrtmbuild%
set xdk=
if exist "%GameDK%\bin\xbversioninfo.exe" (
for /f "usebackq tokens=1,2* delims==" %%a in (`"%GameDK%\bin\xbversioninfo.exe" /f:%exename%.exe /b`) do (
if "!xdk!"=="" if /i %%ax==gxdkeditionsx set xdk=%%b
)
)
if not "%XDKEDITION%"=="" (
echo Forcing use of XDK [%XDKEDITION%]
echo.
set xdk=%XDKEDITION%
)
set staging_dir=xbsx_loose
if not "%enablerl%"=="" set staging_dir=rocketlauncher\xbsx_loose
call "%batch_dir%\_prepare_deploy_scarlett.bat" %target_ip% %build_dir% %build% !xdk!
if errorlevel 1 exit 1
echo.
echo Deploying from !staging_dir!
xbapp /X%target_ip% /V deploy !staging_dir! -S -VM
if errorlevel 1 exit 1
echo Setting default app
xbapp /X%target_ip% /V setdefaultapp !titleid! !aumid!
if errorlevel 1 exit 1
echo.
echo Enabling debug
xbapp /X%target_ip% /V debug !aumid!
if errorlevel 1 exit 1
echo.
REM :: Validating the deployed files really should not be necessary, yet with B*4866972, it does
REM :: seem to be going wrong somewhere. Hopefully this can be disabled once that issue is solved.
rem call "%batch_dir%\_prepare_deploy_scarlett.bat" %target_ip% %build_dir% %build% !xdk! !fullpackagename!
rem if errorlevel 1 exit 1
xbapp /x%target_ip% launch !aumid! %cmdline%
if errorlevel 1 exit 1
echo.
)
title Done running Scarlett %build%
echo.
exit 0