Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 364 lines (314 sloc) 13.4 KB
<?xml version="1.0"?>
<project name="boo-md-addins" default="build">
<property name="build.dir" value="build" />
<!-- projects assumed to be checked out at the same level as this one -->
<property name="boo.dir" value="../boo" />
<property name="boo.extensions.dir" value="../boo-extensions" />
<property name="unityscript.dir" value="../unityscript" />
<property name="build.dependencies" value="true" />
<property name="md.bin.dir" value="/usr/lib/monodevelop/bin" />
<property name="md.addins.dir" value="${environment::get-folder-path('Personal')}/.config/MonoDevelop/addins/Boo" unless="${property::exists('md.addins.dir')}" />
<property name="dir.md.addins" value="${environment::get-folder-path('Personal')}/.config/MonoDevelop/addins/UnityScript" />
<property name="dir.gtk" value="${environment::get-folder-path('ProgramFiles')}/GtkSharp/2.12/lib/gtk-sharp-2.0" if="${platform::is-win32()}" />
<property name="dir.gtk" value="" unless="${platform::is-win32()}" />
<include buildfile="nunit.inc" />
<include buildfile="build.properties" if="${file::exists('build.properties')}" />
<property name="boo.build.dir" value="${boo.dir}/build" />
<property name="boo.extensions.build.dir" value="${boo.extensions.dir}/build" />
<property name="unityscript.build.dir" value="${unityscript.dir}/bin" />
<target name="build" depends="Boo.MonoDevelop, UnityScript.MonoDevelop" />
<target name="test" depends="Boo.Ide.Tests, UnityScript.Ide.Tests">
<nunit2>
<formatter type="Plain" />
<test>
<assemblies basedir="${build.dir}">
<include name="*.Ide.Tests.dll" />
</assemblies>
</test>
</nunit2>
</target>
<target name="test-md" depends="build, Boo.MonoDevelop.Tests">
<property name="tmp.test.dir" value="/tmp/boo-md-addins/config" />
<delete dir="${tmp.test.dir}" />
<mkdir dir="${tmp.test.dir}" />
<copy todir="${tmp.test.dir}/addins">
<fileset basedir="${md.bin.dir}/../AddIns">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${build.dir}">
<fileset basedir="${md.bin.dir}">
<include name="MonoDevelop.Core.dll" />
<include name="MonoDevelop.Ide.dll" />
<include name="mdhost.exe" />
</fileset>
</copy>
<exec program="nunit-console" workingdir="${build.dir}">
<environment>
<variable name="MONO_PATH" dir="${md.bin.dir}" />
<variable name="MONO_ADDINS_REGISTRY" dir="${tmp.test.dir}" />
<variable name="XDG_CONFIG_HOME" dir="${tmp.test.dir}" />
</environment>
<arg value="-nologo" />
<arg value="-noshadow" />
<arg value="-nothread" />
<arg file="${build.dir}/Boo.MonoDevelop.Tests.dll" />
</exec>
</target>
<target name="Boo.Ide" description="IDE agnostic tools" depends="init">
<booc failonerror="true" debug="true" target="library" output="${build.dir}/Boo.Ide.dll">
<sources basedir="src/Boo.Ide">
<include name="*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${boo.build.dir}/Boo.Lang.PatternMatching.dll" />
<include name="${boo.build.dir}/Boo.Lang.Compiler.dll" />
<include name="${boo.build.dir}/Boo.Lang.Parser.dll" />
</references>
</booc>
</target>
<target name="Boo.Ide.Tests" depends="Boo.Ide">
<booc failonerror="true" debug="true" target="library" output="${build.dir}/Boo.Ide.Tests.dll">
<sources basedir="src/Boo.Ide.Tests">
<include name="*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${boo.build.dir}/Boo.Lang.PatternMatching.dll" />
<include name="${boo.build.dir}/Boo.Lang.Compiler.dll" />
<include name="${boo.build.dir}/Boo.Lang.Parser.dll" />
<include name="${nunit.framework.dll}" />
</references>
</booc>
</target>
<target name="UnityScript.Ide" description="IDE agnostic UnityScript tools" depends="Boo.Ide">
<booc failonerror="true" debug="true" target="library" output="${build.dir}/UnityScript.Ide.dll">
<sources basedir="src/UnityScript.Ide">
<include name="*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${unityscript.build.dir}/UnityScript.dll" />
<include name="${boo.build.dir}/Boo.Lang.PatternMatching.dll" />
<include name="${boo.build.dir}/Boo.Lang.Compiler.dll" />
<include name="${boo.build.dir}/Boo.Lang.Parser.dll" />
</references>
</booc>
</target>
<target name="UnityScript.Ide.Tests" depends="UnityScript.Ide, Boo.Ide.Tests">
<booc failonerror="true" debug="true" target="library" output="${build.dir}/UnityScript.Ide.Tests.dll">
<sources basedir="src/UnityScript.Ide.Tests">
<include name="*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${build.dir}/UnityScript.Ide.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${build.dir}/Boo.Ide.Tests.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${boo.build.dir}/Boo.Lang.PatternMatching.dll" />
<include name="${boo.build.dir}/Boo.Lang.Compiler.dll" />
<include name="${boo.build.dir}/Boo.Lang.Parser.dll" />
<include name="${nunit.framework.dll}" />
</references>
</booc>
</target>
<target name="Boo.MonoDevelop.Util" description="Utility code to share with unityscript" depends="Boo.Ide, UnityScript.Ide">
<booc failonerror="true" target="library" output="${build.dir}/Boo.MonoDevelop.Util.dll">
<sources basedir="src/Boo.MonoDevelop.Util">
<include name="*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${boo.build.dir}/Boo.Lang.Parser.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${build.dir}/UnityScript.Ide.dll" />
<include name="${md.bin.dir}/MonoDevelop.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Ide.dll" />
<include name="${md.bin.dir}/Mono.TextEditor.dll" />
<include name="${md.bin.dir}/ICSharpCode.NRefactory.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.SourceEditor2.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
<include name="${dir.gtk}/gtk-sharp.dll" if="${platform::is-win32()}" />
<include name="${dir.gtk}/gdk-sharp.dll" if="${platform::is-win32()}" />
</references>
<pkg-references>
<package name="gtk-sharp-2.0" unless="${platform::is-win32()}" />
</pkg-references>
</booc>
</target>
<target name="Boo.MonoDevelop.Tests" depends="Boo.MonoDevelop">
<booc failonerror="true" target="library" output="${build.dir}/Boo.MonoDevelop.Tests.dll">
<sources basedir="src/Boo.MonoDevelop.Tests">
<include name="*.boo" />
</sources>
<references>
<include name="${build.dir}/Boo.MonoDevelop.dll" />
<include name="${nunit.framework.dll}" />
<include name="System.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Ide.dll" />
<include name="${md.bin.dir}/Mono.TextEditor.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${boo.build.dir}/Boo.Lang.PatternMatching.dll" />
</references>
</booc>
</target>
<target name="Boo.MonoDevelop" description="MonoDevelop Boo addin" depends="Boo.MonoDevelop.Util">
<property name="md-gdk-sharp.dll" value="${md.bin.dir}/gdk-sharp.dll" />
<property name="md-gtk-sharp.dll" value="${md.bin.dir}/gtk-sharp.dll" />
<property name="gdk-sharp.dll" value="gdk-sharp.dll" />
<property name="gdk-sharp.dll" value="${md-gdk-sharp.dll}" if="${file::exists(md-gdk-sharp.dll)}" />
<property name="gtk-sharp.dll" value="gtk-sharp.dll" />
<property name="gtk-sharp.dll" value="${md-gtk-sharp.dll}" if="${file::exists(md-gtk-sharp.dll)}" />
<echo>${md.bin.dir}</echo>
<booc
failonerror="true"
output="${build.dir}/Boo.MonoDevelop.dll"
target="library"
debug="true"
rebuild="true">
<sources basedir="src/Boo.MonoDevelop">
<include name="**/*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Ide.dll" />
<include name="${md.bin.dir}/Mono.TextEditor.dll" />
<include name="${md.bin.dir}/NRefactory.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.Refactoring/MonoDevelop.Refactoring.dll" />
<include name="${boo.extensions.build.dir}/Boo.Adt.dll" />
<include name="${boo.extensions.build.dir}/Boo.Lang.Parser.dll" />
<include name="${boo.extensions.build.dir}/Boo.Lang.CodeDom.dll" />
<include name="${build.dir}/Boo.MonoDevelop.Util.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${gdk-sharp.dll}" />
<include name="${gtk-sharp.dll}" />
</references>
<embed basedir="src/Boo.MonoDevelop">
<include name="Boo.MonoDevelop.addin.xml" />
<include name="Templates/*.xft.xml" />
<include name="Templates/*.xpt.xml" />
<include name="Icons/*.png" />
<include name="Icons/*.Base" />
<include name="Highlighting/BooSyntaxMode.xml" />
</embed>
</booc>
<copy todir="${build.dir}/boo">
<fileset basedir="${boo.build.dir}">
<include name="Boo.Lang*.dll" />
<include name="Boo.Lang*.mdb" />
<include name="booc.*" />
</fileset>
</copy>
<copy todir="${md.addins.dir}" overwrite="true">
<fileset basedir="${build.dir}">
<include name="boo/**/*" />
<include name="Boo.MonoDevelop.dll*" />
<include name="Boo.MonoDevelop.Util.dll*" />
<include name="Boo.Ide.dll*" />
<!--
FIXME: SHOULD NOT BUNDLE UNITYSCRIPT LIBRARIES WITH THE BOO ADDIN
Currently this is necessary for the case where a MixedProjectIndex
needs to be created from a boo script
-->
<include name="UnityScript.Ide.dll*" />
<include name="UnityScript.dll*" />
<include name="UnityScript.Lang.dll*" />
</fileset>
</copy>
</target>
<target name="UnityScript.MonoDevelop" description="MonoDevelop UnityScript addin" depends="Boo.MonoDevelop.Util, UnityScript.Ide">
<booc
output="${build.dir}/UnityScript.MonoDevelop.dll"
target="library"
debug="true"
rebuild="true">
<sources basedir="src/UnityScript.MonoDevelop">
<include name="**/*.boo" />
</sources>
<references>
<include name="System.Core.dll" />
<include name="${unityscript.build.dir}/UnityScript.dll" />
<include name="${md.bin.dir}/Mono.TextEditor.dll" />
<include name="${md.bin.dir}/MonoDevelop.Core.dll" />
<include name="${md.bin.dir}/MonoDevelop.Ide.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.SourceEditor2.dll" />
<include name="${md.bin.dir}/Mono.Debugging.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.dll" />
<include name="${md.bin.dir}/../AddIns/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport.dll" />
<include name="${build.dir}/Boo.MonoDevelop.Util.dll" />
<include name="${build.dir}/Boo.Ide.dll" />
<include name="${build.dir}/UnityScript.Ide.dll" />
</references>
<embed basedir="src/UnityScript.MonoDevelop">
<include name="UnityScript.MonoDevelop.addin.xml" />
<include name="UnityScriptSyntaxMode.xml" />
<include name="ShaderLabSyntaxMode.xml" />
<include name="Templates/*.xft.xml" />
<include name="Templates/*.xpt.xml" />
<include name="Icons/*.png" />
</embed>
</booc>
<copy todir="${dir.md.addins}" overwrite="true">
<fileset basedir="${build.dir}">
<include name="UnityScript.MonoDevelop.*" />
<include name="Boo.MonoDevelop.Util.dll*" />
</fileset>
</copy>
<mkdir dir="${build.dir}/bin" />
<copy todir="${build.dir}/bin">
<fileset basedir="${unityscript.build.dir}">
<include name="us.exe*" />
<include name="UnityScript.dll*" />
<include name="UnityScript.Lang.dll*" />
<include name="Boo.Lang*.dll*" />
</fileset>
</copy>
<copy todir="${dir.md.addins}">
<fileset basedir="${build.dir}">
<include name="Boo.MonoDevelop.Util.dll*" />
<include name="Boo.Ide.dll*" />
<include name="UnityScript.Ide.dll*" />
<include name="bin/**/*" />
</fileset>
</copy>
</target>
<target name="build-dependencies" if="${build.dependencies}">
<nant inheritall="false">
<buildfiles>
<include name="${boo.dir}/default.build" />
<include name="${boo.extensions.dir}/default.build" />
<include name="${unityscript.dir}/default.build" />
</buildfiles>
</nant>
</target>
<target name="init" depends="build-dependencies">
<mkdir dir="${build.dir}" />
<copy file="${nunit.framework.dll}" todir="${build.dir}" />
<loadtasks assembly="${boo.build.dir}/Boo.NAnt.Tasks.dll" />
<copy todir="${build.dir}">
<fileset basedir="${boo.build.dir}">
<include name="Boo.Lang*.dll" />
</fileset>
</copy>
<copy todir="${build.dir}">
<fileset basedir="${unityscript.build.dir}">
<include name="UnityScript.dll*" />
<include name="UnityScript.Lang.dll*" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="rebuild" depends="clean, build" />
</project>