Skip to content

Show license agreements when installing#1347

Merged
florelis merged 33 commits into
microsoft:masterfrom
florelis:EULA
Aug 20, 2021
Merged

Show license agreements when installing#1347
florelis merged 33 commits into
microsoft:masterfrom
florelis:EULA

Conversation

@florelis

@florelis florelis commented Aug 5, 2021

Copy link
Copy Markdown
Member

This adds showing license agreements when installing and the ability to accept them with a command line argument.

  • Added a partial implementation of v1.1 manifests for the agreement fields.
    • Added files for the new schema version. Those are almost the same as v1.0, with just the agreements added. I.e. it does not include all the new fields.
    • Updated manifest reading to be aware of the new version and fields.
    • Based schema definition on existing schema for the REST source
  • Modified the show workflow tasks to include the agreements, and added showing as a step when installing if needed.
  • Added workflow tasks for showing the license agreements if needed and check that they are accepted before starting the installation.
  • Refactored upgrade all and import to use the same code to install multiple packages. Each workflow now only searches the packages to install and selects the installer for each one, then handles all the packages off to a InstallMultiplePackages task that handles agreements, showing dependencies and install.
  • Added an interactive prompt to ask for agreement acceptance. The prompt is roughly based on how I saw confirmation prompts implemented on Powershell.

The output with the agreements looks like this:

Found TestWithLicenseAgreement [AppInstallerTest.TestLicenseAgreement]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Version: 1.0.0.0
Publisher: AppInstaller Test Installer
License: Test
Agreements:
Agreement with text This is the text of the agreement.
Agreement with URL https://TestAgreementUrl


The publisher requires that you view the following information and accept the EULA before installing.
Do you agree to the terms?
[Y] Yes  [N] No:

Not in this PR:

  • E2E tests.
  • Support for REST sources.

I still have to check more cases manually to confirm that the experience is good (specially around upgrade all, import and dependencies).

Microsoft Reviewers: Open in CodeFlow

@florelis florelis marked this pull request as ready for review August 6, 2021 01:15
@florelis florelis requested a review from a team as a code owner August 6, 2021 01:15
Comment thread src/AppInstallerCLICore/Workflows/InstallFlow.cpp Outdated
@denelon denelon linked an issue Aug 6, 2021 that may be closed by this pull request
Comment thread schemas/JSON/manifests/v1.1.0/manifest.defaultLocale.1.1.0.json Outdated
Comment thread schemas/JSON/manifests/v1.1.0/manifest.defaultLocale.1.1.0.json Outdated
Comment thread schemas/JSON/manifests/v1.1.0/manifest.defaultLocale.1.1.0.json
"description": "The agreement URL."
}
},
"minProperties": 1

@yao-msft yao-msft Aug 19, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"minProperties": 1

If we really want to be strict, this would better be in ManifestValidation method

Comment thread schemas/JSON/manifests/v1.1.0/manifest.installer.1.1.0.json Outdated
Comment thread src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp
Comment thread src/AppInstallerCommonCore/Manifest/ManifestYamlPopulator.cpp Outdated
Comment thread src/AppInstallerCommonCore/Manifest/ManifestSchemaValidation.cpp Outdated
Comment thread src/AppInstallerCLITests/AppInstallerCLITests.vcxproj.filters Outdated
Comment thread src/AppInstallerCLICore/ExecutionReporter.h Outdated
Comment thread src/AppInstallerCLICore/Argument.cpp Outdated
Comment thread src/AppInstallerCLICore/ExecutionContextData.h Outdated
Comment thread src/AppInstallerCLICore/ExecutionContextData.h Outdated
Comment thread src/AppInstallerCLICore/ExecutionContext.h Outdated
Comment thread src/AppInstallerCLICore/ExecutionReporter.cpp
Comment thread src/AppInstallerCLICore/ExecutionReporter.cpp Outdated
Comment thread src/AppInstallerCLICore/ExecutionReporter.cpp
Comment thread src/AppInstallerCLICore/ExecutionContextData.h Outdated
Comment thread src/AppInstallerCLICore/Workflows/ImportExportFlow.cpp Outdated
Comment thread src/AppInstallerCLICore/Workflows/ShowFlow.h Outdated
Comment thread src/AppInstallerCLICore/Workflows/InstallFlow.cpp
@florelis florelis merged commit 48b8303 into microsoft:master Aug 20, 2021
@florelis florelis deleted the EULA branch August 20, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Require EULA/TOS acceptance before download starts.

2 participants