Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

FIXED MakeSwig.bat creates output + copy directories if needed #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion DependentExtensions/Swig/MakeSwig.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ if "%swigPath%"=="" goto :SKIPADDSLASH
if "%swigPath:~-1%"=="\" goto :SKIPADDSLASH
SET swigPath=%swigPath%\
:SKIPADDSLASH
del /F /Q SwigOutput\SwigCSharpOutput\*

set swigOutputCsharp=SwigOutput\SwigCSharpOutput
set swigOutputCplusDLL=SwigOutput\CplusDLLIncludes
set swigInterface=SwigInterfaceFiles
set swigFiles=SwigWindowsCSharpSample\SwigTestApp\SwigFiles
Copy link

@Luke1410 Luke1410 Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that while you are introducing the variables here, the folder names are still hard coded throughout the batch file (f.e. in line 23).

Also corresponding changes should/could be applied to MakeSwigWithExtras.bat as well (not required in SLikeNet since there we combined the two batch files in a single one).


if not exist %swigOutputCsharp% ( mkdir %swigOutputCsharp% )
if not exist %swigOutputCplusDLL% ( mkdir %swigOutputCplusDLL% )
if not exist %swigInterface% ( mkdir %swigInterface% )
Copy link

@Luke1410 Luke1410 Jun 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SwigInterfaceFiles directory should exist prior to running the MakeSwig batch file since it should contain the required interface files. Hence, creating this directory here should not really serve any purpose or am I overlooking anything?

if not exist %swigFiles% ( mkdir %swigFiles% )

del /F /Q %swigOutputCsharp%\*

if "%3"=="" goto :NOSQL
%swigPath%swig -c++ -csharp -namespace RakNet -I"%1" -I"SwigInterfaceFiles" -I"%3" -DSWIG_ADDITIONAL_SQL_LITE -outdir SwigOutput\SwigCSharpOutput -o SwigOutput\CplusDLLIncludes\RakNet_wrap.cxx SwigInterfaceFiles\RakNet.i
copy /Y SwigOutput\SwigCSharpOutput\* SwigWindowsCSharpSample\SwigTestApp\SwigFiles\*
Expand Down