Skip to content

Commit

Permalink
Set classpath for creating atlased images in packaging files.
Browse files Browse the repository at this point in the history
  • Loading branch information
neoancient authored and Dylan-M committed Feb 13, 2017
1 parent 4e517e7 commit 5aa2f2e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
23 changes: 22 additions & 1 deletion megamek/packaging.xml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,27 @@

<target name="nix-release" depends="pkgdir-build, nix-package, pkgdir-clean" description="Build the project from local source and package it as Unix" />

<target name="src-release" depends="pkgdir-build, source-package, pkgdir-clean" description="Build the project from local source and package it as source-only" />
<target name="src-release" depends="pkgdir-build, prepackagePrep, source-package, pkgdir-clean" description="Build the project from local source and package it as source-only" />

<!-- Tasks to perform prior to packaing -->
<target name="prepackagePrep" depends="createImageAtlases, deleteAtlasedImages, unitfiles-zip, rat-zip"/>

<!-- Run CreateImageAtlases -->
<target name="createImageAtlases" description="Run the image atlas creator, which will package images in the units and hexes directories into atlases.">
<java dir="${pkgdir}" classname="megamek.utils.CreateImageAtlases" fork="true">
<classpath>
<pathelement path="${pkgdir}/${builddir}" />
<fileset dir="${pkgdir}/${libdir}" includes="*.jar" />
<pathelement path="${pkgdir}/${propdir}" />
</classpath>
</java>
</target>

<!-- Delete images that were packaged into an atlas -->
<target name="deleteAtlasedImages" description="Deletes images that are known to be packaged into an atlas.">
<delete>
<fileset dir="${pkgdir}" includesfile="${atlasedImages}"/>
</delete>
</target>

</project>
23 changes: 22 additions & 1 deletion megamek/packaging_local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,27 @@

<target name="nix-release" depends="localdev-build, nix-package, localdev-clean" description="Build the project from local source and package it as Unix" />

<target name="src-release" depends="localdev-build, source-package, localdev-clean" description="Build the project from local source and package it as source-only" />
<target name="src-release" depends="localdev-build, prepackagePrep, source-package, localdev-clean" description="Build the project from local source and package it as source-only" />

<!-- Tasks to perform prior to packaing -->
<target name="prepackagePrep" depends="createImageAtlases, deleteAtlasedImages, unitfiles-zip, rat-zip"/>

<!-- Run CreateImageAtlases -->
<target name="createImageAtlases" description="Run the image atlas creator, which will package images in the units and hexes directories into atlases.">
<java dir="${localdir}" classname="megamek.utils.CreateImageAtlases" fork="true">
<classpath>
<pathelement path="${localdir}/${builddir}" />
<fileset dir="${localdir}/${libdir}" includes="*.jar" />
<pathelement path="${localdir}/${propdir}" />
</classpath>
</java>
</target>

<!-- Delete images that were packaged into an atlas -->
<target name="deleteAtlasedImages" description="Deletes images that are known to be packaged into an atlas.">
<delete>
<fileset dir="${localdir}" includesfile="${atlasedImages}"/>
</delete>
</target>

</project>

0 comments on commit 5aa2f2e

Please sign in to comment.