Commit Graph

1323 Commits

Author SHA1 Message Date
Adriaan de Groot
370e75fc71 [libcalamares] Repair apidox for Job 2024-04-16 15:41:12 +02:00
Adriaan de Groot
bf09dfc6af [libcalamares] Suppress sleep / suspend during installation 2024-04-16 15:07:58 +02:00
Adriaan de Groot
fe68b45fc5 [libcalamares] Explain updating-status-text mechanism 2024-04-13 23:37:49 +02:00
Adriaan de Groot
fb83ad326b [libcalamares] Document recommended translation contexts
Jobs have specific contexts for their different strings.
Many jobs (now) misuse prettyName() as a status message,
although the existing fallback mechanism means that the
name gets used as if it is a status message when the job
does not define a description or status.
2024-04-13 23:30:57 +02:00
Adriaan de Groot
14c8893b03 [libcalamares] Turn off Clang 17 warning for MOC
The build produces a zillion warnings about unsafe buffer usage
in the code that wrangles metaobjects and slot names. That is
generated code and we can't fix it.
2024-04-02 23:33:21 +02:00
Adriaan de Groot
012138c1f2 [libcalamares] Start with 3.5 TODOs, improve naming 2024-03-03 21:01:01 +01:00
dalto
7fd9d48a20 [calamares] Add python integration type and build type to log 2024-03-02 14:52:16 -06:00
Adriaan de Groot
028e9e68f9 [libcalamares] Add ${LANG} to process expansions 2024-02-26 22:37:20 +01:00
Adriaan de Groot
2697c35fc7 [libcalamares] Run ProcessJobs with CommandLine
This makes the behavior of process jobs and shellcommands the same.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
4329b824d4 [libcalamares] Test command-expansion with environment 2024-02-25 23:22:19 +01:00
Adriaan de Groot
0ced01ddc3 [libcalamares] Test environment-setting for CommandLine 2024-02-25 23:22:19 +01:00
Adriaan de Groot
d5555eba32 [libcalamares] Add environment-setting to CommandLine
This class is shared -- used by shellprocess and contextualprocess --
to collect the command settings for a single shell invocation.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
6770f781e3 [libcalamares] Tests for new CommandLine constructors 2024-02-25 23:22:19 +01:00
Adriaan de Groot
ae3e609024 [libcalamares] Get default timeout from CommandList 2024-02-25 23:22:19 +01:00
Adriaan de Groot
4aa2c4988c [libcalamares] Replace factory method with constructor 2024-02-25 23:22:19 +01:00
Adriaan de Groot
0d9d2ac59a [libcalamares] Extend CommandLine
- rename fields so they are meaningful (this is a leftover
  from it inheriting std::pair)
- add environment list member
- add constructor that consumes a QVariantMap
2024-02-25 23:22:19 +01:00
Adriaan de Groot
dbddeaba68 CMake: be more noisy about python technologies
- log enabled and disabled features
- enabled python gets logged twice, that's fine
2024-02-24 21:27:45 +01:00
Adriaan de Groot
be5ce2e60f [libcalamares] repair boost / pybind split
The difference wasn't being recorded in the ABI-parts of
the CalamaresConfig.h header file, and it was unclear if
the two builds were "clean", e.g. no pybind11 stuff in a
boost build and vice-versa.

Tidy that up by writing more ABI info to the header and
double-checking defines when including Python-related
Calamares headers.
2024-02-24 13:27:44 +01:00
Adriaan de Groot
34888edae1 [libcalamares] repair visibility also for Boost::Python modules 2024-02-24 12:45:20 +01:00
Adriaan de Groot
7a3bff5117 [libcalamares] repair visibility also for Boost::Python modules 2024-02-24 12:28:36 +01:00
Adriaan de Groot
a6591fcaf3 [libcalamares] Make symbols visible as needed 2024-02-20 00:44:48 +01:00
Adriaan de Groot
84b0262f31 [libcalamares] Default symbols to hidden
This restores the purpose of DLLEXPORT and helps keep the ABI
small-and-stable.
2024-02-19 23:23:03 +01:00
Adriaan de Groot
c09953e15e [libcalamares] Adapt tests to changed RegionZonePair
Don't access the pair like it is a std::pair
2024-02-19 23:04:37 +01:00
Adriaan de Groot
d131f51468 [libcalamares] don't inherit RegionZonePair from std::pair
There is no reason to stick with std::pair, make this
a regular value type with accessors with meaningful names.
2024-02-19 23:04:37 +01:00
Adriaan de Groot
5a1428154c [libcalamares] don't inherit CommandLine from std::pair
There's no reason not to write out the two data fields,
and we do not use anything else that std::pair offers.
2024-02-19 23:04:22 +01:00
Adriaan de Groot
0c9b3b2f16 [libcalamares] don't inherit InstanceKey from std::pair
While tempting, none of the STL containers are intended
for inheritance, and there's risks of slicing when used
as value types. Make InstanceKey a regular value type
data class and add the few operators that we actually
used from std::pair by hand.
2024-02-19 22:18:17 +01:00
Adriaan de Groot
c945cca93a [libcalamares] untangle GeoIP implementation details
Some implementation details should just be compiled
multiple times, rather than wrestling with visibility.
2024-02-19 21:40:10 +01:00
Adriaan de Groot
1444d9d73a [libcalamares] Repair misleading comment
The class used to be a `using Descriptor =` but that was changed without
updating the comment. Make it class documentation.
2024-02-19 19:22:08 +01:00
Adriaan de Groot
cefb437324 [libcalamares] Improve CMake bits
- use modern CMake commands, target-based
- make DLLEXPORT_PRO local to the build of libcalamares
- improve locality of includes
2024-02-18 23:19:43 +01:00
Adriaan de Groot
4eba859236 [libcalamares] Simplify symbol-visibility
Do not rely on Q_DECL_EXPORT and the like. Since we support basically
only gcc and clang for the kinds of Linux targets Calamares gets used
on, use visibility-specifiers that those compilers understand.
2024-02-18 23:10:35 +01:00
Adriaan de Groot
283668cb01 [libcalamares] Update sponsor / maintainer information 2024-02-17 11:25:40 +01:00
Adriaan de Groot
25f9eaf523 [libcalamares*] Prefer < comparisons in Qt version 2024-02-04 22:06:55 +01:00
Adriaan de Groot
fd2610c739 [*] Remove pre-Qt-5.15 compatibility ifdefs 2024-02-04 22:06:51 +01:00
Adriaan de Groot
1b655c26ef [libcalamares] Remove TMP-related environment variables
When running a command in the chroot, don't set TMP (and similar)
variables because those directories might nog make sense in the
target (yet).

