diff options
| author | J08nY | 2018-11-10 16:56:20 +0100 |
|---|---|---|
| committer | J08nY | 2018-11-10 16:56:20 +0100 |
| commit | a24f19d08c0cced21cb774a4964778a027a816f4 (patch) | |
| tree | 6ad7839f5c7c2abcc1372c596d1821ad2c73c029 /build-applet.xml | |
| parent | 9e157bc1d0a42848bb8f780f4f7b294ad535feda (diff) | |
| download | ECTester-a24f19d08c0cced21cb774a4964778a027a816f4.tar.gz ECTester-a24f19d08c0cced21cb774a4964778a027a816f4.tar.zst ECTester-a24f19d08c0cced21cb774a4964778a027a816f4.zip | |
Simpify and explain CAP building in README.
Diffstat (limited to '')
| -rw-r--r-- | build-applet.xml | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/build-applet.xml b/build-applet.xml index b03ed53..cfd95e6 100644 --- a/build-applet.xml +++ b/build-applet.xml @@ -21,7 +21,26 @@ <property name="cap_222" value="ectester222.cap"/> <property name="cap" value="${cap_222}"/> - <target name="build-221" description="Builds the CAP file for JavaCard 2.2.1."> + + + <condition property="cap_extended"> + <equals arg1="${cap}" arg2="${cap_222}"/> + </condition> + + <target name="build-check"> + <fail message="Invalid cap name!"> + <condition> + <not> + <or> + <equals arg1="${cap}" arg2="${cap_222}"/> + <equals arg1="${cap}" arg2="${cap_221}"/> + </or> + </not> + </condition> + </fail> + </target> + + <target name="build-221" description="Builds the CAP file for JavaCard 2.2.1." unless="cap_extended"> <javacard jckit="${JC221}"> <cap output="applet/ectester221.cap" sources="src/cz/crcs/ectester/applet" aid="${pkg_aid}" excludes="ECTesterAppletExtended.*"> <applet class="cz.crcs.ectester.applet.ECTesterApplet" aid="${applet_aid}"/> @@ -29,7 +48,7 @@ </javacard> </target> - <target name="build-222" description="Builds the CAP file for JavaCard 2.2.2."> + <target name="build-222" description="Builds the CAP file for JavaCard 2.2.2." if="cap_extended"> <javacard jckit="${JC222}"> <cap output="applet/ectester222.cap" sources="src/cz/crcs/ectester/applet" aid="${pkg_aid}" excludes="ECTesterApplet.*"> <applet class="cz.crcs.ectester.applet.ECTesterAppletExtended" aid="${applet_aid}"/> @@ -37,7 +56,7 @@ </javacard> </target> - <target name="build" description="Builds the CAP file." depends="build-221,build-222"> + <target name="build" description="Builds the CAP file." depends="build-check,build-221,build-222"> </target> <target name="upload" depends="build" description="Uploads the CAP file to the card, using gp.jar."> |
