-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.msproj
109 lines (96 loc) · 3.42 KB
/
build.msproj
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="PublishZip" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<!--
Build properties
-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">Win32</Platform>
</PropertyGroup>
<PropertyGroup>
<ArtifactDir>ArtifactDir\</ArtifactDir>
<SdkVersion>3.0.2</SdkVersion>
<BuildVersionFile>BuildVersion.targets</BuildVersionFile>
</PropertyGroup>
<PropertyGroup>
<BUILD_NUMBER Condition="'$(BUILD_NUMBER)' == ''">0.0.1</BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup>
<SignTool Condition="'$(SIGNTOOL)' == ''">signtool.exe</SignTool>
</PropertyGroup>
<!--+
|
| This target unzips the tobii sdk
|
+-->
<Target Name="Unzip" >
<Error Condition="!Exists('tobiisdk-Win32.zip')" Text="The file 'tobiisdk-Win32.zip does not exist. Please download it into this folder before building." />
<Message Text="Unzipping tobiisdk..." />
<Unzip ZipFileName="tobiisdk-Win32.zip" TargetDirectory="." ContinueOnError="true"/>
</Target>
<!--+
|
| This target sets the app version by modifying a header file
|
+-->
<Target Name="SetAppVersion">
<Message Text="Setting Application Version to $(BUILD_NUMBER)" />
<FileUpdate Files="src\AppVersion.hpp"
Regex="0.0.1"
ReplacementText="$(BUILD_NUMBER)"
Encoding="ascii"/>
</Target>
<!--+
|
| This target runs qmake
|
+-->
<Target Name="QMake" DependsOnTargets="SetAppVersion">
<Message Text="Generating vcproj file..." />
<Exec Command="$(QT_SDK_ROOT)\bin\qmake.exe src\EyetrackerBrowser.pro -r -spec win32-msvc2008 CONFIG+=release -tp vc"/>
</Target>
<!--+
|
| This target compiles the final binary
|
+-->
<Target Name="Compile" DependsOnTargets="QMake;Unzip">
<Message Text="Compiling ET Tools..." />
<VCBuild Projects="EyetrackerBrowser.vcproj" Configuration="$(Configuration)" Platform="$(Platform)" Rebuild="true"/>
</Target>
<!--+
|
| This target collects all the artifacts
|
+-->
<Target Name="CollectArtifacts" DependsOnTargets="Compile">
<Message Text="Collecting Artifacts..." />
<ItemGroup>
<Binaries Include="release\EyetrackerBrowser.exe" />
<Binaries Include="Win32\C++\binaries\tobiisdk.dll" />
<Binaries Include="$(QT_SDK_ROOT)\bin\QtGui4.dll" />
<Binaries Include="$(QT_SDK_ROOT)\bin\QtCore4.dll" />
</ItemGroup>
<RemoveDir Directories="$(ArtifactDir)"/>
<Copy SourceFiles="@(Binaries)" DestinationFolder="$(ArtifactDir)"/>
</Target>
<!--+
|
| This target publishes all artifacts as a zip
|
+-->
<Target Name="PublishZip" DependsOnTargets="CollectArtifacts">
<Message Text="Building ZIP file of Artifacts..." />
<ItemGroup>
<ArtifactFiles Include="$(ArtifactDir)**\*.*" />
</ItemGroup>
<Zip
Files="@(ArtifactFiles)"
ZipFileName="EyetrackerBrowser-$(Platform).zip"
WorkingDirectory="$(ArtifactDir)"
Comment="Eyetracker Browser for Windows ($(Platform))" />
<!-- This message will tell Teamcity to publish the Zip file -->
<Message Text="##teamcity[publishArtifacts 'EyetrackerBrowser-$(Platform).zip']" />
</Target>
</Project>