[go: up one dir, main page]

Menu

[977222]: / build.xml  Maximize  Restore  History

Download this file

135 lines (114 with data), 6.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="JMEBoy" default="jar" basedir=".">
<description>Builds, tests, and runs the project .</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
pre-init: called before initialization of project properties
post-init: called after initialization of project properties
pre-preprocess: called before text preprocessing of sources
post-preprocess: called after text preprocessing of sources
pre-compile: called before source compilation
post-compile: called after source compilation
pre-obfuscate: called before obfuscation
post-obfuscate: called after obfuscation
pre-preverify: called before preverification
post-preverify: called after preverification
pre-jar: called before jar building
post-jar: called after jar building
pre-build: called before final distribution building
post-build: called after final distribution building
pre-clean: called before cleaning build products
post-clean: called after cleaning build products
Example of pluging a my-special-task after the compilation could look like
<target name="post-compile">
<my-special-task>
<fileset dir="${build.classes.dir}"/>
</my-special-task>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Other way how to customize the build is by overriding existing main targets.
The target of interest are:
preprocess: preprocessing
extract-libs: extraction of libraries and resources
compile: compilation
create-jad: construction of jad and jar manifest source
obfuscate: obfuscation
preverify: preverification
jar: jar archive building
run: execution
debug: execution in debug mode
build: building of the final distribution
javadoc: javadoc generation
Example of overriding the target for project execution could look like
<target name="run" depends="init,jar">
<my-special-exec jadfile="${dist.dir}/${dist.jad}"/>
</target>
Be careful about correct dependencies when overriding original target.
Again, for list of available properties which you can use check the target
you are overriding in nbproject/build-impl.xml file.
A special target for-all-configs can be used to run some specific targets for
all project configurations in a sequence. File nbproject/build-impl.xml
already contains some "for-all" targets:
jar-all
javadoc-all
clean-all
Example of definition of target iterating over all project configurations:
<target name="jar-all">
<property name="target.to.call" value="jar"/>
<antcall target="for-all-configs"/>
</target>
-->
<target name="conditional-soot">
<uptodate property="soot.notRequired" targetfile="${build.dir}/sootOutput/.timestamp" >
<srcfiles dir= "${build.classes.dir}"/>
</uptodate>
</target>
<target name="soot" unless="soot.notRequired">
<!--define the classpath extension for the soot jars/classes here-->
<!--<property name="soot.classes" value="" />-->
<!--define the directory of the Java installation here-->
<!--<property name="java.home.path" value="" />-->
<!--define the classpath extension for soot, where the tool can find the J2ME libraries used when compiling the project-->
<!--<property name="soot.classpath" value="" />-->
<mkdir dir="${build.dir}/sootOutput" />
<exec executable="${java.home.path}/bin/java.exe">
<arg value="-classpath"/>
<arg value="${soot.classes}" />
<arg value="soot.Main"/>
<arg value="--w" />
<arg value="--j2me" />
<arg value="--app" />
<arg value="--W" />
<arg value="--keep-line-number" />
<arg value="--O" />
<arg value="--xml-attributes" />
<arg value="--d"/>
<arg value="${build.dir}/sootOutput" />
<arg value="--main-class" />
<arg value="de.joergjahnke.gameboy.jme.BtMEGameboyMIDlet" />
<arg value="--process-dir"/>
<arg value="${build.classes.dir}" />
<arg value="--cp"/>
<arg value="${build.classes.dir};${soot.classpath}" />
</exec>
<copy todir="${build.classes.dir}">
<fileset dir="${build.dir}/sootOutput">
<exclude name="com/**" />
<exclude name="attributes/**" />
</fileset>
</copy>
<echo message="ignore me" file="${build.dir}/sootOutput/.timestamp"/>
</target>
<!--<target name="post-compile" depends="conditional-soot,soot">
</target>
<target name="post-clean">
<delete dir="${build.dir}/sootOutput"/>
</target>-->
</project>