forked from microsoft/WindowsAppSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
771 additions
and
997 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
244 changes: 244 additions & 0 deletions
244
build/AzurePipelinesTemplates/WindowsAppSDK-BuildProject-Steps.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,244 @@ | ||
parameters: | ||
solutionPath: '' | ||
nugetConfigPath: '' | ||
buildOutputDir: '$(Build.SourcesDirectory)\BuildOutput' | ||
WindowsAppSDKCleanIntermediateFiles: 'true' | ||
artifactName: 'drop' | ||
channel: 'experimental' | ||
enableLicenseInstall: false | ||
# license installation assets are only accessible in internal builds, but are only | ||
# needed in release-signed stable builds. Only enble this functionality in the private | ||
# pipeline builds. Otherwise, default to an inert placeholder implementation. | ||
runSDLBinaryAnalysis: false | ||
enablePREFast: true | ||
|
||
steps: | ||
- ${{ if eq(parameters.enableLicenseInstall, true) }}: | ||
- task: NuGetToolInstaller@1 | ||
|
||
- task: NuGetAuthenticate@1 | ||
inputs: | ||
nuGetServiceConnections: 'ProjectReunionInternal' | ||
|
||
# Restore transport package dependencies. This is only enbaled in release-signed builds. | ||
- task: PowerShell@2 | ||
name: ConvertVersionDetailsToPackageConfig | ||
displayName: "Convert VersionDetails To PackageConfig" | ||
inputs: | ||
filePath: '$(Build.SourcesDirectory)\build\Scripts\ConvertVersionDetailsToPackageConfig.ps1' | ||
arguments: -versionDetailsPath '$(Build.SourcesDirectory)\eng\Version.Details.xml' -packageConfigPath '$(Build.SourcesDirectory)\build\packages.config' | ||
|
||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 | ||
displayName: RestoreNuGetPackages | ||
inputs: | ||
restoreSolution: build/packages.config | ||
feedsToUse: config | ||
nugetConfigPath: build/licensing.nuget.config | ||
restoreDirectory: packages | ||
|
||
- template: WindowsAppSDK-PopulateBuildDateAndRevision-Steps.yml | ||
|
||
- script: | | ||
echo parameters.solutionPath = '${{ parameters.solutionPath }}' | ||
echo parameters.nugetConfigPath = '${{ parameters.nugetConfigPath }}' | ||
echo parameters.buildOutputDir = '${{ parameters.buildOutputDir }}' | ||
displayName: 'BuildProject: Display parameters' | ||
- template: WindowsAppSDK-InstallWindowsSDK-Steps.yml | ||
|
||
- template: WindowsAppSDK-InstallNuget-Steps.yml | ||
|
||
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves. | ||
- script: | | ||
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt | ||
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt | ||
del %TEMP%\vsinstalldir.txt | ||
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat" | ||
echo VCToolsInstallDir = %VCToolsInstallDir% | ||
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir% | ||
displayName: 'Retrieve VC tools directory' | ||
- task: CmdLine@1 | ||
displayName: 'Display build machine environment variables' | ||
inputs: | ||
filename: 'set' | ||
- task: NuGetAuthenticate@1 | ||
inputs: | ||
nuGetServiceConnections: 'WindowsES' | ||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 | ||
displayName: 'NuGet restore ${{ parameters.solutionPath }}' | ||
inputs: | ||
restoreSolution: ${{ parameters.solutionPath }} | ||
feedsToUse: config | ||
nugetConfigPath: ${{ parameters.nugetConfigPath }} | ||
- task: powershell@2 | ||
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\DevCheck.ps1 | ||
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create AppNotifications overrides' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\GenerateDynamicDependencyOverrides.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\build\override | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create PushNotifications overrides' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\GeneratePushNotificationsOverrides.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\build\override | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create DynamicDependencies TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.AppNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create DeploymentAPI TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create DynamicDependencies TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DynamicDependency.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.ApplicationModel.DynamicDependency -Output $(Build.SourcesDirectory)\dev\common\MddTerminalVelocityFeatures.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create VersionInfo TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-VersionInfo.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-VersionInfo.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create PushNotifications TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.PushNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Create EnvironmentManager TerminalVelocity features' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1 | ||
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.System -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.h | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
name: UpdateTraceloggingConfig | ||
inputs: | ||
targetType: 'inline' | ||
script: | | ||
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse | ||
if (($srcPath -ne $null)){ | ||
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse | ||
if (($destinationPaths -ne $null)) { | ||
foreach ($destPath in $destinationPaths) { | ||
Write-Host 'SourcePath:' $srcPath.FullName | ||
Write-Host 'DestinationPath:' $destPath.FullName | ||
Copy-Item -Force $srcPath.FullName $destPath.FullName | ||
} | ||
} | ||
} | ||
# Copy MSIX license installation header into the correct source location. | ||
- ${{ if eq(parameters.enableLicenseInstall, true) }}: | ||
- task: CopyFiles@2 | ||
displayName: 'Extract license header to source location' | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)\build\packages\$(AppLicensingInternalPackageName).$(AppLicensingInternalPackageVersion)\src' | ||
Contents: | | ||
*.h | ||
TargetFolder: '$(Build.SourcesDirectory)\dev\Licensing' | ||
flattenFolders: false | ||
overWrite: true | ||
- task: VSBuild@1 | ||
displayName: 'Build solution ${{ parameters.solutionPath }}' | ||
inputs: | ||
solution: ${{ parameters.solutionPath }} | ||
vsVersion: 16.0 | ||
platform: '$(buildPlatform)' | ||
configuration: '$(buildConfiguration)' | ||
msbuildArgs: '/restore /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog /p:WindowsAppSDKVersionBuild=$(builddate_yymm) /p:WindowsAppSDKVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:PGOBuildMode=$(PGOBuildMode) /p:WindowsAppSDKBuildPipeline=1 /p:WindowsAppSDKCleanIntermediateFiles=${{ parameters.WindowsAppSDKCleanIntermediateFiles }}' | ||
- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}: | ||
- template: WindowsAppSDK-BinaryAnalysis-steps.yml | ||
parameters: | ||
outputDirectory: '${{ parameters.buildOutputDir }}' | ||
enablePREFast: ${{ parameters.enablePREFast }} | ||
- task: powershell@2 | ||
displayName: 'Install test certificate for MSIX test packages (DevCheck)' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\DevCheck.ps1 | ||
arguments: -NoInteractive -Offline -Verbose -CheckTestCert | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
- task: powershell@2 | ||
displayName: 'Setup TAEF Service (DevCheck)' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\DevCheck.ps1 | ||
arguments: -Offline -Verbose -NoInteractive -CheckTAEFService | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
#DISABLED - GitHub runs as a a built-in Administrator (thus Elevated and no split-token) | ||
# TAEF Service can't RunAs:RestrictedUser from this account thus all tests Failed or Blocked | ||
# and Dynamic Dependencies doesn't support Elevation so it's impossible for this test to | ||
# work correctly today. Disabling until we move off GitHub's pipeline for test execution | ||
# - task: CmdLine@2 | ||
# displayName: 'Run AppLifeCycleTest' | ||
# inputs: | ||
# script: 'te.exe CppTest.dll' | ||
# workingDirectory: '$(Build.SourcesDirectory)\BuildOutput\$(buildConfiguration)\$(buildPlatform)\CppTest' | ||
# condition: or(eq(variables.buildPlatform, 'x64'), eq(variables.buildPlatform, 'x86')) | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish ${{ parameters.solutionPath }} binlog' | ||
condition: succeededOrFailed() | ||
inputs: | ||
PathtoPublish: $(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog | ||
artifactName: binlogs | ||
#UNDONE - subsequent PR | ||
# - task: powershell@2 | ||
# displayName: 'Source Index PDBs' | ||
# inputs: | ||
# targetType: filePath | ||
# filePath: build\SourceIndexing\IndexPdbs.ps1 | ||
# arguments: -SearchDir '${{ parameters.buildOutputDir }}\$(buildConfiguration)' -SourceRoot '$(Build.SourcesDirectory)' -recursive -Verbose -CommitId $(Build.SourceVersion) | ||
# errorActionPreference: silentlyContinue | ||
- task: powershell@2 | ||
displayName: 'Remove test certificate for MSIX test packages (DevCheck)' | ||
inputs: | ||
targetType: filePath | ||
filePath: tools\DevCheck.ps1 | ||
arguments: -NoInteractive -Offline -Verbose -RemoveTestCert -RemoveTestPfx | ||
workingDirectory: '$(Build.SourcesDirectory)' |
8 changes: 8 additions & 0 deletions
8
build/AzurePipelinesTemplates/WindowsAppSDK-InstallNuget-Steps.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
nugetVersion: 5.11.0 | ||
|
||
steps: | ||
- task: NuGetToolInstaller@1 | ||
displayName: 'Use NuGet ${{ parameters.nugetVersion }}' | ||
inputs: | ||
versionSpec: ${{ parameters.nugetVersion }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT IT | ||
|
||
// INPUT FILE: dev\common\TerminalVelocityFeatures-VersionInfo.xml | ||
// OPTIONS: -Channel Experimental -Language C++ -Namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime -Path dev\common\TerminalVelocityFeatures-VersionInfo.xml -Output dev\common\TerminalVelocityFeatures-VersionInfo.h | ||
|
||
#if defined(__midlrt) | ||
namespace features | ||
{ | ||
feature_name Feature_VersionInfoAPI = { DisabledByDefault, FALSE }; | ||
} | ||
#endif // defined(__midlrt) | ||
|
||
// Feature constants | ||
#define WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_APPLICATIONMODEL_WINDOWSAPPRUNTIME_FEATURE_VERSIONINFOAPI_ENABLED 1 | ||
|
||
#if defined(__cplusplus) | ||
|
||
namespace Microsoft::Windows::ApplicationModel::WindowsAppRuntime | ||
{ | ||
|
||
__pragma(detect_mismatch("ODR_violation_WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_APPLICATIONMODEL_WINDOWSAPPRUNTIME_FEATURE_VERSIONINFOAPI_ENABLED_mismatch", "AlwaysEnabled")) | ||
struct Feature_VersionInfoAPI | ||
{ | ||
static constexpr bool IsEnabled() { return WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_APPLICATIONMODEL_WINDOWSAPPRUNTIME_FEATURE_VERSIONINFOAPI_ENABLED == 1; } | ||
}; | ||
|
||
} // namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime | ||
|
||
#endif // defined(__cplusplus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<features xmlns="http://microsoft.com/windowsappsdk/TerminalVelocity/20210729/TerminalVelocityFeatures.xsd"> | ||
|
||
<!-- Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the MIT License. See LICENSE in the project root for license information. | ||
--> | ||
|
||
<!-- See docs/TerminalVelocity.md for more info. --> | ||
|
||
<!-- Enabled variants --> | ||
<feature> | ||
<name>Feature_VersionInfoAPI</name> | ||
<description>VersionInfo APIs to access Windows App SDK version information at runtime</description> | ||
<state>AlwaysEnabled</state> | ||
<alwaysDisabledChannelTokens> | ||
<channelToken>Preview</channelToken> | ||
<channelToken>Stable</channelToken> | ||
</alwaysDisabledChannelTokens> | ||
</feature> | ||
</features> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation and Contributors. | ||
// Licensed under the MIT License. | ||
|
||
#ifndef __WINDOWSAPPSDK_PRODUCTINFO_H__ | ||
#define __WINDOWSAPPSDK_PRODUCTINFO_H__ | ||
|
||
#ifndef STR2 | ||
#define STR1(x) #x | ||
#define VERSION_DELIMIMITER STR1(.) | ||
#define STR2(a,b) STR1(a) VERSION_DELIMIMITER STR1(b) | ||
#endif | ||
|
||
#define WINDOWSAPPSDK_RELEASE_MAJOR 1 | ||
#define WINDOWSAPPSDK_RELEASE_MINOR 2 | ||
|
||
#define WINDOWSAPPSDK_PRODUCT_VERSION WINDOWSAPPSDK_RELEASE_MAJOR, WINDOWSAPPSDK_RELEASE_MINOR | ||
#define WINDOWSAPPSDK_PRODUCT_VERSION_STRING STR2(WINDOWSAPPSDK_RELEASE_MAJOR, WINDOWSAPPSDK_RELEASE_MINOR) | ||
#define WINDOWSAPPSDK_COMPANY_NAME "Microsoft Corporation" | ||
#define WINDOWSAPPSDK_LEGAL_COPYRIGHT "Copyright (c) Microsoft Corporation. All rights reserved." | ||
#define WINDOWSAPPSDK_PRODUCT_NAME "Windows App SDK" | ||
|
||
#endif // __WINDOWSAPPSDK_PRODUCTINFO_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.