Symbolic link
98 lines
2.2 KiB
Batchfile
Symbolic link
98 lines
2.2 KiB
Batchfile
@echo off
|
|
|
|
for %%f in (*.uproject) do (if "%%~xf"==".uproject" set filepath=%%f & set filename=%%~nf)
|
|
|
|
if not defined filename (
|
|
echo Project Not Found
|
|
goto :quit
|
|
)
|
|
if not defined filepath (
|
|
echo Project Not Found
|
|
goto :quit
|
|
)
|
|
|
|
echo Creating DDC Environment Variables...
|
|
SETX UE-%filename%_DDC "%~dp0%\DerivedDataCache" > nul
|
|
SETX UE-%filename%_SDDC "\\PittaNas\DDC\Shared_DDC\%filename%" > nul
|
|
SETX UE-%filename%_ASDDC "\\PittaNas\DDC\AltShared_DDC\%filename%" > nul
|
|
timeout /t 1 > nul
|
|
echo done.
|
|
echo\
|
|
|
|
echo Creating Project Path and Source Version Editor Path Environment Variable...
|
|
timeout /t 1 > nul
|
|
SETX workproject %~dp0%filepath% > nul
|
|
|
|
for /f "tokens=3" %%a in ('reg query "HKEY_CURRENT_USER\SOFTWARE\Epic Games\Unreal Engine\Builds"') do (set engineroot=%%a)
|
|
if defined engineroot (
|
|
SETX workengine %engineroot%\Engine\Binaries\Win64\UnrealEditor.exe > nul
|
|
echo done.
|
|
echo\
|
|
)
|
|
|
|
cmdkey /list:PittaNas 2>nul | findstr /C:"Target: PittaNas" >nul
|
|
if %errorlevel%==0 (
|
|
echo PittaNas Credential Already Added.
|
|
) else (
|
|
echo Add Network Credential...
|
|
timeout /t 1 > nul
|
|
cmdkey /add:PittaNas /user:PittasoftGuest /pass:Pitta1020
|
|
)
|
|
echo\
|
|
|
|
cmdkey /list:Git:192.168.90.23:31020 2>nul | findstr /C:"Target:Git:192.168.90.23:31020"
|
|
if %errorlevel%==0 (
|
|
echo Remove Previous Generic "Git:192.168.90.23:31020" Credential...
|
|
timeout /t 1 > nul
|
|
cmdkey /delete:git:http://192.168.90.23:31020
|
|
echo done.
|
|
) else (
|
|
echo Git:192.168.90.23:31020 Not Exist.
|
|
)
|
|
echo\
|
|
|
|
echo Setting Git Server UserInfo...
|
|
echo\
|
|
timeout /t 1 > nul
|
|
setlocal
|
|
echo Git Server User Name
|
|
set /p username=:
|
|
echo\
|
|
echo Git Server User Email
|
|
set /p useremail=:
|
|
echo\
|
|
|
|
echo Please Wait...
|
|
timeout /t 1 > nul
|
|
|
|
git config --global user.name %username% --replace-all
|
|
git config --global user.email %useremail% --replace-all
|
|
git config user.name %username% --replace-all
|
|
git config user.email %useremail% --replace-all
|
|
echo done.
|
|
echo\
|
|
|
|
echo Starting git flow Settings...
|
|
timeout /t 1 > nul
|
|
|
|
for /f "delims=" %%i in ('git branch --show-current') do ( set "current_branch=%%i"
|
|
if %%i neq develop (
|
|
git flow init -d -f
|
|
git switch develop
|
|
) else (
|
|
echo Already initialized.
|
|
)
|
|
)
|
|
|
|
rem Enable Git Pull Automatically submodule update
|
|
git config submodule.recurse true
|
|
|
|
echo done.
|
|
echo\
|
|
echo Finish...
|
|
|
|
:quit
|
|
pause > nul
|
|
|
|
|