@Echo off
@Echo "  _____ _____ _____ _____ _____ _____ _____ 
@Echo " |  _  |   __|   __|     |  _  |     |   __|
@Echo " |     |  |  |   __| | | |     | | | |   __|
@Echo " |__|__|_____|_____|_|_|_|__|__|_|_|_|_____|
@Echo "  __                    _      _____   _ _ _           
@Echo " |  |   ___ _ _ ___ _ _| |_   |   __|_| |_| |_ ___ ___ 
@Echo " |  |__| .'| | | . | | |  _|  |   __| . | |  _| . |  _|
@Echo " |_____|__,|_  |___|___|_|    |_____|___|_|_| |___|_|  
@Echo "           |___|                                  
@Echo "                              http://agemame.pembo.co.uk
@Echo "Copyright (C)2006-2008 D.Pemberton - All rights reserved
@Echo "
@Echo "

@drive@
cd @libpath@

if exist .\lib\UPDATE_ALE.jar GOTO UPDATED

GOTO UPDATECHECKDONE

:UPDATED
@ECHO AGEMAME Has been updated since last restart
del .\lib\ALE.jar
copy .\lib\UPDATE_ALE.JAR .\lib\ALE.jar > nul
del .\lib\UPDATE_ALE.JAR

:UPDATECHECKDONE
@Echo Starting Editor...

set ALECP=
:dynClasspath
set _LIBJARS=
for %%i in (.\lib\*.jar) do call .\lib\cpappend %%i


set MEMORY=-Xmx512M
set LOGGING=-Djava.util.logging.config.file=.\lib\Logging.properties
set LIB_PATH=-Djava.library.path=.\lib

java %MEMORY% %LOGGING% %LIB_PATH% -cp %ALECP% uk.co.pembo.agemame.userinterface.MainApplication %1

