5475 Commits (c7d0df223a64cd4d0adda30930e4791bced6a156)

Author SHA1 Message Date
Gabriel Craciunescu 47c167dc04 [bootloader] Resume from outer swap partition
- These fixes are similar to the other swap-from-LUKS changes,
  and just needed to be applied to a different module.
5 years ago
Gabriel Craciunescu 65a989d3cd [grubcfg] With LUKS, resume from the correct swap name
FIXES #1208
5 years ago
Adriaan de Groot 489fd0b272 [welcomeq] Fix QML import
- Now using the properly-namespaced QML import for Calamares things
5 years ago
Adriaan de Groot cd7884a0e5 [welcomeq] Fix build with clang
- can't convert lambda-with-captures to a function pointer (Clang 9)
- instead, use a context property .. QmlViewStep already sets a
  "config" property with the Config object, but WelcomeQ wants it
  as another name as well.
- this avoids registering the Welcome object across all QML pages,
  as well.

NOTE: needs to have the QML adjusted for this change.
5 years ago
Adriaan de Groot c4324fd3ea [libcalamaresui] Provide convenience method for context properties 5 years ago
Adriaan de Groot 3f87cc214a [calamares] Warnings--
- Set the width of the QML sidebar explicitly
- Handle all sidebar-flavor enum values explicitly
5 years ago
Adriaan de Groot afc0c78b4c [libcalamares] Refactor job-weight computations
- only check index-vs-length once
5 years ago
Adriaan de Groot 07da6e3905 [libcalamares] Expand instance with weight 5 years ago
Adriaan de Groot e37809a126 [libcalamares] Detailed InstanceDescription type 5 years ago
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`.
5 years ago
Adriaan de Groot 3897bd54df Changes: write some of the QML docs
- Fix references; I decided to put it in Qml.h, which is
  the header for the code that does the work.
5 years ago
Adriaan de Groot 4576cb4fa0 [notesqml] Fix up documentation pointers 5 years ago
Adriaan de Groot aeffda945f [calamares] Use the ViewManager model to show steps 5 years ago
Adriaan de Groot b5a09d2f83 [branding] Don't hide the sidebar by default 5 years ago
Adriaan de Groot cec406e402 [calamares] Add a sample QML-sidebar
- The built-in one is loaded if no branding file is found.
- This sidebar is just the most basic of QML examples.
5 years ago
Adriaan de Groot cc3b0b2859 [calamares] Remove cruft from CMakeLists.txt 5 years ago
Adriaan de Groot 32ebb08788 [calamares] Search for sidebar QML file
- change name to "calamares-sidebar" so it's clear that
  it is a core component.
5 years ago
Adriaan de Groot 8d6e3e547c [libcalamaresui] Add qmlSearch for non-modules
- Refactor into a support method and two API points
- Use std::transform for doing-things-to-a-list
- Add searchQmlFile that only takes a name, for
  non-modules to use.
5 years ago
Adriaan de Groot 0fd7fec25e [libcalamaresui] Move registration into Qml-service
- Registration of QML modules may need to be done
  for more parts of Calamares. Move into the library,
  out of the model.
- Register for QML when using the QML sidebar.
5 years ago
Adriaan de Groot c628192163 Merge branch 'progress-model' 5 years ago
Adriaan de Groot a0b4d58000 [calamares] The very simplest of QML sidebars 5 years ago
Adriaan de Groot a834d67283 [notesqml] Adjust to new name for Branding 5 years ago
Adriaan de Groot 28c2da12ae [libcalamaresui] Register in io.calamares namespace
- Register both Branding and ViewManager for QML
- Note that this changes the name of Branding
- Add code-docs about object ownership
5 years ago
Adriaan de Groot 7a8eb09cdb [libcalamaresui] Move QML-searching
- This is utility code, so it can be in the QML "service"
  from Calamares, rather than in the QmlViewStep itself.
  That makes it usable for other QML bits as well.
5 years ago
Adriaan de Groot 7d99ad3177 [welcomeq] Adjust to Config-API that QmlViewStep expects 5 years ago
Adriaan de Groot 862b05221d [libcalamaresui] Drop 'name' parameter in QmlViewStep
- The name is just the module identifier, and now we
  search for *m@i* and also *m* from that identifier,
  the name becomes much less important -- and it
  can be set from the config key *qmlFilename* as well.
5 years ago
Adriaan de Groot 8f1ab99190 [libcalamaresui] Search module name as well
- When searching for QML file, obey module name
  (full instance, module-only) and then others.
5 years ago
Adriaan de Groot 165bcfd75d [libcalamaresui] "namespace" QML settings
- To avoid name-collisions in otherwise well-behaved
  modules and configurations, make the QML settings
  more specific:
    search -> qmlSearch
    filename -> qmlFilename
5 years ago
Adriaan de Groot 0f50dc8d33 [welcomeq] Include the QML search mode 5 years ago
Adriaan de Groot 8302f2182b [welcomeq] The QML file name still has a q 5 years ago
Camilo Higuita d26fa63ccd [welcomeq] initial work for welcomeview in qml 5 years ago
Camilo Higuita d7f7c16958 [welcome] using config for both qcc2 or qwidgets 5 years ago
Adriaan de Groot 4ab5b4a5e6 [calamares] Progress"tree" is a list
- No need for a TreeView when it's just a one-dimensional
  list of items.
5 years ago
Adriaan de Groot 99c03f7fbb [libcalamaresui] Behave better as a model 5 years ago
Adriaan de Groot 8f0a6d3065 [calamares] The ViewManager is its own model
- Having a ProgressTreeModel that does nothing but
  proxy to ViewManager methods is kind of useless.
- Move the relevant code from ProgressTreeModel to
  ViewManager.
- Remove now-unused ProgressTreeModel.
5 years ago
Adriaan de Groot b209668d33 [calamares] Fix singleton-ness of the progress view
- Create the ViewManager earlier,
- Create a ProgressTreeModel here for the view,
- Do not weirdly set the model much later.
5 years ago
Adriaan de Groot 290a708e56 [calamares] No need for progresstreeview to be singleton 5 years ago
Adriaan de Groot e9965d37e3 [calamares] Don't create sidebar if we don't want it 5 years ago
Adriaan de Groot 80f49bed1d [libcalamaresui] Add a sidebar flavor setting 5 years ago
Adriaan de Groot 9a63d63d5b [calamares] Factor out the creation of the sidebar 5 years ago
Adriaan de Groot 04cb5f14f7 [calamares] Role names for progress model 5 years ago
Adriaan de Groot ba4b42b4ee [calamares] Introduce a "completed" role
- This is for future support of a QML progress view
5 years ago
Adriaan de Groot d3f55af51e [calamares] Clean up progress tree model
- It's still not a real tree
- Remove unused classes / files
- Apply coding style
5 years ago
Adriaan de Groot 76144fb3dc [calamares] Remove superfluous ViewStepItem
- The model is a simple list, not a tree (it may have been in the
  distant past).
- All the information needed comes from the ViewSteps held by the
  ViewManager.
- The delegate and fake-step handling was never used.
5 years ago
Adriaan de Groot 5a59eb1963 [calamares] Remove unused method from progresstreemodel 5 years ago
Adriaan de Groot 7ec6dff352 [calamares] Apply coding style to progresstree 5 years ago
Adriaan de Groot e2d9ce737c [netinstall] Implement pre-expanded groups
- Return relevant data
- Document code
- Add to README.md documentation about new key
5 years ago
Adriaan de Groot b9b48cfbb1 [netinstall] Apply coding style
- Some missing {} were not noticed by astyle
5 years ago
Adriaan de Groot 4f216b0394 [netinstall] Refactor model-data setting
- Introduce convenience methods getString(), getBool() to pick
  out an entry from item definitions in YAML format.
- Apply coding style.
- Pick up the "expanded" property as well.
5 years ago
Adriaan de Groot 0f7f5216ee [netinstall] isHidden is const after construction 5 years ago
Adriaan de Groot b074696ac1 [netinstall] isCritical is const after construction 5 years ago
Adriaan de Groot 09006a936d [netinstall] Expand groups if requested 5 years ago
Adriaan de Groot 4f22a70b08 [netinstall] Restructure model-method data() 5 years ago
Adriaan de Groot df86972ea7 [netinstall] Introduce constexpr names for columns and roles 5 years ago
Adriaan de Groot 3d68c74a19 [netinstall] Sanitize PackageTreeItem::data()
- Use of != nullptr for QString just a bad idea
- Massage code so structure for packages resembles that of groups
5 years ago
Adriaan de Groot 201c5ddfe1 [netinstall] Add some debug-logging
- Also, prepare for a start-expanded setting
5 years ago
Adriaan de Groot 4cf3ec8663 [netinstall] Resolve TODO (changes translations) 5 years ago
Adriaan de Groot 3302fe319b [netinstall] Fix typo's in README 5 years ago
Adriaan de Groot 220fd31226 [partition] Improve EncryptionWidget
- Use normal translation framework. The EncryptWidget was the one place
  not using the "usual" translation framework, but rolled its own.
- Emphasize that the checkbox-state (checked-ness) is the parameter,
  not a state of the EncryptWidget.
- All other instances of UI classes from Designer use a pointer-to-UI,
  not multiple inheritance.
- Convenience method for setting the pixmap in response to
  changes in the passphrase
- Tighten up types: enum -> enum class
- Reduce the scope for int-confusion by using an enum-class for
  the encryption state of the widget
- Include UI implementation header only in .cpp
- Apply coding style
- Update copyright
5 years ago
Adriaan de Groot 1299c64415 [interactiveterminal] Tidy up includes
- The KF5/ part of the path isn't necessary, and some of the KF5
  includes can be found with a shorter name (with modern ECM and
  imported targets)
5 years ago
Adriaan de Groot 350627172d [partition] Tidy up includes 5 years ago
Adriaan de Groot c5b038587e [welcome] Tidy up includes 5 years ago
Adriaan de Groot ebb3f319cc [modules] Be more consistent in include punctuation
- Use <> for Qt, system, externals
 - Use double-quotes for Calamares headers
5 years ago
Adriaan de Groot 841ea9ff48 [libcalamares] Tidy up includes
- Remove commented-out includes
- Consistent punctuation
5 years ago
Adriaan de Groot c4bfad9399 [packages] Provide status feedback
- The status message should be updated; the name is constant.

FIXES #1330
5 years ago
Adriaan de Groot ef249043f9 [libcalamares] call Python method only from Python thread 5 years ago
Adriaan de Groot b4aaf85ccf [libcalamares] Call Python function if available for status 5 years ago
Adriaan de Groot 252089e372 [libcalamares] Refactor pretty_name() call
- Split out a general method-that-returns-string caller.
5 years ago
Adriaan de Groot ed4cdbeacc [dummypython] Provide status 5 years ago
Adriaan de Groot aa62ca639b [libcalamares] Start getting prettyDescription from Python 5 years ago
Adriaan de Groot 9b5a391c86 [libcalamares] Factor out Python helper
- the strange construction of Helper and treating it as a singleton
  can be factored out into a separate singleton-handling instance()
  function. The Helper should never be destroyed.
5 years ago
Adriaan de Groot 3025c5383b [libcalamares] Document the pretty*() functions for Jobs 5 years ago
Adriaan de Groot 6d29c19e3e [libcalamares] Progress is float 5 years ago
Adriaan de Groot d3828a82fc [packages] Make dummy backend slower
- insert sleeps to make it slower (easier when testing)
- improve debug logging clarity by noting where the messages
  are coming from
5 years ago
Adriaan de Groot 0abde6f1a7 [libcalamares] Don't print funcinfo in continuations
- when a single function does more logging, it generally marks
  those as subsequent debug-messages (with Continuation, or SubEntry)
  and we don't need to print funcinfo for those, since it was already
  printed the first time.
5 years ago
Adriaan de Groot 5248a37eb3 [libcalamares] Add FUNC_INFO into all debug messages
- This is needlessly verbose
- Chase CreatePartitionTableJob which needs to bind to a temporary
5 years ago
Adriaan de Groot 3ddee8090c [libcalamares] Drop intermediate CLog class
- All the real work is done in CDebug, so remove the base class.
5 years ago
Adriaan de Groot ae633c7e7b [removeuser] Remove superfluous formatting around logging 5 years ago
Adriaan de Groot 623a8c2d43 [removeuser] Port to C++
No changes in functionality; add a little description in the .conf file.
5 years ago
Adriaan de Groot bfe45aea18 [netinstall] Warnings--, unused parameter 5 years ago
Adriaan de Groot 3df0878e43 [initramfs] Warnings--
Initializing the JobQuene (and hence Global Storage) and
the System instance is a bit odd, avoid unused-variable
warning with an ugly cast instead.
5 years ago
Adriaan de Groot 0793971d01 [libcalamares] Warnings--, unused variable 5 years ago
Adriaan de Groot 72dcf886bf [contextualprocess] Improve tests, fix off-by-one
- there's no string representation for a QVariantMap, so it
  won't be converted; in *debug* output it looks like there's a
  string there.
- off-by-one when diving into compound selectors, spotted by
  test, now fixed.
5 years ago
Adriaan de Groot 28bf4082b3 [contextualprocess] Tests for new lookup behavior 5 years ago
Adriaan de Groot bdb208c079 [contextualprocess] Split API
In order to test some of the internals, split them into Binding.h.
This makes the interface visible for tests. The implementation
still lives in the same place.

While here, adjust the test to the changed **example** which
now lists an additional variable.
5 years ago
Adriaan de Groot 4a5b3e7bc8 [contextualprocess] Document new behavior for compound keys 5 years ago
Adriaan de Groot d114a3dc21 [contextualprocess] Allow selection from GS with "var1.var2.var3" 5 years ago
Adriaan de Groot f5522425f6
Merge pull request #1331 from PureTryOut/apk-support
[packages] Add apk (Alpine Linux package manager) support
5 years ago
Adriaan de Groot 54a4644893 [partition] Store filesystem types
- Write a new GS key filesystems_use, which is a map of filesystems
  in use on the target system.
5 years ago
Adriaan de Groot d4b26bbaf0 [partition] Tighten up the types of internal methods 5 years ago
Calamares CI 29ba5c961d i18n: [dummypythonqt] Automatic merge of Transifex translations 5 years ago
Adriaan de Groot b0abb99ee1 [libcalamares] Don't log useless FUNC_INFO for Python
- When a Python module calls utils.debug(), there's no point
  in logging the C++ funcinfo that passes the parameters on;
  don't use cDebug() with its attendant magic.
5 years ago
Adriaan de Groot f818d4b446 [libcalamares] Log Q_FUNC_INFO as part of debug
- Warnings, errors, don't get funcinfo, but regular cDebug()
  calls do. Other special-cases, like calling Logger::CDebug()
  constructor explicitly, don't get funcinfo either.

FIXES #1328
5 years ago
Bart Ribbers 136d22188e
[packages] Add apk (Alpine Linux package manager) support 5 years ago
Adriaan de Groot 3456aabfce [libcalamares] Expand utility of list-logging
- Allow logging any QList type (needs explicit call in usage).
- Add a DebugList inheriting from DebugListT to keep existing
  code that logs QStringLists.
- For Calamares 3.3, consider using C++17 and class template deduction.
5 years ago
Adriaan de Groot 8f060a741f [calamares] Default to log-level 1 (not 8)
- This bug has been here since f233cac7a1,
  where a check for isSet() (of the -D option) was dropped. So since then,
  Calamares has always been running with full logging (-D8) on.
- The recently-added "easter egg" of showing the debug-button when
  log-level is 8 (to allow debugging-in-production) trips over the
  default-log-level of 8, so the debug-button is always visible.

So, minor bugs in the debugging-setup, combine to show a debug-button
when there shouldn't be one.

FIXES #1329
5 years ago
Adriaan de Groot 2db3b413f4 [libcalamares] Unmount with mount point, not device
- The manpage for umount says that -R can only be used with
  a mount point (e.g. /usr/local) and not a device name;
  this makes sense because a device might be mounted in multiple
  locations, but the mountpoint (and things mounted under it) lives
  in the filesystem tree.
- Existing code tried to unmount -R the device, not the mount point,
  and so always failed; leaving things mounted that shouldn't.
5 years ago
Philip Müller 0c8257df3d [initcpio] Don't claim other swap
From downstream ee99e34e25ed1224504bbef93fb41e5cad6b0ee8
5 years ago
Matti Hyttinen 717b8947d5
Update main.py
Unset GRUB_SAVEDEFAULT if / or /boot is in btrfs or f2fs partition. This avoids the error "sparse file not allowed" at boot time. Btrfs and f2fs do not support saving default entry in grub.
5 years ago
Adriaan de Groot c20ac0836e [users] Take setRootPassword into account when hiding fields 5 years ago
Adriaan de Groot 7752cf31b3 [users] Improve documentation of setRootPassword 5 years ago
Adriaan de Groot 14979b1630 [libcalamares] TemporaryMount with backwards logic
- because mount() returns an exit code, and 0 is "success",
  the if (!code) was backwards: when mounting succeeded, the
  TemporaryMount object thought it failed.
- This leads to temp-mounts being left *all over* the place
  from os-prober and fstab-handling.
5 years ago
Adriaan de Groot a865620f90 [calamares] Easter egg: running -D8 will show the Debug Information button 5 years ago
Adriaan de Groot ee52e37b36 [libcalamares] Don't hard-code full paths
- See editorial in the code-comment. Still need to test that
   chroot(8) doesn't need a full path, otherwise this will
   go to /usr/bin/env udevadm to force lookup (redundantly
   if not in a chroot)
5 years ago
Adriaan de Groot 8c527ab592 [users] Overwrite host(s|name) files in target 5 years ago
Adriaan de Groot 4621937477 [users] Use right check on writing hostname
- !failed() also means "didn't write the file because it already
  exists", which is sometimes acceptable -- but not here.
  Use the more-strict bool() conversion, which is only when
  the file was actually written.
5 years ago
Adriaan de Groot 862b7e34df [libcalamares] Add tests for file-overwrite 5 years ago
Adriaan de Groot f89951716e [libcalamares] Add mode to createTargetFile()
- Unconditionally **not** overwriting the target file isn't an option:
  writing hostname, for instance, expects that to be done even
  if `/etc/hostname` already exists on the target filesystem.
5 years ago
Adriaan de Groot 6a02f2cfec [machineid] Fix tests
- Make tests more resilient: do them in a temp-dir, and clean it
  up after successful tests. This was prompted by tests failing
  because of things hanging around in /tmp.
5 years ago
Adriaan de Groot adf81c0ab5 [locale][packagechooser] Fix tests, QCOMPARE again 5 years ago
Adriaan de Groot 6352b50ed0 [initramfs] Fix more tests 5 years ago
Adriaan de Groot e49fb74847 [libcalamares] Fix more tests 5 years ago
Adriaan de Groot 39cc43f26b [libcalamares] Fix tests
- QCOMPARE() is sensitive to differing types in actual and expected,
  and uchar and int (and mode_t and int) are different.
5 years ago
Adriaan de Groot a78556b56a [unpackfs] Revert text mode
- Follow original patch from Gabriel Craciunescu: just drop
  the *bufsize* parameter and stick to binary reads.

Text mode was associated in my testing with multiple hangs,
which didn't show up during binary-reads.
5 years ago
Adriaan de Groot 248776144e [unpackfs] Now it's text, it's not encoded anymore 5 years ago
Calamares CI aec6058dc5 i18n: [dummypythonqt] Automatic merge of Transifex translations 5 years ago
Adriaan de Groot 61ca6384cc [partition] Fix tests
- One of the files listed in the test has moved (to libcalamares),
- Don't bother with an extra intermediate SRCS variable.
5 years ago
Adriaan de Groot 6d0f5e4111 Merge branch 'kpmcore-manager' 5 years ago
Adriaan de Groot a2d245ef92 Merge branch 'issue-swaps' 5 years ago
Adriaan de Groot 327c1c0e7b [unpackfs] Reading from the pipe is line-oriented
- Using bufsize=1 causes warnings, since we never bothered
  to explicitly set text mode.
5 years ago
Adriaan de Groot 7c7af28a0d [unpackfs] Make clear that the FS is unsupported by *this* kernel
Patch from Gabriel Craciunescu. FS support is determined be
the kernel, not by Calamares, so make that clearer in the message.
5 years ago
Adriaan de Groot 50161cdab9 [grubcfg] Use own swap
- In situations where there are more swap partitions, only use
  partitions this install "owns".
5 years ago
Adriaan de Groot 5247c13f98 [partition] Follow 'claimed' settings for claiming swap
- By the time the GS is actually written, new (for partition state)
  is always false. So "new" is the wrong thing to track. It should
  have had a better name anyway,
- We store custom properties on the partition objects to indicate
  what happens to them; use those properties (instead of state,
  as done originally), call it "claimed" to indicate that the partition
  is part of this installation.

For now, only new (as in, formatted, created-by-us) partitions are
claimed.

- The effect here is that only "new" swap will be added to the system,
  so in erase-disk installations, or manual partitioning.
- Install-alongside and replace will now **not** claim the swap already
  on the disk; I think we'll need another UI knob for that one.

FIXES #1316
5 years ago
Adriaan de Groot 35a2db064b [partition] Make debug-logging match the functionality
- `createPartitionList()` is called for the summary widget (via
  `prettyDescription()`), and from `exec()`. Only the latter
  actually *writes* to Global Storage, so it's misleading to
  think that the pretty-printed version ends up in GS.
- This makes the "new" key useless, since by the time `exec()` is called
  the partitoons are no longer new.
5 years ago
Adriaan de Groot f9d9cd2df4 [fstab] Document the remapping of fs names
- Shuffle the code a little so it's clear where the remapping
  happens, and explain why we look for "swap" in fstab and
  "linuxswap" elsewhere.
5 years ago
Adriaan de Groot 8ecb364f8c [initramfs] Fix up tests
- These tests don't actually test anything in this specific module,
  they do test CalamaresUtils::System.
- Wrangling System and JobQueue and GlobalStorage instances is fraught
5 years ago
Adriaan de Groot fba1bf7072 CMake: add DEFINITIONS option to calamares_add_test
- There's a handful of tests that need this, it's possible
  there will be more, so just add it to the infrastructure.
5 years ago
Adriaan de Groot 1bb43e06e2 Merge branch 'master' into kpmcore-manager 5 years ago
Adriaan de Groot 7cbc43616e [netinstall] Some more "standard" alternative labels
- Hide the labels from the compiler to avoid warnings
- Add some more labels proposed by ArcoLinux
5 years ago
Adriaan de Groot 5dac67b710 [notesqml] Cut down the example text to be translated. 5 years ago
Adriaan de Groot 2d754dac6d [notesqml] Rename example file to save translators 5 years ago
Adriaan de Groot 51ad7df31c [netinstall] Don't give the translators a bogus string 5 years ago
Adriaan de Groot 538779991e [netinstall] Add some "standard" sidebar labels for the module 5 years ago
Adriaan de Groot 81752b6f7c [libcalamares] Document how TranslatedString context works
- Support re-using class-specific tr() calls in a standard way
- Document this in the netinstall.conf which uses it
5 years ago
Adriaan de Groot a03394f177 [netinstall] Use tr() infrastructure for config-translations 5 years ago
Adriaan de Groot 0ef28f6a50 [libcalamares] Translatable config strings use tr()-infrastructure
- Allow TranslatedString to get a context parameter; if it has
  one, it will try to use the regular tr()-infrastructure
  **as fallback** for the translations from the config file itself.
- This makes it possible to offer -- and translate -- some "standard"
  phrases in the module, while allowing the config file the knob
  to change strings. Using one of the standard strings gets translations
  for "free", while introducing something entirely new means sourcing
  translations for it as well.
5 years ago
Adriaan de Groot 25e3f91754 [welcome] Remove the QML testing bits
- The welcomeq module has actual QML support
5 years ago
Adriaan de Groot bff07ded25 Merge remote-tracking branch 'origin/welcome-q'
- Updates QmlViewStep with slightly neater API
- Introduces Config object for QML pages
- Updates notesqml and welcomeq to use that API
5 years ago
Adriaan de Groot c20f7ee534 [netinstall] Rip out derpy translations of PackageModel
- The model always has two columns, and the column names are always
  the same. We don't need to specially set headers for that.
- Use QCoreApplication::translation() to re-use the existing
  translations and avoid creating "new" strings (in a new context).
5 years ago
Adriaan de Groot f6d8ed85e4 [netinstall] Allow a title above the netinstall tree
- Supports translation via the config file. This is useful
  (like label:sidebar) when displaying more than one netinstall page.
5 years ago
Adriaan de Groot 5b67ca315a [netinstall] It should be easier to get the number 2 5 years ago
Adriaan de Groot 497ecda14d [netinstall] Move translation of widget headers
Editorial: I really don't like plain CALAMARES_RETRANSLATE() thrown
into the middle of code.
5 years ago
Adriaan de Groot 45c15de623 [netinstall] Configurable name in the sidebar 5 years ago
Adriaan de Groot be567dc508 [netinstall] Remove unused m_prettyStatus 5 years ago
Adriaan de Groot 4ae484dbca [netinstall] Initial work for configurable sidebar label
- Now that multiple netinstall pages may be supported, it's annoying
  that they all have the same name. Copy the approach from other
  modules (e.g. notesQML) of having the sidebar and other labels
  configured in the config file.
5 years ago
Adriaan de Groot 0877a994f1 [netinstall] Update copyright 5 years ago
Adriaan de Groot d909b8119e [netinstall] Code-style 5 years ago
Adriaan de Groot bc5aa1f837 [netinstall] Pretend to clean up resources 5 years ago
Adriaan de Groot 5f1bd4396e [netinstall] Avoid duplicate operations
- Since operations are added each time you leave this page,
   the existing operations (from a previous visit) need to be
   cleaned up. With the old setup of only **one** possible
   set of operations, this wasn't a problem. Now, merging
   in operations is necessary. Implement that by looking for
   the *source* property in an operation.

FIXES #1303
5 years ago
Adriaan de Groot 74169c166a [netinstall] Mark operations with source-module
- This will allow us to find the operations later, by looking for
  the same source-module.
- While here, tidy up types
5 years ago
Adriaan de Groot 7cadfb8ddd [packages] Log unfamiliar package operations
- unknown operations get a warning
 - "source" will be added from netinstall shortly
5 years ago
Adriaan de Groot 056b0d7548 [netinstall] Refactor variant-from-ItemData 5 years ago
Adriaan de Groot d5675508fa [netinstall] More coding-style
The tools don't always pick up all the style changes in one go
(I think astyle has trouble parsing some Calamares code)
5 years ago
Adriaan de Groot 8286bff95f [netinstall] Shuffle code around a bit
- introduce char const for key name (consistency, it's used lots)
 - polish debugging a bit
 - add some inline code-docs
5 years ago
Adriaan de Groot 17eb3f5e33 [netinstall] Apply coding style 5 years ago
Adriaan de Groot 1b80cf82de [fstab] Don't add swap that wasn't made new for us 5 years ago
Adriaan de Groot 158e11de1e [partition] Indicate that a filesystem is new in GS 5 years ago
Adriaan de Groot 7c2a196568 [users] Document new knobs
- while here, update copyright notice

FIXES #1140
5 years ago
Adriaan de Groot f7e8488edf [users] Correct DBus return from hostnamed calls 5 years ago
Adriaan de Groot 094c213baa [users] Also test hostname-setting via hostnamed
SEE #1140
5 years ago
Adriaan de Groot f1435452ea [users] Polish up tests
- Don't remove test artifacts on failure
 - Coding style
5 years ago
Adriaan de Groot c5b45c37fc [users] Add tests of the file-writing components 5 years ago
Adriaan de Groot 371fe267b1 Merge branch 'better-hostname' 5 years ago
Adriaan de Groot 94f5b13db0 [libcalamaresui] Restore previous DLLEXPORT names
- Different libraries should have different EXPORTs, so that
   you can IMPORT one while building the other. Reported (and
   kindly explained) by Kevin Kofler.
 - Stick to one header file, though.

While here, update copyright on file.
5 years ago
Adriaan de Groot 49eb8212e3 [users] Imporove enum-naming 5 years ago
Adriaan de Groot e74831fcb4 [users] Add .conf entries for hostname settings
- Set hostname not-at-all, or via one of two mechanisms
 - Write /etc/hosts or not
5 years ago
Adriaan de Groot 61d096c9ec [users] Prep-work for configurable actions
- tidy include style
 - add setting to UsersViewStep for hostname action
5 years ago
Adriaan de Groot 33b3321698 [users] Simplify reading configuration 5 years ago
Adriaan de Groot dbba0c9b03 [users] Move Job creation from the widget to the ViewStep
- Having the widget do creation ties the step heavily to that UI;
   start moving towards a state where we have a Config object (not
   here yet; it still queries the UI part) that moves data around
   between UI and ViewStep.
5 years ago
Adriaan de Groot 2471e74aab [users] Provide some accessors to the UI-page data 5 years ago
Adriaan de Groot ef4bb5e13b [users] Make SetHostName job actions configurable 5 years ago
Adriaan de Groot 6719a41aef [libcalamares] Switch tests to calamares_add_test() 5 years ago
Adriaan de Groot 51e135cfbd CMake: chase introduction of IMPORTED yamlcpp 5 years ago
Adriaan de Groot 6f996d8eed CMake: give yamlcpp a proper imported target
- This makes linking easier,
 - Adds the right includes (needed on FreeBSD),
 - Lets us drop silly GUI setting for non-GUI tests (I think this was
   a side-effect of compiling on FreeBSD, where UI would pull in
   /usr/local/include).
5 years ago
Adriaan de Groot 4495a4c739 CMake: Allow extra libraries in calamares_add_test
- Extra libraries specified via LIBRARIES part of CMake function
 - Convert all the other module tests
5 years ago
Adriaan de Groot 637a57d534 [machineid] Change to calamares_add_test
- The test-macro handles cases without ECM or testing transparently.
 - Adds compile defines for STATICTEST.
5 years ago
Adriaan de Groot 6bdc4a55de CMake: new convenience module CalamaresAddTest 5 years ago
Adriaan de Groot b42520b0ef [machineid] Apply new STATICTEST specifier, hide implementation details 5 years ago
Adriaan de Groot 92260e7d0b [libcalamares] Document DllMacro.h and add STATICTEST
- document the export macros
 - introduce a "static" that is switched off when re-building code
   for tests.
5 years ago
Adriaan de Groot b044549013 [libcalamares] Merge PluginDllMacro.h into DllMacro.h
- Let's just have one header definining export- and visibility-
   macros for Calamares. They are still selected based on the
   export flags (*_PRO), just defined in one header instead of two.
5 years ago
Adriaan de Groot aaa6f6bd55 [libcalamaresui] Drop UiDllMacro.h
- The scattering of DLL export macro's is kind of useless;
   there are several headers, and then the export macro isn't
   even applied consistently. Just drop the one for UI exports,
   which was only used in libcalamaresui.
5 years ago
Adriaan de Groot 44bf0a5d6d [users] Add method for using hostnamed
SEE #1140
5 years ago
Adriaan de Groot 9a7465bfd5 [users] Refactor writing-hostname and writing-hosts
- Move to separate functions, as prep-work for making the actions
   configurable (and optional).
5 years ago
Adriaan de Groot 214f9a308e Merge branch 'improve-tests' 5 years ago
Adriaan de Groot d5f3e2e7d4
Merge pull request #1318 from yurchor/patch-2
[partition] Fix typo: partitons -> partitions
5 years ago
Yuri Chornoivan ea82a26dae
Fix typo:; partitons -> partitions
Many thanks in advance for reviewing.
5 years ago
Yuri Chornoivan b582c27bf4
Fix minor typo
Many thanks in advance for reviewing.
5 years ago
Adriaan de Groot 90f79b0692 [users] Restore error-checking to set-hostname code
- Use the new CreationResult code for compact results
5 years ago
Adriaan de Groot 781322ab41 [libcalamares] Use more descriptive variable name
- If the test failed, you'd get a cryptic message like
	FAIL!  : NetworkTests::testPing() 'r' returned FALSE. ()
   So rename the variable so the failure mode is more obvious.
   (Could have used QVERIFY2() instead, this is simpler)
5 years ago
Adriaan de Groot f6526f7d9f [libcalamares] Add some tests for CreationResult
- More important is the compiler warning that will show up
   if we add more failure states.
5 years ago
Adriaan de Groot 274115c727 [libcalamares] Update tests to reflect changed API 5 years ago
Adriaan de Groot 2d7398161d [libcalamares] More detail for createTargetFile()
- Return a result-object with statrus information and the path
   which was previously used (empty for "failures").
5 years ago
Adriaan de Groot 695b88b8a7 [users] Tidy up hostname creation
- Use the createTargetFile() convenience functions to do the
   actual work.
 - This probably involves more copying around of buffers, since it's
   creating one big QString and sending that off, rather than writing
   little chunks to a file, but I feel this is worth the code simplification.
 - Drops all the error checking for creation, though, because the API for
   createTargetFile() lousy.
5 years ago
Adriaan de Groot b337a6b3f5 [user] Apply coding style 5 years ago
Adriaan de Groot 2bb4dd8e22 [users] Refactor hostname-guessing 5 years ago
Gabriel Craciunescu 7c323bdcdc [users] Try to guess suggested hostname from dmi
- nothing compicated for now, just try to get something
  from /sys/devices/virtual/dmi/id/product_name and fallback
  to -pc thingy if we can't
5 years ago
Adriaan de Groot 7f295d9565 [partition] Apply coding style to core/ subdir
Because this is a giant code change, with no functional effect,
I've been saving this until the end of the kpmcore-manager branch.
5 years ago
Adriaan de Groot 2bc296b468 [unpackfs] Fix typo's introduced in june 5 years ago
Adriaan de Groot 45a31a3022 [partition] Tidy includes
- sort includes a little
 - remove superfluous includes
 - update copyright
5 years ago
Adriaan de Groot d931b146e3 [partition] Shuffle new conveniences into partition service
- the general stuff from KPMHelpers ends up in the partition
   service; that only gets compiled when KPMCore is available anyway.
5 years ago
Adriaan de Groot e72ecaafd3 Merge branch 'kpmcore-manager'
Introduces a "partitioning service" into libcalamares,
shuffles a bunch of things into it, tries to help out
with settling the system between partitioning actions.
5 years ago
Adriaan de Groot 5a50a3a40c [partition] Consistent FS name usage
- explicit use of user-visible names in EditExistingPartitionDialog
 - consistent conversion of config-values to FS names (user-visible).
   The GS value comes from the ViewStep, and should always match
   something -- it's already converted to the canonical un-translated
   so the type should be good.
5 years ago
Adriaan de Groot 57b608083e [partition] Fix build - missing ) 5 years ago
Adriaan de Groot ca67534cd2 [partition] Improve logging of bad configs 5 years ago
Adriaan de Groot 472ec32617 [partition] Be explicit about user-visible FS names, ReplaceWidget 5 years ago
Adriaan de Groot 05dfc24af6 [partition] Be explicit about user-visible FS names, CreatePartitionDialog 5 years ago
Adriaan de Groot 88cff387c3 [partition] Be explicit about user-visible FS names, FormatPartitionJob 5 years ago
Adriaan de Groot bacca04695 [partition] Be explicit about what's user visible in SetPartitionFlagsJob 5 years ago
Adriaan de Groot 29894cec6a [partition] Convenience userVisibleFS()
- Mark uses of filesystem-name where it's intentional that they
   are user-visible, with a new convenience function.
5 years ago
Adriaan de Groot dac5516b2c [partition] Update copyright, coding style 5 years ago
Adriaan de Groot a0449abab9 [partition] Do not translate filesystem names
- Move contents of FSName to KPMHelpers
 - Use the new functions from FillGlobalStorage

Needs more use in the rest of the partition module.
5 years ago
Adriaan de Groot f410a4bb68 [libcalamares] Convenience function for FS names
Because getting the untranslated name of a FileSystem is something
that needs doing consistently, add some functions for that;
it makes it easier to spot places where that isn't done.

Probably doesn't compile, and needs extra documentation.
5 years ago
Adriaan de Groot c055e1da49 [partition] Use untranslated name of filesystem
- Patch from Gabriel Craciunescu
5 years ago
Adriaan de Groot aa0a799492 [welcomeq] QML warnings--
The config bits are all constant, so avoid NOTIFY warnings.
5 years ago
Adriaan de Groot f094cb543b [libcalamaresui] Set config object earlier
- The config context object should be set earlier, otherwise
   QML code will try binding to a non-existent config already
 - Document that QMLViewStep::setConfigurationMap() parent implementation
   should be called **last**, at the end of the subclass implementation.
5 years ago
Adriaan de Groot 7e0cc7af41 [welcomeq] Add configuration file
- copy the buttons-config part from welcome.conf
 - create buttons in the QML part
5 years ago
Adriaan de Groot 85b873a1a2 [libcalamaresui] Log QML error message
- When loading fails, log a useful error message from the QML
   engine (to help debug the QML)
5 years ago
Adriaan de Groot 49ed97cb77 [libcalamares] Allow QML ViewSteps to expose a config object 5 years ago
Adriaan de Groot f0134aab71 [welcomeq] Add more fields to Config
- getters as slots, for later access from QML
5 years ago
Adriaan de Groot 86bf9287ab [notesqml] Use Branding strings 5 years ago
Adriaan de Groot ae35256177 [welcomeq] Add top-text
- Fix QML indentation to the canonical 4-spaces
 - Add a header at the top of the page
 - Force the image to load from the filesystem
5 years ago
Adriaan de Groot 18942f835f [libcalamares] Remove confusing name-qualifiers
- Using Branding::ImageEntry, when ImageEntry is an enum class
   defined *in* Branding, is superfluous, and it also confuses
   moc; the enum type isn't recognized from QML.
5 years ago
Camilo Higuita 15d8503726 [libcalamaresui] Expose the branding strings & urls to qml 5 years ago
Adriaan de Groot 152c3352c2 [welcomeq] Compile the QML into the module
- Default implementation is in the QRC
 - Register Branding for QML modules (just once)
5 years ago
Camilo Higuita b5e17b7ea5 [welcomeq] Add full-featured QML for welcome page
This is a merge of several commits by Camilo.
5 years ago
Adriaan de Groot 7bf0fded1b [welcomeq] Port to newer QmlViewStep 5 years ago
Adriaan de Groot adb312bdd2 [welcomeq] Coding style
- a R/W property isn't CONSTANT
 - apply calamaresstyle
5 years ago
Adriaan de Groot c7780db07a Merge branch 'model-q'
- Make models of some things previously held as lists, as
   prep-work for QML modules.
5 years ago
Camilo Higuita 1f2f1a657e [libcalamaresui] Expose Branding strings to QML 5 years ago
Adriaan de Groot ca13d1670e [libcalamares] Merge more from Camilo
- Complete the model for locales
5 years ago
Adriaan de Groot 59ddda6225 Merge branch 'wrangle-boost' 5 years ago
Adriaan de Groot 9408601074 [libcalamares] Move Python wrapper
- Take the Python wrapper for GlobalStorage out of the GlobalStorage.h
   header and add it to PythonHelper instead, saving some work in
   all the cases that only GS is interesting, not the Python bits.
5 years ago
Adriaan de Groot ad725b671e [hostinfo] Warnings--
- Physical memory can't be negative, so it is reported as
   an unsigned long, but the bytes-to-MiB functions do accept
   negative amounts. As long as no machine has more than 2**62
   bytes of memory, we're good though.
5 years ago
Adriaan de Groot a11280b427 [libcalamares] Expand tests for printable entropy 5 years ago
Adriaan de Groot 090716ba4f [libcalamares] Warnings-- in Entropy
- reading a file yields a qint64
 - need to mash the unsigned data from twister to signed char data.
5 years ago
Adriaan de Groot 7efed8226c [libcalamares] Warnings--, update copyright 5 years ago
Adriaan de Groot c1151cbcfa [libcalamares] Update copyright info 5 years ago
Adriaan de Groot 8181808bec [libcalamares] Fix build
- drop now-obsolete boost-warnings.h
 - add missing namespace alias to GlobalStorage.h (removed accidentally
   in previous commit)
5 years ago
Adriaan de Groot 3b35ca7bb9 [libcalamares] Simplify includes
- PythonHelper.h already pulls in all the Python machinery
5 years ago
Adriaan de Groot 95722541d0 [libcalamares] Untangle Python includes
- Use BoostPython.h to manage overall includes
 - Remove local home-grown variations
5 years ago
Adriaan de Groot f8998834cf [libcalamares] Simplify includes (no Python used in JobQueue) 5 years ago
Adriaan de Groot d42e757576 [libcalamares] Simplify includes
- CalamaresVersion used by the job, not the API presented to Python.
 - Untangle Qt includes from there.
5 years ago
Adriaan de Groot f3e7fe5eb4 [libcalamares] Use more specific include 5 years ago
Adriaan de Groot 96580e5c40 [libcalamares] Convenience header for Boost and its warnings 5 years ago
Adriaan de Groot 6432b7f42a [libcalamares] Hit Boost warnings with a hammer
- Tons of warnings from Clang 9 in Boost::Python code, so
   turn of most of those warnings in the Boost-support code.
5 years ago
Adriaan de Groot 684c5f477c [libcalamares] Moc warnings--
- don't have a NOTIFY CONSTANT property
 - the data is constant, so drop NOTIFY
 - remove redundant signals
 - remove setLabels() now it's only needed from one constructor
5 years ago
Adriaan de Groot b4b1bf5de2 [libcalamares] Call delegated constructor 5 years ago
Adriaan de Groot df5a0d25bc [libcalamares] Handle empty locale names quickly 5 years ago
Adriaan de Groot 27bc64e63f [libcalamares] C++ style, warnings-- 5 years ago
Adriaan de Groot 241cb04f06 [libcalamares] Coding style 5 years ago
Camilo Higuita 1b3d32ca79 make label item from LabelModel qobject based and expose properties 5 years ago
Adriaan de Groot 6c0fecd40d [notesqml] Don't use a fixed width 5 years ago
Adriaan de Groot c3c845e9d7 [notesqml] Add some more module documentation 5 years ago
Adriaan de Groot 4f60a6340e [dummyqml] Drop module; it makes more sense to just be notesqml 5 years ago
demmm c0e1ebb72a adding notesqml, copy of dummyqml
included in settings.conf, commented out
5 years ago
Adriaan de Groot 39a5453904 [libcalamaresui] Add QML onActivate() and onLeave() calls.
- This comes from the ExecutionViewStep, V2 loading, which
   notifies the QML that the QML is now active.
5 years ago
Adriaan de Groot 1f34c2834e [libcalamaresui] Move definitions inside namespace {}
- Remove the extra Calamares:: namespace specifier from half the
   definitions.
5 years ago
Adriaan de Groot 12675be516 [libcalamaresui] Factor out "simple" QML method calls 5 years ago
Adriaan de Groot bf675d971b Merge branch 'qml' 5 years ago
Adriaan de Groot faa88afc88 Merge branch 'issue-1314'
FIXES #1314
5 years ago
Adriaan de Groot 229d09927e Changes: for 2020, new fake Linux distro name 5 years ago
Adriaan de Groot 3e2908ea16 [machineid] Follow Manjaro flags
- add -f to ln(1) flags
5 years ago
Adriaan de Groot 110a84344b [machineid] Test job function
- Create a job and ask it to create dbus files -- either directly,
   or as a symlink. Since the target chroot isn't viable, this will
   fail but we can at least see that directories are created, etc.
5 years ago
Adriaan de Groot 4cdcb48de6 [machineid] Functionality moved to libcalamares 5 years ago
Adriaan de Groot b62004aae9 [machineid] Create the DBus data directory
- before running dbus-uuidgen or linking to systemd's UUID,
   create /var/lib/dbus; some distro's don't create that
   beforehand.

FIXES #1314
5 years ago
Adriaan de Groot 240fe2a564 [libcalamares] Add convenience createTargetParentDirs() 5 years ago
Adriaan de Groot 6ede9f2c7c [libcalamares] Test QFileInfo::dir() for completeness 5 years ago
Adriaan de Groot e65969d587 [libcalamares] Re-do createTargetDirs()
- Drop the basedirs idea, replace return with just bool
 - Use QDir::mkpath, with some extra validation
 - Test it a bit
5 years ago
Adriaan de Groot 8b8ecf7b7b [libcalamars] Improve test init and cleanup
- Test createTargetFile and removeTargetFile
 - Clean up afterwards
 - Ensure /tmp is the RMP for each test
5 years ago
Adriaan de Groot b502d78984 [libcalamares] Fix warning message
- "create" was when this function was used elsewhere
5 years ago
Adriaan de Groot 394eee3954 [libcalamares] Test more targetPath() scenario's 5 years ago
Adriaan de Groot 8d23e665ea [libcalamares] Fix targetPath() tests
- there is less simplification done than you might think
5 years ago
Adriaan de Groot daa5b804b3 [libcalamares] Split paths-tests into own test executable
- Since these tests all want a system object, and a GS
   with a sensible setup, give them one with its own initTestCase().

This could have been done with one executable, running tests from
multiple classes, but there's not much overall benefit there.
5 years ago
Adriaan de Groot 31878dd43b [libcalamares] Avoid double / between root and path in targetPath() 5 years ago
Adriaan de Groot 15bca702c1 [libcalamares] Add tests for path functions (part 1) 5 years ago
Adriaan de Groot 95936549e2 [libcalamares] Add a createTargetBasedirs()
- Used to ensure that the directories leading up to a given path
   exist. Implementation is incomplete and broken for now.
 - While here, avoid removing an empty pathname in removeTargetFile()
   (the empty pathname indicates a broken configuration).
5 years ago
Adriaan de Groot 4af68365c9 [machineid] Remove obsolete implementation 5 years ago
Adriaan de Groot bf882cec1d [machineid] Migrate removeFile() to libcalamares
- Becomes removeTargetFile()
5 years ago
Adriaan de Groot 9ef04192db [libcalamares] Simplify returns in targetPath() 5 years ago
Philip Müller 97ddd30af4
[machineid] folder needs to be created when not exists
- See #1314
5 years ago
Philip Müller 72d742e2f4
[machineid] Use same approach as we do in Manjaro
- See also https://gitlab.manjaro.org/applications/calamares/commit/da8f45ae
- Fixes #1314
5 years ago
Philip Müller c766a0f10f
[machineid] create dbus var-lib folder when not existing
See also #1314
5 years ago
Adriaan de Groot 53b6113c75 [welcome] Fix QML tests 5 years ago
Adriaan de Groot eaea262449 Merge branch 'master' into qml 5 years ago
Adriaan de Groot 4b3f7eb209 [calamares] Local translations can be a separate setting
- Don't stick this in Settings, though, it becomes overly complicated.
5 years ago
Adriaan de Groot 24c2c435a0 [libcalamares] Try repairing tests
- Fail on FreeBSD with an instant timeout
5 years ago
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
5 years ago
Adriaan de Groot 68e8b0695d [calamares] Make declaration order match calling order 5 years ago
Adriaan de Groot db80a34aca [calamares] Remove intermediate debug-settings
- There's a multi-stage setup for debug-mode, where the application
   object also knows that debugging is set. Remove it.
 - Break debug mode (because now the settings don't get debug-mode set).
 - Refactor so that parameter handing is only done if this Calamares
   is the unique (first) Calamares.
5 years ago
Adriaan de Groot 50b6801d35 [calamares] Install translator after loading settings
- means that also the *initial* translation can take settings
   into account, like -d loading local translations.
5 years ago
Adriaan de Groot f233cac7a1 [calamares] Refactor debug-logging settings 5 years ago
Adriaan de Groot ea8adc3de7 [calamares] Simplify return from main 5 years ago
Adriaan de Groot af862336a8 [calamares] Initialize settings before QML 5 years ago
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.
5 years ago
Calamares CI 8c0ef5798d i18n: [dummypythonqt] Automatic merge of Transifex translations 5 years ago
Adriaan de Groot d956c79291 [libcalamares] Load translations from more places
- To support translation testing, without needing to recompile
   Calamares, load files from the local directory when debugging,
   or from /usr/share/calamares/lang/ in general.
 - This allows updating translations and testing them with just
   lrelease (a translation build tool) installed, without rebuilding
   Calamares.
 - This allows distro's to ship updated or modified translations without
   rebuilding Calamares.
5 years ago
Adriaan de Groot 02e5e0de5e [users] Use entropy service.
FIXES #1254
5 years ago
Adriaan de Groot 5b987d4f33 [machineid] Use entropy service
- Most of the code was error-checking, just replace the open-read
   with a call to the service instead.
 - It's not an error if /dev/urandom doesn't exist in the source system
   (there may be other good random sources, and otherwise we have the
   low-quality random fallback).
5 years ago
Adriaan de Groot c971127b17 [machineid] Fix entropy-file return
- If the file was created and written, it would drop out of the
   if() and return an error anyway.
5 years ago
Adriaan de Groot e56948cefa [libcalamares] Fix tests (cell is the lower unicode byte) 5 years ago
Adriaan de Groot be0831ee11 [libcalamares] Add printable-entropy (e.g. for password salt) 5 years ago
Adriaan de Groot 8947f9c00c [libcalamares] Test the Entropy service 5 years ago
Adriaan de Groot a574b43eb8 [libcalamares] Also report empty buffer as no-entropy 5 years ago
Adriaan de Groot 842a90e026 [libcalamares] Add an Entropy service for getting random data
- Tries to get the "best" random data
 - Reports the quality of the random data it got
5 years ago
Adriaan de Groot 94083edf9c Merge branch 'master' into kpmcore-manager 5 years ago
Adriaan de Groot 252ce70203 i18n: updated (English) source files 5 years ago
Adriaan de Groot b38ae75bef Merge branch 'translate-checks' 5 years ago
Adriaan de Groot 8f581ca861 [welcome] Coding style
- apply coding style, add {}
 - remove unneeded includes (moved to the widgets)
 - update copyright
5 years ago
Adriaan de Groot a09593e4a2 [locale] Tighten up language-matching
- Drop plain startsWith() matching, since we now have "as" and "ast"
   as supported languages, where one name is a prefix of the other.
5 years ago
Adriaan de Groot 49690fc681 [locale] Remove superfluous code
- the list is already filtered for UTF-8, so this is redundant
 - this *incidentally* fixes the problem with Assamese and Asturian,
   since Assamese (as_IN) was having its only entry removed,
   after which it would match Asturian (ast_ES)
5 years ago
Adriaan de Groot 97f622e094 [locale] Use standard algorithms 5 years ago
Adriaan de Groot 6b77d5db4a [welcome] Add detail messages for root and screen checks
- these were empty, so the widgets were hidden in the details
   dialog of the requirements check; which looks really strange
   if the reason the check fails is because root is required,
   and you can't see that in the details.

This commit is on a branch because it changes strings, and I want
to do a release Real Soon and not annoy the translators.
5 years ago
Adriaan de Groot ad4ac1d25c [welcome] Update copyrights 5 years ago
Adriaan de Groot 9d69d0a893 [welcome] Remove unused variables 5 years ago
Adriaan de Groot 1ac4786365 [welcome] Move all the translation work to the slot
- this needs to (re)check the satisfaction states to figure out the
   message, but that's useful if the state of the checks changes
   (e.g. in #1106)
5 years ago
Adriaan de Groot 221a79b64c [welcome] Simplify logic
- \not mandatorySatisfied \implies \not requirementsSatisfied,
   so the ifs can be combined and simplified
5 years ago
Adriaan de Groot 28d91979c3 [welcome] Make resultWidgets less error-prone
- instead of counting and needing to keep track of the predicate
   applied while creating the widgets, push nullptrs to the widget
   list instead reflecting "this entry did not satisfy the predicate
   for widget creation".
5 years ago
Adriaan de Groot 39534325e6 [welcome] Re-use widget creation code
- for the list, the code can be the same as for the dialog,
   only the predicate is different.
 - while here, implement retranslate() since there's no text on
   the list widgets otherwise.
5 years ago
Adriaan de Groot 38d58e5b16 [welcome] Hoist explanatory-label code
- Create the label once, and it's ok for it to respond to links
   even if there's none in the code.
 - Turn into a member variable in preparation for retranslation-refactor.
5 years ago
Adriaan de Groot b476e4b386 [welcome] Refactor link-clicking
- remove intermediate lambda
 - rename dialog slot to one handling links in general (which now
   **only** does the dialog link)
5 years ago
Adriaan de Groot ecc7719abd [welcome] Hoist checking for requirements-satisfied
- lift it out of the loop that creates the widgets
 - some lambda-wankery, but the compiler hammers this down to
   simple loops and you can read the resulting code as

	none_of  [the list]  isUnSatisfied
	none_of  [the list]  isMandatoryAndUnSatisfied
5 years ago
Adriaan de Groot f5c0e57f17 [welcome] Improve variable naming
- these two are about whether all the checkEntries are satisfied
   (in general, and the mandatory ones) so make the names reflect that.
5 years ago
Adriaan de Groot 5795801be5 [welcome] Remove unneeded member variables.
- local to the constructor, only needed to be members because
   of the weird split between constructor and init()
5 years ago
Adriaan de Groot 5aae736ced [welcome] Create ResultWidget in separate method 5 years ago
Adriaan de Groot bede280f91 [welcome] Refactor ResultsListWidget
- no point in having init() called immediately after the constructor,
   if it only makes sense to have one call to init() ever to create
   the widget.
 - while here, give it the same kind of structure as the dialog,
   holding on to a reference to the list.
5 years ago
Adriaan de Groot 320dcac946 [welcome] Drop unneeded member variable 5 years ago
Adriaan de Groot ed1b3b576f [welcome] Refactor ResultsListDialog
- drop useless debugging
 - add documentation
 - move to its own spot in the file (not mixed in with ResultsListWidget)
5 years ago
Adriaan de Groot 41ac21bdcd [welcome] Refactor results-details dialog
- Factor out the "details" dialog into a separate class
   with a translation slot. This resolves the crash reported in #1307.
5 years ago
Calamares CI a017451607 i18n: [dummypythonqt] Automatic merge of Transifex translations 5 years ago
Calamares CI ae2536a9c3 i18n: [dummypythonqt] Automatic merge of Transifex translations 5 years ago
Adriaan de Groot 39cc13cb25 [shellprocess] Tidy code
- resolve TODO, use a unique_ptr to hang onto the command-list
 - sort the #includes, use correct quoting
5 years ago
Adriaan de Groot 71a73ee1a1 [libcalamares] PythonJob created with InstanceKey 5 years ago
Adriaan de Groot 96946a8447 Merge branch 'fix-unpackfs-progress'
This is an ugly hack, using Bill Auger's support for Job weights.
The unpackfs job is arbitrarily awarded a weight of 12. That makes it
(in a Netrunner install) use progress from 12% to 40% or so, overall,
as all the files are unpacked.

Also fixes bug reported by Kevin Kofler that unpackfs was only reporting
progress when it hit an exact multiple of 100 (instead of over 100).

SEE #1176
5 years ago
Adriaan de Groot 9976e92659 [libcalamares] Enlarge unpackfs to 12x 5 years ago
Adriaan de Groot d4b24894cb [libcalamares] Weigh unpackfs extra heavy
- This is a gross hack, which hard-codes unpackfs as much-heavier
   than other Python modules.
5 years ago
Adriaan de Groot 0c9188ee83 [libcalamares] Document JobWeight 5 years ago
Adriaan de Groot cdd2b9cc79 Modules: set noconfig:true on Python modules
- hwclock, initramfs, localecfg and networkcfg don't have any
   config file to work with, so set that explicitly in the module.desc
5 years ago
Adriaan de Groot 8d47751cb2 [libcalamares] Beautify debug output for InstanceKey 5 years ago
Adriaan de Groot 83ffbd5126 [libcalamaresui] Only load config file if there is one
- finally, no more warnings for modules that are NO_CONFIG
   (or noconfig: true) and don't have a config file.
5 years ago
Adriaan de Groot f366e3840f [libcalamaresui] Chase stronger typing of ModuleDescriptor 5 years ago
Adriaan de Groot 00deeec8c8 [libcalamaresui] Use InstanceKey instead of strings
- Replace return type of Module::instanceKey() by the structured
   ModuleSystem::InstanceKey type
 - Chase API breakage
5 years ago
Adriaan de Groot abdeb07bd3 [dummyqml] Minor polishing in Qml module
- document the default filename better
 - mark TODO actually loading the instance-id file
5 years ago
demmm b20a957c6e restore includes in header file to amke it build 5 years ago
demmm 538d8d5497 address qmlLabel changes too 5 years ago
demmm 9f55cf4cf4 part of the changes requested
others fail to build, or no idea how to fix
5 years ago
Adriaan de Groot b5d0acdf81 [luksbootkeyfile] Set NO_CONFIG 5 years ago
Adriaan de Groot 40f64f0c11 [hostinfo] Set NO_CONFIG and remove unused configuration methods 5 years ago
Adriaan de Groot fd058302b8 [dracutlukscfg] set NO_CONFIG and coding style 5 years ago
Adriaan de Groot 6530c889f0 Merge remote-tracking branch 'origin/use-idkey' into no-config
- Join to a single branch that does a bunch of tidying
   in the type-strictness of module interfaces.
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 649eb94d24 [libcalamaresui] Type-alias for module descriptors 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 d1f162f92a Docs: describe *noconfig* module option 5 years ago
Adriaan de Groot 10d1c4cf5b [unpackfs] Improve progress reporting
- don't rely on exactly 100 files being copied (thanks to Kevin Kofler)
5 years ago
Adriaan de Groot fbb452f9bf CMake: add support for NO_CONFIG
- A C++ module should set NO_CONFIG to flag that it doesn't have a
   config file (this is an error if it secretly **does** have one)
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
demmm 32eee82744 clean-up dummyqml.conf 5 years ago
demmm f2e68ddcf4 adding configure option dummyqml
sidebar entry can be configured and translated
adding a more elaborate qml example
keeping this in dummyqml for now, another commit will follow with
continuation of dummyqml in a more aptly named module
5 years ago
Adriaan de Groot 750465153f [dummyqml] Improve QML searching
- if the filename is an absolute path, use that
 - support searching in branding directory
5 years ago
Adriaan de Groot 7f8a31007a [dummyqml] Search for files
- start implementation of searching-for-qml
 - add a *filename* configuration item, so that the filename
   can be set per-instance (via the config file)
5 years ago
Adriaan de Groot ed4127f661 [libcalamaresui] Shuffle the module interface
- introduce NamedEnum lookup tables for interface and type
 - drop "final" and "virtual" from methods that don't make
   sense as virtual
 - shuffle declaration order so the virtual API for modules
   sits together
5 years ago
Adriaan de Groot f89c137c90 [libcalamaresui] Migrate module to using InstanceKey
- Trying to get away from untyped strings with special meaning.
 - The "split identifier" branch tried the same thing, but
   was duplicating the existing InstanceKey.h work.
5 years ago
Adriaan de Groot a7e1a1f9fc [libcalamaresui] Refactor Module::initFrom()
- generic initFrom() also sets the instance id
 - subclass-specific initFrom() now pure virtual in base
 - chase changes in subclasses
5 years ago
Adriaan de Groot 04615b251c [dummyqml] Make prettyName() return a sentence with . 5 years ago
Adriaan de Groot ce6d54ad95 [libcalamaresui] Improve failure message, unbreak loading
- example loading had an X inserted in filename (to test failure)
 - add a space between name and failure
5 years ago
Adriaan de Groot fed298b179 [libcalamaresui] Defer QML loading
- need a configuration before we can start loading (to support
   the variable search paths)
 - refactor showing a failure in the spinner widget. On failure,
   the spinner will never go away, so a message for the user is good.
 - stop clang-format from messing up the table of names.
5 years ago
Adriaan de Groot e7e66497d2 [libcalamaresui] Introduce search method for QML UI modules
- add a sample config and documentation in dummyqml/
5 years ago
Adriaan de Groot 23a957e783 [libcalamares] Chase API change (timeouts)
- The new mount service needed adjustment for the independent
   change of timeouts: int -> chrono::seconds.
5 years ago
Adriaan de Groot f6d89354a1 Merge branch 'master' into kpmcore-manager 5 years ago
Adriaan de Groot e6713d456c [libcalamaresui] Need explicit qrc: scheme 5 years ago
Adriaan de Groot c03c6fc8ed [libcalamaresui] Qml loading
- this is mostly copied from ExecutionViewStep (only the V2 QML
   loading), which does the same kind of thing.
 - loading from QRC does not work yet
5 years ago
Adriaan de Groot 44b250809f [libcalamaresui] Add spinner to QmlViewStep
- view step now has a widget, doesn't load QML yet
5 years ago
Adriaan de Groot 60c1d40b20 [libcalamaresui] Log which ViewStep is broken
- a ViewStep with no widget will crash the application;
   print out its name before doing so.
5 years ago
Adriaan de Groot 1cc40bda83 [dummyqml] Stub of a QML module 5 years ago
Adriaan de Groot 4924839217 [libcalamaresui] Start QmlViewStep 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 970702daa0 [libcalamaresui] Tidy up includes 5 years ago
Adriaan de Groot 537c257acf Merge branch 'master' into qml 5 years ago
Adriaan de Groot 56f926094e [welcomeq] Update comments
- Copyright years
 - Purpose of this module
5 years ago
Adriaan de Groot 1a8926181e [locale] Warnings-- (initialization-order) 5 years ago
Adriaan de Groot 2dff2d9d70 [libcalamares] TZRegion is hard to copy
- delete the copy and move constructors
 - adjust tests (which were just interested in simple tr() behavior) to use TZZone instead
5 years ago
Adriaan de Groot 5fbd0169ca [libcalamares] Reduce clang warnings (only-inline-virtual, unused parameters) 5 years ago
Adriaan de Groot 1b62b2f66c [libcalamares] Reduce warnings (extra ;, empty statement ..) 5 years ago
Adriaan de Groot b4c0ebe8ab [calamares] Use screen and window sizes, not position 5 years ago
Adriaan de Groot fcb0109b7b [calamares] Refactor center-placement
- Just move it to its own function where it can have more documentation
 - Tested on multi-screen setups

SEE #1293
5 years ago
Adriaan de Groot 121013fd96 [calamares] Avoid deprecated desktop()
- Put Calamares on the first screen where it fits
 - This is wordy and weird
5 years ago
Adriaan de Groot 43caf7b46a [calamares] Restore functionality for 'center window' 5 years ago
Adriaan de Groot 17d09342e9 [libcalamaresui] Add a setting for window placement 5 years ago
Adriaan de Groot 1625bb1dae [locale] Support Qt 5.9
FIXES #1296
5 years ago
Adriaan de Groot d21ed0cc7f [packagechooser] Coding style 5 years ago
Adriaan de Groot cefb66ab5b
Merge pull request #1276 from bill-auger/patch-packagechooser-default-selection
[packagechooser] pre-select default item in packagechooser
5 years ago
Adriaan de Groot dd5adc153f
Merge pull request #1291 from calamares/initcpiocfg-usr
[initcpiocfg] add usr hook if partition is separate
5 years ago
Adriaan de Groot fe64903d2f [initcpiocfg] Polish PR #1290
- List discrete years in copyright
 - Add docstrings
 - Massage detect_plymouth() to return bool (easier in if() context)
5 years ago
Philip Müller 85d3f9e9b9 [initcpiocfg] add usr hook if partition is separate 5 years ago
Philip Müller a3da47cd9c [initcpiocfg] update plymouth check 5 years ago
Adriaan de Groot 8e2d257040 [welcomeq] Add QML machinery (uninitialized) 5 years ago
Adriaan de Groot 53b208e891 [welcomeq] Start new ViewStep for QML-based welcome 5 years ago
Adriaan de Groot 6c4efc1f9c [welcome] Add Branding object to QML demo 5 years ago