diff --git a/Build.cmd b/Build.cmd index 73bfba19b7..3b84284465 100644 --- a/Build.cmd +++ b/Build.cmd @@ -9,7 +9,6 @@ if "%DevEnvDir%" == "" ( ) set TFS_SourcesDirectory=%~dp0 -set XES_DFSDROP=%~dp0BuildOutput set BUILD_BINARIESDIRECTORY=%~dp0BuildOutput set VERSIONBUILDNUMBER=local set VERSIONBUILDREVISION=10001 @@ -132,7 +131,6 @@ if "%PROJECTPATH%" NEQ "" ( !MSBuildCommand! ) else ( if "%BUILDALL%" == "" ( - set XES_OUTDIR=%BUILD_BINARIESDIRECTORY%\%BUILDCONFIGURATION%\%BUILDPLATFORM%\ "%MSBUILDPATH%" .\MUXControls.sln /p:platform="%BUILDPLATFORM%" /p:configuration="%BUILDCONFIGURATION%" /flp:Verbosity=Diagnostic /fl /bl %EXTRAMSBUILDPARAMS% /verbosity:Minimal /p:AppxBundle=Never /p:AppxSymbolPackageEnabled=false @@ -150,16 +148,6 @@ if "%PROJECTPATH%" NEQ "" ( call .\tools\MakeAppxHelper.cmd arm64 release call .\tools\MakeAppxHelper.cmd arm64 debug ) - - REM - REM PostBuild - REM - call .\tools\PostBuild.cmd - - REM - REM PkgGen - REM - REM call .\tools\pkggen.cmd ) ) diff --git a/CustomInlineTasks.targets b/CustomInlineTasks.targets index ac33583b09..b5098ca112 100644 --- a/CustomInlineTasks.targets +++ b/CustomInlineTasks.targets @@ -39,54 +39,6 @@ File.WriteAllText(DestinationFiles[i], text); } } -]]> - - - - - - - - - - - - - - diff --git a/Directory.Build.props b/Directory.Build.props index 52e25b06d0..7f62122fb2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,13 +4,13 @@ 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. This is parsed too late when put in mux.controls.props. --> - - false - true + + false + true Debug $(MSBuildThisFileDirectory)BuildOutput\$(Configuration)\ - $(MSBuildThisFileDirectory)BuildOutput\Debug\ + $(MSBuildThisFileDirectory)BuildOutput\Debug\ $(BaseOutputPath)\$(Platform)\ - + - {1CEEC8E3-419A-4304-841C-08A334B9E4FF} diff --git a/dev/Repeater/Repeater.vcxitems b/dev/Repeater/Repeater.vcxitems index 51c3dbc70c..a597282cb6 100644 --- a/dev/Repeater/Repeater.vcxitems +++ b/dev/Repeater/Repeater.vcxitems @@ -25,18 +25,16 @@ - - + - - + - + @@ -94,8 +92,7 @@ - - + @@ -104,12 +101,11 @@ - + - - + diff --git a/dev/dll/product.pbxproj b/dev/dll/product.pbxproj deleted file mode 100644 index 1fe8fa8ace..0000000000 --- a/dev/dll/product.pbxproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - v110 - Utility - - - retail - - - - - $(All_Langs) - true - - - \ No newline at end of file diff --git a/mux.controls.props b/mux.controls.props index 0adf3e3f8a..4d3d7765a9 100644 --- a/mux.controls.props +++ b/mux.controls.props @@ -2,20 +2,6 @@ - - - - - - - $(XES_OUTDIR)\..\ - $(XES_OUTDIR)\ - diff --git a/test/IXMPTestApp/IXMPTestApp.Shared.projitems b/test/IXMPTestApp/IXMPTestApp.Shared.projitems index a9482e6cab..e07d40bf44 100644 --- a/test/IXMPTestApp/IXMPTestApp.Shared.projitems +++ b/test/IXMPTestApp/IXMPTestApp.Shared.projitems @@ -1,10 +1,9 @@  - + - - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) true @@ -31,7 +30,7 @@ $(MSBuildThisFileDirectory)\..\..\build\MSTest.pfx IXMPTestApp - true + true 1.1.0.0 $(CSLangVersion) @@ -125,7 +124,7 @@ $(NoWarn);0105 - + {ad0c90b0-4845-4d4b-88f1-86f653f8171b} Microsoft.UI.Xaml @@ -144,7 +143,7 @@ - + @@ -194,25 +193,7 @@ - + - - - Symbols.pri\NTTEST\exe - false - - - NTTEST\windowstest\dxaml\controls\test\IXMPTestApp - - - NTTEST\windowstest\dxaml\controls\test\IXMPTestApp - - - NTTEST\windowstest\dxaml\controls\test\IXMPTestApp\assets - - - NTTEST\windowstest\dxaml\controls\test\IXMPTestApp - - \ No newline at end of file diff --git a/test/IXMPTestApp/MSTest/IXMPTestApp.csproj b/test/IXMPTestApp/MSTest/IXMPTestApp.csproj index 6167bd9f46..b1a1e3f886 100644 --- a/test/IXMPTestApp/MSTest/IXMPTestApp.csproj +++ b/test/IXMPTestApp/MSTest/IXMPTestApp.csproj @@ -4,15 +4,9 @@ $(VisualStudioVersion) true - - - PackageReference - + 1.0.74 diff --git a/test/IXMPTestApp/TAEF/IXMPTestApp.TAEF.csproj b/test/IXMPTestApp/TAEF/IXMPTestApp.TAEF.csproj index 4a8914a3be..17b359602b 100755 --- a/test/IXMPTestApp/TAEF/IXMPTestApp.TAEF.csproj +++ b/test/IXMPTestApp/TAEF/IXMPTestApp.TAEF.csproj @@ -1,18 +1,13 @@  - + $(DefineConstants);USING_TAEF {02800516-6BE8-42A9-9665-5446896BB5C5} - true true {74F24BC4-794D-4CB2-8420-80FF7FDACFE9} - - \ No newline at end of file diff --git a/test/IXMPTestApp/TAEF/RazzleIncludes.props b/test/IXMPTestApp/TAEF/RazzleIncludes.props deleted file mode 100644 index 0f7718916f..0000000000 --- a/test/IXMPTestApp/TAEF/RazzleIncludes.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - $(PUBLIC_ROOT)\sdk\ref\clr453\system.numerics.vectors.metadata_dll - - - $(PUBLIC_ROOT)\internal\onecoreuap\internal\buildmetadata\internal\Windows.UI.winmd - true - false - false - True - true - - - \ No newline at end of file diff --git a/test/MUXControls.Test/MUXControls.Test.Shared.projitems b/test/MUXControls.Test/MUXControls.Test.Shared.projitems index 119d02dbb6..17a7915449 100644 --- a/test/MUXControls.Test/MUXControls.Test.Shared.projitems +++ b/test/MUXControls.Test/MUXControls.Test.Shared.projitems @@ -1,9 +1,8 @@  - + - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) true @@ -19,13 +18,12 @@ Library Properties MUXControls.Test - $(MuxSdkVersion) - 10 + $(MuxSdkVersion) 512 true $(CSLangVersion) - + $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots@KitsRoot10) $(MSBuildProgramFiles32)\Windows Kits\10\ $(UniversalCRTSdkDir)UnionMetadata\$(TargetPlatformVersion) @@ -38,17 +36,6 @@ $(USERPROFILE)\.nuget\packages - - - - Windows.UI.Xaml.Tests.MUXControls - NTTEST\WINDOWSTEST\dxaml\controls\test\MUXControls.Test - true - v2.0 - $(ProjectSdkMetadataPath) - - @@ -131,7 +118,7 @@ prompt MinimumRecommendedRules.ruleset - + diff --git a/test/MUXControls.Test/TAEF/MUXControls.Test.TAEF.csproj b/test/MUXControls.Test/TAEF/MUXControls.Test.TAEF.csproj index 9ffeb3cd81..8d50cb9ea5 100644 --- a/test/MUXControls.Test/TAEF/MUXControls.Test.TAEF.csproj +++ b/test/MUXControls.Test/TAEF/MUXControls.Test.TAEF.csproj @@ -30,7 +30,6 @@ $(TaefRootDirectory)Wex.Logger.Interop.dll - @@ -38,7 +37,6 @@ - diff --git a/test/MUXControlsReleaseTest/AppThatUsesMUXIndirectly/AppThatUsesMUXIndirectly.csproj b/test/MUXControlsReleaseTest/AppThatUsesMUXIndirectly/AppThatUsesMUXIndirectly.csproj index 0a5178896f..8693cd05a3 100644 --- a/test/MUXControlsReleaseTest/AppThatUsesMUXIndirectly/AppThatUsesMUXIndirectly.csproj +++ b/test/MUXControlsReleaseTest/AppThatUsesMUXIndirectly/AppThatUsesMUXIndirectly.csproj @@ -1,7 +1,7 @@  - + diff --git a/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/MUXControls.ReleaseTest.Shared.projitems b/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/MUXControls.ReleaseTest.Shared.projitems index ceed3d0792..e549542f61 100644 --- a/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/MUXControls.ReleaseTest.Shared.projitems +++ b/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/MUXControls.ReleaseTest.Shared.projitems @@ -1,8 +1,7 @@  - - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) diff --git a/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/TAEF/MUXControls.ReleaseTest.TAEF.csproj b/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/TAEF/MUXControls.ReleaseTest.TAEF.csproj index 114565c998..05751de440 100644 --- a/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/TAEF/MUXControls.ReleaseTest.TAEF.csproj +++ b/test/MUXControlsReleaseTest/MUXControls.ReleaseTest/TAEF/MUXControls.ReleaseTest.TAEF.csproj @@ -12,7 +12,7 @@ {14018522-0223-4334-87D2-C343074DDD48} $(DefineConstants);USING_TAEF - + $(TaefRootDirectory)TE.Managed.dll diff --git a/test/MUXControlsReleaseTest/NugetPackageTestApp/NugetPackageTestApp.csproj b/test/MUXControlsReleaseTest/NugetPackageTestApp/NugetPackageTestApp.csproj index f3707cfb1b..df296ec93b 100644 --- a/test/MUXControlsReleaseTest/NugetPackageTestApp/NugetPackageTestApp.csproj +++ b/test/MUXControlsReleaseTest/NugetPackageTestApp/NugetPackageTestApp.csproj @@ -1,8 +1,8 @@  - - + + Debug diff --git a/test/MUXControlsReleaseTest/NugetPackageTestAppCX/NugetPackageTestAppCX.vcxproj b/test/MUXControlsReleaseTest/NugetPackageTestAppCX/NugetPackageTestAppCX.vcxproj index 68abdc7235..97b4abfac8 100644 --- a/test/MUXControlsReleaseTest/NugetPackageTestAppCX/NugetPackageTestAppCX.vcxproj +++ b/test/MUXControlsReleaseTest/NugetPackageTestAppCX/NugetPackageTestAppCX.vcxproj @@ -2,7 +2,7 @@ - + {2f339b02-2b8c-4ed8-9c20-93e24a183a2b} diff --git a/test/MUXControlsReleaseTest/RuntimeComponentThatUsesMUX/RuntimeComponentThatUsesMUX.vcxproj b/test/MUXControlsReleaseTest/RuntimeComponentThatUsesMUX/RuntimeComponentThatUsesMUX.vcxproj index 0b27c8d384..020503a880 100644 --- a/test/MUXControlsReleaseTest/RuntimeComponentThatUsesMUX/RuntimeComponentThatUsesMUX.vcxproj +++ b/test/MUXControlsReleaseTest/RuntimeComponentThatUsesMUX/RuntimeComponentThatUsesMUX.vcxproj @@ -1,6 +1,6 @@  - + true diff --git a/test/MUXControlsReleaseTest/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess.csproj b/test/MUXControlsReleaseTest/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess.csproj index 9b23f8e19c..b0916c3762 100644 --- a/test/MUXControlsReleaseTest/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess.csproj +++ b/test/MUXControlsReleaseTest/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess/UwpAppWithFullTrustProcess.csproj @@ -150,7 +150,7 @@ 6.2.8 - 2.1.190606001 + 2.6.1 diff --git a/test/MUXControlsTestApp.ApiTests/product.pbxproj b/test/MUXControlsTestApp.ApiTests/product.pbxproj deleted file mode 100644 index 6a406232d8..0000000000 --- a/test/MUXControlsTestApp.ApiTests/product.pbxproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - MUXControlsTestApp.ApiTests - $(MSBuildThisFileDirectory)\.. - $(ObjectPath)\.. - - - - - - - - NTTEST\WINDOWSTEST\dxaml\controls\test\MUXControlsTestApp - false - - - diff --git a/test/MUXControlsTestApp/MSTest/MUXControlsTestApp.csproj b/test/MUXControlsTestApp/MSTest/MUXControlsTestApp.csproj index 618772eb7b..9d060bc69c 100644 --- a/test/MUXControlsTestApp/MSTest/MUXControlsTestApp.csproj +++ b/test/MUXControlsTestApp/MSTest/MUXControlsTestApp.csproj @@ -13,15 +13,9 @@ SHA256 True 0 - - - PackageReference - + 1.0.74 diff --git a/test/MUXControlsTestApp/MUXControlsTestApp.Shared.projitems b/test/MUXControlsTestApp/MUXControlsTestApp.Shared.projitems index 2bfdcee738..3f551d0bff 100644 --- a/test/MUXControlsTestApp/MUXControlsTestApp.Shared.projitems +++ b/test/MUXControlsTestApp/MUXControlsTestApp.Shared.projitems @@ -1,10 +1,9 @@ - + - - + @@ -33,16 +32,13 @@ $(MSBuildThisFileDirectory)\..\..\build\MSTest.pfx MUXControlsTestApp - true + true 1.1.0.0 $(CSLangVersion) 0151 - - NTTEST\WINDOWSTEST\dxaml\controls\test\MUXControlsTestApp - true $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP @@ -113,7 +109,6 @@ full arm - ARM64 false prompt true @@ -125,7 +120,6 @@ pdbonly arm - ARM64 false prompt true @@ -166,7 +160,7 @@ App.xaml - + @@ -184,7 +178,7 @@ - + @@ -323,7 +317,7 @@ Designer - + MSBuild:Compile Designer @@ -344,66 +338,14 @@ - - - - $(OutDir)\EditedXamlFiles - - - - - - - - - - - - - - - - - - - + - + $(TargetName) .appx $(AppxPackageDir)$(AppxPackageName)_Test\ $(AppxPackageTestDir)$(AppxPackageName)$(AppxPackageExtension) .intermediate - - - - - - - - - - - $([MSBuild]::MakeRelative('$(MSBuildThisFileDirectory)\', %(Identity))) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/MUXControlsTestApp/TAEF/MUXControlsTestApp.TAEF.csproj b/test/MUXControlsTestApp/TAEF/MUXControlsTestApp.TAEF.csproj index b24463b8c2..9cbe65bbe8 100755 --- a/test/MUXControlsTestApp/TAEF/MUXControlsTestApp.TAEF.csproj +++ b/test/MUXControlsTestApp/TAEF/MUXControlsTestApp.TAEF.csproj @@ -4,7 +4,6 @@ $(DefineConstants);USING_TAEF {DEDC1E4F-CFA5-4443-83EB-E79D425DF7E7} - true true False False diff --git a/test/MUXExperimentalTest/MUXExperimental.Test/TAEF/MUXExperimental.Test.TAEF.csproj b/test/MUXExperimentalTest/MUXExperimental.Test/TAEF/MUXExperimental.Test.TAEF.csproj index 35ea7b30cb..3f2838ec3f 100644 --- a/test/MUXExperimentalTest/MUXExperimental.Test/TAEF/MUXExperimental.Test.TAEF.csproj +++ b/test/MUXExperimentalTest/MUXExperimental.Test/TAEF/MUXExperimental.Test.TAEF.csproj @@ -12,7 +12,7 @@ {14018522-0223-4334-87D2-C343074DDD48} $(DefineConstants);USING_TAEF - + $(TaefRootDirectory)TE.Managed.dll diff --git a/test/TestAppCX/TestAppCX.vcxproj b/test/TestAppCX/TestAppCX.vcxproj index 5e5a3b546c..e16b06e082 100644 --- a/test/TestAppCX/TestAppCX.vcxproj +++ b/test/TestAppCX/TestAppCX.vcxproj @@ -1,9 +1,8 @@  - + - {92081f61-98bb-4105-a90f-b6d524b4f5c9} diff --git a/tools/AdalAuth.ps1 b/tools/AdalAuth.ps1 deleted file mode 100644 index d248dca987..0000000000 --- a/tools/AdalAuth.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -[CmdLetBinding()] -Param() - -function Load-Adal -{ - $adalVersion = "3.17.2" - $installLocation = Get-Package Microsoft.IdentityModel.Clients.ActiveDirectory -MaximumVersion $adalVersion -MinimumVersion $adalVersion -ErrorAction Ignore - if (!$installLocation) - { - Install-Package Microsoft.IdentityModel.Clients.ActiveDirectory -Source https://nuget.org/api/v2/ -ProviderName nuget -MaximumVersion $adalMaxVersion -Scope CurrentUser - $installLocation = Get-Package Microsoft.IdentityModel.Clients.ActiveDirectory -MaximumVersion $adalMaxVersion - } - - $adalPath = Split-Path $installLocation.Source - - Write-Verbose "ADALPath: $adalPath" - - Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" -} - -function Get-AuthenticationContext -{ - Load-Adal - - # Get an Access Token with ADAL - - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.windows.net/common") - - if ($authContext.TokenCache.Count -gt 0) - { - $homeTenant = $authContext.TokenCache.ReadItems()[0].TenantId; - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.microsoftonline.com/$homeTenant"); - } - else - { - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.microsoftonline.com/microsoft.onmicrosoft.com"); - } - - $authContext; -} - -function Get-AccessToken -{ - $resourceId = "499b84ac-1321-427f-aa17-267ca6975798"; - $clientId = "872cd9fa-d31f-45e0-9eab-6e460a02d1f1"; - - $authCtx = Get-AuthenticationContext - - $promptBehavior = [Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior]::Auto - - $authResultTask = $authCtx.AcquireTokenAsync($resourceId, $clientId, [System.Uri]"urn:ietf:wg:oauth:2.0:oob", - (new-object Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters($promptBehavior, $null))); - - while (!$authResultTask.IsCompleted) { - Start-Sleep -Seconds 1 - } - - $authResultTask.Result.AccessToken -} - -function Get-AuthorizationHeaders -{ - $token = Get-AccessToken - - $headers = @{ - "Authorization" = ("Bearer {0}" -f $token); - "Content-Type" = "application/json"; - } - - $headers -} \ No newline at end of file diff --git a/tools/BuildMachineUtils.psm1 b/tools/BuildMachineUtils.psm1 deleted file mode 100644 index d452f0b81b..0000000000 --- a/tools/BuildMachineUtils.psm1 +++ /dev/null @@ -1,103 +0,0 @@ -function Get-AdalPath -{ - $adalVersion = "3.17.2" - $adalPath = "$env:USERPROFILE\.nuget\packages\microsoft.identitymodel.clients.activedirectory\$adalVersion" - - if (-not (Test-Path $adalPath)) - { - $installLocation = Get-Package Microsoft.IdentityModel.Clients.ActiveDirectory -MaximumVersion $adalVersion -MinimumVersion $adalVersion -ErrorAction Ignore - if (!$installLocation) - { - Install-package Microsoft.IdentityModel.Clients.ActiveDirectory -Source https://nuget.org/api/v2/ -ProviderName nuget -MaximumVersion $adalVersion -Scope CurrentUser - $installLocation = Get-Package Microsoft.IdentityModel.Clients.ActiveDirectory -MaximumVersion $adalVersion - } - - $adalPath = Split-Path $installLocation.Source - } - - $adalPath -} - -function Get-AuthenticationContext -{ - # Get an Access Token with ADAL - - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.windows.net/common") - - if ($authContext.TokenCache.Count -gt 0) - { - $homeTenant = $authContext.TokenCache.ReadItems()[0].TenantId; - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.microsoftonline.com/$homeTenant"); - } - else - { - $authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.microsoftonline.com/microsoft.onmicrosoft.com"); - } - - $authContext; -} - -function Get-AccessToken -{ - $promptBehavior = [Microsoft.IdentityModel.Clients.ActiveDirectory.PromptBehavior]::Auto - - $resourceId = "499b84ac-1321-427f-aa17-267ca6975798"; - $clientId = "872cd9fa-d31f-45e0-9eab-6e460a02d1f1"; - - $authCtx = Get-AuthenticationContext - $authResultTask = $authCtx.AcquireTokenAsync($resourceId, $clientId, [System.Uri]"urn:ietf:wg:oauth:2.0:oob", - (new-object Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters($promptBehavior, $null))); - - while (!$authResultTask.IsCompleted) { - Start-Sleep -Seconds 1 - } - - $authResultTask.Result.AccessToken -} - -function Queue-BuildOnMachine -{ - Param( - [string]$MachineName, - [string]$ClientAlias, - [string]$BuildId) - - $token = Get-AccessToken - - $headers = @{ - "Authorization" = ("Bearer {0}" -f $token); - "Content-Type" = "application/json"; - } - - $root = @{ - "sourceBranch" = "refs/heads/main"; - "definition" = @{ - "id" = $BuildId - }; - "project" = @{ - "id" = "8d47e068-03c8-4cdc-aa9b-fc6929290322" # OS - }; - "repository" = @{ - "id" = "d39af991-db55-43c3-bdef-c6333a2b3264" # dep.controls - }; - "demands" = @( - "ClientAlias -equals $ClientAlias"; - "COMPUTERNAME -equals {0}" -f $machineName - ) - }; - - $jsonPayload = ConvertTo-JSon $root - - Write-Verbose "Payload = $jsonPayload" - - $result = Invoke-RestMethod -Method Post -Uri "https://microsoft.visualstudio.com/DefaultCollection/OS/_apis/build/builds?api-version=4.1-preview" -Headers $headers -Body $jsonPayload - - $result -} - -# Initialize ADAL when this module is imported - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" diff --git a/tools/ExtractControls.ps1 b/tools/ExtractControls.ps1 deleted file mode 100644 index d82eaeafc6..0000000000 --- a/tools/ExtractControls.ps1 +++ /dev/null @@ -1,496 +0,0 @@ -# Script to extract all resources related to controls and generate xaml files per control per rs release. -# . Estimate all the keys and styles would be impacted -# . generate files like TimePicker_rs1_themeresources.xaml, TimePicker_rs2_themeresources.xaml, TimePicker_rs3_themeresources.xaml... -# . remove the duplicated Items. If TimePicker style in rs2 is the same with rs1, rs2 will not include this style -# . generate new generic.xaml and the node to be removed would be marked with NodeToBeReplaced -param ( - [Parameter(Mandatory=$true)][string]$controlLists -) -$skippedkeyLists = @() - -$themesDir = "D:\os\src\onecoreuap\windows\dxaml\xcp\dxaml\themes" -$targetDir = "D:\temp" - -# false mean to remove impacted nodes directly when generate generic.xaml. true mean to comment the impacted nodes and it provide a chance to review it -$CommentMatchedNodeInGenericXAML = $false - -$rsPath = Join-Path $themesDir "generic.xaml" -$rs5Path = Join-Path $themesDir "generic.xaml" -$rs4Path = Join-Path $themesDir "generic.rs4.xaml" -$rs3Path = Join-Path $themesDir "generic.rs3.xaml" -$rs2Path = Join-Path $themesDir "generic.rs2.xaml" -$rs1Path = Join-Path $themesDir "generic.rs1.xaml" - -$generatedThemeResourcesBeginMessage = "Begin Windows.UI.Xaml.Controls.dll resources - DO NOT MANUALLY EDIT BELOW THIS LINE!" -$generatedThemeResourcesEndMessage = "End Windows.UI.Xaml.Controls.dll resources - DO NOT MANUALLY EDIT ABOVE THIS LINE!" - -$generatedThemeResourcesRegexString = "(?m)($generatedThemeResourcesBeginMessage)[\s\S]+?($generatedThemeResourcesEndMessage)" - -# xmlDocument.Load/Save converted  to uncode character and it's hard to recover it to the orignal string -# replace the "escape characters" in the form  in loading and convert them back in saving -function Get-XmlDocument -{ - Param($file) - $tempFile = New-TemporaryFile - (Get-Content $file -Raw).Replace("&", "&") |Set-Content $tempFile - $xmlDocument = New-Object System.Xml.XmlDocument - $xmlDocument.PreserveWhitespace = $true - $xmlDocument.Load($tempFile) - Remove-Item $tempFile - return $xmlDocument -} - -function Save-XmlDocument -{ - Param($file, $xmlDocument) - $tempFile = New-TemporaryFile - $xmlDocument.Save($tempFile) - $content = (Get-Content $tempFile -Raw).Replace("&","&") - #Write-Output($tempFile.FullName) - Remove-Item $tempFile - # just keep one space line - $content -replace "(?m)(^\s*\r\n)+","`r`n" |Set-Content $file -} - -function Get-IsInSkipList -{ - Param($node) - - if (!$skippedkeyLists -or $skippedkeyLists.Count -eq 0) - { - return $false - } - - $shouldSkip = $false - if ($($node.Key)) # x:Key - { - $shouldSkip = $shouldSkip -or $skippedkeyLists.Contains($node.Key) - } - if ($($node.Name)) # x:Name= - { - $shouldSkip = $shouldSkip -or $skippedkeyLists.Contains($node.Name) - } - if ($($node.TargetType)) # target exists - { - $shouldSkip = $shouldSkip -or $skippedkeyLists.Contains($node.TargetType) - } - if ($($node.LocalName)) - { - $shouldSkip = $shouldSkip -or $skippedkeyLists.Contains($node.LocalName) - } - return $shouldSkip -} - -function Get-IsRelatedToControl -{ - Param($node, $controlLists) - - if (Get-IsInSkipList $node) - { - return $false - } - - if ($($node.TargetType)) # target exists - { - if ($controlLists.Contains($node.TargetType) -or $($controlLists |Where-Object { $node.TargetType.StartsWith( $_ ) })) - { - return $true - } - } - - if ($($node.Key)) # x:Key - { - $key = $node.Key - } elseif ($($node.Name)) # x:Name= - { - $key = $node.Name - } - if ($key) - { - return $($controlLists |Where-Object { $key.StartsWith( $_ ) }) - } - return $false -} - -enum KeyPrefix -{ - Default - HighContrast - Light - ResourceDictionary -} - -function To-String -{ - Param($node, [KeyPrefix] $keyPrefix) - - $localName = $keyPrefix.ToString() + ":" - if ($node.LocalName) - { - $localName += $node.LocalName + ":" - } - else - { - $localName += "" - } - - if ($($node.Key)) # x:Key - { - return $localName + $node.Key - } - elseif ($($node.TargetType)) - { - return $localName + $node.TargetType - } - elseif ($($node.Name)) # x:Name= - { - return $localName + $node.Name - } - - return "Unknown" -} - - -function Evaluate-ImpactedKeys -{ - param($dict, $controlLists) - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[0].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - Write-Output("Default has Key " + (To-String $node ([KeyPrefix]::Default))) - } - } - - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[1].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - Write-Output("HighContrast has key " + (To-String $node ([KeyPrefix]::HighContrast))) - } - } - - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[2].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - Write-Output("Light has key " + (To-String $node ([KeyPrefix]::Light))) - } - } - - foreach ($node in $dict.ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - Write-Output("Root has key " + (To-String $node ([KeyPrefix]::ResourceDictionary))) - } - } -} - -function Build-ImpactedMap -{ - param($dict, $controlLists) - $map = @{} - - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[0].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - $map.Add((To-String $node ([KeyPrefix]::Default)), $node.OuterXml) - } - } - - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[1].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - $map.Add((To-String $node ([KeyPrefix]::HighContrast)), $node.OuterXml) - } - } - - foreach ($node in $dict.'ResourceDictionary.ThemeDictionaries'.ChildNodes[2].ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - $map.Add( (To-String $node ([KeyPrefix]::Light)), $node.OuterXml) - } - } - - foreach ($node in $dict.ChildNodes) - { - if (Get-IsRelatedToControl $node $controlLists) - { - $map.Add((To-String $node ([KeyPrefix]::ResourceDictionary)), $node.OuterXml) - } - } - return $map -} - -# The DO NOT MANUALLY EDIT part is used by depcontrol porting script and should be ignored. -# the curMap keeps all the keys, it we can't find the key, then it should be in DepControlAutoPortingPart -function Get-IsDepControlAutoPortingPart -{ - Param($node, $keyPrefix, $curMap) - $key = To-String $node $keyPrefix - return !$curMap.ContainsKey($key) -} - -function Get-IsSameNodeWithOldRelease -{ - Param($node, $keyPrefix, $preMap, $curMap) - - if (!$preMap) - { - return $false - } - - $key = To-String $node $keyPrefix - $oldValue = $preMap[$key] - $curValue = $curMap[$key] - if (!$curValue) - { - Write-Error("Can't find key in cur map: " + $key) - Write-Debug($curMap) - } - - if ($oldValue -and $oldValue.Equals($curValue)) - { - return $true - } - return $false -} - -function Replace-ChildNodes -{ - Param($parentNode, [KeyPrefix] $keyPrefix, $controlLists, $xmlDocument, $curMap) - - - if (!$($parentNode.ChildNodes)) - { - return - } - - $nodeToBeReplaced = New-Object System.Collections.ArrayList - - foreach ($node in $parentNode.ChildNodes) - { - if (Is-ReservedNode $node) - { - continue #skip 'ResourceDictionary.ThemeDictionaries' - } - - if (Get-IsRelatedToControl $node $controlLists) - { - if (Get-IsDepControlAutoPortingPart $node $keyPrefix $curMap) - { - continue # ignore ManuallyPart - } - $nodeToBeReplaced.Add($node) | Out-Null - } - } - foreach ($node in $nodeToBeReplaced) - { - if ($CommentMatchedNodeInGenericXAML) - { - # Comment the matched Element - $node.SetAttribute("NodeToBeReplaced","True") | Out-Null - } - else - { - $parentNode.RemoveChild($node) | Out-Null - } - } -} - -# In order to keep the old format of generic*.xaml, we didn't create a new file and copy all concerned nodes to the new file -# But we copy generic*.xaml to a new file, then remove items which should not belongs to this file -function Clean-ChildNodes -{ - Param($parentNode, [KeyPrefix] $keyPrefix, $controlLists, $preMap, $curMap) - - if (!$($parentNode.ChildNodes)) - { - return - } - - $nodeToBeRemoved = New-Object System.Collections.ArrayList - - foreach ($node in $parentNode.ChildNodes) - { - if (Is-ReservedNode $node) - { - continue #skip 'ResourceDictionary.ThemeDictionaries' - } - - if (Get-IsRelatedToControl $node $controlLists) - { - if (Get-IsDepControlAutoPortingPart $node $keyPrefix $curMap) - { - # remove it because it's in ManuallyPart - $nodeToBeRemoved.Add($node) | Out-Null - } - elseif (Get-IsSameNodeWithOldRelease $node $keyPrefix $preMap $curMap) - { - Write-Output("Remove duplicate " + (To-String $node $keyPrefix)) - $nodeToBeRemoved.Add($node) | Out-Null - } - } - else - { - $nodeToBeRemoved.Add($node) | Out-Null - } - } - foreach ($node in $nodeToBeRemoved) - { - $parentNode.RemoveChild($node) | Out-Null - } -} - -function Is-ReservedNode -{ - Param($node) - - $reservedKey = @("ResourceDictionary.ThemeDictionaries", "#whitespace", "ResourceDictionary") - return $($node.LocalName) -and $reservedKey.Contains($node.LocalName) -} - - -function Get-ThemeSubDict -{ - Param($themesDir, [KeyPrefix] $keyPrefix) - $key = $keyPrefix.ToString() - foreach ($node in $themesDir.ChildNodes) - { - if ($node.Key) - { - if ($key.Equals($node.Key)) - { - return $node - } - } - } - Write-Error("This should not happen") - Write-Debug($themeDict.ChildNodes) - return $null -} - -function Handle-Control -{ - Param($xmlPath, $controlName, $preMap, $curMap, $postfix) - - $xmlDocument = Get-XmlDocument $xmlPath - - $controlLists = New-Object System.Collections.ArrayList - $controlLists.Add($controlName) | Out-Null - - $themeDict = $xmlDocument.ResourceDictionary.'ResourceDictionary.ThemeDictionaries' - - # Remove Items in ThemeDictionaries - $subDict0 = Get-ThemeSubDict $themeDict ([KeyPrefix]::Default) - Clean-ChildNodes $subDict0 ([KeyPrefix]::Default) $controlLists $preMap $curMap - $subDict1 = Get-ThemeSubDict $themeDict ([KeyPrefix]::HighContrast) - Clean-ChildNodes $subDict1 ([KeyPrefix]::HighContrast) $controlLists $preMap $curMap - $subDict2 = Get-ThemeSubDict $themeDict ([KeyPrefix]::Light) - Clean-ChildNodes $subDict2 ([KeyPrefix]::Light) $controlLists $preMap $curMap - - # Remove Items in ResourceDictionary - - Clean-ChildNodes $xmlDocument.ResourceDictionary ([KeyPrefix]::ResourceDictionary) $controlLists $preMap $curMap - - $file = Join-Path $targetDir ($controlName + "_" + $postfix + "_themeresources.xaml") - Write-Output("Generate File " + $file) - Save-XmlDocument $file $xmlDocument -} - -function Produce-GenericXAML -{ - Param($xmlPath, $controlLists, $curMap) - - $xmlDocument = Get-XmlDocument $xmlPath - - $themeDict = $xmlDocument.ResourceDictionary.'ResourceDictionary.ThemeDictionaries' - - # Replace Items in ThemeDictionaries - $subDict0 = Get-ThemeSubDict $themeDict ([KeyPrefix]::Default) - Replace-ChildNodes $subDict0 ([KeyPrefix]::Default) $controlLists $xmlDocument $curMap - $subDict1 = Get-ThemeSubDict $themeDict ([KeyPrefix]::HighContrast) - Replace-ChildNodes $subDict1 ([KeyPrefix]::HighContrast) $controlLists $xmlDocument $curMap - $subDict2 = Get-ThemeSubDict $themeDict ([KeyPrefix]::Light) - Replace-ChildNodes $subDict2 ([KeyPrefix]::Light) $controlLists $xmlDocument $curMap - - # Replace Items in ResourceDictionary - Replace-ChildNodes $xmlDocument.ResourceDictionary ([KeyPrefix]::ResourceDictionary) $controlLists $xmlDocument $curMap - - $file = Join-Path $targetDir "generic.xaml" - Write-Output("Generate File " + $file) - Save-XmlDocument $file $xmlDocument -} - -function Run-Main -{ - param($rs1Path, $rs2Path, $rs3Path, $rs4Path, $rs5Path, $rsPath, $controlLists) - - Start-Transcript -path (Join-Path $targetDir "main.log") -Append - New-Item -Path $targetDir -Type Directory - Write-Output("themesDir: " + $themesDir) - Write-Output("targetDir: " + $targetDir) - Write-Output("Generate files for Controls: " + $controlLists) - Write-Output("Skipped Keys " + $skippedkeyLists) - - [string]$rsThemeResouces = Get-Content $rsPath -Raw - [string]$rsOriginalThemeResources = $rsThemeResouces -replace $generatedThemeResourcesRegexString,"" - - [string]$rs5ThemeResouces = Get-Content $rs5Path -Raw - [string]$rs5OriginalThemeResources = $rs5ThemeResouces -replace $generatedThemeResourcesRegexString,"" - - [string]$rs4ThemeResouces = Get-Content $rs4Path -Raw - [string]$rs4OriginalThemeResources = $rs4ThemeResouces -replace $generatedThemeResourcesRegexString,"" - - [string]$rs3ThemeResouces = Get-Content $rs3Path -Raw - [string]$rs3OriginalThemeResources = $rs3ThemeResouces -replace $generatedThemeResourcesRegexString,"" - - [string]$rs2ThemeResouces = Get-Content $rs2Path -Raw - [string]$rs2OriginalThemeResources = $rs2ThemeResouces -replace $generatedThemeResourcesRegexString,"" - - [string]$rs1ThemeResouces = Get-Content $rs1Path -Raw - [string]$rs1OriginalThemeResources = $rs1ThemeResouces -replace $generatedThemeResourcesRegexString,"" - - Write-Output("Load generic.rs*.xaml and build quick lookup map") - $rsResourceDictionary = ([xml] $rsOriginalThemeResources).ResourceDictionary - $rs5ResourceDictionary = ([xml] $rs5OriginalThemeResources).ResourceDictionary - $rs4ResourceDictionary = ([xml] $rs4OriginalThemeResources).ResourceDictionary - $rs3ResourceDictionary = ([xml] $rs3OriginalThemeResources).ResourceDictionary - $rs2ResourceDictionary = ([xml] $rs2OriginalThemeResources).ResourceDictionary - $rs1ResourceDictionary = ([xml] $rs1OriginalThemeResources).ResourceDictionary - - $rsMap = Build-ImpactedMap $rsResourceDictionary $controlLists - $rs5Map = Build-ImpactedMap $rs5ResourceDictionary $controlLists - $rs4Map = Build-ImpactedMap $rs4ResourceDictionary $controlLists - $rs3Map = Build-ImpactedMap $rs3ResourceDictionary $controlLists - $rs2Map = Build-ImpactedMap $rs2ResourceDictionary $controlLists - $rs1Map = Build-ImpactedMap $rs1ResourceDictionary $controlLists - - Write-Output("Evaluate the Changes related to Controls") - Evaluate-ImpactedKeys $rsResourceDictionary $controlLists - - $oldGenericXamlFile = Join-Path $targetDir "generic.orig.xaml" - Write-Output("Backup $rsPath to $oldGenericXamlFile") - Copy-Item -Path $rsPath -Destination $oldGenericXamlFile - - Write-Output("Generate new generic.xaml template") - Produce-GenericXAML $rsPath $controlLists $rsMap - - foreach ($controlName in $controlLists) - { - Write-Output("Processing " + $controlName) - Handle-Control $rs1Path $controlName $rsMapNotExist $rs1Map "rs1" - Handle-Control $rs2Path $controlName $rs1Map $rs2Map "rs2" - Handle-Control $rs3Path $controlName $rs2Map $rs3Map "rs3" - Handle-Control $rs4Path $controlName $rs3Map $rs4Map "rs4" - Handle-Control $rs5Path $controlName $rs4Map $rs5Map "rs5" - Handle-Control $rsPath $controlName $rs5Map $rsMap "rs6" - } - Stop-Transcript -} - -Run-Main $rs1Path $rs2Path $rs3Path $rs4Path $rs5Path $rsPath $controlLists \ No newline at end of file diff --git a/tools/GenerateAppxDependenciesXML.cmd b/tools/GenerateAppxDependenciesXML.cmd deleted file mode 100644 index 6f7bd4b151..0000000000 --- a/tools/GenerateAppxDependenciesXML.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off - -%~dp0\PowershellWrapper.cmd %~dpn0.ps1 %* \ No newline at end of file diff --git a/tools/GenerateAppxDependenciesXML.ps1 b/tools/GenerateAppxDependenciesXML.ps1 deleted file mode 100644 index 81378e5b78..0000000000 --- a/tools/GenerateAppxDependenciesXML.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -Param( - [string]$sourceFile, - [string]$outputFile, - [string]$BUILDPLATFORM) - -Write-Output @" - - - - -"@ > $outputFile - -$appxRoot = Split-Path $sourceFile - -foreach ($dependency in Get-Content $sourceFile) -{ - $relativeSourcePath = "Dependencies\$BUILDPLATFORM\$dependency" - Write-Host "Checking '$appxRoot\$relativeSourcePath'" - if (Test-Path "$appxRoot\$relativeSourcePath") - { - Write-Output (' ') >> $outputFile - } -} - -Write-Output @" - - - - -"@ >> $outputFile \ No newline at end of file diff --git a/tools/GenerateSystemDllImageResources.ps1 b/tools/GenerateSystemDllImageResources.ps1 deleted file mode 100644 index 76cdd34951..0000000000 --- a/tools/GenerateSystemDllImageResources.ps1 +++ /dev/null @@ -1,64 +0,0 @@ -param( - [Parameter(Mandatory=$true, HelpMessage="Paths to the image files that need to be parsed and added to the system DLL resources.")] - [string]$ImagePaths, - - [Parameter(Mandatory=$true, HelpMessage="Path to the file to write the resources to.")] - [string]$OutputPath, - - [Parameter(Mandatory=$true, HelpMessage="Path to the file to write the resource helper information to.")] - [string]$ResourceHelperOutputPath -) - -# We'll start this at 2000 to be sure that we don't collide with string resources, which start at 1000. -$currentIndex = 2000 - -$resourceDefinitionsString = @" -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// THIS FILE IS CREATED BY A SCRIPT! DO NOT EDIT DIRECTLY! -// If you need to edit this file, edit GenerateSystemDllImageResources.ps1, which outputs its contents. -// - -"@ - -$resourceHelperString = @" -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// THIS FILE IS CREATED BY A SCRIPT! DO NOT EDIT DIRECTLY! -// If you need to edit this file, edit GenerateSystemDllImageResources.ps1, which outputs its contents. -// - -#pragma once - -"@ - -foreach ($imagePath in $ImagePaths.Split(";", [System.StringSplitOptions]::RemoveEmptyEntries)) -{ - $currentLocation = Get-Location - Set-Location $PSScriptRoot\..\dev\dll - $imagePath = (Resolve-Path $imagePath -Relative).Replace("\", "\\") - Set-Location $currentLocation - - $imageName = [io.path]::GetFileNameWithoutExtension($imagePath).Replace("`"", "") - - if ($resourceDefinitionsString.Length -gt 0) - { - $resourceDefinitionsString += [Environment]::NewLine - } - - $resourceDefinitionsString += "$currentIndex RCDATA `"$imagePath`"" - - if ($resourceHelperString.Length -gt 0) - { - $resourceHelperString += [Environment]::NewLine - } - - $resourceHelperString += "#define IR_$imageName $currentIndex" - - $currentIndex++ -} - -$resourceHelperString += [Environment]::NewLine - -Out-File $OutputPath -InputObject $resourceDefinitionsString -Encoding ASCII -Out-File $ResourceHelperOutputPath -InputObject $resourceHelperString -Encoding ASCII \ No newline at end of file diff --git a/tools/GenerateSystemDllStringResources.ps1 b/tools/GenerateSystemDllStringResources.ps1 deleted file mode 100644 index cc80d0c30b..0000000000 --- a/tools/GenerateSystemDllStringResources.ps1 +++ /dev/null @@ -1,115 +0,0 @@ -param( - [Parameter(Mandatory=$true, HelpMessage="Paths to the RESW files that need to be parsed and added to the system DLL resources.")] - [string]$ReswPaths, - - [Parameter(Mandatory=$true, HelpMessage="Path to the file to write the resources to.")] - [string]$OutputPath, - - [Parameter(Mandatory=$true, HelpMessage="Path to the file to write the resource helper information to.")] - [string]$ResourceHelperOutputPath -) - -[System.Collections.ArrayList]$reswDataObjectsToInclude = @() - -$groupIndex = 0; - -foreach ($reswPath in $ReswPaths.Split(";", [System.StringSplitOptions]::RemoveEmptyEntries)) -{ - # We only want to grab the en-US strings, since those are the inputs to our localization. - if (-not $reswPath.ToLower().Contains("en-us")) - { - continue - } - - $reswWithoutComments = ([regex]"").Replace((Get-Content $reswPath), "") - $reswDataElements = ([regex]".+?").Matches($reswWithoutComments) - - $numInGroup = 0 - foreach ($reswDataElement in $reswDataElements) - { - # Need to split large groups because of #define nesting limit (somewhere around 50) - if ($numInGroup -gt 50) - { - $numInGroup = 0 - $groupIndex++ - } - - $reswData = $reswDataElement.Groups[0].Value - $nameMatch = ([regex]"name=`"(.+?)`"").Match($reswData) - $valueMatch = ([regex]"(.+?)").Match($reswData) - $commentMatch = ([regex]"(.+?)").Match($reswData) - - $propertyDictionary = - @{"Name"="$($nameMatch.Groups[1].Value)"; - "Value"="$($valueMatch.Groups[1].Value)"; - "Comment"="$($commentMatch.Groups[1].Value)" - "GroupIndex"=$groupIndex} - - $reswDataObject = New-Object -TypeName PSObject -Property $propertyDictionary - - $reswDataObjectsToInclude.Add($reswDataObject) 2>&1> $null - - $numInGroup++ - } - - # Every file gets its own group - $groupIndex++ -} - -$resourceDefinitionsString = @" -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// THIS FILE IS CREATED BY A SCRIPT! DO NOT EDIT DIRECTLY! -// If you need to edit this file, edit GenerateSystemDllStringResources.ps1, which outputs its contents. -// - -#include "$(Split-Path -Leaf $ResourceHelperOutputPath)" - -"@ - -$resourceHelperString = @" -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// THIS FILE IS CREATED BY A SCRIPT! DO NOT EDIT DIRECTLY! -// If you need to edit this file, edit GenerateSystemDllImageResources.ps1, which outputs its contents. -// - -#pragma once - -"@ - -$lastResourceId = "SR_FIRST" - -# We'll start this at 1000 in case we need to add hard-coded resource strings for some reason. - -$groupIndex = -1 # Start at -1 so we always emit the first group -$groupStart = 1000 -$groupIncrement = 100 - -foreach ($reswDataObject in $reswDataObjectsToInclude) -{ - if ($reswDataObject.GroupIndex -ne $groupIndex) - { - $groupIndex = $reswDataObject.GroupIndex - $groupIdBegin = $groupStart + ($groupIncrement * $groupIndex) - $lastResourceId = "SR_GROUP$($groupIndex)" - $resourceHelperString += [Environment]::NewLine + "#define $lastResourceId $($groupIdBegin)" + [Environment]::NewLine - } - - $currentResourceId = "SR_$($reswDataObject.Name)" - - $resourceDefinitionsString += "$currentResourceId `"$($reswDataObject.Value)`"" - - if ($reswDataObject.Comment.Length -gt 0) - { - $resourceDefinitionsString += " // $($reswDataObject.Comment)" - } - - $resourceDefinitionsString += [Environment]::NewLine - - $resourceHelperString += "#define $($currentResourceId) ($($lastResourceId) + 1) " + [Environment]::NewLine - $lastResourceId = $currentResourceId -} - -Out-File $OutputPath -InputObject $resourceDefinitionsString -Encoding ASCII -Out-File $ResourceHelperOutputPath -InputObject $resourceHelperString -Encoding ASCII \ No newline at end of file diff --git a/tools/InstallTestApp.Desktop.cmd b/tools/InstallTestApp.Desktop.cmd deleted file mode 100644 index f82c0ded3b..0000000000 --- a/tools/InstallTestApp.Desktop.cmd +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -if exist "%SystemDrive%\Program Files\WindowsApps\MUXControlsTestApp_1.0.0.0_neutral__8wekyb3d8bbwe\MUXControlsTestApp.exe" ( - echo MUXControlsTestApp.appx already installed. Uninstalling... - powershell Remove-AppxPackage MUXControlsTestApp_1.0.0.0_neutral__8wekyb3d8bbwe -) - -echo Installing MUXControlsTestApp.appx... -powershell Add-AppxPackage %~dp0\Test\MUXControlsTestApp.appx -DependencyPath %~dp0\Test\TaefFramework.appx diff --git a/tools/InstallTestApp.Phone.cmd b/tools/InstallTestApp.Phone.cmd deleted file mode 100644 index 0184ab4bb5..0000000000 --- a/tools/InstallTestApp.Phone.cmd +++ /dev/null @@ -1,11 +0,0 @@ -@echo off - -if exist "%SystemDrive%\Data\PROGRAMS\WINDOWSAPPS\MUXControlsTestApp_1.0.0.0_neutral__8wekyb3d8bbwe\MUXControlsTestApp.exe" ( - echo MUXControlsTestApp.appx already installed. Uninstalling... - th {MUXControlsTestApp} -u - echo. -) - -echo Installing MUXControlsTestApp.appx... -th %~dp0\Test\MUXControlsTestApp.appx -sload -echo. \ No newline at end of file diff --git a/tools/PerformFullOSBuilds.ps1 b/tools/PerformFullOSBuilds.ps1 deleted file mode 100644 index 938bc5cfd6..0000000000 --- a/tools/PerformFullOSBuilds.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdLetBinding()] -Param( - ) - -Import-Module -Name $PSScriptRoot\BuildMachineUtils.psm1 -DisableNameChecking - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" - -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI24" -ClientAlias "winui2" -BuildId "32408" # Perform Full OS Build -Write-Host "PKGESWINUI24: $($result._links.web.href)" -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI25" -ClientAlias "winui2" -BuildId "32408" # Perform Full OS Build -Write-Host "PKGESWINUI25: $($result._links.web.href)" -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI44" -ClientAlias "winui" -BuildId "32408" # Perform Full OS Build -Write-Host "PKGESWINUI44: $($result._links.web.href)" diff --git a/tools/PostBuild.cmd b/tools/PostBuild.cmd deleted file mode 100644 index 8c1af09b0e..0000000000 --- a/tools/PostBuild.cmd +++ /dev/null @@ -1,84 +0,0 @@ -ECHO ON -SETLOCAL enabledelayedexpansion -set ERRORLEVEL=0 - -echo Converting XES_DFSDROP to FQDN path... -echo XES_DFSDROP is currently %XES_DFSDROP% - -for /F "tokens=1 delims=\" %%A in ('echo %XES_DFSDROP%') do (set XES_DFSDROP_DN=%%A) -call set XES_DFSDROP_FQDN=%%XES_DFSDROP:!XES_DFSDROP_DN!=!XES_DFSDROP_DN!.redmond.corp.microsoft.com%% -echo ##vso[task.setvariable variable=XES_DFSDROP;]%XES_DFSDROP_FQDN% - -pushd %~dp0 - -set CHUNKCOUNT=0 -if EXIST %XES_DFSDROP%\release\x86 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\release\x86\prebuilt %XES_DFSDROP%\spkg\release\x86\prebuilt -) -if EXIST %XES_DFSDROP%\release\x64 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\release\x64\prebuilt %XES_DFSDROP%\spkg\release\amd64\prebuilt -) -if EXIST %XES_DFSDROP%\release\arm ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\release\arm\prebuilt %XES_DFSDROP%\spkg\release\arm\prebuilt -) -if EXIST %XES_DFSDROP%\release\arm64 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - REM we don't create arm64 spkgs (yet), so don't copy them. -) -if EXIST %XES_DFSDROP%\debug\x86 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\debug\x86\prebuilt %XES_DFSDROP%\spkg\debug\x86\prebuilt -) -if EXIST %XES_DFSDROP%\debug\x64 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\debug\x64\prebuilt %XES_DFSDROP%\spkg\debug\amd64\prebuilt -) -if EXIST %XES_DFSDROP%\debug\arm ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - robocopy %XES_DFSDROP%\debug\arm\prebuilt %XES_DFSDROP%\spkg\debug\arm\prebuilt -) -if EXIST %XES_DFSDROP%\debug\arm64 ( - set /A CHUNKCOUNT=%CHUNKCOUNT%+1 - REM we don't create arm64 spkgs (yet), so don't copy them. -) - -echo Number of chunks available: %CHUNKCOUNT% - -echo ++++++++++++++++ ENVIRONMENT ++++++++++++++++++++++++ -set -echo ++++++++++++++++ ----------- ++++++++++++++++++++++++ -echo ++++++++++++++++ OUTPUT DIRECTORY ++++++++++++++++++++++++ -dir /s /b %XES_OUTDIR% -echo ++++++++++++++++ ----------- ++++++++++++++++++++++++ - -pushd %~dp0\..\build\NuSpecs - -set NUGETCMD=%~dp0\NugetWrapper.cmd -set BUILDOUTPUT=%XES_DFSDROP% -set OUTPUTDIR=%BUILD_BINARIESDIRECTORY%\PostBuild -set ECHOON=1 - -echo Calling build-nupkg for "prerelease" version. -echo build-nupkg.cmd -BuildOutput %BUILDOUTPUT% -OutputDir %OUTPUTDIR% -subversion %VERSIONBUILDREVISION:~-3% -prereleaseversion prerelease -call build-nupkg.cmd -BuildOutput %BUILDOUTPUT% -OutputDir %OUTPUTDIR% -subversion %VERSIONBUILDREVISION:~-3% -prereleaseversion prerelease -IF %ERRORLEVEL% NEQ 0 GOTO END - -if /I "%MUXFINALRELEASE%" == "true" ( - echo Calling build-nupkg for "release" version. - echo build-nupkg.cmd -BuildOutput %BUILDOUTPUT% -OutputDir %OUTPUTDIR%\Final -subversion %VERSIONBUILDREVISION:~-3% - call build-nupkg.cmd -BuildOutput %BUILDOUTPUT% -OutputDir %OUTPUTDIR%\Final -subversion %VERSIONBUILDREVISION:~-3% - IF !ERRORLEVEL! NEQ 0 GOTO END -) - -popd - -robocopy /S %BUILD_BINARIESDIRECTORY%\PostBuild %XES_DFSDROP%\PostBuildUnsigned - -REM robocopy returns 0 for no files copied, 1 for files copied. (https://support.microsoft.com/en-us/kb/954404) -IF %ERRORLEVEL%==1 set ERRORLEVEL=0 - -:END -exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/tools/PostBuildWrapper.cmd b/tools/PostBuildWrapper.cmd deleted file mode 100644 index 4b0285e5d4..0000000000 --- a/tools/PostBuildWrapper.cmd +++ /dev/null @@ -1,3 +0,0 @@ -pushd %~dp0 - -call PostBuildOnly.cmd %~dp0\PostBuild.cmd diff --git a/tools/PostTestsWrapper.cmd b/tools/PostTestsWrapper.cmd deleted file mode 100644 index a3340052c8..0000000000 --- a/tools/PostTestsWrapper.cmd +++ /dev/null @@ -1,5 +0,0 @@ -REM This script is supposed to run in the Package ES build after tests have complete - -pushd %~dp0 - -call PostBuildOnly.cmd %~dp0\PublishNupkg.cmd \ No newline at end of file diff --git a/tools/ProcessTextTemplate.ps1 b/tools/ProcessTextTemplate.ps1 deleted file mode 100644 index 477d3d67be..0000000000 --- a/tools/ProcessTextTemplate.ps1 +++ /dev/null @@ -1,213 +0,0 @@ -Param( - [Parameter(Mandatory = $true)] - [string]$FilePath, - - [Parameter(Mandatory = $true)] - [string]$OutputPath, - - [string]$ParameterValuesString -) - -if ("$env:SDXROOT".Length -eq 0) -{ - Write-Error "This script should only be run in a Razzle context." -} - -$textTemplatingDllPath = "$env:SDXROOT\tools\managed\v2.0\Microsoft.VisualStudio.TextTemplating.dll" - -[System.Reflection.Assembly]::LoadFrom($textTemplatingDllPath) 2>&1>> $null -Add-Type -Path $textTemplatingDllPath - -Add-Type -Language CSharp -ReferencedAssemblies $textTemplatingDllPath @" -using System; -using System.CodeDom.Compiler; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Text; - -using Microsoft.VisualStudio.TextTemplating; - -namespace TextTemplateProcessing -{ - public sealed class TransformationHost : ITextTemplatingEngineHost - { - private readonly IList _errors; - private string _basePath; - private IDictionary _parameterValues; - - public TransformationHost(string basePath, IDictionary parameterValues) - { - _errors = new List(); - _basePath = basePath; - _parameterValues = parameterValues; - } - - public ICollection Errors - { - get - { - return _errors; - } - } - - public object GetHostOption(string optionName) - { - throw new NotImplementedException(); - } - - public bool LoadIncludeText(string requestFileName, out string content, out string location) - { - string resolvedLocation = ResolvePath(requestFileName); - - if (!string.IsNullOrEmpty(resolvedLocation)) - { - content = File.ReadAllText(resolvedLocation); - location = resolvedLocation; - return true; - } - else - { - content = string.Empty; - location = string.Empty; - return false; - } - } - - public void LogErrors(CompilerErrorCollection errors) - { - foreach (CompilerError error in errors) - { - _errors.Add(error); - } - } - - public AppDomain ProvideTemplatingAppDomain(string content) - { - return AppDomain.CurrentDomain; - } - - public string ResolveAssemblyReference(string assemblyReference) - { - if (System.IO.File.Exists(assemblyReference)) - { - return assemblyReference; - } - - var assembly = Assembly.Load(assemblyReference); - if (assembly != null) - { - return assembly.Location; - } - - return string.Empty; - } - - public Type ResolveDirectiveProcessor(string processorName) - { - throw new ArgumentException("Invalid directive processor.", "processorName"); - } - - public string ResolveParameterValue(string directiveId, string processorName, string parameterName) - { - if (directiveId == null) - { - throw new ArgumentNullException("directiveId"); - } - - if (processorName == null) - { - throw new ArgumentNullException("processorName"); - } - - if (parameterName == null) - { - throw new ArgumentNullException("parameterName"); - } - - return _parameterValues[parameterName] as string; - } - - public string ResolvePath(string path) - { - if (File.Exists(path)) - { - return path; - } - - string pathFromBase = Path.Combine(_basePath, path); - if (File.Exists(pathFromBase)) - { - return pathFromBase; - } - - return string.Empty; - } - - public void SetFileExtension(string extension) - { - } - - public void SetOutputEncoding(Encoding encoding, bool fromOutputDirective) - { - } - - public IList StandardAssemblyReferences - { - get - { - return new string[] - { - typeof(System.Uri).Assembly.Location - }; - } - } - - public IList StandardImports - { - get - { - return new string[0]; - } - } - - public string TemplateFile - { - get - { - return string.Empty; - } - } - } -} -"@ - -[System.Collections.Generic.Dictionary[string, string]]$parameterValues = @{} - -$ParameterValuesString.Split(',') | ForEach-Object { - $components = $_.Split('=') - $parameterValues.Add($components[0], $components[1]) -} - -$engine = New-Object -TypeName Microsoft.VisualStudio.TextTemplating.Engine -$transformationHost = New-Object -TypeName TextTemplateProcessing.TransformationHost -ArgumentList (Split-Path -Path $FilePath),$parameterValues -$transformedText = $engine.ProcessTemplate([System.IO.File]::ReadAllText($FilePath), $transformationHost) - -# If we individually write out every error, then every single one of them will be annotated with the line number -# from this script. In order to avoid that hindrance to readability, we'll collect all of the errors (if any) -# into a single string, and then write that out as an error. -$errors = "" - -$transformationHost.Errors | ForEach-Object { - $errors = "$errors$_$([Environment]::NewLine)" -} - -if ($errors.Length -gt 0) -{ - Write-Error $errors - exit 1 -} -else -{ - [System.IO.File]::WriteAllText($OutputPath, $transformedText) -} \ No newline at end of file diff --git a/tools/PublishChunk.cmd b/tools/PublishChunk.cmd deleted file mode 100644 index c939f225c9..0000000000 --- a/tools/PublishChunk.cmd +++ /dev/null @@ -1,23 +0,0 @@ -ECHO ON -SETLOCAL -set ERRORLEVEL= - -set RETRYCOUNT=0 - -:TryAgain -echo robocopy %BUILD_BINARIESDIRECTORY% %XES_DFSDROP% /E /R:50 /NP /XX -robocopy %BUILD_BINARIESDIRECTORY% %XES_DFSDROP% /E /R:50 /NP /XX - -REM robocopy returns 0 for no files copied, 1 for files copied and random other values up to 8 for ok. (https://support.microsoft.com/en-us/kb/954404) -IF %ERRORLEVEL% LEQ 8 ( - set ERRORLEVEL=0 -) ELSE IF %RETRYCOUNT% LEQ 2 ( - set /a RETRYCOUNT=RETRYCOUNT+1 - @echo ##vso[task.logissue type=warning;] Robocopy returned error, trying again %BUILD_BINARIESDIRECTORY% %XES_DFSDROP% - goto :TryAgain -) ELSE ( - @echo ##vso[task.logissue type=error;] Robocopy failed %BUILD_BINARIESDIRECTORY% %XES_DFSDROP% -) - -:END -exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/tools/PublishPostBuild.cmd b/tools/PublishPostBuild.cmd deleted file mode 100644 index d16d47ba24..0000000000 --- a/tools/PublishPostBuild.cmd +++ /dev/null @@ -1,10 +0,0 @@ -ECHO ON -SETLOCAL -set ERRORLEVEL= - -robocopy /s %BUILD_BINARIESDIRECTORY%\signed %XES_DFSDROP%\PostBuild - -REM robocopy returns 0 for no files copied, 1 for files copied. (https://support.microsoft.com/en-us/kb/954404) -IF %ERRORLEVEL%==1 set ERRORLEVEL=0 - -exit /B %ERRORLEVEL% \ No newline at end of file diff --git a/tools/PublishPostBuildWrapper.cmd b/tools/PublishPostBuildWrapper.cmd deleted file mode 100644 index a13b8eadc6..0000000000 --- a/tools/PublishPostBuildWrapper.cmd +++ /dev/null @@ -1,3 +0,0 @@ -pushd %~dp0 - -call PostBuildOnly.cmd %~dp0\PublishPostBuild.cmd diff --git a/tools/RebootBuildMachine.ps1 b/tools/RebootBuildMachine.ps1 deleted file mode 100644 index 0290e8dea9..0000000000 --- a/tools/RebootBuildMachine.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -[CmdLetBinding()] -param( - [Parameter(mandatory=$true)] - [string]$MachineName - ) - -Import-Module -Name $PSScriptRoot\BuildMachineUtils.psm1 -DisableNameChecking - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" - -$result = Queue-BuildOnMachine -MachineName $MachineName -BuildId "33711" # Reboot build machine build -Write-Host "$($MachineName): $($result._links.web.href)" \ No newline at end of file diff --git a/tools/ReleaseHelper.ps1 b/tools/ReleaseHelper.ps1 deleted file mode 100644 index 8cd0ae79df..0000000000 --- a/tools/ReleaseHelper.ps1 +++ /dev/null @@ -1,243 +0,0 @@ -Write-Verbose "PSScriptRoot: $PSScriptRoot" -. $PSScriptRoot\ADALAuth.ps1 - -############################################################################### -# Retrieve-Headers -# Pops an authentication flow for VSTS -# -# This just wraps the base function from ADALAuth.ps1, and saves the -# headers so that any future calls to this return immediately -############################################################################### - -function Retrieve-Headers -{ - if ($global:vstsRestApiHeaders -eq $null) - { - $global:vstsRestApiHeaders = Get-AuthorizationHeaders - } -} - - -############################################################################### -# GetAnswer -# Stolen from Jevan's CopyAndPrepVHD script -############################################################################### - -function GetAnswer -{ - Param([string[]]$Choices) - - while ($true) - { - $choice = Read-Host -Prompt ("[" + ([string]::Join("|", $Choices)) + "]") - foreach ($possibleChoice in $Choices) - { - if ($possibleChoice -like $choice) - { - return $choice - } - } - } - - return $null -} - -############################################################################### -# RunLocalization -# Run the localization script with a unique tag -############################################################################### - -function RunLocalization -{ - Param([string] $branchName) - $locWorkflowName = $branchName -replace '/','_' - $locWorkflowName = "localization_nuget_release_" + $locWorkflowName - $DateTime = Get-Date #or any other command to get DateTime object - $locWorkflowName = $locWorkflowName + ([DateTimeOffset]$DateTime).ToUnixTimeSeconds(); - Write-Host $locWorkflowName - - pushd build/localization - .\RunLocWorkflow.ps1 $locWorkflowName - popd -} - -############################################################################### -# New-BranchPullRequest -# Create a pull request from the specified branch into master -############################################################################### - -function New-BranchPullRequest -{ - Param([string] $branchName) - - Retrieve-Headers - - $pullRequestParameters = @{ - "sourceRefName"="refs/heads/$branchname" - "targetRefName"="refs/heads/master" - "title"="Updating custom.props and localization in master (from nuget package creation)" - "description"="" - "reviewers"=@() - } - - Invoke-RestMethod -Uri "https://microsoft.visualstudio.com/defaultcollection/os/_apis/git/repositories/dep.controls/pullRequests?api-version=3.0-preview&sourceRefName=refs/heads/$branchname" -Body (ConvertTo-Json $pullRequestParameters) -Method Post -ContentType "application/json" -Headers $global:vstsRestApiHeaders 2>&1> $null -} - -function Get-BranchPullRequests -{ - Invoke-RestMethod -Uri "https://microsoft.visualstudio.com/defaultcollection/os/_apis/git/repositories/dep.controls/pullRequests?api-version=3.0-preview&sourceRefName=refs/heads/$branchname" -Method Get -Headers $global:vstsRestApiHeaders -} - -function Lock-Branch -{ - Param([string] $branchName) - - Retrieve-Headers - - $parameters = @{ - "isLocked"="true" - } - - Invoke-RestMethod -Uri "https://microsoft.visualstudio.com/defaultcollection/os/_apis/git/repositories/dep.controls/refs/heads/$($branchName)?api-version=1.0" -Body (ConvertTo-Json $parameters) -Method Patch -ContentType "application/json" -Headers $global:vstsRestApiHeaders 2>&1> $null -} - -############################################################################### -# Queue-NewReleaseBuild -# Queue a build of the specified branch -############################################################################### - -function Queue-NewReleaseBuild -{ - Param([string] $branchName) - Retrieve-Headers - - $root = @{ - "sourceBranch" = "refs/heads/$branchName"; - "definition" = @{ - "id" = "11819" # depcontrols_release build defn - }; - "project" = @{ - "id" = "8d47e068-03c8-4cdc-aa9b-fc6929290322" # OS - }; - "repository" = @{ - "id" = "d39af991-db55-43c3-bdef-c6333a2b3264" # dep.controls - }; - }; - - $response = Invoke-RestMethod https://microsoft.visualstudio.com/DefaultCollection/os/_apis/build/builds?api-version=2.0 -Body (ConvertTo-Json $root) -Method Post -ContentType "application/json" -Headers $global:vstsRestApiHeaders - - $id = $response.id; - $url = "https://microsoft.visualstudio.com/DefaultCollection/OS/_build/index?buildId=$id" - Write-Host "New build at $url" - Start-Process $url - -} - -##################################################### -# START ACTUAL SCRIPT # -##################################################### - -Write-Host "Make sure this branch is clear of changes!" - -Write-Host "ReleaseHelper, select your action:" -Write-Host "1. Create and prepare release branch" -# Write-Host "2. Deploy nuget package to feed" - -$scriptAction = GetAnswer("1", "2"); - -if ($scriptAction -eq "1") -{ - Write-Host "Do you want me to switch to master and pull?" - if ((GetAnswer("Y", "N")) -eq "Y") - { - Write-Host "YEAH BOY"; - git checkout master - git pull - } - - $branchName = git name-rev --name-only HEAD - - Write-Host "Create a release branch [Y]? Or use existing branch $branchName [N]" - if ((GetAnswer("Y", "N")) -eq "Y") - { - Write-Host "Pick a name for the release branch, it should look something like release/1801/nuget-18013-180123" - Write-Host "That's release/[YY][MM]/nuget-[YY][MM][release # for this month]-[YY][MM][todays date]" - - $branchName = Read-Host "Release branch name" - - git checkout -b $choice - } - - $gitChanges = $false; - - Write-Host "" - Write-Host "Run localization?" - Write-Host "" - Write-Host "Remember, if you are adding new strings, you'll need to re-run localization (after the translations are done)" - Write-Host "to actually get the newly translated strings pulled back down into our project. Since we are releasing a new" - Write-Host "package every week-ish, this only matters if for some reason we add new/update strings in a release end-game," - Write-Host "but just something to keep in mind!" - if ((GetAnswer("Y", "N")) -eq "Y") - { - RunLocalization($branchName); - $gitChanges = $true; - } - - Write-Host "Time to update custom.props, usually you set the VersionMinor to the [YY][MM][release # for this month] of your branch name" - Write-Host "Update custom.props?" - if ((GetAnswer("Y", "N")) -eq "Y") - { - notepad custom.props - git add custom.props - $gitChanges = $true; - } - - if ($gitChanges -eq $true) - { - git commit -m "Updated custom.props" - git push --set-upstream origin $branchName - } - - Write-Host "Lock the branch? This will prevent further commits (including by future runs of this script)" - if ((GetAnswer("Y", "N")) -eq "Y") - { - Lock-Branch($branchName) - } - - Write-Host "Create pull request to merge changes back to master?" - if ((GetAnswer("Y", "N")) -eq "Y") - { - Write-Host "You may be asked to install some nuget packages the first time you go through this flow" - - New-BranchPullRequest($branchName); # rename function - - $BranchPullRequests = Get-BranchPullRequests - if ($BranchPullRequests.count -eq 0) - { - Write-Error "Could not create pull request!" - exit 1 - } - else - { - $pullRequest = $BranchPullRequests.value[0]; - $pullRequestID = $pullRequest.pullRequestId; - $url = "https://microsoft.visualstudio.com/OS/OS%20Team/_git/dep.controls/pullrequest/$pullRequestID#_a=overview" - Write-Host "New pull request: $url" - Start-Process $url - } - } - - Write-Host "Spin a new depcontrols_release build?" - if ((GetAnswer("Y", "N")) -eq "Y") - { - Queue-NewReleaseBuild($branchName); - } - - Write-Host "---" - Write-Host "" - Write-Host "Remember go to https://microsoft.visualstudio.com/DefaultCollection/OS/ft_xamlcon/_git/dep.controls/branches and LOCK your new branch" -} -Elseif ($scriptAction -eq "2") -{ - # Write-Host "NUYGETSFDASD" -} \ No newline at end of file diff --git a/tools/UpdateBuildMachineGitInstalls.ps1 b/tools/UpdateBuildMachineGitInstalls.ps1 deleted file mode 100644 index 0b44b43de2..0000000000 --- a/tools/UpdateBuildMachineGitInstalls.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdLetBinding()] -Param( - ) - -Import-Module -Name $PSScriptRoot\BuildMachineUtils.psm1 -DisableNameChecking - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" - -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI24" -BuildId "17093" # Install GVFS -Write-Host "PKGESWINUI24: $($result._links.web.href)" -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI25" -BuildId "17093" # Install GVFS -Write-Host "PKGESWINUI25: $($result._links.web.href)" -$result = Queue-BuildOnMachine -MachineName "PKGESWINUI44" -BuildId "17093" # Install GVFS -Write-Host "PKGESWINUI44: $($result._links.web.href)" diff --git a/tools/UpdateBuildMachineSDKs.ps1 b/tools/UpdateBuildMachineSDKs.ps1 deleted file mode 100644 index f9f5251c14..0000000000 --- a/tools/UpdateBuildMachineSDKs.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdLetBinding()] -Param( - ) - -Import-Module -Name $PSScriptRoot\BuildMachineUtils.psm1 -DisableNameChecking - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" - -for ($i = 30; $i -le 43; $i++) -{ - $machineName = "PKGESWINUI$i" - $result = Queue-BuildOnMachine -MachineName $machineName -ClientAlias "depcontrols2" -BuildId "18490" # UpdateSDKs build - Write-Host "$($machineName): $($result._links.web.href)" -} diff --git a/tools/UpdateBuildMachineVSInstalls.ps1 b/tools/UpdateBuildMachineVSInstalls.ps1 deleted file mode 100644 index f6b93b1ae7..0000000000 --- a/tools/UpdateBuildMachineVSInstalls.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdLetBinding()] -Param( - ) - -Import-Module -Name $PSScriptRoot\BuildMachineUtils.psm1 -DisableNameChecking - -$adalPath = Get-AdalPath - -Write-Verbose "ADALPath: $adalPath" -Add-Type -Path "$adalPath\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" - -for ($i = 30; $i -le 43; $i++) -{ - $machineName = "PKGESWINUI$i" - $result = Queue-BuildOnMachine -MachineName $machineName -ClientAlias "depcontrols2" -BuildId "32303" # Update VS installs build - Write-Host "$($machineName): $($result._links.web.href)" -} diff --git a/tools/packages.pkggen.config b/tools/packages.pkggen.config deleted file mode 100644 index 757b2b0cd4..0000000000 --- a/tools/packages.pkggen.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file