@echo off 
@title RothenburgAR Deploy

rem Variablendefinitionen
SET ApkPath=..\Output\rc3.apk
SET DataSourcePath=%appdata%\..\LocalLow\FHWS\RothenburgAR\data\
SET DataTargetPath=/storage/emulated/0/Android/data/de.fhws.rothenburgar/files/data/

rem Dieser Pfad muss unbedingt angepasst werden!
SET adbPath=C:\Program Files\Unity\Editor\Android\platform-tools\adb.exe
SET ClearBeforeCopy=1


rem Hier beginnt das Script
echo Installing "%ApkPath%" to connected devices.
rem "%adbPath%" install -r "%ApkPath%"

if "%ClearBeforeCopy%"=="1" (
    echo Clearing data
    "%adbPath%" shell rm -r %DataTargetPath%
)

CALL :CopyData colors.xml
CALL :CopyData localization.xml
CALL :CopyData localization
CALL :CopyData exhibition
CALL :CopyData poi

echo Done!

EXIT /B %ERRORLEVEL%

:CopyData
rem echo Copying data/%1 to connected devices.
"%adbPath%" push %DataSourcePath%\%1 %DataTargetPath%/%1
EXIT /B 0
