User License Elections proposal #45
Replies: 6 comments 5 replies
-
TODO: Clarify where licenses are stored (on gems) and setreg/cmake implications. (this is done) |
Beta Was this translation helpful? Give feedback.
-
I think this is a great proposal to make easier to deal with non-OSS licenses in O3DE. Having to manually download 3rdParty SDK/libs, install them, or place them in the right folders, is a very tedious process for users. The setup of the engine should be as easy, seamless and quick as possible. One of the main points when to check for non-OSS licenses could be when enabling gems. For example, DirectX12 runtime dependency comes from Atom gem (on windows platform only), if some customer doesn't need to enable Atom gem for whatever reason then they shouldn't need to accept DX12 license. For gems that are distributed enabled by default (like Atom) I guess the user would need to accept it at an earlier point. For gems not enabled by default, it seems fit that the system would ask to accept the non-OSS license when the user attempts to enable the gem and if the user declines the license then the gem just doesn't get enabled (that's if the license is mandatory for the gem to function, if it's an optional one the gem can still be enabled but with limited functionality). |
Beta Was this translation helpful? Give feedback.
-
Another user case that I've encountered that would fit with this proposal is the Lastly, I'd like to quickly mention Wwise and I think its gem for O3DE is a similar situation whose setup could also benefit from this proposal. |
Beta Was this translation helpful? Give feedback.
-
[Just a thought] The proposal doesn't mention restricted platforms, but I was thinking that maybe there is a larger story here for this proposal to also accept restricted platforms SDKs in the future? It's ok if we don't want to dive into this yet, but I thought it was worth bringing it up as it might be worth keeping it under our radar. |
Beta Was this translation helpful? Give feedback.
-
Can a user still use these redistributable libraries even when the license hasn't been accepted through SDK? Simply will the detection mechanism first detect if the redistributable is on the user machine before prompting them to accept a non-OSS license? |
Beta Was this translation helpful? Give feedback.
-
Would we also want to consider a similar mechanism on a per project basis? I could see a user having different preferences depending on the kind of project they're making. |
Beta Was this translation helpful? Give feedback.
-
User License Elections
Problem Statement
O3DE, being an open source project, is predominantly powered by open-source code and open-source dependencies. However, it is impractical to restrict all runtime license usage strictly to open-source licenses. Some binary redistributable libraries may be needed in a shipping product, including for example:
The usage of these binaries and associated headers may require the user to accept a license before compiling and using the engine. Currently, the user would be required to download these dependencies manually, passing dependency paths to the CMake configuration step to use.
What we would like is a more turnkey approach, which does much of the heavy lifting of fetching, configuring, and building the dependencies as needed, while still gating product usage until the user accepts all relevant licenses. In the case that a dependency is optional, rejecting the license should simply cause the project to build and run without the optional dependency. A mechanism is also needed for the user to elect a different set of licenses at a later point in time, with the project build configuration adjusting accordingly.
Proposed Solution
A new
user_license_elections.json
file in the user’s.o3de
config folder will be used to indicate the acceptance status of each dependency with a non-OSS license. This file may be different depending on the host platform, and the general structure of the file looks like:The file contains an array of objects, associated licenses, version data, a URI referring to the license. Crucially, each entry in the array has an
accepted
field with a simple boolean value indicating if the user has accepted the license terms for that entry. By default, licenses are not accepted.Specifying the licenses themselves occurs on a per-gem basis, leveraging a similar format to the file above (possibly using the setreg mechanism). These files are aggregated as part of the configure or install process, and the elections themselves are defined using a process described next.
Accepting licenses occurs via two mechanisms, modifying the file entries above via script or installer, or passing CMake variables that indicate license acceptance. If using the installer, the user must be prompted with a screen listing each dependency, with a link to view the license, a brief description about the dependency usage, and a checkbox to either accept or reject the license. The elections are checked at configuration time in CMake. If a required dependency isn’t met, the configuration will terminate immediately with an error message indicating what went wrong.
To avoid needing multiple configuration attempts to discover what licenses are needed, the O3DE CMake file will populate required and optional licenses early-on, prior to configuration other targets. If user intervention is needed, the configuration will emit an error message and fail immediately with instructions on how to proceed. Among the existing scripts for managing project registry settings, two additional scripts will be provided to accept all licenses, or strictly required ones. Later, an interactive script may be provided to interactively make an acceptance election on licenses one at a time. Early on though, the burden of additional licenses is expected to be small, so this interactive script may be deferred till a later time.
Finally, as an alternative to modifications to the configuration file above, individual licenses may be accepted by passing appropriate CMake variables directly at generation time (either via the CMake GUI configurator or on the command line). The general structure of the CMake variable tied to a particular license is
ACCEPT_LICENSE_[LICENSE_NAME]_[VERSION]
. While cumbersome to type, it would be discoverable through the CMake GUI and storable in a presets file.To make additions, modifications, or deletions from the authoritative license elections file, TSC approval is needed. This already would be the case given that licenses outside MIT and Apache 2 licenses are subject to TSC approval, but we are mentioning this again here for clarity.
FAQ
3p-package-source
repository, the use of CMake’sFetchContent
module, or some other mechanism entirely.Beta Was this translation helpful? Give feedback.
All reactions