FIXES #2269
2024-01-12 23:04:26 +01:00
artoo
78eeb963a3 libcalamares: add compat and packages headers to be installed;
Use case would be customization of default modules, eg packagechooser requires compat/Variant.h and packages/Globals.h to compile in the calamares-extension repo

Signed-off-by: artoo <artoo@artixlinux.org>
2024-01-02 22:57:08 +01:00
Adriaan de Groot
115f00f5cd [libcalamares] Rename tr() functions to avoid confusing lupdate 2023-12-25 14:24:06 +01:00
Adriaan de Groot
558f045b65
Merge pull request #2252 from calamares/issue-2225
Add support for systemd-machine-id variations
2023-12-11 22:18:03 +01:00
Adriaan de Groot
0d11de4525 [libcalamares] Add missing parameter name 2023-12-08 22:04:46 +01:00
Adriaan de Groot
7a9a50d702 [libcalamares] AutoMount / kded6 has been tested by KaOS 2023-11-26 21:53:04 +01:00
Adriaan de Groot
01e7cf44c2 [libcalamares] Placeholder for KF6 automount DBus calls 2023-11-21 15:22:09 +01:00
Adriaan de Groot
146f549552 [libcalamares] Return None for empty GS keys
All unknown-variants return None, but this only
happens in practice with an empty variant (e.g.
a configuration key that is empty in the YAML).

FIXES #2237
2023-11-16 23:17:33 +01:00
Adriaan de Groot
1e1e12fad2 Merge branch 'issue-2018' into calamares
FIXES #2018
2023-11-13 00:47:31 +01:00
Adriaan de Groot
d9aeb88275 [libcalamares] Add a clear() to GlobalStorage
While this isn't useful in production, it makes tests a lot
simpler to write since you don't have to wrestle with
creating new GS objects in order to start fresh.
2023-11-12 22:41:02 +01:00
Adriaan de Groot
6e9dac3417 libcalamares: apply coding style 2023-11-07 23:43:09 +01:00
Adriaan de Groot
1051033324 libcalamares: create Python module libcalamares by hand
From inside Calamares, register libcalamares to the
interpreter by hand; from external Python processes
the regular extension library hooks are called.

Tested by running ./build/localmodule dummypython
(which means that the shared library is not present
in the current directory, so then `import libcalamares`
fails if the module is not already registered --
a test scenario that previous attempt at module
import missed).
2023-11-07 21:42:05 +01:00
Adriaan de Groot
a629e2650a libcalamares: importing the embedded python module can fail 2023-11-07 13:40:10 +01:00
Adriaan de Groot
5346008b7a libcalamares: repair names for recent translations
bqi is one possible name of Luri / Lhur language,
as far as I can tell -- there is also Northern Luri,
which is supported by Qt and has code lrc.

ie is Interlingue, which Qt maps to C locale.
Work around that by mapping it to interlingua.
2023-11-07 13:25:37 +01:00
Adriaan de Groot
d2c3f7a326 libcalamares: improve formatting of Qt error messages
These come through without function information, but we
can format them in one line by mis-using function info.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
b57db97412 libcalamares: massage logging
Make the log-to-file always follow columns (with time
at the start of each line) so that stdout and the
log file look more alike.
2023-11-07 00:53:10 +01:00
Adriaan de Groot
18689074a8 libcalamares: add accessor for settings path 2023-11-07 00:53:10 +01:00