forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.build
64 lines (58 loc) · 4.09 KB
/
default.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0"?>
<project name="Installer Build Script" default="build" basedir=".">
<description>Default Addins Automated Build script</description>
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}" />
<property name="mdtooldir" value="/Applications/MonoDevelop.app/Contents/MacOS"/>
<property name="buildNumber" value="0.0.0.0"/>
<if test="${environment::variable-exists('BUILD_NUMBER')}">
<property name="buildNumber" value="${environment::get-variable('BUILD_NUMBER')}"/>
</if>
<target name="checkos" description="check the operating system">
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}"/>
<if test="${os == 'Unix'}">
<if test="${directory::exists('/Applications') and directory::exists('/Library')}">
<property name="os" value="MacOS"/>
<if test="${not directory::exists(mdtooldir)}">
<property name="mdtooldir" value="${path::get-full-path('/Applications/Xamarin Studio.app/Contents/MacOS')}"/>
</if>
</if>
</if>
<if test="${os == 'Win32NT'}">
<property name="mdtooldir" value="${path::get-full-path('c:\Program Files (x86)\Xamarin Studio\bin')}"/>
</if>
<echo message="mdtool : ${mdtooldir}"/>
<echo message="Detected : ${os}"/>
</target>
<target name="build" description="Build All" depends="checkos">
<if test="${os == 'MacOS'}">
<call target="buildaddin"/>
<exec program="mdtool" basedir="${mdtooldir}" workingdir="." commandline="setup rep-build ."/>
</if>
</target>
<target name="buildaddin" description="Build Xamarin Studio Addin" depends="checkos">
<mkdir dir="MonoDevelop.MonoGame/packages/"/>
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.Android/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.Android.3.4.0.459.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.iOS/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.iOS.3.4.0.459.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.Linux/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.Linux.3.4.0.459.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.MacOS/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.MacOS.3.4.0.459.nupkg" />
<!--
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.MonoMac/3.2.99-Beta" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.MonoMac.3.3.0.nupkg" />
-->
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.WindowsDX/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.WindowsDX.3.4.0.459.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.WindowsGL/3.4.0.459" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.WindowsGL.3.4.0.459.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.Portable/3.2.99.1-Beta" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.Portable.3.2.99.1-Beta.nupkg" />
<get src="https://www.nuget.org/api/v2/package/MonoGame.Framework.Content.Pipeline.Portable/3.2.99.1-Beta" dest="MonoDevelop.MonoGame/packages/MonoGame.Framework.Content.Pipeline.Portable.3.2.99.1-Beta.nupkg" />
<if test="${os == 'MacOS'}">
<delete failonerror="false">
<fileset>
<include name="MonoDevelop.MonoGame_*.mpack" />
</fileset>
</delete>
<!-- Fix up xml to ${buildNumber} -->
<xmlpoke file="MonoDevelop.MonoGame/MonoDevelop.MonoGame.addin.xml" xpath="/Addin/@version" value="${buildNumber}" />
<exec program="mdtool" basedir="${mdtooldir}" workingdir="." commandline="build -t:Clean -c:Release MonoDevelop.MonoGame.Addin.sln" />
<exec program="mdtool" basedir="${mdtooldir}" workingdir="." commandline="build -t:Build -c:Release MonoDevelop.MonoGame.Addin.sln" />
<exec program="mdtool" basedir="${mdtooldir}" workingdir="." commandline="setup pack bin/Release/MonoDevelop.MonoGame.dll"/>
</if>
</target>
</project>