text
stringlengths
0
834k
%*
goto :eof
:ensureExesExist
set Found=TRUE
for %%s in (git, hg, svn) do set %%sExists=FALSE
call :forAllRepositories :ensureExeExistSpecific %1
goto :eof
:ensureExeExistSpecific
:: optimization: only call when not found for a specific VCS yet.
if ""%1Exists""==""FALSE"" call :ensureExeExist %1
goto :eof
:ensureExeExist
where %1
if errorlevel 1 goto :fail
set %1Exists=TRUE
goto :eof
:fail
echo Failure: %1 is missing on the PATH
set Found=FALSE
goto :eof
:: a bit ugly setlocal/endlocal, but it is the cleanest way to do this.
:pull
echo PULL (or fetch, or update)
setlocal
call :ensureExesExist
if /I ""%Found%""==""TRUE"" goto :pullContinue
:pullFail
endlocal
goto :eof
:pullContinue
endlocal
call :forAllRepositories :pullSpecific %1
goto :eof
:pullSpecific
:: http://mercurial.selenic.com/wiki/GitConcepts#Command_equivalence_table
if hg==%1 for %%d in (%~dp0..) do call :do %1 pull %%~fd\%2
:: git needs to run in the local repository directory
if git==%1 for %%d in (%~dp0..) do call :do pushd %%~fd\%2
if git==%1 for %%d in (%~dp0..) do call :do %1 fetch %%~fd\%2
if git==%1 for %%d in (%~dp0..) do call :do popd
if svn==%1 for %%d in (%~dp0..) do call :do %1 update %%~fd\%2
goto :eof
:help
:: ^| to escape the pipe
echo Syntax: %~f0 [set^|clone^|pull^|help]
echo set:
echo Sets the environment variables to the directories so you can use them in Delphi or Visual Studio for instance $(FastMM)
echo VS: http://stackoverflow.com/questions/840472#1126937
echo Delphi: http://stackoverflow.com/questions/7642891#7643538
echo show:
echo Shows detail information of the known repositories.
echo clone:
echo Calls ""set"", then clones all the repositories for each variable with the right command.
echo Note this needs HG.EXE, GIT.EXE and SVN.EXE on your path.
echo pull:
echo Calls ""set"", then pulls (git: fetches; svn: updates) all the repositories for each variable with the right command.
echo For DVCS (hg/git) you need to do your own merge.
echo Note this needs HG.EXE, GIT.EXE and SVN.EXE on your path.
echo help:
echo Shows this help.
goto :eof
",28.9819277108,129,0.6460195386
166,d0183b34f173e7cb1d7614f868e6007cb106c330,1517,bat,Batchfile,protobuf-definitions/make_for_win1.bat,MikeWise2718/ml-agents-mod,c8393b7973be329b79cda70a7140d734205013f9,['Apache-2.0'],,,,protobuf-definitions/make_for_win1.bat,MikeWise2718/ml-agents-mod,c8393b7973be329b79cda70a7140d734205013f9,['Apache-2.0'],,,,protobuf-definitions/make_for_win1.bat,MikeWise2718/ml-agents-mod,c8393b7973be329b79cda70a7140d734205013f9,['Apache-2.0'],,,,"rem variables
rem GRPC-TOOLS required. Install with `nuget install Grpc.Tools`.
rem Then un-comment and replace [DIRECTORY] with location of files.
rem For example, on Windows, you might have something like:
rem set COMPILER=Grpc.Tools.1.14.1\tools\windows_x64
rem set COMPILER=[DIRECTORY]
set SRC_DIR=proto\mlagents\envs\communicator_objects
set DST_DIR_C=..\UnitySDK\Assets\ML-Agents\Scripts\Grpc\CommunicatorObjects1
set DST_DIR_P=..\ml-agents-envs1
set PROTO_PATH=proto
set PYTHON_PACKAGE=mlagents\envs\communicator_objects
rem clean
rd /s /q %DST_DIR_C%
rd /s /q %DST_DIR_P%\%PYTHON_PACKAGE%
mkdir %DST_DIR_C%
mkdir %DST_DIR_P%\%PYTHON_PACKAGE%
rem generate proto objects in python and C#
for %%i in (%SRC_DIR%\*.proto) do (
protoc --proto_path=proto --csharp_out=%DST_DIR_C% %%i
protoc --proto_path=proto --python_out=%DST_DIR_P% %%i
)
rem grpc