This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 117
/
build.xml
41 lines (36 loc) · 1.71 KB
/
build.xml
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceDir>src</SourceDir>
<BuildDir>bin</BuildDir>
<ReleaseDir>release</ReleaseDir>
<ToolsDir>tools</ToolsDir>
</PropertyGroup>
<Target Name="Clean">
<ItemGroup><Solutions Include='$(SourceDir)\*.sln'/></ItemGroup>
<RemoveDir Directories="$(BuildDir)"/>
<RemoveDir Directories="$(ReleaseDir)"/>
<MSBuild Projects="@(Solutions)"
Targets="Clean"
Properties="Configuration=Release"/>
</Target>
<Target Name="Build" DependsOnTargets="Clean">
<ItemGroup><Solutions Include='$(SourceDir)\*.sln'/></ItemGroup>
<MSBuild Projects="@(Solutions)"
Targets="Rebuild"
Properties="Configuration=Release"/>
<ItemGroup>
<binaries Include="$(SourceDir)\**\bin\Release\*.*"/>
</ItemGroup>
<Copy SourceFiles="@(binaries)" DestinationFolder="$(BuildDir)"/>
</Target>
<Target Name="Package" DependsOnTargets="Build">
<MakeDir Directories='$(ReleaseDir)'/>
<!-- haven't been able to prevent NuGet from self updating -->
<!-- so let's get the self update out of the way -->
<Exec Command='$(ToolsDir)\NuGet.exe update -self'/>
<Exec Command='$(ToolsDir)\NuGet.exe pack "$(SourceDir)\TwainDotNet\TwainDotNet.csproj" -properties Configuration="Release" -o "$(ReleaseDir)"'/>
<Exec Command='$(ToolsDir)\NuGet.exe pack "$(SourceDir)\TwainDotNet.WinFroms\TwainDotNet.WinFroms.csproj" -properties Configuration="Release" -o "$(ReleaseDir)"'/>
<Exec Command='$(ToolsDir)\NuGet.exe pack "$(SourceDir)\TwainDotNet.Wpf\TwainDotNet.Wpf.csproj" -properties Configuration="Release" -o "$(ReleaseDir)"'/>
</Target>
</Project>