Skip to content

Commit

Permalink
FI develop into WNP_ContentBuilder_Prev1 (#2656)
Browse files Browse the repository at this point in the history
* Fix issue where WinUI C# and C++ item templates are not appearing in WinUI projects

* Making EM RS5+. Limiting the tracking capability to Windows11+ (Spec) (#2544)

* Updating spec

* Adressing comments

* More changes

Co-authored-by: Darren Hoehna <[email protected]>

* Create a pipeline to automate FIs from main to develop (#2610)

* v1.1 SDK throws an access violation from MddBootstrapInitialize's logging code if no matching packages are installed #2592 (#2608)

* v1.1 SDK throws an access violation from MddBootstrapInitialize's logging code if no matching packages are installed #2592

* Telemetry char/string. AppData DataStore-1.0.

* Retrieve the *Main* package's family name for AppData

* Add/Remove the test Main package (DataStore) just like we do the test Framework

* Detoured GetCurrentPackageInfo3() should route to the OS any PackageInfoType value it doesn't handle (#2623)

* Create tsaoptions.json

* Create WindowsAppSDK-BinaryAnalysis-steps.yml

* Create WindowsAppSDK-SourceAnalysis-job.yml

* Update build-mrt.yml

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-CI.yml

* Delete WindowsAppSDK-SourceAnalysis-job.yml

* Delete WindowsAppSDK-BinaryAnalysis-steps.yml

* Create WindowsAppSDK-BinaryAnalysis-steps.yml

* Create WindowsAppSDK-SourceAnalysis-job.yml

* Update WindowsAppSDK-BuildDevProject-Steps.yml

* Update WindowsAppSDK-BuildProject-Steps.yml

* Update WindowsAppSDK-BuildSolution-Steps.yml

* Update ProjectReunion-CI.yml

* Update ProjectReunion-BuildFoundation.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update build-mrt.yml

* Update ProjectReunion-BuildFoundation.yml

* Update WindowsAppSDK-BinaryAnalysis-steps.yml

* Update WindowsAppSDK-BinaryAnalysis-steps.yml

* Update WindowsAppSDK-BuildProject-Steps.yml

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-CI.yml

* Update WindowsAppSDK-BuildDevProject-Steps.yml

* Update WindowsAppSDK-BuildProject-Steps.yml

* Update WindowsAppSDK-BuildSolution-Steps.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update WindowsAppSDK-BinaryAnalysis-steps.yml

* Update build-mrt.yml

* Update ProjectReunion-CI.yml

* Update WindowsAppSDK-BinaryAnalysis-steps.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Do a compiler options pass on all binaries contributing to WinAppSDK (#2629)

Tweak various compiler options for optimization (e.g. /GR-) and correctness/productivity (e.g. /W4).

Project-wide standardization via new \WindowsAppSDK.Build.Cpp.props. See for more details.

Corrected several inconsistencies across projects e.g. given Debug|Release + x86+x64+arm64 = 6 permutations, but some projects had an option set for only 5, or only 1. Most projects were mostly already setting most of these options so their changes were mostly removing the now-redundant project-specific setting and let the top-level project-wide standards handle it.

This now standardizes all C++ projects to...
* Compile (all): `/W4 /sdl /permissive- /std:c++17 /GR-` (except 2 projects that explicitly set `/std:c++20`)
* Compile (debug): `/Od`
* Compile (release): `/GS /GF /GL /Gy /Gw /Ob2 /Oi /Os /Oy`
* Link (debug) `/DEBUG:FULL /INCREMENTAL`
* Link (release): `/INCREMENTAL:NO /LTCG /OPT:ICF /OPT:REF`

https://task.ms/39994837 Foundation

https://task.ms/39994852 MRTCore

* Add standardized (project-wide) C++ compile and link options

* Remove ARM support (not supported, but some ARM-conditional fragments weren't removed)

* Removed <WarningLevel> from all projects. Fixed up warnings masked by projects who'd set Level3

* Added SDLCheck for all builds. Added Disable-Optimization for Debug builds. Remove properties in *vcxproj redundnat with standardized options

* Removed redundant <Optimization> from *vcxproj

* Fixed warnings. Removed unnecessary delayload

* Fixed some inconsistencies in project settings

* Fixed AccessControlTests weren't copying the Bootstrap dll to the test's OutDir and thus the test dll wouldn't load

* Fix some warnings in MRT. Had to disable read-only string pooling and strictstrings as workaround for some funky issues in MrtBaseUnitTests for now; filed bug for follow up to fix the errors

* Corrected some comments. Added the missing LTCG option

* Changed LTCG from fast to normal

* Updated FavorSizeOrSpeed to Size instead of Speed

* Move LinkIncremental=false for Release builds to the top-level project-wide standard

* Host LinkIncremental=true if Configuration=Debug to be project wide setting (projects were routinely doing this locally, but inconsistently)

* Fixed a comment

* Added a cautionary note about why Detours.vcxproj has seemingly redundant or contradictory options and to be wary of making any changes

* Removed options redundant with WindowsAppSDK.Build.Cpp.props

* Elevate GenerateDebugInformation=Full to project-wide and remove redundancies. Move dev\WindowsAppSDK.Build.Cpp.props content to project wide (not just \dev) and delete the now obsolete dev\WindowsAppSDK.Build.Cpp.props (really only amounted to /ZH:SHA_256).

* Incorporated feedback

* Overhaul NuGet versions to include "main" or "develop" (#2636)

* Some old MSTest.pfx references were lingering (and now breaking things) (#2638)

* Installation with System-Account doesn't work #2546 (#2565)

* Installation with System-Account doesn't work #2546 
Co-authored-by: Santosh Chintalapati <[email protected]>

* Fix the .NET SDK installer script used by MRT Core, and don't run the script anymore (#2640)

* Fix the .NET SDK install script.

* Remove .NET SDK version from global.json file.

* Don't run the DownloadDotNetCoreSdk.ps1 script in the pipeline.

* Update build-mrt.yml

* Update DownloadDotNetCoreSdk.ps1

* Update global.json

* Update WindowsAppSDK-BinaryAnalysis-steps.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update global.json

* Update global.json

* Update build-mrt.yml

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-CI.yml

* Update WindowsAppSDK-BuildDevProject-Steps.yml

* Update WindowsAppSDK-BuildProject-Steps.yml

* Update WindowsAppSDK-BuildProject-Steps.yml

* Update WindowsAppSDK-BuildSolution-Steps.yml

* Add 1.1.1 & 1.0.4 to bug template and remove outdated versions (#2627)

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-CI.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update ProjectReunion-BuildFoundation.yml

* Update ProjectReunion-CI.yml

* Update WindowsAppSDK-SourceAnalysis-job.yml

* Update ProjectReunion-CI.yml

Co-authored-by: James Parsons <[email protected]>
Co-authored-by: Darren Hoehna <[email protected]>
Co-authored-by: Darren Hoehna <[email protected]>
Co-authored-by: reunion-maestro-bot <[email protected]>
Co-authored-by: Kyaw Thant <[email protected]>
Co-authored-by: Howard Kapustein <[email protected]>
Co-authored-by: alexlamtest <[email protected]>
Co-authored-by: Jeff Genovy <[email protected]>
Co-authored-by: Gabby Bilka <[email protected]>
  • Loading branch information
10 people authored Jun 23, 2022
1 parent bd1888a commit 71a2da7
Show file tree
Hide file tree
Showing 164 changed files with 1,529 additions and 3,866 deletions.
9 changes: 9 additions & 0 deletions .config/tsaoptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"instanceUrl": "https://microsoft.visualstudio.com",
"projectName": "os",
"areaPath": "OS\\WDX\\DXP\\APT-Application Platform and Tools\\BTAD-Base Tools and Developer experiences\\WinAppSDK Engineering System",
"iterationPath": "OS",
"notificationAliases": [ "[email protected]" ],
"ignoreBranchName": true,
"codebaseName": "WinAppSDK"
}
14 changes: 3 additions & 11 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,12 @@ body:
label: NuGet package version
description: Specify the version of Windows App SDK (or Project Reunion) you're using.
options:
- "1.1.1"
- "1.1.0-preview3"
- "1.1.0-preview2"
- "1.1.0-preview1"
- "1.0.0"
- "1.0.4"
- "1.0.0-preview3"
- "1.0.0-preview2"
- "1.0.0-preview1"
- "1.0.0-experimental1"
- "0.8.5"
- "0.8.4"
- "0.8.3"
- "0.8.2"
- "0.8.1"
- "0.8.0"
- "0.8.10"
- "0.5"
- type: dropdown
attributes:
Expand Down
7 changes: 2 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@
</Midl>
</ItemDefinitionGroup>

<!-- Build with the hybrid CRT (Universal CRT + Static VS CRT (for what little the Universal CRT doesn't cover) -->
<Import Project="$(MSBuildThisFileDirectory)HybridCRT.props" />

<!-- Build with APIscan-friendly compiler+linker options -->
<Import Project="$(MSBuildThisFileDirectory)ApiScan.Cpp.props" />
<!-- Define our standardardized options for C/C++ builds -->
<Import Project="$(MSBuildThisFileDirectory)WindowsAppSDK.Build.Cpp.props" />

<!-- Load the test certificate's password (so we do it once for reuse across projects) -->
<PropertyGroup Condition="'$(RepoTestCertificatePFX)' == ''">
Expand Down
1 change: 0 additions & 1 deletion WindowsAppRuntime.sln
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ Global
dev\AppLifecycle\AppLifecycle.vcxitems*{e3a522a3-6635-4a42-bded-1af46a15f63c}*SharedItemsImports = 9
test\inc\inc.vcxitems*{e5659a29-fe68-417b-9bc5-613073dd54df}*SharedItemsImports = 4
test\inc\inc.vcxitems*{e977b1bd-00dc-4085-a105-e0a18e0183d7}*SharedItemsImports = 4
dev\Common\Common.vcxitems*{f76b776e-86f5-48c5-8fc7-d2795ecc9746}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
97 changes: 97 additions & 0 deletions WindowsAppSDK.Build.Cpp.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Build with the hybrid CRT (Universal CRT + Static VS CRT (for what little the Universal CRT doesn't cover) -->
<Import Project="$(MSBuildThisFileDirectory)HybridCRT.props" />

<!-- Build with APIscan-friendly compiler+linker options -->
<Import Project="$(MSBuildThisFileDirectory)ApiScan.Cpp.props" />

<!-- Common (all Configurations) options -->
<ItemDefinitionGroup>
<ClCompile>
<!-- /std:c++17 Enable ISO C++17 Standard -->
<LanguageStandard>stdcpp17</LanguageStandard>

<!-- /permissive- Enable Conformance mode (i.e. Disable 'permissive' mode) -->
<ConformanceMode>true</ConformanceMode>

<!-- /W4 Enable max warning level -->
<WarningLevel>Level4</WarningLevel>

<!-- /sdk Enable additional security checks-->
<SDLCheck>true</SDLCheck>

<!-- /GR- Disable RTTI (causes binary bloat) -->
<RuntimeTypeInfo>false</RuntimeTypeInfo>

<!-- /ZH:SHA_256 Hash algorithm for file checksums in debug info -->
<AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
</ClCompile>
<Link>
<!-- /DEBUG:FULL Create PDF containing full debug information -->
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>

<!-- Debug-specific options -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<!-- /INCREMENTAL Enable incremental linking -->
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)' == 'Debug'">
<ClCompile>
<!-- /d- Disable optimization -->
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
</Link>
</ItemDefinitionGroup>

<!-- Release-specific options -->
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<!-- /INCREMENTAL:NO Disable incremental linking -->
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)' == 'Release'">
<ClCompile>
<!-- /GS Enable Control Flow Guard -->
<ControlFlowGuard>Guard</ControlFlowGuard>

<!-- Compile-time optimizations:
/GF Enable read-only string pooling (eliminate duplicate strings)
/GL Whole Program Optimization
/Gy Enable function-level linking
/Gw Optimize Global Data (https://docs.microsoft.com/en-us/cpp/build/reference/gw-optimize-global-data)
-->
<StringPooling>true</StringPooling>
<WholeProgramOptimization>true</WholeProgramOptimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AdditionalOptions>%(AdditionalOptions) /Gw</AdditionalOptions>

<!-- /Oxs Enable most speed optimizations
NOTE: /Oxs is short-hand for multiple options:
/Ob2 Enable inline function expansion (/Ob2 = Any Suitable)
/Oi Enable intrinsic functions
/Os Favor fast code
/Oy Omit frame pointers
-->
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
</ClCompile>
<Link>
<!-- Link-time optimizations:
/LCTG Enable Link Time Code Generation
/OPT:ICF Enable COMDAT folding
/OPT:REF Optimize references
-->
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
parameters:
# Caller optionally overrides these.
- name: outputDirectory
type: string
default: $(Build.SourcesDirectory)\BuildOutput
- name: enablePREFast
type: boolean
default: true

steps:
- task: NodeTool@0
displayName: 'Use Node >=8.6.0'
inputs:
versionSpec: '>=8.6.0'

- template: v2/Steps/PackageES/Windows.SDL.Binary.Analysis.OS.Undocked.yml@templates_onebranch
parameters:
variables:
ob_outputDirectory: ${{ parameters.outputDirectory }}
ob_sdl_binskim_scanOutputDirectoryOnly: true
ob_sdl_binskim_break: false
globalsdl:
binskim:
enabled: true
break: true
# The following serves as an include/exclude example (*untested*).
# analyzeTargetGlob: '+:file|**\bin\**\*.dll;-:file|**\Microsoft.WindowsAppRuntime.Insights.Resource.dll'
prefast:
${{ if ne(parameters.enablePREFast, true) }}:
enabled: false
${{ if eq(parameters.enablePREFast, true) }}:
enabled: true
# ToDo: set the following to true once pre-existing errors are resolved.
break: false
# The following scans we already did during in the SourceAnalysis job, not repeating here.
# ToDo: Consider disabling Antimalware also, but how?
credscan:
enabled: false
policheck:
enabled: false
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
parameters:
channel: 'experimental'
enableLicenseInstall: false
runSDLBinaryAnalysis: false
enablePREFast: true

steps:
- template: WindowsAppSDK-BuildProject-Steps.yml
Expand All @@ -11,3 +13,5 @@ steps:
publishDir: $(publishDir)
channel: ${{ parameters.channel }}
enableLicenseInstall: ${{ parameters.enableLicenseInstall }}
runSDLBinaryAnalysis: ${{ parameters.runSDLBinaryAnalysis }}
enablePREFast: ${{ parameters.enablePREFast }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ parameters:
# 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) }}:
Expand Down Expand Up @@ -175,6 +176,12 @@ steps:
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ parameters:
displayName: ''
additionalMsBuildArgs: ''
WindowsAppSDKCleanIntermediateFiles: 'true'
runSDLBinaryAnalysis: false
enablePREFast: true

# Note, this template depends on these variables from parent yml:
# $(buildConfiguration), $(buildPlatform)
Expand All @@ -26,6 +28,12 @@ steps:
msbuildArgs: /binaryLogger:$(Build.SourcesDirectory)\${{ parameters.displayName }}.$(buildConfiguration).$(buildPlatform).binlog /restore ${{ parameters.additionalMsBuildArgs }} /p:WindowsAppSDKCleanIntermediateFiles=${{ parameters.WindowsAppSDKCleanIntermediateFiles }}
logProjectEvents: false

- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- template: WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: '$(Build.SourcesDirectory)\buildoutput'
enablePREFast: ${{ parameters.enablePREFast }}

- task: PublishBuildArtifacts@1
displayName: 'Publish ${{ parameters.displayName }} binlog'
condition: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parameters:
# The "primary" build arch is the one that the nuspec gets its winmd, pri, and other neutral files from
primaryBuildArch: x86
buildFlavor: Release
prereleaseVersionTag: 'prerelease'
condition: ''
buildPool: ''

Expand Down Expand Up @@ -100,7 +99,13 @@ jobs:
inputs:
targetType: 'inline'
script: |
$packageVersion = '$(version).${{ parameters.prereleaseVersionTag }}'
$packageVersion = '$(version)'
$pipelineType = '$(PipelineType)'
$sourceBranchName = '$(Build.SourceBranchName)'
if ($sourceBranchName -eq 'main' -or $sourceBranchName -eq 'develop')
{
$packageVersion = $packageVersion + '.' + $sourceBranchName + '.' + $pipelineType
}
Write-Host "##vso[task.setvariable variable=packageVersion;]$packageVersion"
Write-Host "##vso[task.setvariable variable=packageVersion;isOutput=true;]$packageVersion"
Write-Host $packageVersion
Expand Down
41 changes: 41 additions & 0 deletions build/AzurePipelinesTemplates/WindowsAppSDK-SourceAnalysis-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This job is expected to run in parallel with the build task.

jobs:
- job: SDLSourcesScanning
pool:
name: $(buildPool)
steps:
# Required by the Packaged ES SDL Templates.
- checkout: self
persistCredentials: true

- task: NodeTool@0
displayName: 'Use Node >=8.6.0'
inputs:
versionSpec: '>=8.6.0'

- template: v2/Steps/PackageES/Windows.SDL.Sources.Analysis.OS.Undocked.yml@templates_onebranch
parameters:
globalsdl:
tsa:
# Not filing bugs for issues found by the scans just yet.
#enabled: true
enabled: false
codeql:
tsandjs:
enabled: true
break: true
python:
enabled: true
break: true
psscriptanalyzer:
enable: true
break: true
credscan:
enable: true
break: true
policheck:
# ToDo: Once pre-existing issues have been resolved, set break to true.
enable: true
break: false

Loading

0 comments on commit 71a2da7

Please sign in to comment.