88 Commits (e1e81bb133bdebe7af79a4246419b6c59e9e504b)

Author SHA1 Message Date
Adriaan de Groot e1e81bb133 [libcalamaresui] Warnings--, don't shadow a parameter 5 years ago
Adriaan de Groot 3c6e53ecb9 [libcalamaresui] Chase the change in Module descriptor
- most of the code becomes **simpler** because the requirement
  to handle unstructured data is now in the descriptor itself,
  rather than in consumers.
5 years ago
Adriaan de Groot a8075fba5f [libcalamares] Chase API change in settings 5 years ago
Adriaan de Groot b23dbd47c7 [libcalamaresui] Chase changes in instanceDescriptor
- this is mostly about deleting code, since the special-cases
  now live in libcalamares where `settings.conf` is interpreted.
5 years ago
Adriaan de Groot ea709aab59 [libcalamaresui] Swap out unstructured string for structured data 5 years ago
Adriaan de Groot 22fdca8f44 [libcalamares] Use Logger::Pointer for logging void-pointers 5 years ago
Adriaan de Groot c7d0df223a [libcalamaresui] Expose registering-a-single-module
- For testing purposes, it's useful to load a module externally
  and then register it to the ModuleManager (this hands off ownership).
- Refactor overall module loading to use the exposed single-module method.
5 years ago
Adriaan de Groot f856c07b04 [libcalamares] Move progress signal to RequirementsModel
- It is the requirements model (checking) that reports progress, and now
  the model is accessible (ask for it with requirementsModel(), make the
  messages come from there.
5 years ago
Adriaan de Groot 153757933a [libcalamares] Stop emitting signals with RequirementsList
- The architecture of letting someone build up a list of requirements
  from data emitted by the ModuleManager is broken: if it gets loaded
  later, it will miss data; passing around complicated objects is
  no fun anyway. Get rid of it, on the way to "ModuleManager has
  its own model of requirements".
5 years ago
Adriaan de Groot b7c60cec66 [libcalamares] Re-vamp RequirementsChecker
- Give the ModuleManager a RequirementsModel -- that is the source
  of truth about the module-requirements of the modules managed
  by that particular ModuleManager.
- Let the RequirementsChecker operate on a given RequirementsModel.
5 years ago
Adriaan de Groot 1765412b61 [libcalamaresui] Move RequirementsChecker to libcalamares
- the checker only collects and calls requirements; it has no
  UI component, and only manages data (and a thread to do the
  checking). Move it out of the UI library.
5 years ago
Adriaan de Groot 7655584022 [libcalamaresui] Move Module to libcalamares
- The Module class has no UI-specific code in it; it's all about
  loading and data-management. Move it out of the UI library.
5 years ago
Adriaan de Groot e04f87fe95 [libcalamaresui] Refactor moduleFromDescriptor
- this function lives in Module -- and is the only thing typing
  Module to the ViewSteps and JobTypes. Split it out into its
  own funciton. Nothing else in Module needs to befriend the
  ViewSteps, so we move the friend declaration around a bit
  as well.
- while here, apply coding style.

This is prep-work for moving module to libcalamares.
5 years ago
Adriaan de Groot e37809a126 [libcalamares] Detailed InstanceDescription type 5 years ago
Adriaan de Groot eaea262449 Merge branch 'master' into qml 5 years ago
Adriaan de Groot f366e3840f [libcalamaresui] Chase stronger typing of ModuleDescriptor 5 years ago
Adriaan de Groot 155db29ccf [libcalamares] Add a ModuleSystem::Descriptor
- this is currently just an alias for QVariantMap, which is
   the type already in use.
 - future plan is to tighten this up and have an actual
   Descriptor class that carries only the information
   actually needed for the module descriptor.
5 years ago
Adriaan de Groot 974d795390 [libcalamares] Shuffle module-loading logic
- group ifs by the state of thisModule
5 years ago
Adriaan de Groot 58931d99fa [libcalamaresui] Support noconfig setting
- look up the descriptor and use its noconfig value
 - return empty QString if noconfig is set; this does not
   apply to custom instances
5 years ago
Adriaan de Groot 8fbe676280 [libcalamaresui] Refactor finding config file name
- check for broken custom instances earlier in the loop
 - make free function for finding the config file name
5 years ago
Adriaan de Groot fed0c46612 [libcalamaresui] Change return type of loadedInstanceKeys()
- Replace stringlist with a stronger-typed list of InstanceKey objects
 - Move smashing-that-to-stringlist into consumers of the list
   (just one, the debug window)
5 years ago
Adriaan de Groot 16a460adff [libcalamaresui] Move ExecutionViewStep where it belongs
- viewpages/ collects the ViewStep implementations
 - chase header moving and tidy some #includes
5 years ago
Adriaan de Groot 5ac4f3ec38 [libcalamaresui] Fix up module dependency checking
- If a module exists, and has unmet dependencies, then
   that is only a problem if the module itself is *used*.
   Merely existing is ok.

This triggers on FreeBSD, where partition isn't built, but
bootloader depends on partition -- so you can never start
Calamares on FreeBSD, because bootloader depends on something
non-existent.

Relax the check: just warn, and only fail if a non-existent
module is used (all those with unmet dependencies are considered
non-existent).
6 years ago
Adriaan de Groot a9a12820d8 [libcalamaresui] Log the found-modules
- fix up comment because it described an old member variable name
 - log number of modules found (all the *potential* modules)
6 years ago
Adriaan de Groot c4b0511f8d [libcalamaresui] Improve debug message for bad dirs
- Calamares scans **all** subdirs of the module-directory
   for a module.desc and complains about those that don't have
   a module.desc.
 - For ./calamares -d runs from the build-directory, this
   leads to a few complaints when some plugins have been
   ignored (and so no module.desc is generated for them).
6 years ago
Andrius Štikonas 490c14d93d QLatin1Literal->QLatin1String. 6 years ago
Adriaan de Groot 7a5ac63f92 [libcalamares] Chase change of API
- Replace QString( x ) by x.toString() where x is an InstanceKey
6 years ago
Adriaan de Groot d6ed046495 [libcalamaresui] Replace a superfluous lambda
- The whole method body can be a lot on its own, and since
   loadModules() does nothing but single-shot the lambda,
   call it from outside instead.
6 years ago
Adriaan de Groot 2f99004041 [libcalamares] Move the module instance-key
- Split out of the UI library and into (header-only) libcalamares.
6 years ago
Adriaan de Groot 666462651b [libcalamares] Namespace consistently
- Things in libcalamares/ subdirectories are namespaced
   according to that subdirectory (sometimes in namespace
   Calamares, sometimes CalamaresUtils). Do that in modulesystem/ too.
6 years ago
Adriaan de Groot 78de6776af [libcalamaresui] Swap out use of QString for ModuleInstanceKey
- The strings `module@id` are used internally, make that type explicit.
6 years ago
Adriaan de Groot 0bd2bfa708 CI: apply coding style to libcalamaresui/modulesystem 6 years ago
Adriaan de Groot 34b1a250ba [libcalamares] Improve warnings when module descriptor files are bad 6 years ago
Adriaan de Groot 8fcdbd5bd5 [libcalamaresui] Improve warning message
- Tell the packager / deployer that certain modules are missing
6 years ago
Adriaan de Groot cdb613bf02 [libcalamares] Move module-related things into subdirectory
- Currently just moves a single enum, but this is prep-work for
   moving the non-GUI parts of the module system into libcalamares,
   to better support GUI-less operation.
6 years ago
Adriaan de Groot f076dd76ad [libcalamares] Rename YamlUtils.h
- Since we have the utils/ filesystem namespace, and use CalamaresUtils::
   as C++ namespace, simplify naming.
6 years ago
Adriaan de Groot c83395ff6d Reduce warnings for yaml-cpp
- Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code.
 - When compiling with clang, turn off warnings that the system header
   for yaml-cpp would generate.
6 years ago
Adriaan de Groot 2b7832857c [libcalamaresui] Simplify checking dependencies
- Avoid crash due to invalid iterator, when modules
   are removed due to missing requirements.
 - Simplify code, factor out the determination of
   which required modules are missing.
6 years ago
Adriaan de Groot f1aa22d9e8 [libcalamaresui] Sort signals chronologically 6 years ago
Adriaan de Groot c678cd80b4 [libcalamaresui] Refactor Requirements-Checking
- Move the actual checking into a separate object with some lifecycle-
   management signals.
 - Right now this is still single-threaded and blocking, so no net gain.
6 years ago
Adriaan de Groot bbb9ff0cbf [libcalamaresui] Remove useless #define 6 years ago
Adriaan de Groot 5aa4e52452 [libcalamaresui] Improve debug-logging 6 years ago
Adriaan de Groot d33752c66c [libcalamaresui] Refactor Requirements classes
- improve naming of member variables
 - expand documentation
6 years ago
Adriaan de Groot bf40f3bd23 Merge branch 'master' into requirements-checking 7 years ago
Adriaan de Groot d66393f1ae [libcalamares] Fix early failure mode
- There is more to failing out of loadModules() than just
   emitting modulesFailed, so instead share the failure
   code with the code after loading modules -- but don't load any.
7 years ago
Adriaan de Groot 08966ff933 [libcalamaresui] Check module dependencies
- Module dependency-checking is done in two phases:
   first, catch any unknown modules that are listed
   in *requiredModules* and bail out before loading
   anything. Second, check that the modules required
   by X occur before X in the sequence.
7 years ago
Adriaan de Groot 1a097f8c49 Style: run modulesystem through the style guide 7 years ago
Adriaan de Groot 58121abf06 [libcalamaresui] Wasted spaces 7 years ago
Adriaan de Groot a64de3dbfe [libcalamaresui] Assign the index to found
- Previous code assigns the result of the comparison to found,
   instead of the index, resulting in the wrong configuration
   map sent to each module.
7 years ago
Adriaan de Groot dd8e53dc22 Copyright: update copyright lines on files touched in 2018
Contributions from:
  Adriaan de Groot <groot@kde.org>
  Gabriel Craciunescu <crazy@frugalware.org>
  AlmAck <gluca86@gmail.com>
  Andrius Štikonas <andrius@stikonas.eu>
  Caio Carvalho <caiojcarvalho@gmail.com>
  Raul Rodrigo Segura <raurodse@gmail.com>
7 years ago