Skip to content

Commit

Permalink
Merge branch 'main' into user/ayushjaiswal/OAuthAPIUTs
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushjai30 committed Dec 17, 2024
2 parents ebf1f2f + a0a435d commit 6240298
Show file tree
Hide file tree
Showing 200 changed files with 4,418 additions and 2,408 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body:
label: NuGet package version
description: Specify the version of Windows App SDK (or Project Reunion) you're using.
options:
- "Windows App SDK 1.6.1: 1.6.240923002"
- "Windows App SDK 1.6.3: 1.6.241114003"
- "Windows App SDK 1.6 Preview 2: 1.6.240821007-preview2"
- "Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2"
- type: dropdown
Expand Down
34 changes: 32 additions & 2 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ configuration:
label: needs-triage


description: Add needs-triage to closed item if commented on by external user
- if:
- description: Add needs-triage to closed item if commented on by external user
if:
- payloadType: Issue_Comment
- not: isOpen
- not:
Expand Down Expand Up @@ -194,6 +194,36 @@ configuration:
- removeLabel:
label: no-recent-activity

# /feedbackHub
- description: >-
Triggers:
* /feedbackhub
* /feedbackHub
if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/feedback[H|h]ub'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- addReply:
reply: >-
Hi @${issueAuthor}. Please file this issue on Feedback Hub [Windows]+[f] and paste
the link here so we can more easily find your information on the back end. The link
can be found at the bottom of the feedback report. Please use "Developer Platform" and "Windows App SDK"
for the Category.
- closeIssue
- removeLabel:
label: needs-triage
- removeLabel:
label: needs-assignee-attention
- addLabel:
label: needs-author-feedback
onFailure:
Expand Down
106 changes: 34 additions & 72 deletions BuildAll.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,27 @@ write-host "VCToolsInstallDir: $VCToolsInstallDir"
$msBuildPath = "$VCToolsInstallDir\MSBuild\Current\Bin\msbuild.exe"
write-host "msBuildPath: $msBuildPath"


# Generate overrides
# Make sure override directory exists.
if(-not (test-path "$buildOverridePath"))
{
new-item -path "$buildOverridePath" -itemtype "directory"
}

function NugetRestore([string] $Label, [string] $Target)
{
if ($AzureBuildStep -ne "all")
{
$env:NUGET_RESTORE_MSBUILD_ARGS = "/binaryLogger:BuildOutput\binlogs\$Label.restore.$Platform.$Configuration.binlog /p:Platform=$Platform /p:Configuration=$Configuration"
}
& .\.nuget\nuget.exe restore $Target -configfile NuGet.config
if ($lastexitcode -ne 0)
{
write-host "ERROR: nuget.exe restore $Label FAILED."
exit 1
}
}

Try {
$WindowsAppSDKBuildPipeline = 0
$WindowsAppSDKVersionProperty = ""
Expand All @@ -110,34 +123,23 @@ Try {
# If $AzureBuildStep is not "all", that means we are in the pipeline
$WindowsAppSDKBuildPipeline = 1
}
# PreFastSetup is specifically for use when preparing for PREFast scans. It triggers the same actions below as BuildBinaries or BuildMRT, except
# PreFastSetup is specifically for use when preparing for PREFast scans. It triggers the same actions below as BuildFoundation or BuildMRT, except
# PreFastSetup stops short of calling msBuild.exe to build the target, which the Guardian:PREFast task does _not_ support, so the caller of this
# script needs to resort to calling the MSBuild/VSBuild task later to build the target, which the Guardian:PREFast task does support. Structuring
# the code this way allows minimally diveraging the flow while supporting building the target both via this script and the VSBuild/MSBuild task.
if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildBinaries") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup")))
if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildFoundation") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup")))
{
& .\.nuget\nuget.exe restore WindowsAppRuntime.sln -configfile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore WindowsAppRuntime.sln FAILED."
exit 1
}

& .\.nuget\nuget.exe restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" -configfile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED."
exit 1
}
NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln"
NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj"

$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse

