GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Plugin system Plugin system
TheAssassin edited this page
linuxdeploy is using a subprocess-based plugin system. It communicates with the plugin processes via stdin and stdout with simple text-based protocols described below. Like linuxdeploy, the plugins work with AppDirs. They expect an AppDir on which linuxdeploy has been run to be provided as a CLI parameter. Input plugins can add, modify or delete files inside the AppDir. Output plugins shall turn the AppDir into application bundles like e.g., AppImages. There are two plugin types: input and output plugins. Input plugins are also known as bundling plugins. These plugins bundle resources like libraries, frameworks, translations, media, etc. for different frameworks, libraries etc. Output plugins create actual application bundles. As the AppDir contains all sufficient data to be able to run an application on Linux systems, it is relatively easy for the plugins to create e.g., AppImages from them.
The following text is a work in progress. It will be subject to major changes until the initial stable version The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119. Versions are named using integer numbers. The number is monotonically increased for every new release. The current version of this document is Plugins MUST be standalone applications. They MUST work with AppDirs. It is RECOMMENDED to write them in C++ for performance reasons, but they can OPTIONALLY also be written in other languages. They MUST ship with all their dependencies. Therefore, authors SHOULD ship them as application bundles (e.g., as AppImages). Plugins MUST be named as follows: Regular expression, Perl style (uses [Boost.Regex] internally to match the filenames):
Plugin names consist of the prefix Example names:
The following locations are searched for plugins by linuxdeploy on startup:
linuxdeploy's All plugins MUST implement the following parameters:
If one of these arguments is missing, the plugin MUST exit with a non-zero code without modifying the AppDir. The plugins MAY provide the following parameters:
Input plugins SHOULD expect AppDirs that have been processed by linuxdeploy already (for instance, all shared libraries linked to the executables should be in place already). Therefore it is sufficient for them to scan the libraries directory to get a list of all shared dependencies. They MAY re-deploy shared dependencies again, though. The plugin MAY implement the following parameters:
linuxdeploy input plugins can make use of Output plugins MUST implement the following CLI parameters:
Output plugins SHOULD implement support for the following environment variables:
This example illustrates how these variables may be used by an output plugin: # generate an AppImage called myApp-1.2.3-x86_64.AppImage > env LINUXDEPLOY_OUTPUT_PREFIX=myApp LINUXDEPLOY_OUTPUT_VERSION=1.2.3 ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage # alternatively, one could have set the AppImage output plugin specific OUTPUT variable > env OUTPUT=myApp-1.2.3-x86_64.AppImage ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage There is no way to have linuxdeploy forward parameters to plugins. This design decision has been made to keep this specification simple, and reduce the potential for issues due to parameter naming issues (e.g., if Instead, plugin behavior may be controlled by environment variables the user can set before running linuxdeploy. Plugins may evaluate any environment variable they want to, but plugin developers are encouraged to prefix their variable names with Input plugins may create shell scripts in the directory Files placed in this directory MUST be idempotent (i.e., they must be able to deal with previous executions) and MUST NOT rely on any special order (i.e., if a plugin relies on environment variables that might also be set by another plugin, it should set those variables nevertheless or try to recognize on runtime whether the variables have been amended already; they SHOULD NOT just check for other files' existence, as their name may change at any time). Clone this wiki locally |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |