This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheem.build
169 lines (145 loc) · 7.55 KB
/
eem.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
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
<?xml version="1.0"?>
<!-- ============================================================
Created: 10/14/2010 12:59 PM
Name: eem.build*
Description: description
Author: Digitalroot
============================================================= -->
<project name="eem" default="BetaRelease">
<target name="Setup" description="Setup Global Properties.">
<property name="dir.working" value="${directory::get-current-directory()}" />
<property name="dir.project" value="${dir.working}\Enterprise Empire Manager" />
<property name="dir.installer" value="${dir.working}\EEM_Installer\Release" />
</target>
<target name="BetaRelease" depends="Setup">
<echo message="Building Beta Release" />
<!-- Build x86 -->
<call target="Build_x86"/>
<!-- Build x64 - Disabled for now -->
<call target="Build_x64"/>
<!-- Build Extras -->
<fail if="${not property::exists('dir.extras')}" message="Missing dir.extras value." />
<zip zipfile="${dir.build}\..\..\Enterprise_Empire_Manager_Extras.zip" verbose="True">
<fileset basedir="${dir.extras}">
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="Build_x86">
<property name="build.platform" value="x86" />
<call target="DoBuild"/>
<property name="assembly.name" value="${dir.build}\Enterprise Empire Manager.exe" />
<property name="assembly.version" value="${assemblyname::get-version(assemblyname::get-assembly-name(assembly.name))}" />
<fail if="${not property::exists('dir.build')}" message="Missing dir.build value." />
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<!-- Build x86 MSI -->
<echo message="Building x86 Installer" />
<!-- exec program="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" commandline='"EEM.sln" /build Release /project "EEM_Installer_x86"'/ -->
<zip zipfile="${dir.build}\..\..\Enterprise_Empire_Manager_${build.platform}.zip" verbose="True">
<fileset basedir="${dir.build}"> <!-- ${dir.installer} -->
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="Build_x64">
<property name="build.platform" value="x64" />
<call target="DoBuild"/>
<fail if="${not property::exists('dir.build')}" message="Missing dir.build value." />
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<zip zipfile="${dir.build}\..\..\Enterprise_Empire_Manager_${build.platform}.zip" verbose="True">
<fileset basedir="${dir.build}">
<include name="**/*" />
</fileset>
</zip>
<!-- Build x64 MSI -->
<echo message="Building x64 Installer" />
<!-- exec program="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" commandline='"EEM.sln" /build Release /project "EEM_Installer_x64"'/ -->
</target>
<target name="DoBuild" description="Builds EEM">
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<property name="dir.build" value="${dir.project}\bin\${build.platform}\Release" />
<property name="dir.plugins" value="${dir.build}\plug-ins" />
<property name="dir.extras" value="${dir.project}\bin\Extras" />
<delete dir="${dir.build}" failonerror="False" />
<mkdir dir="${dir.build}" if="${not directory::exists(dir.build)}" failonerror="False" />
<exec program="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MsBuild.exe" commandline="EEM.sln /p:Configuration=Release /p:Platform=${build.platform} /p:WarningLevel=4" />
<delete dir="${dir.plugins}" failonerror="False" />
<call target="Copy.NRTFTree"/>
<call target="Copy.Plugin.Chat"/>
<call target="Copy.Plugin.Ranking"/>
<call target="Copy.Plugin.RawInput"/>
<call target="Copy.Plugin.Notifications"/>
<call target="Copy.Plugin.JsonLogger"/>
<delete>
<fileset basedir="${dir.build}">
<include name="**.pdb" />
</fileset>
</delete>
</target>
<target name="Copy.Plugin.Chat">
<property name="plugin.name" value="Chat" />
<call target="Copy.Plugin"/>
</target>
<target name="Copy.Plugin.Ranking">
<property name="plugin.name" value="Ranking" />
<call target="Copy.PluginToExtras"/>
</target>
<target name="Copy.Plugin.RawInput">
<property name="plugin.name" value="RawInput" />
<call target="Copy.PluginToExtras"/>
</target>
<target name="Copy.Plugin.Notifications">
<property name="plugin.name" value="Notifications" />
<call target="Copy.PluginToExtras"/>
</target>
<target name="Copy.Plugin.JsonLogger">
<property name="plugin.name" value="JsonViewer" />
<call target="Copy.PluginToExtras"/>
</target>
<target name="Copy.NRTFTree" description="Copies the NRTFTree Project to the plug-in directory.">
<fail if="${not property::exists('dir.build')}" message="Missing dir.build value." />
<fail if="${not property::exists('dir.plugins')}" message="Missing dir.plugins value." />
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<echo message="Copying NRTFTree to ${dir.plugins}" />
<mkdir dir="${dir.plugins}" if="${not directory::exists(dir.plugins)}" failonerror="False" />
<copy todir="${dir.plugins}" verbose="true">
<fileset basedir="${dir.working}\NRTFTree\bin\${build.platform}\Release">
<include name="**.dll" />
<include name="**.config" />
<include name="**.txt" />
</fileset>
</copy>
</target>
<target name="Copy.Plugin" description="Copies the plug-in's files to the plug-in directory.">
<fail if="${not property::exists('dir.build')}" message="Missing dir.build value." />
<fail if="${not property::exists('dir.plugins')}" message="Missing dir.plugins value." />
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<fail if="${not property::exists('plugin.name')}" message="Missing plugin.name value." />
<echo message="Copying ${plugin.name} to ${dir.plugins}" />
<mkdir dir="${dir.plugins}" if="${not directory::exists(dir.plugins)}" failonerror="False" />
<copy todir="${dir.plugins}" verbose="true">
<fileset basedir="${dir.working}\Plug-ins\${plugin.name}\bin\${build.platform}\Release">
<include name="EEM.Plugin.*.dll" />
<include name="EEM.Plugin.*.config" />
<include name="EEM.Plugin.*.txt" />
<include name="EEM.Plugin.*.xml" />
</fileset>
</copy>
</target>
<target name="Copy.PluginToExtras" description="Copies the plug-in's files to the plug-in directory.">
<fail if="${not property::exists('dir.build')}" message="Missing dir.build value." />
<fail if="${not property::exists('dir.plugins')}" message="Missing dir.plugins value." />
<fail if="${not property::exists('build.platform')}" message="Missing build.platform value." />
<fail if="${not property::exists('plugin.name')}" message="Missing plugin.name value." />
<echo message="Copying ${plugin.name} to ${dir.extras}" />
<mkdir dir="${dir.extras}" if="${not directory::exists(dir.extras)}" failonerror="False" />
<copy todir="${dir.extras}\${build.platform}" verbose="true">
<fileset basedir="${dir.working}\Plug-ins\${plugin.name}\bin\${build.platform}\Release">
<include name="EEM.Plugin.*.dll" />
<include name="EEM.Plugin.*.config" />
<include name="EEM.Plugin.*.txt" />
<include name="EEM.Plugin.*.xml" />
</fileset>
</copy>
</target>
</project>