Move the CMake code responsible for building the translations from
the src/calamares directory (yeah, yeah, the translations need to
link into the executable) into lang/ (which is where the source
and other infrastructure lives).
Prompted by Linlinger, I've reconsidered the names of languages
in the drop-down in the welcome page. We already have the
infrastructure for assigning specific names / locales to
"Calamares locale names" (which match Transifex names, not
necessarily Qt names). Use that to put exactly two Chinese-
language translations in the drop-down:
- Simplified Chinese (code zh_CN)
- Traditional Chinese (code zh_TW)
Drop zh (which is a peculiar locale name anyway) and zh_HK
(which is Traditional Chinese, but using the geographic
boundary is a bit weird; we're going to ignore the
minor orthographic differences with Traditional Chinese
written elsewhere for now).
Note that this makes the drop-down show "Chinese"
in the English column, twice; the difference is visible
only in the native-language representation.
SEE #1741
The list suggests things are not-so-good because of recently-pushed
changes to the translations and teams haven't had time to react.
There are also some new duplicate languages.
- Keep the project() version as literal, drop the script-mode changes,
to keep existing (weird?) build-and-packaging hacks working.
- Do switch to unified versioning-git-annotations CMake module,
do drop the "rc" from version numbers.
- merge the (not-installed) date-stamp and git-version
files into ExtendedVersion, turn things into functions
- drop support for CVS (wut?)
- don't mention the branch, in git-versioning, because the
hash is enough to find whatever
- don't need external program to find date, use `string(TIMESTAMP...)`
- separate out the version into a variable (again -- this was moved **into**
project() long ago, but now there's a desire to have the value before
reaching the project() command)
- rename CALAMARES_VERSION_RC to something more sensible.
In current development, RC is effectively 0 (for a release)
or 1 (during development). It doesn't add anything to suffix
'rc1' to the version number. While here, remove the BUILD_RELEASE
check (because nothing ever sets it) and instead rely on
the RC setting instead to decide for long-calamares-version
The skip-checking is now in the functions for adding plugins and
subdirectories, so that third-party building should get it
as well, for free. Since AddModuleSubdirectory and AddPlugin
use the newly split-out module, handling SKIP_MODULES and USE_*
consistently across module repositories is now easier.
While here, make accumulating-the-skipped-modules explicit.
- both clang and g++ support __builtin_unreachable(); (as Kevin
Kofler pointed out) so we don't need the macro to do different things;
- the compilers have gotten better at detecting unreachable code,
so instead of inserting macros or fiddly bits, just drop them
and the unreachable code they comment.
- reduce the difference between clang and g++ builds, factor
common flags out of the CMake-if
- drop special boost-warning-suppression, we do that differently
most of the time in the affected source files
- 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.
The build instructions are not that interesting, it's a toss-up
between CC0 and BSD-2, but because other CMake bits are BSD-2-Clause,
apply that to more CMakeLists. The copyright date isn't all that
accurate, but these are just inconsequential files.
While here, tidy up and get rid of some useless intermediates.
- like Esperanto before Qt 5.12, Interlingue does not
seem to be supported by QLocale, so it gets turned into
"C" locale, which then messes up the default language
selection in the welcome page.
Move it to _incomplete until QLocale does support it.
FIXES#1475
The configvalidator has some extra Python dependencies. Cache
the restults of checking the dependencies (convenient for developers),
and also explain what's going on if the feature is switched off.
- Very rarely do we need the full-git-version of Calamares,
so split that into a separate header with a little trickery.
- In the "normal" version header, drop the full-git-version values.
- The USE_* infrastructure is only **inside** the Calamares build
tree (see `src/modules/CMakeLists.txt`) so there is no point
in referring to external repositories.
- The variables that are set for out-of-tree builds are prefixed
with to avoid name clashes; make the module-infrastructure
respect those instead of the in-tree variable names.
- .. and then duplicate the in-tree variables to the out-of-tree
variables, so we only need one set of module instructions.
- link the library privately -- the public API uses QVariantMap
- install FindYAMLCPP just in case
- add yamlcpp explicitly in the few places that really need it
(e.g. netinstall testing the parsing of netinstall.yaml)
- Add the Calamares CMake-modules to the search path automatically
- Export to CalamaresTargets.cmake and use namespace Calamares::
- Document imported targets
- Find Qt, because the translations machinery will need macros from that
- The installed lib links to IMPORTED libraries from KF5, so we need
to find them (again) as well.
This makes it possible to remove QML from Calamares, possibly yielding
a smaller, lighter installer; it takes with it the nice slideshow,
modern configurable navigation and the QML UIs built for various modules.
By default, WITH_QML is on and the "normal" feature set is retained.
- look for Qml modules only when WITH_QML is on (the default)
- look for Network, since that's pulled in only implicitly
- disable the QML Calamares models (modules/*q) if no QML is
enabled; longer-term plan is to merge the **pages** back to
the "upstream" modules, and have things be run-time switchable,
but that's not here yet. Also disable the notesqml module when
QML is off.
- reminder to make all the ABI-relevant WITH_* settings available as #defines
- move the compilation of KDSAG to the calamares executable, not the library
- when DBus activation is on, drop all of kdsingleapplicationguard
- By default, try to use DBus service to keep Calamares unique
- The older implementation via KDSingleApplicationGuard is still
available, just not used by default.
- Make all four DEBUG_ flags actual CMake options, rather than
stuffing some of them in the rather-peculiar _enable_debug_flags.
Each debug option turns on suitable compile flags in the module(s)
that are affected.
- Add Assamese (as) in the *ok* group.
- Although languages move around a bit in the groupings,
that doesn't change their availability; just says something
about the current translation status.
- AppData and AppStream can be disabled independently of finding
their requirements (possibly useful if you want to ignore
AppStream even when it's installed in your build environment).
- Add a little top-level documentation about WITH_
- Add a FALLTHRU macro to annotate fallthrough situations in both
Clang and GCC,
- Annotate intentional fallthroughs.
- Add missing break which meant that the selection mode was
always multiple-selection.
- Require CMake 3.3 for the IN_LIST operator in if() statements
- It looks like Qt 5.12.2 (possibly earlier) supports a QLocale("eo")
so enable Esperanto if that Qt version or later is detected.