@echo off
REM installrenew.bat
REM Renew Win/DOS Installation Batch
REM 06/2001 by Frank Wienberg, Olaf Kummer, Sven Offermann
IF "%~1" NEQ "" cd /d %1
if exist installrenew.bat goto DOIT
echo Please start installrenew.bat from its own directory!
goto END
:DOIT
echo @ECHO OFF > renew.bat
echo @ECHO OFF > makestub.bat
echo @ECHO OFF > compilestub.bat
echo @ECHO OFF > loadrenew.bat
echo @ECHO OFF > jcompile.bat
cd ..\..
cd > bin\win\dir.src
cd bin\win
copy setdir.src + dir.src setdir.tmp > NUL:
del dir.src
type setdir.tmp >> renew.bat
type setdir.tmp >> makestub.bat
type setdir.tmp >> compilestub.bat
type setdir.tmp >> loadrenew.bat
type setdir.tmp >> jcompile.bat
del setdir.tmp
type setup.src >> renew.bat
type setup2-1.src >> makestub.bat
type setup2-1.src >> compilestub.bat
type setup2-1.src >> loadrenew.bat
type setup2-1.src >> jcompile.bat
echo REM The list of jar files below has been generated by installrenew.bat. > setup2-2.tmp
echo REM If it becomes out-of-date, please re-run the install script. >> setup2-2.tmp
cd ..\..\
echo CALL "%%_BASEDIR%%\bin\win\_rcphelp.bat" "%%_BASEDIR%%\loader.jar" >> bin\win\setup2-2.tmp
cd plugins
for %%F in (*.jar) do echo CALL "%%_BASEDIR%%\bin\win\_rcphelp.bat" "%%_BASEDIR%%\plugins\%%F" >> ..\bin\win\setup2-2.tmp
cd ..
cd libs\log4j
for %%F in (*.jar) do echo CALL "%%_BASEDIR%%\bin\win\_rcphelp.bat" "%%_BASEDIR%%\libs\log4j\%%F" >> ..\..\bin\win\setup2-2.tmp
cd ..\..
cd bin\win
type setup2-2.tmp >> makestub.bat
type setup2-2.tmp >> compilestub.bat
type setup2-2.tmp >> loadrenew.bat
type setup2-2.tmp >> jcompile.bat
del setup2-2.tmp
type setup2-3.src >> makestub.bat
type setup2-3.src >> compilestub.bat
type setup2-3.src >> loadrenew.bat
type setup2-3.src >> jcompile.bat
echo "%%_JAVA_BIN%%java" -Xmx200M -Dde.renew.netPath=%%_NP%% -Dde.renew.classPath=%%CLASSPATH%% -jar "%%_BASEDIR%%\loader.jar" gui %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> renew.bat
echo "%%_JAVA_BIN%%java" -classpath %%CLASSPATH%% de.renew.call.StubGenerator %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> makestub.bat
echo "%%_JAVA_BIN%%java" -classpath %%CLASSPATH%% de.renew.call.StubCompiler %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> compilestub.bat
echo "%%_JAVA_BIN%%java" -classpath %%CLASSPATH%% CH.ifa.draw.application.DrawingLoadClient %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> loadrenew.bat
echo "%%_JAVA_BIN%%javac" -classpath %%CLASSPATH%% %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9 >> jcompile.bat
type teardown.src >> renew.bat
type teardown.src >> makestub.bat
type teardown.src >> compilestub.bat
type teardown.src >> loadrenew.bat
type teardown.src >> jcompile.bat
echo Type renew or double-click renew.bat in
cd
echo to start Renew 2.0.
echo The batch file makestub.bat generates a Renew stub for a Java class.
echo The batch file compilestub.bat compiles a Renew stub.
echo The batch file jcompile.bat helps compiling java classes depending on 
echo Renew classes like net stubs.
echo Associate .rnw files to loadrenew.bat to load drawings into a running
echo Renew application (this only works if you configure the property
echo de.renew.loadServerPort in your .renew.properties file).
:END
