forked from mwinapi/mwinapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnant.build
123 lines (118 loc) · 3.88 KB
/
nant.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0"?>
<project name="ManagedWinapi" default="build">
<!-- Path to MSBuild to compile stuff -->
<property name="msbuild.path" value="${environment::get-variable('windir')}\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe"/>
<target name="clean">
<delete dir="build"/>
<delete dir="dist"/>
<exec program="${msbuild.path}" verbose="True">
<arg value="ManagedWinapi.sln"/>
<arg value="/t:Clean"/>
<arg value="/p:Configuration=Release"/>
</exec>
<exec program="${msbuild.path}" verbose="True">
<arg value="ManagedWinapi.sln"/>
<arg value="/t:Clean"/>
<arg value="/p:Configuration=Debug"/>
</exec>
<foreach item="File" property="solutionfile">
<in>
<items>
<include name="Tools/*.sln"/>
</items>
</in>
<do>
<exec program="${msbuild.path}" verbose="True">
<arg value="${solutionfile}"/>
<arg value="/t:Clean"/>
<arg value="/p:Configuration=Debug"/>
</exec>
<exec program="${msbuild.path}" verbose="True">
<arg value="${solutionfile}"/>
<arg value="/t:Clean"/>
<arg value="/p:Configuration=Release"/>
</exec>
</do>
</foreach>
</target>
<target name="build-dll">
<mkdir dir="build/bin" />
<exec program="${msbuild.path}" verbose="True">
<arg value="ManagedWinapi.sln"/>
<arg value="/t:Build"/>
<arg value="/p:Configuration=Release"/>
</exec>
<copy file="ManagedWinapi\bin\release\ManagedWinapi.dll"
todir="build/bin"/>
<copy file="ManagedWinapi\bin\release\ManagedWinapi.xml"
todir="build/bin"/>
<copy file="ManagedWinapi\ManagedWinapiNativeHelper.dll"
todir="build/bin"/>
</target>
<target name="build" depends="build-dll">
<foreach item="Folder" property="toolpath">
<in>
<items>
<include name="Tools/*"/>
<exclude name="Tools/.svn"/>
<exclude name="Tools" />
</items>
</in>
<do>
<property name="toolname" value="${path::get-file-name(toolpath)}" />
<exec program="${msbuild.path}" verbose="True">
<arg value="Tools/${toolname}.sln"/>
<arg value="/t:Build"/>
<arg value="/p:Configuration=Release"/>
</exec>
<copy file="Tools/${toolname}/bin/Release/${toolname}.exe" todir="build/bin"/>
</do>
</foreach>
</target>
<target name="dist" depends="build">
<mkdir dir="dist/bin"/>
<mkdir dir="dist/tools"/>
<mkdir dir="dist/src"/>
<copy todir="dist/bin">
<fileset basedir="build/bin">
<include name="*.dll" />
<include name="*.chm" />
<include name="ManagedWinapi.xml" />
</fileset>
</copy>
<copy todir="dist/bin">
<fileset basedir=".">
<include name="COPYING"/>
<include name="readme.txt"/>
</fileset>
</copy>
<copy todir="dist/tools">
<fileset basedir="build/bin">
<include name="*.dll" />
<include name="*.exe" />
</fileset>
</copy>
<copy todir="dist/tools">
<fileset basedir=".">
<include name="COPYING"/>
<include name="readme.txt"/>
</fileset>
</copy>
<copy todir="dist/src">
<fileset basedir=".">
<include name="COPYING"/>
<include name="ManagedWinapi.shfb"/>
<include name="ManagedWinapi.sln"/>
<include name="nant.build"/>
<include name="readme.txt"/>
<include name="ManagedWinapiNativeHelper/*"/>
<include name="ManagedWinapi/**"/>
<include name="Tools/**"/>
<exclude name="**/*.suo"/>
<exclude name="**/*.csproj.user" />
<exclude name="**/bin/**"/>
<exclude name="**/obj/**"/>
</fileset>
</copy>
</target>
</project>