Skip to content

Commit

Permalink
When running a build in the default 'single archive' mode, automatica…
Browse files Browse the repository at this point in the history
…lly unpack the final package so it is ready to run
  • Loading branch information
Bruce Leidl committed Apr 14, 2009
1 parent f4e2fdc commit a7633a1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ build/stage
build/buildpack
build/archives/*.bz2
platform/*/*/bin/
netifera
2 changes: 2 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
<import file="build/ant/setup-targets.xml" />
<import file="build/ant/buildpack-targets.xml" />
<import file="build/ant/pde-build-targets.xml" />
<import file="build/ant/unpack-targets.xml" />

<target name="main">
<antcall target="buildpack-setup" />
<antcall target="setup" />
<antcall target="pde-build" />
<antcall target="unpack-archive" />
</target>

<target name="all">
Expand Down
49 changes: 49 additions & 0 deletions build/ant/unpack-targets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<project name="netifera.unpack">

<property name="build.output" location="build/stage/I.NetiferaBuild" />

<!-- If running in default 'single build' mode, unpack the final archive so it is ready to run -->

<target name="unpack-archive" depends="choose-archive,unpack-setup,unpack-choice" unless="build.all" />

<target name="unpack-choice" depends="unpack-osx,unpack-linux,unpack-win32" unless="build.all" />

<!-- Delete a previously unpacked netifera package if it exists -->

<target name="unpack-setup">
<delete dir="netifera" />
</target>

<!-- One target for each operating system -->

<target name="unpack-osx" if="unpack.osx">
<unzip src="${build.output}/NetiferaBuild-macosx.carbon.x86.zip" dest="${basedir}" />
<chmod file="netifera/netifera.app/Contents/MacOS/netifera" perm="755" />
</target>

<target name="unpack-linux" if="unpack.linux">
<unzip src="${build.output}/NetiferaBuild-linux.gtk.x86.zip" dest="${basedir}" />
<chmod file="netifera/netifera" perm="755" />
</target>

<target name="unpack-win32" if="unpack.win32">
<unzip src="${build.output}/NetiferaBuild-win32.win32.x86.zip" dest="${basedir}" />
</target>

<!-- Set a property depending on which OS the build is being run on -->

<target name="choose-archive" unless="build.all">
<condition property="unpack.linux">
<os name="Linux" />
</condition>

<condition property="unpack.osx">
<os name="Mac OS X" />
</condition>

<condition property="unpack.win32">
<os family="windows" />
</condition>
</target>
</project>

0 comments on commit a7633a1

Please sign in to comment.