-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsoleframework.build
More file actions
195 lines (165 loc) · 7.65 KB
/
consoleframework.build
File metadata and controls
195 lines (165 loc) · 7.65 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?xml version="1.0" encoding="UTF-8"?>
<project default="build">
<!-- Compile with debugging information -->
<property name="project.is-debug" value="true" overwrite="false" />
<!-- Compile flag -->
<property name="project.is-optimized" value="true" overwrite="true" />
<!-- File alignment, supported only on .net -->
<property name="project.file-alignment" value="512" overwrite="true" />
<target name="init-variables">
<property name="project.build.is-mono" value="${string::contains(framework::get-target-framework(), 'mono')}"/>
<if test="${project.build.is-mono}">
<property name="nant.settings.currentframework" value="mono-4.0" />
</if>
<if test="${not project.build.is-mono}">
<property name="nant.settings.currentframework" value="net-4.0" />
</if>
<!-- define project version info depending on debug/release build -->
<if test="${project.is-debug}">
<property name="project.version.info" value="${framework::get-target-framework()} debug" />
<property name="project.output.dir" value="build/debug" />
</if>
<if test="${not project.is-debug}">
<property name="project.version.info" value="${framework::get-target-framework()} release" />
<property name="project.output.dir" value="build/release" />
</if>
</target>
<target name="build-binding">
<property name="assembly-name" value="Binding" overwrite="true" />
<property name="assembly-description" value=".NET data binding library" overwrite="true" />
<csc target="library" output="${project.output.dir}/${assembly-name}.dll" debug="${project.is-debug}"
optimize="${project.is-optimized}"
doc="${project.output.dir}/${assembly-name}.xml">
<nowarn>
<warning number="1591"/>
</nowarn>
<sources>
<include name="Binding/**.cs"/>
</sources>
<references>
<include name="System.dll"/>
</references>
<arg value="/filealign:${project.file-alignment}" unless="${project.build.is-mono}"/>
</csc>
</target>
<target name="build-xaml">
<property name="assembly-name" value="Xaml" overwrite="true" />
<property name="assembly-description" value=".NET simple XAML library" overwrite="true" />
<csc target="library" output="${project.output.dir}/${assembly-name}.dll" debug="${project.is-debug}"
optimize="${project.is-optimized}"
doc="${project.output.dir}/${assembly-name}.xml">
<nowarn>
<warning number="1591"/>
</nowarn>
<sources>
<include name="Xaml/**.cs"/>
</sources>
<references>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="System.Xml.dll"/>
<!-- Using JSIL for JSReplacement attribute - if you don't need JSIL, you can remove this -->
<include name="Web/JSIL/JSIL.dll"/>
<include name="Web/JSIL/JSIL.Meta.dll"/>
</references>
<arg value="/filealign:${project.file-alignment}" unless="${project.build.is-mono}"/>
</csc>
</target>
<target name="build-consoleframework" >
<property name="assembly-name" value="ConsoleFramework" overwrite="true" />
<property name="assembly-description" value="Console framework library" overwrite="true" />
<property name="defines" value=""/>
<if test="true" unless="${project.build.is-mono}">
<property name="defines" value="WIN32"/>
</if>
<csc target="library" output="${project.output.dir}/${assembly-name}.dll" debug="${project.is-debug}"
optimize="${project.is-optimized}" define="${defines}"
doc="${project.output.dir}/${assembly-name}.xml">
<nowarn>
<warning number="1591"/>
</nowarn>
<sources>
<include name="ConsoleFramework/**.cs"/>
</sources>
<references>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="Mono.Posix.dll" if="${project.build.is-mono}"/>
<include name="${project.output.dir}/Binding.dll"/>
<include name="${project.output.dir}/Xaml.dll"/>
</references>
<arg value="/filealign:${project.file-alignment}" unless="${project.build.is-mono}"/>
</csc>
<!--- Dll mappings for OS X -->
<copy file="ConsoleFramework/ConsoleFramework.dll.config" todir="${project.output.dir}"/>
</target>
<!-- Builds examples for specified use case -->
<!-- Needs arguments: entryPointClass and exampleName -->
<target name="build-examples-core">
<property name="assembly-name" value="Examples" overwrite="true" />
<property name="assembly-description" value="Example executable" overwrite="true" />
<csc target="exe" output="${project.output.dir}/Example_${exampleName}.exe" debug="${project.is-debug}"
optimize="${project.is-optimized}" main="${entryPointClass}">
<nowarn>
<warning number="1591"/>
</nowarn>
<sources>
<include name="Examples/**.cs"/>
</sources>
<references>
<include name="System.dll"/>
<include name="System.Core.dll"/>
<include name="${project.output.dir}/Xaml.dll"/>
<include name="${project.output.dir}/ConsoleFramework.dll"/>
<include name="${project.output.dir}/Binding.dll"/>
</references>
<resources dynamicprefix="true" prefix="">
<include name="Examples/**/*.xml" />
<exclude name="Examples/bin/**.*"/>
<exclude name="Examples/obj/**.*"/>
</resources>
<arg value="/filealign:${project.file-alignment}" unless="${project.build.is-mono}"/>
</csc>
</target>
<target name="build-examples">
<property name="assembly-name" value="Examples" overwrite="true" />
<property name="assembly-description" value="Examples executable" overwrite="true" />
<property name="entryPointClass" value="Examples.Program"/>
<property name="exampleName" value="ManyControls"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.AsyncUiUpdate.Program"/>
<property name="exampleName" value="AsyncUiUpdate"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.CheckBoxes.Program"/>
<property name="exampleName" value="CheckBoxes"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.Commands.Program"/>
<property name="exampleName" value="Commands"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.MainMenu.Program"/>
<property name="exampleName" value="MainMenu"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.TreeView.Program"/>
<property name="exampleName" value="TreeView"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.RadioButtons.Program"/>
<property name="exampleName" value="RadioButtons"/>
<call target="build-examples-core"/>
<property name="entryPointClass" value="Examples.TabControl.Program"/>
<property name="exampleName" value="TabControl"/>
<call target="build-examples-core"/>
</target>
<target name="clean">
<delete dir="${project.output.dir}"/>
</target>
<target name="build" depends="init-variables, clean, build-binding, build-xaml, build-consoleframework, build-examples">
</target>
<target name="build-debug">
<property name="project.is-debug" value="true" overwrite="true" />
<call target="build"/>
</target>
<target name="build-release">
<property name="project.is-debug" value="false" overwrite="true" />
<call target="build"/>
</target>
</project>