dalto
e22efab1b3
Add isModuleEnabled function
2021-10-23 13:57:24 -05:00
Adriaan de Groot
14c26d01af
[libcalamares] Warnings for nullptr Settings
2021-08-24 12:30:44 +02:00
Anubhav Choudhary
03d1fe434c
Navigation button hideability added
2020-12-06 04:32:18 +05:30
Adriaan de Groot
1cd9b93a22
REUSE: Giant boilerplate cleanup
...
- point to main Calamares site in the 'part of' headers instead
of to github (this is the "this file is part of Calamares"
opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
this is the 3-paragraph summary of the GPL-3.0-or-later, which has
a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00
Adriaan de Groot
7cef99605f
[libcalamares] Distinguish instances with an explicit weight
...
- setting the weight in *instances* should be different from letting
the default weight (of 1) stand; explicitly saying 1 should
carry some weight (ha!)
2020-08-11 16:45:51 +02:00
Adriaan de Groot
d81d585c32
[libcalamares] Add isValid() to Settings
...
- settings can be invalid (missing data, whatever) and that
can be used to shut things down early. Validity must be
checked explicitly, though.
2020-08-11 16:32:44 +02:00
Adriaan de Groot
4cd2a4ae91
[libcalamares] Produce warnings while reading settings
...
- any invalid instance key will cause a complaint
- "new" custom instances in sequence get a complaint, but
the instance description added to the list is valid
2020-08-11 16:32:44 +02:00
Adriaan de Groot
253e5610af
[libcalamares] Better type for the list of InstanceKeys
...
- *sequence* lists module instance keys; make the stored type of
those keys InstanceKey instead of QString
2020-08-11 16:32:44 +02:00
Adriaan de Groot
57f5a92d96
[libcalamares] Build complete instanceDescriptor list
...
- there's no reason to ignore custom instances that are **not**
mentioned in the *instances* section: it may be useful to
name more that one even without distinct config files.
2020-08-11 16:32:44 +02:00
Adriaan de Groot
4968efdaa7
[libcalamares] Simplify constructors of InstanceDescription
...
- no more weights in constructors; do that in fromSettings() only.
- simplify test to drop those constructors
- set config file also for "normal" descriptors; fix test
2020-08-11 16:32:44 +02:00
Adriaan de Groot
1f57a99ff2
[libcalamares] Rename moduleInstances() and fix tests
...
- "custom" is a misnomer, so drop that from the name
- tests adjusted: all instances are returned, not just the "custom"
ones.
2020-08-11 12:54:29 +02:00
Adriaan de Groot
6f7234e4ac
[libcalamares] Add all mentioned instances to the instanceList
...
- "custom" instances is now a misnomer, since all the instances
go into it; they are distinguished by `isCustom()` on the descriptor
2020-08-11 12:43:59 +02:00
Adriaan de Groot
f157d9c459
[libcalamares] Refactor data-loading in Settings
...
- expose, for testing purposes, the load-from-YAML-data part
alongside the public constructor that reads a YAML file
- add test for building the list of instances
2020-08-11 11:53:50 +02:00
Adriaan de Groot
53eb6c614a
[libcalamares] Make InstanceDescription a class
...
- switch from dumb struct to a class; use a structured InstanceKey
- expand testing of InstanceKey and InstanceDescription
2020-08-11 10:31:12 +02:00
Callum Farmer
0c4dc71d5c
[libcalamares] Update SPDX identifiers.
...
Update CppJob.h
Update CalamaresConfig.h.in
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.cpp
Update CalamaresConfig.h.in
Update CppJob.cpp
Update CppJob.h
Update DllMacro.h
Update GlobalStorage.cpp
Update GlobalStorage.h
Update Job.cpp
Update Job.h
Update JobExample.cpp
Update JobExample.h
Update JobQueue.h
Update ProcessJob.cpp
Update ProcessJob.h
Update PythonHelper.cpp
Update PythonJob.cpp
Update PythonJob.h
Update PythonHelper.h
Update PythonJobApi.cpp
Update PythonJobApi.h
Update Settings.cpp
Update Settings.h
Update GeoIPJSON.cpp
Update GeoIPJSON.h
Update GeoIPTests.cpp
Update GeoIPTests.h
Update GeoIPXML.cpp
Update GeoIPXML.h
Update Handler.cpp
Update Handler.h
Update Interface.cpp
Update Interface.h
Update test_geoip.cpp
Update CountryData_p.cpp
Update Label.cpp
Update Label.h
Update LabelModel.cpp
Update LabelModel.h
Update CountryData_p.cpp
Update CountryData_p.cpp
Update Lookup.cpp
Update Lookup.h
Update Tests.cpp
Update Tests.h
Update TimeZone.cpp
Update TimeZone.h
Update TranslatableConfiguration.cpp
Update TranslatableConfiguration.h
Update ZoneData_p.cxxtr
Update cldr-extractor.py
Update zone-extractor.py
Update Actions.h
Update Actions.h
Update Descriptor.h
Update InstanceKey.cpp
Update Module.cpp
Update Module.h
Update Requirement.cpp
Update RequirementsChecker.h
Update RequirementsModel.cpp
Update RequirementsModel.h
Update Tests.cpp
Update Manager.cpp
Update Manager.h
Update Tests.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update KPMTests.cpp
Update FileSystem.cpp
Update FileSystem.cpp
Update FileSystem.h
Update KPMManager.cpp
Update KPMManager.h
Update Mount.cpp
Update Mount.h
Update PartitionIterator.cpp
Update PartitionIterator.h
Update PartitionIterator.h
Update PartitionQuery.cpp
Update PartitionQuery.h
Update PartitionSize.cpp
Update PartitionSize.h
Update Sync.cpp
Update Sync.h
Update Tests.cpp
Update Tests.h
Update BoostPython.h
Update CalamaresUtilsSystem.cpp
Update CalamaresUtilsSystem.h
Update CommandList.cpp
Update CommandList.h
Update Dirs.cpp
Update Dirs.h
Update Entropy.cpp
Update Entropy.h
Update Entropy.cpp
Update Logger.cpp
Update Logger.h
Update NamedEnum.h
Update NamedSuffix.h
Update PluginFactory.cpp
Update PluginFactory.h
Update RAII.h
Update RAII.h
Update Retranslator.cpp
Update Retranslator.h
Update String.cpp
Update String.h
Update TestPaths.cpp
Update Tests.cpp
Update Tests.h
Update UMask.cpp
Update UMask.h
Update Units.h
Update Variant.cpp
Update Variant.h
Update Yaml.cpp
Update Yaml.h
Update moc-warnings.h
2020-06-03 12:52:53 +01:00
Adriaan de Groot
1de2a4ff14
[libcalamares] Introduce quit-at-end
...
- In some cases, it makes sense to close Calamares automatically
when it is done. Set *quit-at-end* to do so -- although this
probably also means you should remove the *finished* page.
2020-03-24 15:38:43 +01:00
Adriaan de Groot
07da6e3905
[libcalamares] Expand instance with weight
2020-03-13 02:59:09 +01:00
Adriaan de Groot
e37809a126
[libcalamares] Detailed InstanceDescription type
2020-03-13 02:55:38 +01:00
Adriaan de Groot
0e68013bb3
[libcalamares] Start making InstanceDescription a stronger type
...
- Replace a map-of-strings with a class type.
- For now, doesn't compile.
- Intention is to construct from a YAML / QVariant from the
*instances* list in `settings.conf`.
2020-03-13 02:41:42 +01:00
Adriaan de Groot
4525060c26
[calamares] Refactor Settings initialization
...
- add a Settings::init() to do actual work
- remove the same kind of code from CalamaresApplication
- make constructor of Settings private
- initialize settings before the application
2020-02-05 16:48:49 +01:00
Adriaan de Groot
91625c8ba8
[libcalamares] Tidy up boolean options in Settings
...
- The const getters for a single boolean value have moved
to the header, for inlining.
- Document the getters and what their settings mean.
2020-02-05 13:35:26 +01:00
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.
2019-09-15 20:38:16 +02:00
Adriaan de Groot
1afa9c4d08
[libcalamares] Apply current coding style to all of libcalamares/
2019-08-04 22:24:55 +02:00
Adriaan de Groot
f3bfc81e52
[libcalamares] Rename dontCancel to disableCancelDuringExec
...
- This way the name actually refers to what it does, rather
than being a somewhat ambiguous overload of disableCancel.
2019-05-14 08:30:34 -04:00
Adriaan de Groot
761205ecf7
[libcalamares] Tidy some bits
...
- Explain what the library is for (briefly) in the CMakeLists
- Settings should use the right export macro
2019-05-07 07:02:55 -04:00
Adriaan de Groot
ac095d9ed0
[libcalamares] [libcalamaresui] [calamares] Adjust to moved Dirs.h
2019-04-29 06:49:16 -04:00
Adriaan de Groot
f076dd76ad
[libcalamares] Rename YamlUtils.h
...
- Since we have the utils/ filesystem namespace, and use CalamaresUtils::
as C++ namespace, simplify naming.
2019-04-29 06:14:21 -04:00
Adriaan de Groot
d506296aa7
[libcalamares] Adjust code to changed name
...
- renamed setting in the configuration file, but not in the code
- add documentation to getters
2019-04-21 17:15:53 +02:00
Adriaan de Groot
10727c7bd9
Merge pull request #1126 from feren/patch-3
...
Patch to add 'dont-cancel' setting to disable Cancel only during the installation phase
2019-04-21 17:02:21 +02:00
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.
2019-04-18 12:06:09 +02:00
The feren OS Dev
455505ba78
Update copyright header
2019-04-16 18:27:03 +01:00
The feren OS Dev
6d6c152f70
Update Settings.cpp
2019-04-16 17:14:55 +01:00
The feren OS Dev
d31f2d2116
Update Settings.cpp
2019-04-16 17:12:14 +01:00
The feren OS Dev
02d6e1a946
Update Settings.cpp
2019-04-16 17:11:39 +01:00
Adriaan de Groot
63b317902d
[libcalamares] [partition] Adjust to logging changes
...
- Use the un-paren'ed Continuation and SubEntry
2019-04-15 08:27:43 -04:00
Adriaan de Groot
713370da55
Merge remote-tracking branch 'origin/issue-1100'
2019-04-11 11:47:00 +02:00
Adriaan de Groot
b18e0a0bd8
[libcalamares] Use structured logging tags
2019-04-04 14:44:44 +02:00
Adriaan de Groot
b6ea171365
[libcalamares] Reduce chatty logging
...
- Only log module-search entries when they are bad.
2019-04-04 14:14:59 +02:00
Adriaan de Groot
3248aba899
[libcalamares] Make oem-setup independent of dont-chroot
...
- At least for testing purposes it makes sense to decouple dont-chroot
from the OEM-setup wording, so introduce a separate setting for it.
2019-04-01 06:26:42 -04:00
Adriaan de Groot
7515f36b96
[libcalamares] Refactor settings-loading some more
...
- Load instances list in a separate method
- Load sequence list in a separate method
- Don't rely on QASSERT, explicitly throw if something is missing.
2019-03-19 11:11:43 -04:00
Adriaan de Groot
e18e4e3d6f
[libcalamares] Refactor module-search path
...
- Refactor code that fills up the module search path from
the *modules-search* configuration key.
- Improve debug logging while here.
2019-03-18 17:48:39 -04:00
Arnaud Ferraris
db3d3a7d03
Add a settings.conf option to disable "Cancel" button
...
In some cases, e.g. when calamares is used as an "initial setup" tool,
we may want to user to go through all the configuration steps in order
to end up with a usable system.
Therefore, disabling the "Cancel" button can be useful in this case.
This commit adds an option to settings.conf which disables this button
when set to "true". If the option is not present in the settings file,
the default behavior ("Cancel" button enabled & visible) is enforced.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-01-23 15:56:07 +01:00
Adriaan de Groot
0db8082ae1
[libcalamares] Convenience type
2018-06-26 08:41:16 -04:00
Adriaan de Groot
d59a44be44
[libcalamares] Asking for type of undefined node throws
...
- Use YAML-CPP API for finding out if a node has a value at all.
- Asking for Type() of an undefined or NULL node throws an
exception, so the existing code didn't **actually** catch
cases where a required setting wasn't set at all.
2018-06-20 15:59:23 +02:00
Adriaan de Groot
ec09272b81
[libcalamares] Fix inverted logic
...
Reported by bshah.
2018-06-19 18:08:14 +02:00
Adriaan de Groot
b283ad69d5
[libcalamares] Complain if key isn't set
...
- Previous check would also fail when the setting is false,
not just when the key is missing.
2018-06-19 17:59:28 +02:00
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>
2018-06-15 05:59:11 -04:00
Adriaan de Groot
a732ce11bc
[libcalamares] Warn more about badly-formed config
2018-06-11 08:35:35 -04:00
Adriaan de Groot
a626e52bf3
[libcalamares] Introduce more descriptive type name
2018-06-08 17:36:29 -04:00
Adriaan de Groot
fdda0e14aa
[libcalamaresui] Improve explainYamlException
...
- overloads for common kinds of label
- improve error reporting when reading settings and branding files
2018-05-24 06:46:11 -04:00