forked from DaxStudio/DaxStudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.msproj
130 lines (112 loc) · 6.04 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SourceExeConfigFile>$(MSBuildProjectDirectory)\src\daxstudio.standalone\app.config</SourceExeConfigFile>
<Dest2014ExeConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.exe.2014.config</Dest2014ExeConfigFile>
<Dest2016ExeConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.exe.2016.config</Dest2016ExeConfigFile>
<Dest2017ExeConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.exe.2017.config</Dest2017ExeConfigFile>
</PropertyGroup>
<PropertyGroup>
<SourceDllConfigFile>$(MSBuildProjectDirectory)\src\daxstudio.exceladdin\app.config</SourceDllConfigFile>
<Dest2014DllConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.dll.2014.config</Dest2014DllConfigFile>
<Dest2016DllConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.dll.2016.config</Dest2016DllConfigFile>
<Dest2017DllConfigFile>$(MSBuildProjectDirectory)\release\DaxStudio.dll.2017.config</Dest2017DllConfigFile>
</PropertyGroup>
<Target Name="Clean">
<Message Text="Cleaning DaxStudio.Standalone" />
<MSBuild Projects=".\src\daxstudio.sln" Targets="Clean" />
</Target>
<Target Name="Build" DependsOnTargets="Clean">
<Message Text="Building DaxStudio.Standalone" />
<!--<MSBuild Projects=".\src\daxstudio.standalone\daxstudio.standalone.csproj" Targets="Build" />-->
<MSBuild Projects=".\src\daxstudio.sln" Targets="Build" />
</Target>
<UsingTask TaskName="TransformXml"
AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.Tasks.dll" />
<Target Name="Configs2014" DependsOnTargets="Build" >
<Message Text="Creating configs for SQL 2014 dependencies"/>
<!--<Copy SourceFiles="$(SourceConfigFile)" DestinationFiles="$(DestConfigFile)" />-->
<TransformXml Source="$(SourceExeConfigFile)"
Transform="app.2014.config"
Destination="$(Dest2014ExeConfigFile)" />
<TransformXml Source="$(SourceDllConfigFile)"
Transform="app.2014.config"
Destination="$(Dest2014DllConfigFile)" />
</Target>
<Target Name="Configs2016" DependsOnTargets="Build" >
<Message Text="Creating configs for SQL 2016 dependencies"/>
<!--<Copy SourceFiles="$(SourceConfigFile)" DestinationFiles="$(DestConfigFile)" />-->
<TransformXml Source="$(SourceExeConfigFile)"
Transform="app.2016.config"
Destination="$(Dest2016ExeConfigFile)" />
<TransformXml Source="$(SourceDllConfigFile)"
Transform="app.2016.config"
Destination="$(Dest2016DllConfigFile)" />
</Target>
<Target Name="Configs2017" DependsOnTargets="Build" >
<Message Text="Creating configs for SQL 2017 dependencies"/>
<!--<Copy SourceFiles="$(SourceConfigFile)" DestinationFiles="$(DestConfigFile)" />-->
<TransformXml Source="$(SourceExeConfigFile)"
Transform="app.2017.config"
Destination="$(Dest2017ExeConfigFile)" />
<TransformXml Source="$(SourceDllConfigFile)"
Transform="app.2017.config"
Destination="$(Dest2017DllConfigFile)" />
</Target>
<Target Name="DeletePdb" DependsOnTargets="Build">
<ItemGroup>
<FilesToDelete Include=".\Release\*.pdb"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
</Target>
<Target Name="DeleteXml" DependsOnTargets="Build">
<ItemGroup>
<FilesToDelete Include=".\Release\*.xml"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)" />
</Target>
<PropertyGroup>
<MyAssemblies>.\Release\DaxStudio.dll</MyAssemblies>
</PropertyGroup>
<Target Name="RetrieveIdentities">
<Message Text="Getting Assembly Versions" Importance="high"/>
<PropertyGroup>
<MyAssemblyInfo/>
</PropertyGroup>
<GetAssemblyIdentity
AssemblyFiles="$(MyAssemblies)">
<Output
TaskParameter="Assemblies"
ItemName="MyAssemblyInfo"/>
</GetAssemblyIdentity>
<!-- <PropertyGroup>
<Pattern>(\d+)\.(\d+)</Pattern>
<In>%(myAssemblyInfo.Version)</In>
<OutVersion>$([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern)))</OutVersion>
</PropertyGroup>
-->
<PropertyGroup>
<OutVersion>$([System.Version]::Parse(%(MyAssemblyInfo.Version)).ToString(3).Replace('.','_'))</OutVersion>
</PropertyGroup>
<Message Text="Files: %(MyAssemblyInfo.Version)" Importance="high"/>
<Message Text="Major: $(OutVersion) " Importance="high"/>
</Target>
<Target Name="SignAssemblies" DependsOnTargets="Build">
<Message Text="Attempting to sign Assemblies" Importance="high" />
<Exec Command='"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /n "Darren Gosbell" /t http://timestamp.verisign.com/scripts/timstamp.dll .\Release\daxstudio.exe'
IgnoreExitCode="true"/>
<Exec Command='"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /n "Darren Gosbell" /t http://timestamp.verisign.com/scripts/timstamp.dll .\Release\daxstudio.dll'
IgnoreExitCode="true"/>
</Target>
<Target Name="Installer" DependsOnTargets="Configs2014; Configs2016; Configs2017; DeleteXml; DeletePdb">
<Exec Command='"$(MSBuildProgramFiles32)\Inno Setup 5\iscc.exe" .\installer\daxstudio.iss' />
</Target>
<Target Name="InstallerWthSignedAssemblies" DependsOnTargets="Configs2014; Configs2016; Configs2017; DeleteXml; DeletePdb; SignAssemblies">
<Exec Command='"$(MSBuildProgramFiles32)\Inno Setup 5\iscc.exe" .\installer\daxstudio.iss' />
</Target>
<Target Name="SignedInstaller" DependsOnTargets="InstallerWithSignedAssemblies; RetrieveIdentities">
<Message Text="Attempting to sign installer" Importance="high" />
<Exec Command='"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /n "Darren Gosbell" /t http://timestamp.verisign.com/scripts/timstamp.dll .\package\daxstudio_$(OutVersion)b_setup.exe'
IgnoreExitCode="true"/>
</Target>
</Project>