echo off

set CONSOLEDIR=Console
cd %CONSOLEDIR%

echo ------------------------------------------------------------------
..\AjustementJavaFile FrameConsole.java defaultTx "640"
echo ------------------------------------------------------------------
..\AjustementJavaFile FrameConsole.java defaultTy "480"
echo ------------------------------------------------------------------
..\AjustementJavaFile FrameConsole.java defaultLines "100"
echo ------------------------------------------------------------------
..\AjustementJavaFile CanvasConsole.java defaultFont "\"Courier new\""
echo ------------------------------------------------------------------
..\AjustementJavaFile CanvasConsole.java defaultSize "18"
echo ------------------------------------------------------------------
..\AjustementJavaFile CanvasConsole.java defaultStyle "Font.BOLD"
echo ------------------------------------------------------------------

javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" Console.java
javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" FrameConsole.java
javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" ConsoleReader.java
javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" ConsolePrinter.java
javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" CanvasConsole.java
javac -Xlint:deprecation -Xlint:unchecked -source %ALGOVERSION% -target %ALGOVERSION% -bootclasspath %ALGOBOOTCLASSPATH% -extdirs "" CurseurCanvasConsole.java

cd ..

set DESTDIR=08-Bibliotheque

set SRCNAME=TestBibliotheque0
set BIBNAME=Bibliotheque0
if exist %CONSOLEDIR%\%SRCNAME%EnConsole.jar del %CONSOLEDIR%\%SRCNAME%EnConsole.jar
cd %CONSOLEDIR%
copy ..\%DESTDIR%\%BIBNAME%.java
javac %BIBNAME%.java
cd ..
GenerationJarConsole %DESTDIR%\%SRCNAME%       %CONSOLEDIR% %ALGOVERSION% "%ALGOBOOTCLASSPATH%"
cd %CONSOLEDIR%
jar uf %SRCNAME%EnConsole.jar %BIBNAME%.class
cd ..
xcopy %CONSOLEDIR%\%SRCNAME%EnConsole.jar      %DESTDIR% /Q /Y >NUL

echo ------------------------------------------------------------------

set SRCNAME=TestBibliotheque1
set BIBNAME=Bibliotheque1
if exist %CONSOLEDIR%\%SRCNAME%EnConsole.jar del %CONSOLEDIR%\%SRCNAME%EnConsole.jar
cd %CONSOLEDIR%
copy ..\%DESTDIR%\%BIBNAME%.java
javac %BIBNAME%.java
cd ..
GenerationJarConsole %DESTDIR%\%SRCNAME%       %CONSOLEDIR% %ALGOVERSION% "%ALGOBOOTCLASSPATH%"
cd %CONSOLEDIR%
jar uf %SRCNAME%EnConsole.jar %BIBNAME%.class
jar uf %SRCNAME%EnConsole.jar %BIBNAME%$Pos2D.class
jar uf %SRCNAME%EnConsole.jar %BIBNAME%$Dir2D.class
cd ..
xcopy %CONSOLEDIR%\%SRCNAME%EnConsole.jar      %DESTDIR% /Q /Y >NUL

echo ------------------------------------------------------------------

set SRCNAME=TestBibliotheque2
set BIBNAME=Bibliotheque2
if exist %CONSOLEDIR%\%SRCNAME%EnConsole.jar del %CONSOLEDIR%\%SRCNAME%EnConsole.jar
cd %CONSOLEDIR%
copy ..\%DESTDIR%\%BIBNAME%.java
..\SubstitutionJavaFile %BIBNAME%.java Ecran Console
..\SubstitutionJavaFile %BIBNAME%.java Clavier Console
javac %BIBNAME%.java
cd ..
GenerationJarConsole %DESTDIR%\%SRCNAME%       %CONSOLEDIR% %ALGOVERSION% "%ALGOBOOTCLASSPATH%"
cd %CONSOLEDIR%
jar uf %SRCNAME%EnConsole.jar %BIBNAME%.class
cd ..
xcopy %CONSOLEDIR%\%SRCNAME%EnConsole.jar      %DESTDIR% /Q /Y >NUL

echo ------------------------------------------------------------------

pause
