312b3156b558680a03570fa6f76f8814f8bffcd7
[old-projects.git] / ekit / MakeEkit.bat
1 @set inputmode=mode%1
2 @if %inputmode% == modespell goto spellmaker
3 @goto basicmaker
4 :basicmaker
5 @echo =========================
6 @echo Basic version compilation
7 @echo =========================
8 @set compilemode=basic
9 @set additionalfiles=
10 @echo [] creating core...
11 @copy /Y com\hexidec\ekit\EkitCore_Basic.java com\hexidec\ekit\EkitCore.java
12 @if errorlevel 2 goto failure
13 @goto compilecore
14 :spellmaker
15 @echo ==============================
16 @echo Spellcheck version compilation
17 @echo ==============================
18 @set compilemode=spell
19 @set additionalfiles=com\swabunga\spell\engine\*.class com\swabunga\spell\engine\*.properties com\swabunga\spell\engine\dictionary\* com\swabunga\spell\event\*.class com\swabunga\spell\swing\*.class com\swabunga\spell\swing\*.properties
20 @echo [] creating core...
21 @copy /Y com\hexidec\ekit\EkitCore_Spell.java com\hexidec\ekit\EkitCore.java
22 @if errorlevel 2 goto failure
23 @goto compilecore
24 :compilecore
25 @echo [] compiling core...
26 @javac -deprecation com\hexidec\ekit\EkitCore.java
27 @if errorlevel 1 goto failure
28 @goto compileapp
29 :compileapp
30 @echo [] compiling application...
31 @javac com\hexidec\ekit\Ekit.java
32 @if errorlevel 2 goto failure
33 @goto makejar
34 :makejar
35 @echo [] jarring...
36 @jar cmf com\hexidec\ekit\ekit.manifest ekit.jar com\hexidec\ekit\*.class com\hexidec\ekit\action\*.class com\hexidec\ekit\component\*.class com\hexidec\ekit\icons\*.gif com\hexidec\ekit\*.properties com\hexidec\util\Base64Codec.class com\hexidec\util\Translatrix.class %additionalfiles%
37 @if errorlevel 1 goto failure
38 @goto cleanup
39 :failure
40 @echo [*] make failed with an error level of %errorlevel%
41 @goto cleanup
42 :cleanup
43 @echo [] cleaning up Ekit classes...
44 @del com\hexidec\ekit\*.class
45 @del com\hexidec\ekit\action\*.class
46 @del com\hexidec\ekit\component\*.class
47 @del com\hexidec\util\Base64Codec.class
48 @del com\hexidec\util\Translatrix.class
49 @if %compilemode% == spell goto spellpurge
50 @goto finish
51 :spellpurge
52 @echo [] cleaning up spellcheck classes...
53 @del com\swabunga\spell\engine\*.class
54 @del com\swabunga\spell\event\*.class
55 @del com\swabunga\spell\swing\*.class
56 @goto finish
57 :finish
58 @set inputmode=
59 @set compilemode=
60 @set additionalfiles=
61 @echo [] finished