#16 batch file for compiling jace project

open
nobody
None
5
2004-09-15
2004-09-15
n_toze
No

Hi,
I think this might be a useful example (that could be
included in the documentation) of a batch file that would
compile a jace project using a similar directory structure
to your examples. It gets around the problem with the
relative paths in the tool batch files by cd'ing into the
tools directory. It need 'jace' to be set as an
environment variable first.

Directory structure is:
'MyProject' which contains directories named 'java'
and 'c++'. build.bat would be in directory 'MyProject'.

build.bat
*******

javac -d java\classes -sourcepath java
java\com\mycomp\mypack\*.java

@set current_dir=%CD%

@pushd %jace%\bin

cmd /c PeerEnhancer %current_dir%
\java\classes\com\mycomp\mypack\myclass.class %
current_dir%
\java\enhanced\com\mycomp\mypack\myclass.class
mydll close

@del %current_dir%
\java\classes\com\mycomp\mypack\myclass.class

cmd /c PeerGenerator %current_dir%
\java\enhanced\com\mycomp\mypack\myclass.class
mydll %current_dir%\c++\include %current_dir%
\c++\source true

cmd /c AutoProxy %current_dir%\c++\include %
current_dir%\c++\source %current_dir%
\c++\proxies\include %current_dir%\c++\proxies\source
%JAVA_HOME%\jre\lib\rt.jar;%current_dir%
\java\enhanced;%current_dir%\java\classes -mindep

@popd

jar cvf mydll.jar -C %current_dir%\java\classes com
jar uvf mydll.jar -C %current_dir%\java\enhanced com

pause

Discussion