@echo off
echo Effettua setup dei file specifici per i vari ambienti pre build installer: verifica da nome configurazione %1


REM if %1 == "Release" goto Release
REM if %1 == "Debug" goto Debug
REM if %1 == "FANUC" goto CMS
REM if %1 == "SIEMENS" goto CMS
REM 
REM :Release
REM echo Release: nulla da copiare
REM goto END
REM 
REM :Debug
REM echo Debug: copia file ini x simulazione ESA
REM del  %2"DATA\CONF\EsaKvara.ini"
REM copy %2"Resources\SCM\EsaKvara_SIM.ini" %2"DATA\CONF\EsaKvara.ini"
REM goto END
REM 
REM :CMS
REM echo CMS: copio files CMS - Zogno
REM del  %2"Resources\MTCA.ico"
REM del  %2"DATA\CONF\Adapter_ItemList.xml"
REM del  %2"DATA\CONF\AlarmList.map"
REM del  %2"DATA\CONF\AlarmListCNC.map"
REM del  %2"DATA\CONF\AnalogData.map"
REM del  %2"DATA\CONF\CounterList.map"
REM del  %2"DATA\CONF\StatusList.map"
REM REM del  /F /Q %2"DATA\CONF\*.*"
REM copy %2"Resources\CMS\CMS.ico" %2"Resources\MTCA.ico"
REM copy %2"Resources\CMS\AlarmListEmpty.map" %2"DATA\CONF\AlarmListCNC.map"
REM REM ora verifico tipo controllo esatto...
REM if %1 == "CMS-FANUC" goto FANUC
REM if %1 == "CMS-SIEMENS" goto SIEMENS
REM if %1 == "CMS-OSAI" goto OSAI
REM 
REM :SCM
REM echo SCM: copio files SCM - Rimini
REM del  %2"Resources\MTCA.ico"
REM del  %2"DATA\CONF\Adapter_ItemList.xml"
REM del  %2"DATA\CONF\AlarmList.map"
REM REM del  %2"DATA\CONF\EsaKvara.ini"
REM del  %2"DATA\CONF\IOT_ByteList.map"
REM del  %2"DATA\CONF\IOT_WordList.map"
REM del  %2"DATA\CONF\IOT_DWordList.map"
REM del  %2"DATA\CONF\IOT_StringList.map"
REM REM del  /F /Q %2"DATA\CONF\*.*"
REM copy %2"Resources\SCM\SCM.ico" %2"Resources\MTCA.ico"
REM copy %2"Resources\SCM\SCM_ESA.xml" %2"DATA\CONF\Adapter_ItemList.xml"
REM copy %2"Resources\SCM\AlarmListEsaGv.map" %2"DATA\CONF\AlarmList.map"
REM copy %2"Resources\SCM\AlarmListEsaGvCNC.map" %2"DATA\CONF\AlarmListCNC.map"
REM copy %2"Resources\SCM\EsaKvara_PROD.ini" %2"DATA\CONF\EsaKvara.ini"
REM copy %2"Resources\SCM\IOT_ByteList.map" %2"DATA\CONF\IOT_ByteList.map"
REM copy %2"Resources\SCM\IOT_WordList.map" %2"DATA\CONF\IOT_WordList.map"
REM copy %2"Resources\SCM\IOT_DWordList.map" %2"DATA\CONF\IOT_DWordList.map"
REM copy %2"Resources\SCM\IOT_StringList.map" %2"DATA\CONF\IOT_StringList.map"
REM goto END
REM 
REM :FANUC
REM copy %2"Resources\CMS\FANUC.xml" %2"DATA\CONF\Adapter_ItemList.xml"
REM copy %2"Resources\CMS\AlarmListFANUC.map" %2"DATA\CONF\AlarmList.map"
REM copy %2"Resources\CMS\AnalogDataFANUC.map" %2"DATA\CONF\AnalogData.map"
REM copy %2"Resources\CMS\CounterListFANUC.map" %2"DATA\CONF\CounterList.map"
REM copy %2"Resources\CMS\StatusListFANUC.map" %2"DATA\CONF\StatusList.map"
REM goto END
REM 
REM :SIEMENS
REM copy %2"Resources\CMS\SIEMENS.xml" %2"DATA\CONF\Adapter_ItemList.xml"
REM copy %2"Resources\CMS\AlarmListSIEMENS.map" %2"DATA\CONF\AlarmList.map"
REM copy %2"Resources\CMS\AnalogDataSIEMENS.map" %2"DATA\CONF\AnalogData.map"
REM copy %2"Resources\CMS\CounterListSIEMENS.map" %2"DATA\CONF\CounterList.map"
REM copy %2"Resources\CMS\StatusListSIEMENS.map" %2"DATA\CONF\StatusList.map"
REM goto END
REM 
REM :OSAI
REM copy %2"Resources\CMS\OSAI.xml" %2"DATA\CONF\Adapter_ItemList.xml"
REM copy %2"Resources\CMS\AlarmListOSAI.map" %2"DATA\CONF\AlarmList.map"
REM copy %2"Resources\CMS\AnalogDataOSAI.map" %2"DATA\CONF\AnalogData.map"
REM copy %2"Resources\CMS\CounterListOSAI.map" %2"DATA\CONF\CounterList.map"
REM copy %2"Resources\CMS\StatusListOSAI.map" %2"DATA\CONF\StatusList.map"
REM goto END

:END
echo Fatto!