Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ab5524952d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 191 lines (143 sloc) 8.409 kb
<!--
Description: Build script for the Mobile Trail Explorer
Author: Barry Redmond
-->
<!-- NOTES:
======
Use this script only if you can't get the build.xml script working, or you have another good reason.
The build.xml script should be considered the 'primary' script.
You must set the property: 'install.api.root' to the root of your Wireless Tookit(WTK),
one level above the 'lib' and 'bin' folders.
If you are not using the 'Default' WTK, which is the SUN one, installed at "C:\WTK",
you must change the DEFAULT target to one which is appropriate for your WTK.
N.B. "C:\WTK" is NOT the default installation folder for the SUN wtk, so you will PROBABLY NEED TO CHANGE
the defualt target (or move the WTK.)
If you use this script, remember to add the created 'collated' and 'bin' folders to 'svn:ignore'
as they should not be added to the svn repository.
If a build fails a folder 'temp####' will be created, these can be deleted without fear.
-->
<project name="Mobile Trail" default="R01-Default Build and Run" >
<!-- If you are using the SonyEricsson WTK, Uncomment the following line, and comment the one after it. -->
<!-- <target name="Default Build" depends="SonyEricsson_K750_Emu" /> -->
<target name="Default Build" depends="Default_Color_Phone" />
<!-- IDE/WTK Setup Spesific Variables -->
<!-- You must UN-Comment the 'install.api.root' which is appropriate for you, and recomment the default one bellow -->
<property name="install.api.root" value="C:/WTK2.5.2" />
<!-- <property name="install.api.root" value="C:/WTK25" /> -->
<!-- <property name="install.api.root" value="C:/WTK22" /> -->
<!-- <property name="install.api.root" value="C:/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation/WTK2" /> -->
<property name="install.api.lib" value="${install.api.root}/lib" />
<property name="install.api.bin" value="${install.api.root}/bin" />
<!-- MIDlet properties -->
<!-- midlet.name must not contain spaces -->
<property name="midlet.name" value="TrailExplorerMidlet" />
<property name="midlet.vendor" value="Tommi Laukkanen" />
<property name="midlet.version" value="1.7" />
<!-- This is the path to the MIDlet that is started when the Application is run -->
<property name="midlet.class" value="com.substanceofcode.tracker.TrailExplorerMidlet" />
<!-- User Directories -->
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="collated.dir" value="collated" />
<property name="bin.dir" value="bin" />
<!-- Ant extensions -->
<!-- This is a non-standard extension! -->
<taskdef resource="wtk.properties" classpath="${lib.dir}/wtk.jar" />
<!-- List of all the required JSRs for this App. -->
<property name="api.cldc" value="${install.api.lib}/cldcapi11.jar" />
<property name="api.midp" value="${install.api.lib}/midpapi20.jar" />
<property name="api.bluetooth" value="${install.api.lib}/jsr082.jar" />
<property name="api.fileIO" value="${install.api.lib}/jsr75.jar" />
<!-- <property name="api.junit-10" value="${lib.dir}/JMUnit4CLDC10.jar" /> -->
<property name="api.junit-11" value="${lib.dir}/jmunit4cldc11-1.0.1.jar" />
<property name="api.nokia" value="${lib.dir}/nokiaext.jar" />
<property name="api.siemens" value="${lib.dir}/SiemensAPI.jar" />
<property name="api.samsung" value="${lib.dir}/SamsungAPI.jar" />
<property name="api.messaging" value="${lib.dir}/wma20.jar" />
<property name="api.jsr179" value="${install.api.lib}/jsr179.jar" />
<property name="jsr" value="${api.cldc};${api.midp};${api.bluetooth};${api.fileIO};${api.junit-11};${api.nokia};${api.siemens};${api.samsung};${api.messaging};${api.jsr179}" />
<!-- Setup the project build, create required folders, and copy accross required files. -->
<target name="setup">
<!-- Create directories if they don't exist-->
<mkdir dir="${collated.dir}"/>
<mkdir dir="${bin.dir}"/>
<!-- Clean any files from previous build -->
<delete includeemptydirs="true">
<fileset dir="${collated.dir}" includes="**/*" />
</delete>
<!-- Copy accross the image files -->
<copy todir="${collated.dir}/images/" >
<fileset dir="${src.dir}/images/" includes="**/*" />
</copy>
<!-- Copy accross the Mobile Trail Explorer icon -->
<copy file="${src.dir}/images/explorer.png" tofile="${collated.dir}/resources/icon.png" />
<property name="release.name" value="${midlet.name}_${midlet.version}" />
</target>
<target name="build_no_obfustication">
<wtk
jad="${bin.dir}/${release.name}.jad"
jar="${bin.dir}/${release.name}.jar"
source="${src.dir}"
resource="${collated.dir}"
jsr="${jsr}"
debug="false"
preverify="${install.api.bin}/preverify.exe" >
<!-- Required -->
<attribute name="MicroEdition-Configuration" value="CLDC-1.1" />
<attribute name="MicroEdition-Profile" value="MIDP-2.0" />
<attribute name="MIDlet-Name" value="${midlet.name}" />
<attribute name="MIDlet-Vendor" value="${midlet.vendor}" />
<attribute name="MIDlet-Version" value="${midlet.version}" />
<!-- MIDlet suites -->
<midlet name="${midlet.name}" class="${midlet.class}" icon="/resources/icon.png" />
</wtk>
</target>
<target name="build_with_obfustication">
<wtk
jad="${bin.dir}/${release.name}.jad"
jar="${bin.dir}/${release.name}.jar"
source="${src.dir}"
resource="${collated.dir}"
jsr="${jsr}"
debug="false"
obfuscate="${lib.dir}/proguard.jar"
preverify="${install.api.bin}/preverify.exe" >
<!-- Required -->
<attribute name="MicroEdition-Configuration" value="CLDC-1.1" />
<attribute name="MicroEdition-Profile" value="MIDP-2.0" />
<attribute name="MIDlet-Name" value="${midlet.name}" />
<attribute name="MIDlet-Vendor" value="${midlet.vendor}" />
<attribute name="MIDlet-Version" value="${midlet.version}" />
<!-- MIDlet suites -->
<midlet name="${midlet.name}" class="${midlet.class}" icon="/resources/icon.png" />
</wtk>
</target>
<target name="run_only_setup">
<property name="release.name" value="${midlet.name}_${midlet.version}" />
</target>
<target name="run">
<wtkrun jad="${bin.dir}/${release.name}.jad" device="${buildtype}" emulator="${install.api.bin}/emulator.exe" />
</target>
<target name="run_Default_Color_Phone">
<wtkrun jad="${bin.dir}/${midlet.name}_${midlet.version}.jad" device="DefaultColorPhone" emulator="${install.api.bin}/emulator.exe" />
</target>
<target name="Default_Color_Phone">
<property name="buildtype" value="DefaultColorPhone"/>
</target>
<target name="SonyEricsson_K750_Emu">
<property name="buildtype" value="SonyEricsson_K750_Emu"/>
</target>
<!-- Build targets for non-critical deployment AND development/debugging (i.e. no obfustication)-->
<target name="B01-Default Build" description="B01" depends="Default Build,setup,build_no_obfustication"></target>
<target name="B02-Default_Color_Phone" description="B02" depends="Default_Color_Phone,setup,build_no_obfustication"></target>
<target name="B03-SonyEricsson_K750_Emu" description="B03" depends="SonyEricsson_K750_Emu,setup,build_no_obfustication"></target>
<!-- Run with normal setings -->
<target name="R01-Default Build and Run" description="R01" depends="B01-Default Build,run"></target>
<target name="R02-Default_Color_Phone" description="R02" depends="B02-Default_Color_Phone,run"></target>
<target name="R03-SonyEricsson_K750_Emu" description="R03" depends="B03-SonyEricsson_K750_Emu,run"></target>
<!-- Build target for Deployment! With obfustication for minimum jar size,and maximum performance (Hard to debug...)-->
<target name="D01-Default Deployment" description="D01" depends="Default Build,setup,build_with_obfustication"></target>
<target name="D02-Default_Color_Phone" description="D02" depends="Default_Color_Phone,setup,build_with_obfustication"></target>
<target name="D03-SonyEricsson_K750_Emu" description="D03" depends="SonyEricsson_K750_Emu,setup,build_with_obfustication"></target>
<target name="Run only" description="RO1" depends="Default_Color_Phone,run_only_setup,run" />
</project>
Jump to Line
Something went wrong with that request. Please try again.