192 строки
9.4 KiB
XML
192 строки
9.4 KiB
XML
<?xml version="1.0"?>
|
|
<project name="MonoGame Build Script" default="build" basedir=".">
|
|
<description>Default MonoGame 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="psmtooldir" value="C:\Program Files (x86)\SCE\PSM\tools\PsmStudio\bin" />
|
|
|
|
<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>
|
|
<echo message="Detected : ${os}"/>
|
|
</target>
|
|
|
|
<target name="clean">
|
|
<delete dir="${project::get-base-directory()}\MonoGame.Framework\obj" verbose="true">
|
|
</delete>
|
|
</target>
|
|
|
|
<target name="build-windows" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildwindows"/>
|
|
|
|
</target>
|
|
|
|
<target name="build-windows8" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildwindows8" />
|
|
<call target="buildwindowsphone" />
|
|
|
|
</target>
|
|
|
|
<target name="build-android" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildandroid" />
|
|
|
|
</target>
|
|
|
|
<target name="build-mac" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildmac" />
|
|
<call target="buildios" />
|
|
|
|
</target>
|
|
|
|
<target name="build-linux" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildlinux"/>
|
|
|
|
</target>
|
|
|
|
<target name="build-psm" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildpsm" />
|
|
|
|
</target>
|
|
|
|
<target name="build-tools" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildtools"/>
|
|
<call target="buildcontentprocessor"/>
|
|
|
|
</target>
|
|
|
|
<target name="build" description="Build MonoGame Release" depends="checkos">
|
|
|
|
<call target="buildwindows"/>
|
|
<call target="buildlinux"/>
|
|
<call target="buildandroid" />
|
|
<call target="buildwindows8" />
|
|
<call target="buildwindowsphone" />
|
|
<!--
|
|
<call target="buildmac" />
|
|
<call target="buildios" />
|
|
<call target="buildpsm" />
|
|
-->
|
|
<call target="buildtools"/>
|
|
<call target="buildcontentprocessor"/>
|
|
|
|
</target>
|
|
|
|
<target name="buildpsm" description="Build Play Station Mobile" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<if test="${file::exists('C:\Program Files (x86)\SCE\PSM\tools\PsmStudio\bin\mdtool.exe') or file::exists('C:\Program Files\SCE\PSM\tools\PsmStudio\bin\mdtool.exe')}">
|
|
<exec program="mdtool.exe" basedir="${psmtooldir}" commandline="build -t:Clean -c:Release MonoGame.Framework.PSMobile.sln" />
|
|
<exec program="mdtool.exe" basedir="${psmtooldir}" commandline="build -t:Build -c:Release MonoGame.Framework.PSMobile.sln" />
|
|
</if>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildwindows" description="Build Windows" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Windows.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Windows.sln /t:Build /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.WindowsGL.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.WindowsGL.sln /t:Build /p:Configuration=Release" />
|
|
</if>
|
|
<if test="${os == 'Unix'}">
|
|
<exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Windows.sln" />
|
|
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.Windows.sln" />
|
|
<exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.WindowsGL.sln" />
|
|
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.WindowsGL.sln" />
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildlinux" description="Build Linux" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Linux.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Linux.sln /t:Build /p:Configuration=Release" />
|
|
</if>
|
|
<if test="${os == 'Unix'}">
|
|
<exec program="xbuild" commandline="/t:Clean /p:Configuration=Release MonoGame.Framework.Linux.sln" />
|
|
<exec program="xbuild" commandline="/t:Build /p:Configuration=Release MonoGame.Framework.Linux.sln" />
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildmac" description="Build MacOS" depends="clean">
|
|
<if test="${os == 'MacOS'}">
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Clean -c:Release MonoGame.Framework.MacOS.sln" />
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Build -c:Release MonoGame.Framework.MacOS.sln" />
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildios" description="Build iOS" depends="clean">
|
|
<if test="${os == 'MacOS'}">
|
|
<if test="${file::exists('/Developer/MonoTouch/MSBuild/Xamarin.ObjcBinding.CSharp.targets')}">
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Clean -c:Release MonoGame.Framework.iOS.sln" />
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Build -c:Release MonoGame.Framework.iOS.sln" />
|
|
</if>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildandroid" description="Build Android" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<if test="${file::exists('C:\Program Files (x86)\MSBuild\Novell\Novell.MonoDroid.CSharp.targets') or file::exists('C:\Program Files\MSBuild\Novell\Novell.MonoDroid.CSharp.targets')}">
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Android.sln /t:Build /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.OUYA.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.OUYA.sln /t:Build /p:Configuration=Release" />
|
|
</if>
|
|
</if>
|
|
<if test="${os == 'MacOS'}">
|
|
<if test="${file::exists('/Developer/MonoAndroid/usr/bin/mandroid')}">
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Clean -c:Release MonoGame.Framework.Android.sln" />
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Build -c:Release MonoGame.Framework.Android.sln" />
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Clean -c:Release MonoGame.Framework.OUYA.sln" />
|
|
<exec program="mdtool" basedir="${mdtooldir}" commandline="build -t:Build -c:Release MonoGame.Framework.OUYA.sln" />
|
|
</if>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildwindows8" description="Build Windows 8" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Windows8.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.Framework.Windows8.sln /t:Rebuild /p:Configuration=Release" />
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildwindowsphone" description="Build Windows Phone" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<if test="${file::exists('c:\Program Files (x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Cpp.WindowsPhone.8.0.targets') or file::exists('c:\Program Files\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Cpp.WindowsPhone.8.0.targets')}">
|
|
<exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="ARM"' />
|
|
<exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Build /p:Configuration=Release /p:Platform="ARM"' />
|
|
<exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Clean /p:Configuration=Release /p:Platform="x86"' />
|
|
<exec program="msbuild " commandline='MonoGame.Framework.WindowsPhone.sln /t:Build /p:Configuration=Release /p:Platform="x86"' />
|
|
</if>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildtools" description="Build Tools" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="Tools\2MGFX\2MGFX.sln /t:Build /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="Tools\MGCB\MGCB.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="Tools\MGCB\MGCB.sln /t:Build /p:Configuration=Release" />
|
|
</if>
|
|
</target>
|
|
|
|
<target name="buildcontentprocessor" description="Build Content Processor" depends="clean">
|
|
<if test="${os == 'Win32NT'}">
|
|
<exec program="msbuild " commandline="MonoGame.ContentPipeline\ContentProcessors\MonoGameContentProcessors.sln /t:Clean /p:Configuration=Release" />
|
|
<exec program="msbuild " commandline="MonoGame.ContentPipeline\ContentProcessors\MonoGameContentProcessors.sln /t:Build /p:Configuration=Release" />
|
|
</if>
|
|
</target>
|
|
|
|
</project> |