Skip to content

Commit 1dfb3ea

Browse files
committed
Added new ant task to build .deb binary distribution package
1 parent d3c66f6 commit 1dfb3ea

3 files changed

Lines changed: 80 additions & 2 deletions

File tree

build/build.xml

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@
696696
<exec executable="./processing" dir="linux/work" spawn="true"/>
697697
</target>
698698

699-
<target name="linux-dist" depends="linux-build"
699+
<target name="linux-dist-tar" depends="linux-build"
700700
description="Build .tar.gz of linux version">
701701

702702
<!--
@@ -730,7 +730,67 @@
730730
</echo>
731731
</target>
732732

733-
733+
<target name="linux-dist" depends="linux-dist-tar"
734+
description="Build .deb of linux version">
735+
736+
<!-- setup the file structure -->
737+
<mkdir dir="linux/debian/opt" />
738+
<mkdir dir="linux/debian/usr/share/applications/" />
739+
<mkdir dir="linux/debian/usr/share/mime/packages/" />
740+
<mkdir dir="linux/debian/DEBIAN" />
741+
<!-- rename the work folder temporarily -->
742+
<move file="linux/work" tofile="linux/debian/opt/processing" />
743+
744+
<!-- place .desktop and .sharedmimeinfo file -->
745+
<copy file="linux/processing.desktop" tofile="linux/debian/usr/share/applications/processing.desktop" />
746+
<copy file="linux/processing.sharedmimeinfo" tofile="linux/debian/usr/share/mime/packages/processing.xml" />
747+
748+
<!-- Set properties for DEBIAN/control file -->
749+
<property name="linux.dist" value="linux/processing-${version}-linux${sun.arch.data.model}.deb" />
750+
751+
<condition property="deb.arch" value="i386">
752+
<equals arg1="${sun.arch.data.model}" arg2="32" />
753+
</condition>
754+
<condition property="deb.arch" value="amd64">
755+
<equals arg1="${sun.arch.data.model}" arg2="64" />
756+
</condition>
757+
758+
<!-- Create DEBIAN/control file. The spacing matters.-->
759+
<echo file="linux/debian/DEBIAN/control" >Package: processing
760+
Version: ${version}
761+
Section: base
762+
Priority: optional
763+
Architecture: ${deb.arch}
764+
Maintainer: Kyle Feuz &lt;kylefeuz@weber.edu&gt;
765+
Description: Processing programming language and IDE
766+
Processing is a programming language, development environment, and online community. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.
767+
</echo>
768+
769+
<!-- Create .deb file -->
770+
<exec executable="fakeroot" dir="linux" failonerror="true">
771+
<arg value="dpkg-deb" />
772+
<arg value="--build" />
773+
<arg value="debian" />
774+
<arg value="../${linux.dist}" />
775+
</exec>
776+
777+
<!-- put... the candle... back -->
778+
<!-- (rename the debian processing version to work) -->
779+
<move file="linux/debian/opt/processing" tofile="linux/work" />
780+
781+
<!-- cleanup -->
782+
<delete dir="linux/debian" />
783+
784+
<echo>
785+
=======================================================
786+
Processing for Linux was built. Grab the deb from
787+
788+
${linux.dist}
789+
=======================================================
790+
</echo>
791+
</target>
792+
793+
734794
<!-- - - - - - - - -->
735795
<!-- Windows -->
736796
<!-- - - - - - - - -->

build/linux/processing.desktop

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Desktop Entry]
2+
Version=2.1
3+
Name=Processing
4+
Comment=graphics and animation language
5+
Exec=processing %F
6+
Icon=/opt/processing/lib/icons/pde-256.png
7+
Terminal=false
8+
Type=Application
9+
Categories=AudioVideo;Video;Graphics;Developer;
10+
StartupWMClass=Processing
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
3+
<mime-type type="text/x-processing">
4+
<comment>Processing source code</comment>
5+
<sub-class-of type="text/x-csrc"/>
6+
<glob pattern="*.pde"/>
7+
</mime-type>
8+
</mime-info>

0 commit comments

Comments
 (0)