forked from libera-csharp/SpikeLite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.build
84 lines (69 loc) · 2.95 KB
/
bot.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0"?>
<!--
SpikeLite C# IRC Bot
Copyright (c) 2009 FreeNode ##Csharp Community
This source is licensed under the terms of the MIT license. Please see the
distributed license.txt for details.
-->
<project name="SharpBot" default="build" basedir=".">
<description>FreeNode Csharp Bot</description>
<target name="build" description="Wraps the build process and builds either with XBuild, or MSBuild dependong on if the host is win32 or not." depends="build-windows, build-nonwindows, dist">
<echo message="Build completed via dependencies above."/>
</target>
<target name="build-windows" description="Builds the bot on a standard Windows, MS-CLR environment via MSBuild" depends="clean" if="${platform::is-win32()}">
<echo message="Win32 environment detected... building via MSBuild."/>
<!-- Build Debug artifacts -->
<msbuild project="SpikeLite.sln">
<arg value="/property:Configuration=debug" />
<arg value="/t:Rebuild" />
<arg value="/p:PlatformTarget=x86"/>
</msbuild>
<!-- Build Release artifacts -->
<msbuild project="SpikeLite.sln">
<arg value="/property:Configuration=release" />
<arg value="/t:Rebuild" />
<arg value="/p:PlatformTarget=x86"/>
</msbuild>
</target>
<target name="build-nonwindows" description="Builds the bot on an environment that does not have MSBuild on it, namely *Nix" depends="clean" unless="${platform::is-win32()}">
<echo message="Non-Win32 environment detected... building via XBuild."/>
<!-- Build Debug artifacts -->
<exec program="xbuild">
<arg value="SpikeLite.sln"/>
<arg value="/target:Rebuild"/>
<arg value="/p:Configuration=debug"/>
<arg value="/p:PlatformTarget=x86"/>
</exec>
<!-- Build Release artifacts -->
<exec program="xbuild">
<arg value="SpikeLite.sln"/>
<arg value="/target:Rebuild"/>
<arg value="/p:Configuration=release"/>
<arg value="/p:PlatformTarget=x86"/>
</exec>
</target>
<target name="dist" description="Creates a debug and release zip file for distribution.">
<!-- Zip the Release quality artifacts -->
<zip zipfile="${path::combine('output', 'SpikeLite-Release.zip')}">
<fileset basedir="${path::combine('output', 'Release')}">
<include name="**/*"/>
</fileset>
</zip>
<!-- Zip the Debug quality artifacts -->
<zip zipfile="${path::combine('output', 'SpikeLite-Debug.zip')}">
<fileset basedir="${path::combine('output', 'Debug')}">
<include name="**/*"/>
</fileset>
</zip>
</target>
<target name="clean" description="Clean previously built artifacts">
<echo message="Cleaning all obj directories..."/>
<delete >
<fileset basedir=".">
<include name="**\obj\**"/>
</fileset>
</delete>
<echo message="cleaning the output directory."/>
<delete dir="output"/>
</target>
</project>