# Licensed feature demo

This compiled C++ plugin is built with the exported SDK and no Qt or private
application headers. Its ET panel has a free action, an entitlement-gated paid
action, and an Activate action that opens the host plugin manager. The paid
action asks `ET_SERVICE_LICENSE` asynchronously for
`org.epictuner.feature.pro`; the host checks signed entitlement status at
dispatch. The sample is intentionally transparent and is not DRM.

Build with a native 64-bit compiler:

```sh
cmake -S examples/licensed-feature-demo -B out -DCMAKE_PREFIX_PATH=/path/to/EpicTunerSDK
cmake --build out --config Release
```

For a signed test package, edit `out/package-manifest.json` with your test
publisher/key IDs. Place the resulting library at
`payload/<platform>/licensed-feature-demo.<dll-or-so>`, then run:

```sh
python tools/package.py --manifest out/package-manifest.json --payload-root payload \
  --key /outside/sdk/test-publisher.pem --output licensed-feature.etplugin
```

`tools/package.py` requires Python `cryptography` and `jsonschema` in the
publisher environment. Private keys stay outside the SDK and package. Import
the corresponding publisher public-key JSON in **Plugins → Trust publisher
key**, then install the package. For license testing, import an issuer public
key separately and either use the manager's online activation URL or export a
challenge, sign it with `tools/test-issuer.py`, and import its response. The
test issuer accepts an external Ed25519 PEM and is not a production service.

The native acceptance run captured [the panel](screenshot.png) after a signed
install and both online and offline mock activation. It checks that the paid
button is denied before activation and accepted after it. See
`docs/LICENSE.md` and `docs/PACKAGE.md` for the wire and trust rules.
