@echo off

PATH=..\Utilities;%PATH%

set CFG_DIR=Bin\Release

set ARCHIVE_EDITOR_SRC_DIR=..\Tools\ArchiveEditor\%CFG_DIR%
set FONT_EDITOR_SRC_DIR=..\Tools\FontEditor\%CFG_DIR%
set MODEL_EDITOR_SRC_DIR=..\Tools\ModelEditor\%CFG_DIR%

set ARCHIVE_EDITOR_DST_DIR=..\..\Tools\ArchiveEditor
set FONT_EDITOR_DST_DIR=..\..\Tools\FontEditor
set MODEL_EDITOR_DST_DIR=..\..\Tools\ModelEditor

if not exist %ARCHIVE_EDITOR_DST_DIR% ( mkdir %ARCHIVE_EDITOR_DST_DIR% )
if not exist %FONT_EDITOR_DST_DIR% ( mkdir %FONT_EDITOR_DST_DIR% )
if not exist %MODEL_EDITOR_DST_DIR% ( mkdir %MODEL_EDITOR_DST_DIR% )

duplicator.exe /sd "..\Tools\ArchiveEditor\Bin\Release" /td %ARCHIVE_EDITOR_DST_DIR% /opt "Upload_Tools.opt"
duplicator.exe /sd "..\Tools\FontEditor\Bin\Release"    /td %FONT_EDITOR_DST_DIR%    /opt "Upload_Tools.opt"
duplicator.exe /sd "..\Tools\ModelEditor\Bin\Release"   /td %MODEL_EDITOR_DST_DIR%   /opt "Upload_Tools.opt"

if "%1" == "" (
  @echo on
  pause
) else (
  @echo on
)
