@echo off
echo Install new version of Kave2000 with xml databases
if not "%1" == "del" do goto docopyhelp
echo To override demo values call
echo   install del
:docopyhelp
echo 1) After install chage possible setting icons (like 14 or 20)
echo    to point to \kave\k2000xml directory setting.bat
echo    Make also icons from k2000.cmd and k2000p.exe.
echo 2) Check by
echo      dir c:\midas.dll /s
echo    that there is only one midas.dll.  Delete the other ones.
echo 3) copy from \kave\k2000 needed setting files that have more than 2 letters
echo    like 142.ini, 142.prg and 142.ctr
echo 4) if problems with midas,dll 
echo      a) open command prompt
echo      b) go to directory where k2000p.exe is
echo      c) write regsvr32 midas.dll
echo .
echo If you like continue, press anykey, if stop, press Ctrl-C
pause
if not "%1" == "del" do goto docopy
del k2000p.ini
del k2000p.ctr
del k2000p.prg
del k2000p.sec
del ionames.txt
del posnames.txt
del servip.prg
del comm\YASCARRY.INI
del comm\YasCon*.INI
del comm\YasMo*.INI
del comm\YasRea*.INI

:docopy
xcopy \kave\k2000\k2000p.ini /d
xcopy \kave\k2000\k2000p.ctr /d
xcopy \kave\k2000\k2000p.prg /d
xcopy \kave\k2000\ionames.txt /d
xcopy \kave\k2000\posnames.txt /d
xcopy \kave\k2000\servip.prg /d
xcopy \kave\k2000\servip.ctr /d
xcopy \kave\k2000\move.prg /d
xcopy \kave\k2000\move.ini /d
xcopy \kave\k2000\??.prg /d
xcopy \kave\k2000\??.ini /d
xcopy \kave\k2000\??.ctr /d
xcopy \kave\k2000\comm\*.* comm\*.* /d
xcopy \kave\k2000\comm\YASCARRY.INI comm\*.* /d
xcopy \kave\k2000\comm\YasCon*.INI  comm\*.* /d
xcopy \kave\k2000\comm\YasMo*.INI   comm\*.* /d
xcopy \kave\k2000\comm\YasRea*.INI  comm\*.* /d
copy k2000p.ini k2000p.oni
sed s/FormOrder-Params/FormOrderText-Params/g k2000p.ini >k2000p.oni
copy k2000p.oni k2000p.ini
cd xml
call db2x.bat
cd ..

