This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Package.csproj
284 lines (284 loc) · 16.3 KB
/
Package.csproj
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="Installer\Binary\MyTasks.dll" TaskName="GetVersion" />
<UsingTask AssemblyFile="Installer\Binary\MyTasks.dll" TaskName="ReplaceText" />
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D06AFC6E-EF13-4951-AEA7-0A9E16F22E52}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Package</RootNamespace>
<AssemblyName>Package</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<MSBuildExe Condition=" '$(VisualStudioVersion)' == '15.0' ">"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"</MSBuildExe>
<MSBuildExe Condition=" '$(VisualStudioVersion)' == '16.0' ">"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe"</MSBuildExe>
</PropertyGroup>
<Choose>
<When Condition=" '$(NoPackage)' == 'y' ">
<PropertyGroup>
<GetPackageVersion></GetPackageVersion>
<PackageClean></PackageClean>
<PackageInstall></PackageInstall>
<PackageNoInstall></PackageNoInstall>
<PackageSource></PackageSource>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GetPackageVersion>GetPackageVersion;</GetPackageVersion>
<PackageClean>PackageClean;</PackageClean>
<PackageInstall>PackageInstall;</PackageInstall>
<PackageNoInstall>PackageNoInstall;</PackageNoInstall>
<PackageSource>PackageSource</PackageSource>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<When Condition=" '$(PackageCommercial)' == 'y' ">
<PropertyGroup>
<BuildInstallerCommercial>BuildInstallerCommercial;</BuildInstallerCommercial>
<PackageCleanCommercial>PackageCleanCommercial;</PackageCleanCommercial>
<PackageInstallCommercial>PackageInstallCommercial;</PackageInstallCommercial>
<PackageSigningCommercial>PackageSigningCommercial;</PackageSigningCommercial>
<PackageSourceCommercial>PackageSourcePrepare;PackageSourceCommercial;</PackageSourceCommercial>
<PackageNoInstallCommercial>PackageNoInstallCommercial;</PackageNoInstallCommercial>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<BuildInstallerCommercial></BuildInstallerCommercial>
<PackageCleanCommercial></PackageCleanCommercial>
<PackageInstallCommercial></PackageInstallCommercial>
<PackageSigningCommercial></PackageSigningCommercial>
<PackageSourceCommercial></PackageSourceCommercial>
<PackageNoInstallCommercial></PackageNoInstallCommercial>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<When Condition=" '$(Signing)' == 'y' AND '$(NoPackage)' != 'y' ">
<PropertyGroup>
<PackageSigning>PackageSigning;</PackageSigning>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<PackageSigning></PackageSigning>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Source\MySql.VisualStudio\Properties\AssemblyInfo.cs" />
<Compile Include="Source\MySql.VisualStudio\Properties\VersionInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Targets we care about -->
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release' ">
<CallTarget Targets="Build15_461;Build16_472;BuildInstaller;$(GetPackageVersion)$(PackageClean)$(PackageSigning)$(PackageInstall)$(PackageNoInstall)$(PackageSource)" />
<RemoveDir Directories="**/obj; **/bin" />
</Target>
<!-- Build Source Targets -->
<Target Name="Build15_461" Condition=" '$(VisualStudioVersion)' == '15.0' Or '$(VisualStudioVersion)' == '16.0' ">
<Message Text="Building VisualStudioVersion=15.0" Importance="high" />
<Exec Command="$(MSBuildExe) MySqlForVisualStudio.sln /p:Configuration=Release;Platform="Any CPU";VisualStudioVersion=15.0" />
</Target>
<Target Name="Build16_472" Condition=" '$(VisualStudioVersion)' == '16.0' ">
<Message Text="Building VisualStudioVersion=16.0" Importance="high" />
<Exec Command="$(MSBuildExe) MySqlForVisualStudio.sln /p:Configuration=Release;Platform="Any CPU";VisualStudioVersion=16.0" />
</Target>
<!-- Package Installer Build Targets -->
<Target Name="BuildInstaller" DependsOnTargets="BuildInstallerGPL;$(BuildInstallerCommercial)" />
<Target Name="BuildInstallerGPL">
<MSBuild Projects="Installer/PackageWix.wixproj" Properties="Configuration=GPL;Platform=x86" />
</Target>
<Target Name="BuildInstallerCommercial">
<MSBuild Projects="Installer/PackageWix.wixproj" Properties="Configuration=Commercial;Platform=x86" />
</Target>
<!-- Get product version -->
<Target Name="GetPackageVersion">
<GetVersion Assembly="Source\MySql.VisualStudio\bin\15.0v4.6.1\Release\MySql.VisualStudio.dll" Format="{0}.{1}.{2}">
<Output TaskParameter="AsString" PropertyName="Version" />
</GetVersion>
</Target>
<!-- Package Clean Targets -->
<Target Name="PackageClean" DependsOnTargets="PackageCleanGPL;$(PackageCleanCommercial)" />
<Target Name="PackageCleanGPL">
<Delete Files="bin/GPL/mysql-for-visualstudio-$(Version)$(Postfix).msi" TreatErrorsAsWarnings="true" />
<Delete Files="bin/GPL/mysql-for-visualstudio-$(Version)$(Postfix)-src.zip" TreatErrorsAsWarnings="true" />
<Delete Files="bin/GPL/mysql-for-visualstudio-$(Version)$(Postfix)-noinstall.zip" TreatErrorsAsWarnings="true" />
<RemoveDir Directories="bin/GPL" ContinueOnError="true" />
<MakeDir Directories="bin/GPL" ContinueOnError="true" />
</Target>
<Target Name="PackageCleanCommercial">
<Delete Files="bin/Commercial/mysql-for-visualstudio-$(Version)$(Postfix).msi" TreatErrorsAsWarnings="true" />
<Delete Files="bin/Commercial/mysql-for-visualstudio-$(Version)$(Postfix)-src.zip" TreatErrorsAsWarnings="true" />
<Delete Files="bin/Commercial/mysql-for-visualstudio-$(Version)$(Postfix)-noinstall.zip" TreatErrorsAsWarnings="true" />
<RemoveDir Directories="bin/Commercial" ContinueOnError="true" />
<MakeDir Directories="bin/Commercial" ContinueOnError="true" />
</Target>
<!-- Signing Targets -->
<Target Name="PackageSigning" DependsOnTargets="PackageSigningGPL;$(PackageSigningCommercial)" />
<Target Name="PackageSigningGPL">
<Exec Command="(set CODESIGNBUREAU_CREDFILE=C:\Jenkins\Signing\MySQL Installer\v3\wex_grp_config.properties) & java -Xmx1024m -jar "$(ClientPath)" sign -sign_method microsoft -file_to_sign "Installer/bin/GPL/MySql.VisualStudio.Plugin.msi" -user $(SigningUser) -global_uid $(SigningGuid) -server $(SigningServer) -signed_location "Installer/bin/GPL/signed"" ContinueOnError="false" />
<Copy SourceFiles="Installer/bin/GPL/signed/MySql.VisualStudio.Plugin.msi" DestinationFiles="Installer/bin/GPL/MySql.VisualStudio.Plugin.msi" />
</Target>
<Target Name="PackageSigningCommercial">
<Exec Command="(set CODESIGNBUREAU_CREDFILE=C:\Jenkins\Signing\MySQL Installer\v3\wex_grp_config.properties) & java -Xmx1024m -jar "$(ClientPath)" sign -sign_method microsoft -file_to_sign "Installer/bin/Commercial/MySql.VisualStudio.Plugin.msi" -user $(SigningUser) -global_uid $(SigningGuid) -server $(SigningServer) -signed_location "Installer/bin/Commercial/signed"" ContinueOnError="false" />
<Copy SourceFiles="Installer/bin/Commercial/signed/MySql.VisualStudio.Plugin.msi" DestinationFiles="Installer/bin/Commercial/MySql.VisualStudio.Plugin.msi" />
</Target>
<!-- MSI Targets -->
<Target Name="PackageInstall" DependsOnTargets="PackageInstallPrepare;PackageInstallGPL;$(PackageInstallCommercial)" />
<Target Name="PackageInstallPrepare">
<RemoveDir Directories="packages" ContinueOnError="true" />
<MakeDir Directories="packages" ContinueOnError="true" />
</Target>
<Target Name="PackageInstallGPL">
<Copy SourceFiles="Installer/bin/GPL/MySql.VisualStudio.Plugin.msi" DestinationFiles="packages/mysql-for-visualstudio-$(Version)$(Postfix).msi" />
</Target>
<Target Name="PackageInstallCommercial">
<Copy SourceFiles="Installer/bin/Commercial/MySql.VisualStudio.Plugin.msi" DestinationFiles="packages/mysql-for-visualstudio-commercial-$(Version)$(Postfix).msi" />
</Target>
<!-- No Install Targets -->
<Target Name="PackageNoInstall" DependsOnTargets="PackageNoInstallPrepare;PackageNoInstallGPL;$(PackageNoInstallCommercial)" />
<Target Name="PackageNoInstallPrepare">
<ItemGroup>
<V461Assemblies Include="Dependencies\v4.5\Release\MySql.Data.dll" />
<V461Assemblies Include="Dependencies\v4.5\Release\MySql.Web.dll" />
<V461Assemblies Include="Dependencies\v4.5\Release\MySql.Data.Entity.dll" />
<V461Assemblies Include="Dependencies\v4.5\Release\MySql.Data.EntityFramework.dll" />
<V461Assemblies Include="Dependencies\v4.5\Release\BouncyCastle.Crypto.dll" />
<V461Assemblies Include="Source\MySql.VisualStudio\bin\15.0v4.6.1\release\MySql.VisualStudio.dll" />
<V461Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\15.0v4.6.1\release\Antlr3.Runtime.dll" />
<V461Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\15.0v4.6.1\release\MySql.Debugger.dll" />
<V461Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\15.0v4.6.1\release\MySql.Parser.dll" />
<V461Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\15.0v4.6.1\release\MySql.Debugger.VisualStudio.dll" />
</ItemGroup>
<ItemGroup>
<V472Assemblies Include="Dependencies\v4.5\Release\MySql.Data.dll" />
<V472Assemblies Include="Dependencies\v4.5\Release\MySql.Web.dll" />
<V472Assemblies Include="Dependencies\v4.5\Release\MySql.Data.Entity.dll" />
<V472Assemblies Include="Dependencies\v4.5\Release\MySql.Data.EntityFramework.dll" />
<V472Assemblies Include="Dependencies\v4.5\Release\BouncyCastle.Crypto.dll" />
<V472Assemblies Include="Source\MySql.VisualStudio\bin\15.0v4.6.1\release\MySql.VisualStudio.dll" />
<V472Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\16.0v4.7.2\release\Antlr3.Runtime.dll" />
<V472Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\16.0v4.7.2\release\MySql.Debugger.dll" />
<V472Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\16.0v4.7.2\release\MySql.Parser.dll" />
<V472Assemblies Include="Source\MySql.Debugger.VisualStudio\bin\16.0v4.7.2\release\MySql.Debugger.VisualStudio.dll" />
</ItemGroup>
<ItemGroup>
<ReleaseFiles Include="Release Notes.txt" />
<ReleaseFiles Include="CHANGES" />
</ItemGroup>
<ItemGroup>
<DocFiles Include="Documentation\Output\MySqlForVisualStudio.chm" />
</ItemGroup>
<RemoveDir Directories="tmp" ContinueOnError="true" />
<MakeDir Directories="tmp" />
<Copy SourceFiles="@(ReleaseFiles)" DestinationFolder="tmp" />
<Copy SourceFiles="@(V461Assemblies)" DestinationFolder="tmp\15.0v461" />
<Copy SourceFiles="@(V472Assemblies)" DestinationFolder="tmp\16.0v472" />
<Copy SourceFiles="@(DocFiles)" DestinationFolder="tmp/Documentation" />
</Target>
<Target Name="PackageNoInstallGPL">
<ItemGroup>
<OtherGplFiles Include="README" />
<OtherGplFiles Include="LICENSE" />
</ItemGroup>
<Copy SourceFiles="@(OtherGplFiles)" DestinationFolder="tmp" />
<ItemGroup>
<ZipFilesGPL Include="tmp\**\*.*" />
</ItemGroup>
<Zip ZipFileName="packages/mysql-for-visualstudio-$(Version)$(Postfix)-noinstall.zip" Files="@(ZipFilesGPL)" workingDirectory="tmp" />
</Target>
<Target Name="PackageNoInstallCommercial">
<ItemGroup>
<OtherCommercialFiles Include="README-Commercial" />
<OtherCommercialFiles Include="LICENSE-Commercial" />
</ItemGroup>
<Delete Files="tmp/README" TreatErrorsAsWarnings="true" />
<Copy SourceFiles="@(OtherCommercialFiles)" DestinationFolder="tmp" />
<Move SourceFiles="tmp/README-Commercial" DestinationFiles="tmp/README" />
<Move SourceFiles="tmp/LICENSE-Commercial" DestinationFiles="tmp/LICENSE" />
<ItemGroup>
<ZipFilesCommercial Include="tmp\**\*.*" />
</ItemGroup>
<Zip ZipFileName="packages/mysql-for-visualstudio-commercial-$(Version)$(Postfix)-noinstall.zip" Files="@(ZipFilesCommercial)" workingDirectory="tmp" />
</Target>
<!-- Source Targets -->
<Target Name="PackageSource" DependsOnTargets="PackageSourcePrepare;PackageSourceGPL;$(PackageSourceCommercial)PackageSourceClean" />
<Target Name="PackageSourcePrepare">
<RemoveDir Directories="tmp" ContinueOnError="true" />
<MakeDir Directories="tmp" />
<ItemGroup>
<CommercialOnlyFiles Include="**/README-Commercial;**/LICENSE-Commercial" />
</ItemGroup>
<ItemGroup>
<SourceCodeFiles Include="**/**" Exclude="@(CommercialOnlyFiles);**/tmp/**;**/bin/**;**/obj/**;**/.git/**;*.py;*.diff;.gitignore;.gitattributes;.reviewboardrc;*.suo;**/source/*.suo;**/*.user;**/packages/**;**/.svn/**;**/output/**;**/debug/**;**/release/**;**/*.wixobj;**/*.msi;**/*.msm;*.Design.*;**/installer/**;**/Package.csproj;**/Package.sln;**/*.cache;**/*.proj;**/*.bak;**/*.user;**/MySql.Data.xml;**/*.InstallLog;**/*.bat;**/*.reg;**/thumbs.db;**/UpgradeLog*.*;**/*.~??;**/Scripts/**;**/NGShellClient/**" />
</ItemGroup>
<Copy SourceFiles="@(SourceCodeFiles)" DestinationFolder="tmp/%(RecursiveDir)" />
</Target>
<Target Name="PackageSourceGPL">
<ItemGroup>
<FilesToZipGPL Include="tmp\**\*.*" />
</ItemGroup>
<Zip ZipFileName="packages/mysql-for-visualstudio-$(Version)$(Postfix)-src.zip" Files="@(FilesToZipGPL)" WorkingDirectory="tmp" />
</Target>
<Target Name="PackageSourceCommercial">
<Delete Files="tmp/README" />
<Delete Files="tmp/LICENSE" />
<Copy SourceFiles="@(CommercialOnlyFiles)" DestinationFolder="tmp\%(RecursiveDir)" />
<Move SourceFiles="tmp/README-Commercial" DestinationFiles="tmp/README" />
<Move SourceFiles="tmp/LICENSE-Commercial" DestinationFiles="tmp/LICENSE" />
<ItemGroup>
<FilesToZipCommercial Include="tmp\**\*.*" />
</ItemGroup>
<Zip ZipFileName="packages/mysql-for-visualstudio-commercial-$(Version)$(Postfix)-src.zip" Files="@(FilesToZipCommercial)" WorkingDirectory="tmp" />
</Target>
<Target Name="PackageSourceClean">
<RemoveDir Directories="tmp" ContinueOnError="true" />
</Target>
<Choose>
<When Condition="('$(ClientPath)' != '' AND Exists($(ClientPath)) AND '$(SigningServer)' != '' AND '$(SigningUser)' != '' AND '$(SigningGuid)' != '' AND '$(SigningFile)' != '')">
<PropertyGroup>
<PreBuildEvent>
set CODESIGNBUREAU_CREDFILE=$(SigningFile)
java -Xmx1024m -jar "$(ClientPath)" sign -file_to_sign "$(SolutionDir)Dependencies\MySql\MySql.VisualStudio.Updater.exe" -user $(SigningUser) -global_uid $(SigningGuid) -server $(SigningServer) -signed_location "$(SolutionDir)Dependencies\MySql" -sign_method microsoft
</PreBuildEvent>
</PropertyGroup>
</When>
</Choose>
</Project>