Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stoecker committed Sep 3, 2008
1 parent a70d34e commit 1e09cbc
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 98 deletions.
2 changes: 1 addition & 1 deletion agpifoj/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<target name="compile" depends="init">
<echo message="creating ${plugin.jar}"/>
<javac srcdir="src" classpath="../../core/dist/josm-custom.jar" destdir="build">
<javac srcdir="src" classpath="${josm}" destdir="build">
<compilerarg value="-Xlint:deprecation"/>
</javac>
</target>
Expand Down
122 changes: 73 additions & 49 deletions globalsat/build.xml
Original file line number Diff line number Diff line change
@@ -1,52 +1,76 @@
<project name="globalsat" default="dist" basedir=".">

<!-- point to your JOSM directory -->
<property name="josm" location="../../core/dist/josm-custom.jar" />
<property name="RXTX" location="./libs/RXTXcomm.jar" />

<path id="classpath">
<fileset id="RXTX" file="${RXTX}"/>
<fileset file="${josm}"/>
</path>

<target name="init">
<mkdir dir="build"></mkdir>
<mkdir dir="dist"></mkdir>
</target>

<target name="compile" depends="init">
<javac srcdir="src" classpathref="classpath" debug="true" destdir="build" target="1.5">
<!-- <javac srcdir="src" classpathref="classpath" debug="true" destdir="build" target="1.5"> -->
<!-- <javac srcdir="src" classpath="${RXTX}" debug="true" destdir="build" target="1.5"> -->

<include name="**/*.java" />
</javac>
</target>

<target name="dist" depends="compile">
<unjar dest="build">
<fileset refid="RXTX" />
</unjar>
<copy todir="build/images" >
<fileset dir="images" />
</copy>
<jar destfile="dist/globalsat.jar" basedir="build">
<manifest>
<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin" />
<attribute name="Plugin-Description" value="Provide a dialog to read stored tracks from a Globalsat DG100 datalogger into a GPX-layer. Depends on installed rxtx library." />
<attribute name="Plugin-Author" value="[email protected]" />
<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
</manifest>
</jar>
</target>

<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>

<target name="install" depends="dist">
<copy file="dist/globalsat.jar" todir="${user.home}/.josm/plugins"/>
</target>
<!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
<property environment="env"/>
<condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
<and>
<os family="windows"/>
</and>
</condition>

<!-- compilation properties -->
<property name="josm.build.dir" value="../../core"/>
<property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
<property name="josm" location="../../core/dist/josm-custom.jar" />
<property name="RXTX" location="./libs/RXTXcomm.jar" />
<property name="plugin.build.dir" value="build"/>
<property name="plugin.dist.dir" value="../../dist"/>
<property name="plugin.name" value="${ant.project.name}"/>
<property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>

<property name="ant.build.javac.target" value="1.5"/>

<path id="classpath">
<fileset id="RXTX" file="${RXTX}"/>
<fileset file="${josm}"/>
</path>

<target name="dist" depends="compile">
<unjar dest="build">
<fileset refid="RXTX" />
</unjar>
<!-- images -->
<copy todir="build/images">
<fileset dir="images" />
</copy>

<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
<env key="LANG" value="C"/>
<arg value="info"/>
<arg value="--xml"/>
<arg value="."/>
</exec>
<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
<delete file="REVISION"/>

<jar destfile="${plugin.jar}" basedir="build">
<manifest>
<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.globalsat.GlobalsatPlugin" />
<attribute name="Plugin-Description" value="Provide a dialog to read stored tracks from a Globalsat DG100 datalogger into a GPX-layer. Depends on installed rxtx library." />
<attribute name="Plugin-Author" value="[email protected]" />
<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
</manifest>
</jar>
</target>

<target name="compile" depends="init">
<echo message="creating ${plugin.jar}"/>
<javac srcdir="src" classpathref="classpath" destdir="build">
<compilerarg value="-Xlint:deprecation"/>
</javac>
</target>

<target name="init">
<mkdir dir="${plugin.build.dir}" />
</target>

<target name="clean">
<delete dir="${plugin.build.dir}" />
<delete file="${plugin.jar}" />
</target>

<target name="install" depends="dist">
<copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
</target>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.gui.IconToggleButton;
import org.openstreetmap.josm.gui.MapFrame;
import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
import org.openstreetmap.josm.gui.layer.Layer;
import org.openstreetmap.josm.gui.layer.GpxLayer;
import org.openstreetmap.josm.plugins.Plugin;
Expand Down
103 changes: 64 additions & 39 deletions measurement/build.xml
Original file line number Diff line number Diff line change
@@ -1,42 +1,67 @@
<project name="measurement" default="dist" basedir=".">

<!-- point to your JOSM directory -->
<property name="josm" location="../../core/dist/josm-custom.jar" />


