This launcher sets up the runtime environment so that the snapped application can load the libraries and commands shipped in the snap.
This launcher is used in classic confinement snaps as by default Snapcraft didn’t set-up any environment for them(for a reason). You should patch your application to use a vanilla environment if your application will call external programs out-of-snap.
How to use
-
Merge the following part definition to your Snapcraft recipe:
parts: classic-launch: source: https://github.com/Lin-Buo-Ren/classic-launch.git source-tag: v1.0.0 plugin: dump stage: - bin/classic-launch
-
In the
apps
stanza, insertbin/classic-launch
into the command chain:apps: _app_name_: # The command to run the application, the value should be a *relative path* to an executable file rooted from the `prime` directory command: bin/classic-launch "${SNAP}"/bin/_app_command_
if you’re using the
full
adapter:apps: _app_name_: # The environment adapter style to use, `command-chain` is only supported adapter: full # The command to run the application, the value should be a *relative path* to an executable file rooted from the `prime` directory command: bin/_app_command_ command-chain: - bin/classic-launch
The implementation
Snaps that use this stage snap
T.B.A.
Happy snapcrafting!