forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStride.build
More file actions
339 lines (290 loc) · 22.3 KB
/
Copy pathStride.build
File metadata and controls
339 lines (290 loc) · 22.3 KB
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?xml version="1.0" encoding="utf-8"?>
<!--
Build file used to build and package Stride from the command line.
Example: dotnet build build/Stride.build -t:Package
-->
<Project DefaultTarget="Help" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<StrideRoot>$(MSBuildThisFileDirectory)..\</StrideRoot>
<StrideSolution>$(StrideRoot)build\Stride.slnx</StrideSolution>
<StrideVisualStudioSolution>$(StrideRoot)build\Stride.VisualStudio.slnx</StrideVisualStudioSolution>
<StrideSolutionLauncher>$(StrideRoot)build\Stride.Launcher.slnx</StrideSolutionLauncher>
<StridePlatforms Condition="'$(StridePlatforms)' == ''">Windows</StridePlatforms>
<BuildProperties>Configuration=Release;NoWarn=1591;DeployExtension=false;StridePlatforms=$([MSBuild]::Escape('$(StridePlatforms)'));StrideGraphicsApiDependentBuildAll=$(StrideGraphicsApiDependentBuildAll)</BuildProperties>
<StrideSign Condition="'$(StrideSign)' == ''">true</StrideSign>
<BuildProperties Condition="'$(StrideSign)' != ''">$(BuildProperties);StrideSign=$(StrideSign)</BuildProperties>
<NuGetPath>$(MSBuildThisFileDirectory).nuget\NuGet.exe</NuGetPath>
<StrideStoreUrl Condition="'$(StrideStoreUrl)' == ''">https://api.nuget.org/v3/index.json</StrideStoreUrl>
<AdvancedInstallerPath Condition="'$(AdvancedInstallerPath)' == '' And Exists('$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 22.0\bin\x86\AdvancedInstaller.com')">$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 22.0\bin\x86\AdvancedInstaller.com</AdvancedInstallerPath>
<AdvancedInstallerBuildScript Condition="'$(StrideSign)' == 'true'">$(MSBuildThisFileDirectory)advancedinstaller-signed.aic</AdvancedInstallerBuildScript>
<AdvancedInstallerBuildScript Condition="'$(StrideSign)' != 'true'">$(MSBuildThisFileDirectory)advancedinstaller-unsigned.aic</AdvancedInstallerBuildScript>
<StrideBuildPrerequisitesInstaller Condition="'$(StrideBuildPrerequisitesInstaller)' == ''">true</StrideBuildPrerequisitesInstaller>
<!-- Shared signing config, defined once (was duplicated across SignPackage / VSIXPlugin /
PackageLauncher). The client secret is the only sensitive arg; it lives here in a single
place and every signing Exec uses EchoOff so it never reaches the log.
TODO hardening: the `sign` tool uses Azure.Identity, so the secret could move to an
AZURE_CLIENT_SECRET env var (off the command line entirely) — needs a signed-build test. -->
<StrideSignTool>$(MSBuildThisFileDirectory)sign\sign code azure-key-vault</StrideSignTool>
<StrideSignArgs>--description "Stride" --description-url "https://stride3d.net" --publisher-name "Stride" --azure-key-vault-tenant-id "$(StrideSignTenantId)" --azure-key-vault-client-id "$(StrideSignClientId)" --azure-key-vault-client-secret "$(StrideSignClientSecret)" --azure-key-vault-certificate "$(StrideSignKeyVaultCertificate)" --azure-key-vault-url "https://$(StrideSignKeyVaultName).vault.azure.net/" --file-list "sign\nupkgfilter.txt" -v Information</StrideSignArgs>
</PropertyGroup>
<!-- Sign every *.nupkg in $(StrideSignDir). Pass the dir, not a glob: a wildcard expands only when
literal in an Include, not via a property. Error if nothing matches, so we never ship unsigned. -->
<Target Name="_SignFiles" DependsOnTargets="SignCredentialsCheck" Condition="'$(StrideSign)' == 'true'">
<ItemGroup>
<_SignList Include="$(StrideSignDir)\*.nupkg" />
</ItemGroup>
<Error Condition="'@(_SignList)' == ''" Text="StrideSign=true but no .nupkg found in '$(StrideSignDir)' — nothing to sign. Refusing to ship an unsigned package." />
<Message Importance="high" Text="Signing @(_SignList->Count()) file(s)" />
<Exec Command="$(StrideSignTool) %(_SignList.Identity) $(StrideSignArgs)" EchoOff="true" />
</Target>
<!-- Build an AdvancedInstaller .aip ($(StrideInstallerAip)), signing inline when StrideSign.
Shared by PrerequisitesInstaller and PackageInstaller.
The secret goes via EnvironmentVariables (not the command line) — AdvancedInstaller reads it. -->
<Target Name="_BuildAdvancedInstaller" DependsOnTargets="SignCredentialsCheck">
<Exec Condition="'$(StrideSign)' == 'true'" Command='"$(AdvancedInstallerPath)" /edit "$(StrideInstallerAip)" /SetAzureKeyVaultParameters -tenant_id $(StrideSignTenantId) -app_id $(StrideSignClientId) -vault_name $(StrideSignKeyVaultName) -certificate_name $(StrideSignKeyVaultCertificate) -enable_signing ' />
<Exec Command='"$(AdvancedInstallerPath)" /execute "$(StrideInstallerAip)" "$(AdvancedInstallerBuildScript)"' EnvironmentVariables="StrideSignClientSecret="$(StrideSignClientSecret)"" />
</Target>
<Target Name="Help">
<Message Importance="high" Text="Stride build targets (run: dotnet build build/Stride.build -t:<Target>)%0a%0a Build - build the full Stride solution (Windows)%0a BuildWindows / BuildWindowsDirect3D11 / BuildWindowsDirect3D12 / BuildWindowsVulkan%0a BuildLinux / BuildAndroid / BuildiOS / BuildmacOS - build a platform's runtime%0a BuildRuntime - build the runtime slnf (with tests/packing)%0a Package - build + pack + sign NuGet packages (BuildPackages = build only, no signing)%0a VSIXPlugin - build + pack the Visual Studio extension%0a FullBuildLauncher - build the launcher + installer%0a PackageCli - build + pack + sign the Stride CLI dotnet tool (Stride.Cli)%0a Publish / PublishVSIX / PublishLauncher - push packages to the NuGet store%0a Clean - delete the Bin output folder%0a%0aCommon properties: -p:StrideSign=false -p:StrideGraphicsApiDependentBuildAll=true" />
</Target>
<!--
VSIX Stride plugin
-->
<Target Name="VSIXPlugin" DependsOnTargets="PreparePackageBuild;Restore">
<ItemGroup>
<FilesToDeleteVSIX Include="$(StrideRoot)bin\vsix\*.nupkg"/>
</ItemGroup>
<Delete Files="@(FilesToDeleteVSIX)"/>
<MSBuild Targets="Restore" Projects="$(StrideVisualStudioSolution)" />
<MSBuild Targets="Stride_VisualStudio_Package;Stride_VisualStudio_Package_Shaders;Stride_VisualStudio_PackageInstall" Projects="$(StrideVisualStudioSolution)" Properties="$(BuildProperties);Platform=Any CPU;VersionSuffix=$(VersionSuffix)"/>
<!-- Ask each package for its built .vsix path (Configuration/TargetFramework-derived) and the main package for
its independent NuGet version (VersionPrefix + VersionSuffix), so the nuspec stays TFM- and version-agnostic.
Use Platform=AnyCPU (not "Any CPU"): these query the csproj directly, where the spaced solution-platform
name isn't normalized and would append an "Any CPU" segment to $(OutputPath) that the solution build (which
does normalize it) never produces — leaving nuget pack looking for a .vsix that isn't there. -->
<MSBuild Targets="GetVsixOutputPath" Projects="$(StrideRoot)sources\tools\Stride.VisualStudio.Package\Stride.VisualStudio.Package.csproj" Properties="$(BuildProperties);Platform=AnyCPU;VersionSuffix=$(VersionSuffix)">
<Output TaskParameter="TargetOutputs" PropertyName="StrideVsixPath" />
</MSBuild>
<MSBuild Targets="GetVsixOutputPath" Projects="$(StrideRoot)sources\tools\Stride.VisualStudio.Package.Shaders\Stride.VisualStudio.Package.Shaders.csproj" Properties="$(BuildProperties);Platform=AnyCPU">
<Output TaskParameter="TargetOutputs" PropertyName="StrideShadersVsixPath" />
</MSBuild>
<MSBuild Targets="GetPackageVersion" Projects="$(StrideRoot)sources\tools\Stride.VisualStudio.Package\Stride.VisualStudio.Package.csproj" Properties="$(BuildProperties);Platform=AnyCPU;VersionSuffix=$(VersionSuffix)">
<Output TaskParameter="TargetOutputs" PropertyName="StrideVsPackageVersion" />
</MSBuild>
<Exec Command='"$(NuGetPath)" pack "$(StrideRoot)sources\tools\Stride.VisualStudio.Package\Stride.VisualStudio.Package.nuspec" -BasePath "$(StrideRoot)sources\tools\Stride.VisualStudio.Package" -Version "$(StrideVsPackageVersion)" -Properties "VsixPath=$(StrideVsixPath);ShadersVsixPath=$(StrideShadersVsixPath)" -OutputDirectory "$(StrideRoot)bin\vsix"' />
<!-- Invoke _SignFiles via MSBuild (not CallTarget) so StrideSignDir reaches it and its *.nupkg glob resolves -->
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_SignFiles"
Properties="StrideSign=$(StrideSign);StrideSignDir=$(MSBuildThisFileDirectory)..\bin\vsix" />
</Target>
<!--
Package Installer: install-prerequisites.exe
-->
<Target Name="PrerequisitesInstaller">
<Delete Files="$(StrideRoot)Bin\Prerequisites\install-prerequisites.exe"/>
<!-- Note: this exe will be signed as part of GameStudio.nupkg -->
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildAdvancedInstaller" Properties="StrideInstallerAip=$(StrideRoot)sources\prerequisites\prerequisites.aip" />
</Target>
<!--
Perform a full build: Build, Package
-->
<Target Name="FullBuild">
<CallTarget Targets="Build"/>
<CallTarget Targets="Package"/>
<CallTarget Targets="VSIXPlugin"/>
</Target>
<!--
Publish Stride nupkg from this folder to the store
-->
<Target Name="Publish">
<Error Condition="'$(StrideStoreApiKey)' == ''" Text="Missing env variable StrideStoreApiKey"/>
<!-- Waiting 30min in case NuGet.Gallery/Server takes time to process -->
<ItemGroup>
<NuGetPackage Include="..\bin\packages\*.nupkg"/>
<!-- Remove GameStudio (pushed in a second stage) -->
<NuGetPackage Remove="@(NuGetPackage)" Condition="$([System.String]::Copy('%(Filename)').Contains('Stride.GameStudio'))"/>
<!-- Remove Samples.Templates (we use -SkipDuplicate since version is rarely bumped) -->
<NuGetPackage Remove="@(NuGetPackage)" Condition="$([System.String]::Copy('%(Filename)').Contains('Stride.Samples.Templates'))"/>
</ItemGroup>
<Exec Command='"$(NuGetPath)" push %(NuGetPackage.Identity) -ApiKey $(StrideStoreApiKey) -Source $(StrideStoreUrl) -Timeout 1800 -NoSymbols -SkipDuplicate'/>
<Exec Command='"$(NuGetPath)" push ..\bin\packages\Stride.Samples.Templates*.nupkg -ApiKey $(StrideStoreApiKey) -Source $(StrideStoreUrl) -Timeout 1800 -NoSymbols -SkipDuplicate'/>
<!-- Push GameStudio so that dependencies are already uploaded -->
<Exec Command='"$(NuGetPath)" push ..\bin\packages\Stride.GameStudio*.nupkg -ApiKey $(StrideStoreApiKey) -Source $(StrideStoreUrl) -Timeout 1800 -NoSymbols'/>
</Target>
<!--
Publish VSIX nupkg from this folder to the store
-->
<Target Name="PublishVSIX">
<Error Condition="'$(StrideStoreApiKey)' == ''" Text="Missing env variable StrideStoreApiKey"/>
<Exec Command='"$(NuGetPath)" push ..\bin\vsix\*.nupkg -ApiKey $(StrideStoreApiKey) -Source $(StrideStoreUrl) -NoSymbols'/>
</Target>
<!--
Build Stride: Windows, Android, iOS, Windows 10 (UWP)
-->
<Target Name="Clean">
<RemoveDir Directories="$(StrideRoot)Bin"/>
</Target>
<!-- Package -->
<Target Name="PreparePackageBuild">
<PropertyGroup>
<BuildProperties>$(BuildProperties);StridePublicApi=true;StridePackageBuild=true</BuildProperties>
</PropertyGroup>
<ItemGroup>
<FilesToDeletePackages Include="$(StrideRoot)bin\packages\*.nupkg"/>
</ItemGroup>
<Delete Files="@(FilesToDeletePackages)"/>
<!-- Create SharedAssemblyInfo.Generated.cs with the committed version + git metadata (the Stride SDK swaps
it in for SharedAssemblyInfo.cs when building the packages). -->
<StrideGitVersion RootDirectory="$(StrideRoot)" VersionFile="sources\shared\SharedAssemblyInfo.cs" GeneratedVersionFile="sources\shared\SharedAssemblyInfo.Generated.cs" SuffixOverride="$(StrideVersionSuffix)">
<Output TaskParameter="NuGetVersion" PropertyName="StridePackageVersion"/>
</StrideGitVersion>
<Message Text="Done preparing build for version $(StridePackageVersion)"/>
<Exec Command="echo **Version:** $(StridePackageVersion) >> $(GITHUB_STEP_SUMMARY)" Condition="'$(GITHUB_STEP_SUMMARY)' != ''" IgnoreExitCode="true" />
</Target>
<PropertyGroup>
<_StridePackageTargetPrerequisitesInstaller Condition="'$(StrideBuildPrerequisitesInstaller)' == 'true'">PrerequisitesInstaller</_StridePackageTargetPrerequisitesInstaller>
</PropertyGroup>
<!-- Build phase: produce packages WITHOUT signing. Secret-free, so the workflow can run this
as its own step and confine signing secrets to the SignPackage step (TODO: wire that split
in release.yml — needs a signed-build test; note the prerequisites installer still signs
inline during build via AdvancedInstaller, so full scoping requires building it unsigned). -->
<Target Name="BuildPackages" DependsOnTargets="PreparePackageBuild;$(_StridePackageTargetPrerequisitesInstaller);Build"/>
<!-- Build + sign, in order. Same behavior as before; the BuildPackages/SignPackage seam lets
callers run the two phases separately. -->
<Target Name="Package" DependsOnTargets="BuildPackages;SignPackage"/>
<!--
Stride CLI dotnet tool (Stride.Cli)
Versioned independently of the engine (SemVer in Stride.Cli.csproj); deployed by
.github/workflows/release-cli.yml. BuildPackageCli packs the tool nupkg (secret-free),
SignPackageCli signs it via the shared _SignFiles target, PackageCli does both.
-->
<PropertyGroup>
<StrideCliProject>$(StrideRoot)sources\launcher\Stride.Cli\Stride.Cli.csproj</StrideCliProject>
<StrideCliPackageDir>$(StrideRoot)bin\cli</StrideCliPackageDir>
</PropertyGroup>
<Target Name="BuildPackageCli">
<ItemGroup>
<_StrideCliOldPackages Include="$(StrideCliPackageDir)\*.nupkg" />
</ItemGroup>
<Delete Files="@(_StrideCliOldPackages)" />
<MSBuild Projects="$(StrideCliProject)" Targets="Restore" />
<!-- StrideSkipAutoPack: engine ProjectReferences build but don't auto-pack their own .nupkg into our output. -->
<MSBuild Projects="$(StrideCliProject)" Targets="Pack"
Properties="Configuration=Release;ContinuousIntegrationBuild=true;StrideSkipAutoPack=true;VersionSuffix=$(VersionSuffix);PackageOutputPath=$(StrideCliPackageDir)" />
</Target>
<Target Name="SignPackageCli">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_SignFiles"
Properties="StrideSign=$(StrideSign);StrideSignDir=$(StrideCliPackageDir)" />
</Target>
<Target Name="PackageCli" DependsOnTargets="BuildPackageCli;SignPackageCli" />
<!-- In-repo sample version management (SamplesToDevVersion / SamplesToReleaseVersion /
UpgradeSamplesVersion) is standalone in build/Stride.Samples.build - run it directly, e.g.
dotnet msbuild build/Stride.Samples.build -t:UpgradeSamplesVersion. See plans/samples-version-bump.md. -->
<Target Name="RestoreInternal">
<MSBuild Targets="Restore" Projects="$(StrideSolution)" Properties="StrideGraphicsApiDependentBuildAll=$(StrideGraphicsApiDependentBuildAll);StrideGraphicsApis=$(StrideGraphicsApis);StridePlatforms=$(StridePlatforms)" />
</Target>
<Target Name="Restore">
<CallTarget Targets="RestoreInternal" />
</Target>
<Target Name="Build">
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StridePlatforms=$(StridePlatforms);StrideSolution=$(StrideSolution);StrideGraphicsApiDependentBuildAll=$(StrideGraphicsApiDependentBuildAll)"/>
<MSBuild Targets="Build" Projects="$(StrideSolution)" Properties="$(BuildProperties);Platform=Any CPU"/>
</Target>
<!-- Shared body for the per-platform build entry points below. Restores + builds
$(StrideTargetSolution) scoped by the ambient StridePlatforms/StrideGraphicsApis, skipping
packing and unit tests (these are local "build the binaries" shortcuts). The BuildXxx
targets exist so users don't need to know which slnf / properties each platform wants. -->
<Target Name="_BuildPlatform">
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StrideSolution=$(StrideTargetSolution);StridePlatforms=$(StridePlatforms);StrideGraphicsApis=$(StrideGraphicsApis);StrideGraphicsApiDependentBuildAll=$(StrideGraphicsApiDependentBuildAll)"/>
<MSBuild Targets="Build" Projects="$(StrideTargetSolution)" Properties="$(BuildProperties);StridePlatforms=$(StridePlatforms);StrideGraphicsApis=$(StrideGraphicsApis);StrideSkipAutoPack=true;StrideSkipUnitTests=true;StrideGraphicsApiDependentBuildAll=$(StrideGraphicsApiDependentBuildAll)"/>
</Target>
<Target Name="BuildWindows">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideSolution)" />
</Target>
<Target Name="BuildWindowsDirect3D11">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.Runtime.slnf;StrideGraphicsApis=Direct3D11" />
</Target>
<Target Name="BuildWindowsDirect3D12">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.Runtime.slnf;StrideGraphicsApis=Direct3D12" />
</Target>
<Target Name="BuildWindowsVulkan">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.Runtime.slnf;StrideGraphicsApis=Vulkan" />
</Target>
<Target Name="BuildAndroid">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.Android.slnf;StridePlatforms=Android" />
</Target>
<Target Name="BuildiOS">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.iOS.slnf;StridePlatforms=iOS" />
</Target>
<Target Name="BuildLinux">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildPlatform" Properties="StrideTargetSolution=$(StrideRoot)build\Stride.Runtime.slnf;StridePlatforms=Linux" />
</Target>
<!-- macOS is bespoke: uses the full solution with Platform=macOS (not StridePlatforms). -->
<Target Name="BuildmacOS">
<PropertyGroup>
<StridemacOSSolution>$(StrideRoot)build\Stride.macOS.slnx</StridemacOSSolution>
</PropertyGroup>
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StrideSolution=$(StridemacOSSolution)"/>
<MSBuild Targets="Build" Projects="$(StridemacOSSolution)" Properties="$(BuildProperties);Platform=macOS"/>
</Target>
<!-- BuildRuntime is bespoke: builds the runtime slnf WITH packing/tests (no skip flags). -->
<Target Name="BuildRuntime">
<PropertyGroup>
<StrideRuntimeSolution>$(StrideRoot)build\Stride.Runtime.slnf</StrideRuntimeSolution>
</PropertyGroup>
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StridePlatforms=$(StridePlatforms);StrideSolution=$(StrideRuntimeSolution)"/>
<MSBuild Targets="Build" Projects="$(StrideRuntimeSolution)" Properties="$(BuildProperties)"/>
</Target>
<!--
Package Launcher
-->
<Target Name="PackageLauncher">
<ItemGroup>
<FilesToDeleteLauncher Include="$(StrideRoot)bin\launcher\*.nupkg"/>
</ItemGroup>
<!-- Note: we avoid building again if BuildWindows was already ran just before -->
<Delete Files="@(FilesToDeleteLauncher)"/>
<!-- Generate the nuget package for the launcher application -->
<Exec Command='"$(NuGetPath)" pack "$(StrideRoot)sources\launcher\Stride.Launcher\Stride.Launcher.nuspec" -BasePath "$(StrideRoot)sources\launcher\Stride.Launcher\bin\Release\publish" -OutputDirectory "$(StrideRoot)bin\launcher"' />
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_SignFiles"
Properties="StrideSign=$(StrideSign);StrideSignDir=$(MSBuildThisFileDirectory)..\bin\launcher" />
</Target>
<!--
Package Installer: StrideSetup.exe
-->
<Target Name="PackageInstaller" DependsOnTargets="PackageLauncher">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_BuildAdvancedInstaller" Properties="StrideInstallerAip=$(StrideRoot)sources\launcher\Setup\setup.aip" />
<Copy SourceFiles="$(StrideRoot)sources\launcher\Setup\setup-SetupFiles\StrideSetup.exe" DestinationFolder="$(StrideRoot)bin\launcher"/>
</Target>
<!--
Perform a full build: Build, Package and PackageInstaller
-->
<Target Name="FullBuildLauncher">
<CallTarget Targets="BuildLauncher"/>
<CallTarget Targets="PackageInstaller"/>
</Target>
<!--
Publish Launcher nupkg from this folder to the store
-->
<Target Name="PublishLauncher">
<Error Condition="'$(StrideStoreApiKey)' == ''" Text="Missing env variable StrideStoreApiKey"/>
<Exec Command='"$(NuGetPath)" push ..\bin\launcher\*.nupkg -ApiKey $(StrideStoreApiKey) -Source $(StrideStoreUrl) -NoSymbols'/>
</Target>
<Target Name="BuildLauncher" DependsOnTargets="SignCredentialsCheck">
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StridePlatforms=Windows;StrideSolution=$(StrideSolutionLauncher);RuntimeIdentifiers=win-x64"/>
<MSBuild Projects="..\sources\launcher\Stride.Launcher\Stride.Launcher.csproj" Targets="Publish" Properties="$(BuildProperties);PublishProfile=FolderProfile;SolutionName=Stride.Launcher" />
</Target>
<Target Name="SignCredentialsCheck" Condition="'$(StrideSign)' == 'true'">
<Error Condition="'$(StrideSignTenantId)' == ''" Text="StrideSignTenantId is not set. Please set StrideSign to false if you don't want to sign using code certificates." />
<Error Condition="'$(StrideSignClientId)' == ''" Text="StrideSignClientId is not set. Please set StrideSign to false if you don't want to sign using code certificates." />
<Error Condition="'$(StrideSignClientSecret)' == ''" Text="StrideSignClientSecret is not set. Please set StrideSign to false if you don't want to sign using code certificates." />
<Error Condition="'$(StrideSignKeyVaultCertificate)' == ''" Text="StrideSignKeyVaultCertificate is not set. Please set StrideSign to false if you don't want to sign using code certificates." />
<Error Condition="'$(StrideSignKeyVaultName)' == ''" Text="StrideSignKeyVaultName is not set. Please set StrideSign to false if you don't want to sign using code certificates." />
</Target>
<Target Name="SignPackage">
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="_SignFiles"
Properties="StrideSign=$(StrideSign);StrideSignDir=$(MSBuildThisFileDirectory)..\bin\packages" />
</Target>
<!-- StrideGitVersion task (package version from git release tags); shared with Stride.Samples.build. -->
<Import Project="$(StrideRoot)sources\targets\Stride.GitVersion.targets"
Condition="'$(_StrideGitVersionTargetsImported)' != 'true'" />
</Project>