<target name="init">
<mkdir dir="build"></mkdir>
<mkdir dir="dist"></mkdir>
</target>

<target name="compile" depends="init">
<javac srcdir="src" classpath="${josm}" debug="true" destdir="build" target="1.5">
<include name="**/*.java" />
</javac>
</target>

<target name="dist" depends="compile">
<copy todir="build/images" >
<fileset dir="images" />
</copy>
<jar destfile="dist/measurement.jar" basedir="build">
<manifest>
<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.measurement.MeasurementPlugin" />
<attribute name="Plugin-Description" value="Provide a measurement dialog and a layer to measure length and angle of segments (there are no segments anymore, I know. Any idea how the angle should be measures now?) and create measurement paths (which also can be imported from a gps layer)" />
<attribute name="Plugin-Author" value="[email protected]" />
<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
</manifest>
</jar>
</target>

<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>

<target name="install" depends="dist">
<copy file="dist/measurement.jar" todir="${user.home}/.josm/plugins"/>
</target>

<!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
<property environment="env"/>
<condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
<and>
<os family="windows"/>
</and>
</condition>

<!-- compilation properties -->
<property name="josm.build.dir" value="../../core"/>
<property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
<property name="josm" location="../../core/dist/josm-custom.jar" />
<property name="plugin.build.dir" value="build"/>
<property name="plugin.dist.dir" value="../../dist"/>
<property name="plugin.name" value="${ant.project.name}"/>
<property name="plugin.jar" value="../../dist/${plugin.name}.jar"/>

<property name="ant.build.javac.target" value="1.5"/>

<target name="dist" depends="compile">
<!-- images -->
<copy todir="build/images">
<fileset dir="images" />
</copy>

<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
<env key="LANG" value="C"/>
<arg value="info"/>
<arg value="--xml"/>
<arg value="."/>
</exec>
<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
<delete file="REVISION"/>

<jar destfile="${plugin.jar}" basedir="build">
<manifest>
<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.measurement.MeasurementPlugin" />
<attribute name="Plugin-Description" value="Provide a measurement dialog and a layer to measure length and angle of segments and create measurement paths (which also can be imported from a gps layer)" />
<attribute name="Plugin-Author" value="[email protected]" />
<attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
<attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
</manifest>
</jar>
</target>

<target name="compile" depends="init">
<echo message="creating ${plugin.jar}"/>
<javac srcdir="src" classpath="${josm}" destdir="build">
<compilerarg value="-Xlint:deprecation"/>
</javac>
</target>

<target name="init">
<mkdir dir="${plugin.build.dir}" />
</target>

<target name="clean">
<delete dir="${plugin.build.dir}" />
<delete file="${plugin.jar}" />
</target>

<target name="install" depends="dist">
<copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
</target>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,26 @@ public MeasurementDialog()

JPanel valuePanel = new JPanel(new GridLayout(0,2));

valuePanel.add(new JLabel("Path Length"));
valuePanel.add(new JLabel(tr("Path Length")));

pathLengthLabel = new JLabel("0 m");
valuePanel.add(pathLengthLabel);

valuePanel.add(new JLabel("Selection Length"));
valuePanel.add(new JLabel(tr("Selection Length")));

selectLengthLabel = new JLabel("0 m");
valuePanel.add(selectLengthLabel);

valuePanel.add(new JLabel("Selection Area"));
valuePanel.add(new JLabel(tr("Selection Area")));

selectAreaLabel = new JLabel("0 m²");
selectAreaLabel = new JLabel("0 m\uc2b2");
valuePanel.add(selectAreaLabel);

JLabel angle = new JLabel("Angle");
JLabel angle = new JLabel(tr("Angle"));
angle.setToolTipText(tr("Angle between two selected Nodes"));
valuePanel.add(angle);

segAngleLabel = new JLabel("- °");
segAngleLabel = new JLabel("- \uc2b0");
valuePanel.add(segAngleLabel);

add(valuePanel, BorderLayout.CENTER);
Expand Down Expand Up @@ -143,8 +143,8 @@ public void selectionChanged(Collection<? extends OsmPrimitive> arg0) {
}
dlg.selectLengthLabel.setText(new DecimalFormat("#0.00").format(length) + " m");

dlg.segAngleLabel.setText(new DecimalFormat("#0.0").format(segAngle) + " °");
dlg.selectAreaLabel.setText(new DecimalFormat("#0.00").format(area) + " m²");
dlg.segAngleLabel.setText(new DecimalFormat("#0.0").format(segAngle) + " \uc2b0");
dlg.selectAreaLabel.setText(new DecimalFormat("#0.00").format(area) + " m\uc2b2");

}

Expand Down

0 comments on commit 1e09cbc

Please sign in to comment.