@echo off REM This file was taken from RakNet 4.082. REM Please see licenses/RakNet license.txt for the underlying license and related copyright. REM REM Modified work: Copyright (c) 2018, SLikeSoft UG (haftungsbeschränkt) REM REM This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style REM license found in the license.txt file in the root directory of this source tree. SetLocal EnableDelayedExpansion set sourceDir=%1 CALL :dequote sourceDir if "%sourceDir%"=="" goto :NOVARS echo Performing Swig build set swigPath=%2 CALL :dequote swigPath if "%swigPath%"=="" goto :SKIPADDSLASH if "%swigPath:~-1%"=="\" goto :SKIPADDSLASH SET swigPath=%swigPath%\ :SKIPADDSLASH if exist SwigOutput\SwigCSharpOutput del /F /Q SwigOutput\SwigCSharpOutput\* set option=%4 CALL :dequote option set dependentDir=%3 CALL :dequote dependentDir if "%option%"=="MYSQL_AUTOPATCHER" goto :MYSQLAUTOPATCHER echo Unsupported option GOTO END :MYSQLAUTOPATCHER %swigPath%swig -c++ -csharp -namespace RakNet -I"%1" -I"SwigInterfaceFiles" -I"%3" -DSWIG_ADDITIONAL_AUTOPATCHER_MYSQL -outdir SwigOutput\SwigCSharpOutput -o SwigOutput\CplusDLLIncludes\RakNet_wrap.cxx SwigInterfaceFiles\RakNet.i :ENDSWIG if errorlevel 1 GOTO :SWIGERROR echo Swig build complete GOTO END :NOVARS echo Invalid number of parameters, Usage: MakeSwigWithExtras.bat ^ ^ ^ ^ PAUSE GOTO END :SWIGERROR echo Swig had an error during build :END GOTO FILEEND :DeQuote SET _DeQuoteVar=%1 CALL SET _DeQuoteString=%%!_DeQuoteVar!%% IF [!_DeQuoteString:~0^,1!]==[^"] ( IF [!_DeQuoteString:~-1!]==[^"] ( SET _DeQuoteString=!_DeQuoteString:~1,-1! ) ELSE (GOTO :EOF) ) ELSE (GOTO :EOF) SET !_DeQuoteVar!=!_DeQuoteString! SET _DeQuoteVar= SET _DeQuoteString= GOTO :EOF :FILEEND