if (($srcPath -ne $null)){
if (($srcPath -ne $null))
{
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse

if (($destinationPaths -ne $null)) {
if (($destinationPaths -ne $null))
{
foreach ($destPath in $destinationPaths) {
Write-Host 'SourcePath:' $srcPath.FullName
Write-Host 'DestinationPath:' $destPath.FullName
Expand All @@ -153,7 +155,7 @@ Try {
}
}
# PreFastSetup intentionally skips the call to MSBuild.exe below.
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildBinaries"))
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildFoundation"))
{
foreach($configurationToRun in $configuration.Split(","))
{
Expand All @@ -163,15 +165,15 @@ Try {
& $msBuildPath /restore `
WindowsAppRuntime.sln `
/p:Configuration=$configurationToRun,Platform=$platformToRun `
/binaryLogger:"BuildOutput/WindowsAppRuntime.$platformToRun.$configurationToRun.binlog" `
/binaryLogger:"BuildOutput/binlogs/WindowsAppRuntime.$platformToRun.$configurationToRun.binlog" `
$WindowsAppSDKVersionProperty `
/p:PGOBuildMode=$PGOBuildMode `
/p:WindowsAppSDKCleanIntermediateFiles=true `
/p:AppxSymbolPackageEnabled=false `
/p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline
if ($lastexitcode -ne 0)
{
write-host "ERROR: msbuild.exe /restore WindowsAppRuntime.sln FAILED."
write-host "ERROR: msbuild.exe WindowsAppRuntime.sln FAILED."
exit 1
}
}
Expand All @@ -184,45 +186,11 @@ Try {
#------------------

#Restore packages from mrt.
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\MrtCore.sln" -ConfigFile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore MrtCore.sln FAILED."
exit 1
}

& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\packages.config" -ConfigFile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore Microsoft.Windows.ApplicationModel.Resources\src\packages.config FAILED."
exit 1
}

& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmex\packages.config" -ConfigFile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore mrm\mrmex\packages.config FAILED."
exit 1
}

& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmmin\packages.config" -ConfigFile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore mrmmin\packages.config FAILED."
exit 1
}

& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\unittests\packages.config" -ConfigFile NuGet.config

if ($lastexitcode -ne 0)
{
write-host "ERROR: restore unittests\packages.config FAILED."
exit 1
}
NugetRestore "MrtCore" "$MRTSourcesDirectory\mrt\MrtCore.sln"
NugetRestore "Microsoft.Windows.ApplicationModel.Resources" "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\packages.config"
NugetRestore "mrmex" "$MRTSourcesDirectory\mrt\mrm\mrmex\packages.config"
NugetRestore "mrmmin" "$MRTSourcesDirectory\mrt\mrm\mrmmin\packages.config"
NugetRestore "unittests" "$MRTSourcesDirectory\mrt\mrm\unittests\packages.config"

# Init mrtcore
foreach($platformToRun in $platform.Split(","))
Expand All @@ -247,11 +215,11 @@ Try {
& $msBuildPath /restore "$MRTSourcesDirectory\mrt\MrtCore.sln" `
/p:Configuration=$configurationToRun,Platform=$platformToRun `
/p:PGOBuildMode=$PGOBuildMode `
/binaryLogger:"BuildOutput/mrtcore.$platformToRun.$configurationToRun.binlog"
/binaryLogger:"BuildOutput/binlogs/MrtCore.$platformToRun.$configurationToRun.binlog"

if ($lastexitcode -ne 0)
{
write-host "ERROR: Building '$MRTSourcesDirectory\mrt\MrtCore.sln' FAILED."
write-host "ERROR: msbuild.exe '$MRTSourcesDirectory\mrt\MrtCore.sln' FAILED."
exit 1
}
}
Expand All @@ -263,11 +231,11 @@ Try {
#------------------
# Build windowsAppRuntime.sln (anyCPU) and move output to staging.
#------------------
# build AnyCPU
# build and restore AnyCPU
& $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU,Platform=AnyCPU
if ($lastexitcode -ne 0)
{
write-host "ERROR: msbuild restore Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED."
write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED."
exit 1
}
}
Expand Down Expand Up @@ -418,12 +386,6 @@ Try {
exit 1
}
}
# if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMock"))
# {
# $transportPackagepath = (Join-Path $OutputDirectory "Microsoft.WindowsAppSDK.Foundation.TransportPackage.$PackageVersion.nupkg")
# . eng\common\Scripts\buildMockWinAppSdkPackage.ps1 -TransportPackageName "Foundation" -TransportPackagePath $transportPackagepath -RepoRoot $env:Build_SourcesDirectory -Output $OutputDirectory -Platform $Platform -Configuration $Configuration -TransportPackageVersion $PackageVersion -CleanOutput
# }

$files = Get-ChildItem $OutputDirectory -File -Filter "*.nupkg"
foreach ($file in $files)
{
Expand Down
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information. -->
<!-- This is a special MSBuild file that is parsed before everything else when MSBuild detects it in our directory structure.
Adding Sdk="Microsoft.NET.Sdk" to a project causes NuGet files to be generated very early on, so we need these defines to be here
to ensure that all of our build output files end up in the same location. -->
<Project InitialTargets="DirectoryBuildPropsInfo" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="LkgToolset.props" />
<Import Project="eng\Version.Dependencies.props" />
<!-- Due to import ordering inconsistencies between different project types, we import this file from multiple places. -->
<Import Project="$(MSBuildThisFileDirectory)build\EnsureOutputLayout.props" Condition="$(EnsureOutputLayoutPropsIncluded) == ''" />
Expand All @@ -23,6 +24,7 @@
<AssemblyOriginatorKeyFile>$(RepoRoot)\WasdkStrongNameSign.snk</AssemblyOriginatorKeyFile>
<WindowsSdkPackageVersion>10.0.17763.$(CsWinRTDependencyWindowsSdkVersionSuffixPackageVersion)</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
Expand Down
23 changes: 23 additions & 0 deletions LkgToolset.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project ToolsVersion="14.0" TreatAsLocalProperty="Platform" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Enable synchronized LKG and internal MsUCRT consumption -->
<PropertyGroup>
<UseInternalMSUniCrtPackage>true</UseInternalMSUniCrtPackage>
<UndockedSettingsLoaded>true</UndockedSettingsLoaded>
</PropertyGroup>

<!-- The LKG toolset only supports Platform=win32. To work around, we TreatAsLocalProperty=Platform above to
enable overriding the global (command-line) Platform, explicitly import LKG's custom.props, and restore Platform. -->
<PropertyGroup Condition="'$(Platform)'=='x86'">
<WorkaroundLkgWin32>true</WorkaroundLkgWin32>
<Platform>Win32</Platform>
<CustomProps>$([MSBuild]::GetPathOfFileAbove('custom.props', '$(MSBuildThisFileDirectory)'))</CustomProps>
</PropertyGroup>
<Import Project="$(CustomProps)" Condition="Exists('$(CustomProps)') and '$(WorkaroundLkgWin32)'=='true'" />
<PropertyGroup Condition="'$(WorkaroundLkgWin32)'=='true'">
<Platform>x86</Platform>
</PropertyGroup>

</Project>
Loading

0 comments on commit 6240298

Please sign in to comment.