-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge/Port 1.0 license support into main/1.1 (#2012)
* Update installer to support both publishing IDs used in App SDK. (#1759) * draft changes * fixing typo Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com> * Added MSIX license support (#1783) * Update installer to support installing licenses. Structure in place, need to coordinate with build pipeline to implement InstallLicenses (instead of printf) * Simplified help * Added missing Copyright. Add valid license for inner-loop testing. Added --dry-run and other command line parameters (to expedite testing as well as product benefit). Wired up install flow. Next is testing the actual get-license-from-stream-and-install * It works! Verified with stub NOP implementation here for dev inner-loop and full pipeline bits. Improved error reporting. * Add license support to Deployment API and a new InstallLicenses API (#1790) * Updated DeploymentManager to install license files if necessary * Add stubs for the InstallLicenseFile() methods * Change installer to install licenses BEFORE packages, for higher reliability * Copy the license header to the source tree to use whehn building via the pipeline] * Add Licensing API and export from Bootstrap'r * Added some pseudocode in MsixInstallLicenses(). Real implementation coming RSN * yml changes to pickup licensing package when needed. * moving restore to the top of the pipeline. * moving back, wrong stage * Fixed license filename * add nuget authenticate call * differnt connection * adding nuget config for build * avoid using licensing support in github / PR builds, which don't have access to the resources * update script to capture package version / name. * one missed check * Incorported feedback * udpdating nuget.config name to avoid conflicts. Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com> * Incorporated feedback Co-authored-by: Ben Kuhn <bjk4929@yahoo.com> Co-authored-by: Ben Kuhn <benkuhn@ntdev.microsoft.com>
- Loading branch information
1 parent
0780fe5
commit 6df1822
Showing
37 changed files
with
781 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<config> | ||
<!-- | ||
Where packages should go. Visual Studio will provide a default value of $(SolutionDir) but command-line based | ||
package restores could end up in a different location. Setting this value keeps Visual Studio and NuGet.exe | ||
in sync for packages.config based restores. | ||
--> | ||
<add key="repositoryPath" value=".\packages" /> | ||
</config> | ||
<packageRestore> | ||
<add key="enabled" value="True" /> | ||
<add key="automatic" value="True" /> | ||
</packageRestore> | ||
<activePackageSource> | ||
<add key="All" value="(Aggregate source)" /> | ||
</activePackageSource> | ||
<packageSources> | ||
<clear /> | ||
<add key="Project.Reunion.nuget.internal" value="https://pkgs.dev.azure.com/microsoft/ProjectReunion/_packaging/Project.Reunion.nuget.internal/nuget/v3/index.json" /> | ||
</packageSources> | ||
<disabledPackageSources> | ||
<clear /> | ||
</disabledPackageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Param( | ||
[Parameter(Position=0)] | ||
[string]$versionDetailsPath = "", | ||
[Parameter(Position=1)] | ||
[string]$packageConfigPath = "" | ||
) | ||
|
||
[xml]$buildConfig = Get-Content -Path $versionDetailsPath | ||
|
||
$packagesText = | ||
@" | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<!-- Transport packages from the feeder repositories --> | ||
"@ | ||
foreach ($dependency in $buildConfig.Dependencies.ProductDependencies.Dependency) | ||
{ | ||
$name = $dependency.name | ||
$ver = $dependency.version | ||
Write-Host "id: " $name | ||
Write-Host "ver: " $ver | ||
|
||
if ($name -eq "Microsoft.WindowsAppSDK.AppLicensingInternal.TransportPackage") | ||
{ | ||
Write-Host "##vso[task.setvariable variable=AppLicensingInternalPackageName;]$name" | ||
Write-Host "##vso[task.setvariable variable=AppLicensingInternalPackageVersion;]$ver" | ||
} | ||
|
||
$packagesText += ' <package id="' + $name + '" version="' + $ver + '" targetFramework="native" /> | ||
' | ||
} | ||
$packagesText += | ||
@" | ||
</packages> | ||
"@ | ||
|
||
Write-Host $packagesText | ||
|
||
Set-Content -Value $packagesText $packageConfigPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
<HasSharedItems>true</HasSharedItems> | ||
<ItemsProjectGuid>{885A43FA-052D-4b0d-A2DC-13EE15796435}</ItemsProjectGuid> | ||
<ItemsProjectName>Licensing</ItemsProjectName> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ProjectCapability Include="SourceItemsFromImports" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="$(MSBuildThisFileDirectory)WindowsAppRuntime-License.h" /> | ||
<ClInclude Include="$(MSBuildThisFileDirectory)MsixLicensing.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="$(MSBuildThisFileDirectory)MsixLicensing.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PublicHeaders Include="$(MSBuildThisFileDirectory)MsixLicensing.h" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
#include "pch.h" | ||
|
||
#include "msixlicensing.h" | ||
|
||
#include <WindowsAppRuntime-License.h> | ||
|
||
STDAPI MsixInstallLicenses() noexcept try | ||
{ | ||
//TODO | ||
// FOREACH file IN pkgdir\MSIX\*_license.xml | ||
// InstallLicenseFile(file) | ||
return S_OK; | ||
} | ||
CATCH_RETURN(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
#ifndef __MSIXLICENSING_H | ||
#define __MSIXLICENSING_H | ||
|
||
STDAPI MsixInstallLicenses() noexcept; | ||
|
||
#endif // __MSIXLICENSING_H |
Oops, something went wrong.