31 lines
736 B
Batchfile
31 lines
736 B
Batchfile
@echo off
|
|
setlocal EnableExtensions
|
|
cd /d "%~dp0"
|
|
|
|
git pull
|
|
if errorlevel 1 (
|
|
echo Git pull failed, code: %ERRORLEVEL%
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
REM TLauncher — основной путь через профиль пользователя
|
|
set "TL_HOME=%USERPROFILE%\AppData\Roaming\.minecraft\TLauncher.exe"
|
|
REM Запасной вариант: относительно папки bat (…\Instances\ИмяСборки ^> … ^> USERPROFILE)
|
|
set "TL_REL=%~dp0..\..\..\..\AppData\Roaming\.minecraft\TLauncher.exe"
|
|
|
|
if exist "%TL_HOME%" (
|
|
set "TL=%TL_HOME%"
|
|
) else if exist "%TL_REL%" (
|
|
set "TL=%TL_REL%"
|
|
) else (
|
|
echo TLauncher not found. Tried:
|
|
echo %TL_HOME%
|
|
echo %TL_REL%
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
start "" "%TL%"
|
|
endlocal
|