Merge branch 'calamares' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
40263b09f8
@ -180,6 +180,11 @@ a `CMakeLists.txt` with a `calamares_add_plugin` call. It will be picked
|
||||
up automatically by our CMake magic. The `module.desc` file is not recommended:
|
||||
nearly all cases can be described in CMake.
|
||||
|
||||
Modules can be tested with the `loadmodule` testing executable in
|
||||
the build directory. See the section on [testing modules](#testing-modules)
|
||||
for more details.
|
||||
|
||||
|
||||
### C++ Jobmodule
|
||||
|
||||
**TODO:** this needs documentation
|
||||
@ -258,8 +263,10 @@ All code in Python job modules must obey PEP8, the only exception are
|
||||
`libcalamares.globalstorage` keys, which should always be
|
||||
camelCaseWithLowerCaseInitial to match the C++ identifier convention.
|
||||
|
||||
For testing and debugging we provide the `testmodule.py` script which
|
||||
fakes a limited Calamares Python environment for running a single jobmodule.
|
||||
Modules can be tested with the `loadmodule` testing executable in
|
||||
the build directory. See the section on [testing modules](#testing-modules)
|
||||
for more details.
|
||||
|
||||
|
||||
### Python Jobmodule
|
||||
|
||||
@ -301,3 +308,29 @@ The module-descriptor key *command* should have a string as value, which is
|
||||
passed to the shell -- remember to quote it properly. It is generally
|
||||
recommended to use a *shellprocess* job module instead (less configuration,
|
||||
easier to have multiple instances).
|
||||
|
||||
|
||||
## Testing Modules
|
||||
|
||||
For testing purposes there is an executable `loadmodule` which is
|
||||
built, but not installed. It can be found in the build directory.
|
||||
The `loadmodule` executable behaves like single-module Calamares:
|
||||
it loads global configuration, job configuration, and then runs
|
||||
a single module which may be a C++ module or a Python module,
|
||||
a Job or a ViewModule.
|
||||
|
||||
The same application can also be used to test translations,
|
||||
branding, and slideshows, without starting up a whole Calamares
|
||||
each time. It is possible to run multiple `loadmodule` executables
|
||||
at the same time (Calamares tries to enforce that it runs only
|
||||
once).
|
||||
|
||||
The following arguments can be used with `loadmodule`
|
||||
(there are more; run `loadmodule --help` for a complete list):
|
||||
- `--global` takes a filename and reads the file to provide data in
|
||||
global storage. The file must be YAML-formatted.
|
||||
- `--job` takes a filename and reads that to provide the job
|
||||
configuration (e.g. the `.conf` file for the module).
|
||||
- `--ui` runs a view module with a UI. Without this option,
|
||||
view modules are run as jobs, and most of them are not
|
||||
prepared for that, and will crash.
|
||||
|
@ -162,13 +162,14 @@ label:
|
||||
# Defaults to false. If not set in a subgroup (see below), inherits from
|
||||
# the parent group.
|
||||
# - *immutable*: if true, the state of the group (and all its subgroups)
|
||||
# cannot be changed; it really only makes sense in combination
|
||||
# with *selected* set to true. This only affects the user-interface.
|
||||
# cannot be changed; no packages can be selected or deselected. No
|
||||
# checkboxes are show for the group. Setting *immutable* to true
|
||||
# really only makes sense in combination with *selected* set to true,
|
||||
# so that the packages will be installed. (Setting a group to immutable
|
||||
# can be seen as removing it from the user-interface.)
|
||||
# - *expanded*: if true, the group is shown in an expanded form (that is,
|
||||
# not-collapsed) in the treeview on start. This only affects the user-
|
||||
# interface. Only top-level groups are show expanded-initially.
|
||||
# - *immutable*: if true, the group cannot be changed (packages selected
|
||||
# or deselected) and no checkboxes are shown for the group.
|
||||
# - *subgroups*: if present this follows the same structure as the top level
|
||||
# groups, allowing sub-groups of packages to an arbitary depth.
|
||||
# - *pre-install*: an optional command to run within the new system before
|
||||
|
Loading…
Reference in New Issue
Block a user