Initial upload of HyprArch releng configuration

This commit is contained in:
2026-03-03 20:31:33 +00:00
commit 7df61351c0
634 changed files with 36355 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef BLANKVIEWSTEP_H
#define BLANKVIEWSTEP_H
#include "viewpages/ViewStep.h"
namespace Calamares
{
/** @brief A "blank" view step, used for error and status reporting
*
* This view step never allows navigation (forward or back); it's a trap.
* It displays a title and explanation, and optional details.
*/
class BlankViewStep : public Calamares::ViewStep
{
Q_OBJECT
public:
explicit BlankViewStep( const QString& title,
const QString& description,
const QString& details = QString(),
QObject* parent = nullptr );
~BlankViewStep() override;
QString prettyName() const override;
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;
bool isAtBeginning() const override;
bool isAtEnd() const override;
Calamares::JobList jobs() const override;
private:
QWidget* m_widget;
};
} // namespace Calamares
#endif // BLANKVIEWSTEP_H

View File

@@ -0,0 +1,80 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef EXECUTIONVIEWSTEP_H
#define EXECUTIONVIEWSTEP_H
#include "ViewStep.h"
#include "modulesystem/InstanceKey.h"
#include "widgets/LogWidget.h"
#include <QStringList>
class QLabel;
class QObject;
class QProgressBar;
class QTabWidget;
namespace Calamares
{
class Slideshow;
/**
* @class
*
* This is the implementation of the special ViewStep "Install"
* which takes care of an *exec* phase in the sequence. It runs
* jobs, shows the slideshow, etc.
*/
class UIDLLEXPORT ExecutionViewStep : public ViewStep
{
Q_OBJECT
public:
explicit ExecutionViewStep( QObject* parent = nullptr );
QString prettyName() const override;
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;
bool isAtBeginning() const override;
bool isAtEnd() const override;
void onActivate() override;
void onLeave() override;
JobList jobs() const override;
void appendJobModuleInstanceKey( const ModuleSystem::InstanceKey& instanceKey );
private:
QWidget* m_widget;
QProgressBar* m_progressBar;
QLabel* m_label;
Slideshow* m_slideshow;
QTabWidget* m_tab_widget;
LogWidget* m_log_widget;
QList< ModuleSystem::InstanceKey > m_jobInstanceKeys;
void updateFromJobQueue( qreal percent, const QString& message );
void toggleLog();
};
} // namespace Calamares
#endif /* EXECUTIONVIEWSTEP_H */

View File

@@ -0,0 +1,127 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef QMLVIEWSTEP_H
#define QMLVIEWSTEP_H
#include "DllMacro.h"
#include "utils/Qml.h"
#include "viewpages/ViewStep.h"
class QQmlComponent;
class QQmlEngine;
class QQuickItem;
class QQuickWidget;
class WaitingWidget;
namespace Calamares
{
/** @brief A viewstep that uses QML for the UI
*
* This is generally a **base** class for other view steps, but
* it can be used stand-alone for viewsteps that don't really have
* any functionality.
*
* Most subclasses will override the following methods:
* - prettyName() to provide a meaningful human-readable name
* - jobs() if there is real work to be done during installation
* - getConfig() to return a meaningful configuration object
*
* For details on the interaction between the config object and
* the QML in the module, see the module documentation:
* src/modules/README.md
*/
class UIDLLEXPORT QmlViewStep : public Calamares::ViewStep
{
Q_OBJECT
public:
/** @brief Creates a QML view step
*
* The search behavior for the actial QML depends on a QmlSearch value.
* This is set through common configuration key *qmlSearch*.
* The filename used comes from the module identifier, or can be
* set in the configuration file through *qmlFilename*.
*
* @see Qml.h for available Calamares internals.
*/
QmlViewStep( QObject* parent = nullptr );
~QmlViewStep() override;
virtual QString prettyName() const override;
virtual QWidget* widget() override;
virtual QSize widgetMargins( Qt::Orientations panelSides ) override;
virtual bool isNextEnabled() const override;
virtual bool isBackEnabled() const override;
virtual bool isAtBeginning() const override;
virtual bool isAtEnd() const override;
virtual void onActivate() override;
virtual void onLeave() override;
/// @brief QML widgets don't produce jobs by default
virtual JobList jobs() const override;
/// @brief Configure search paths; subclasses should call this at the **end** of their own implementation
virtual void setConfigurationMap( const QVariantMap& configurationMap ) override;
protected:
/** @brief Gets a pointer to the Config of this view step
*
* Parts of the configuration of the viewstep can be passed to QML
* by placing them in a QObject (as properties). The default
* implementation returns nullptr, for no-config.
*
* Ownership of the config object remains with the ViewStep; it is possible
* to return a pointer to a member variable.
*
* This object is made available as a context-property *config* in QML.
*/
virtual QObject* getConfig();
/** @brief Adds a context property for this QML file
*
* Does not take ownership.
*/
void setContextProperty( const char* name, QObject* property );
private Q_SLOTS:
void loadComplete();
private:
/// @brief Swap out the spinner for the QQuickWidget
void showQml();
/// @brief Show error message in spinner.
void showFailedQml();
/// @brief Controls where m_name is searched
Calamares::QmlSearch m_searchMethod;
QString m_name;
QString m_qmlFileName;
QWidget* m_widget = nullptr;
WaitingWidget* m_spinner = nullptr;
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
QQuickWidget* m_qmlWidget = nullptr;
#else
QWidget* m_qmlWidget = nullptr; // Qt6: container for QQuickWindow
#endif
QQmlEngine* m_qmlEngine = nullptr; // Qt5: points to QuickWidget engine, Qt6: separate engine
QQmlComponent* m_qmlComponent = nullptr;
QQuickItem* m_qmlObject = nullptr;
};
} // namespace Calamares
#endif

View File

@@ -0,0 +1,142 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2014 Aurélien Gâteau <agateau@kde.org>
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef LIBCALAMARESUI_SLIDESHOW_H
#define LIBCALAMARESUI_SLIDESHOW_H
#include "CalamaresConfig.h"
#include <QMutex>
#include <QStringList>
#include <QWidget>
class QLabel;
class QTimer;
#ifdef WITH_QML
class QQmlComponent;
class QQuickItem;
class QQuickWidget;
#endif
namespace Calamares
{
/** @brief API for Slideshow objects
*
* A Slideshow (subclass) object is created by the ExecutionViewStep
* and needs to manage its own configuration (e.g. from Branding).
* The slideshow is started and stopped when it becomes visible
* and when installation is over, by calling changeSlideShowState()
* as appropriate.
*/
class Slideshow : public QObject
{
Q_OBJECT
public:
/// @brief State-change of the slideshow, for changeSlideShowState()
enum Action
{
Start,
Stop
};
Slideshow( QWidget* parent = nullptr )
: QObject( parent )
{
}
~Slideshow() override;
/// @brief Is the slideshow being shown **right now**?
bool isActive() const { return m_state == Start; }
/** @brief The actual widget to show the user.
*
* Depending on the style of slideshow, this might be a QQuickWidget,
* or a QLabel, or something else entirely.
*/
virtual QWidget* widget() = 0;
/** @brief Tells the slideshow we activated or left the show.
*
* If @p state is @c Slideshow::Start, calls suitable activation procedures.
* If @p state is @c Slideshow::Stop, calls deactivation procedures.
*/
virtual void changeSlideShowState( Action a ) = 0;
protected:
QMutex m_mutex;
Action m_state = Stop;
};
#ifdef WITH_QML
/** @brief Slideshow using a QML file
*
* This is the "classic" slideshow in Calamares, which runs some QML
* while the installation is in progress. It is configured through
* Branding settings *slideshow* and *slideshowAPI*, showing the QML
* file from *slideshow*. The API version influences when and how the
* QML is loaded; version 1 does so only when the slideshow is activated,
* while version 2 does so asynchronously.
*/
class SlideshowQML : public Slideshow
{
Q_OBJECT
public:
SlideshowQML( QWidget* parent );
~SlideshowQML() override;
QWidget* widget() override;
void changeSlideShowState( Action a ) override;
public slots:
void loadQmlV2Complete();
void loadQmlV2(); ///< Loads the slideshow QML (from branding) for API version 2
/// Implementation detail
void startSlideShow();
private:
QQuickWidget* m_qmlShow;
QQmlComponent* m_qmlComponent;
QQuickItem* m_qmlObject; ///< The actual show
};
#endif
/** @brief Slideshow using images
*
* This is an "oldschool" slideshow, but new in Calamares, which
* displays static image files one-by-one. It is for systems that
* do not use QML at all. It is configured through the Branding
* setting *slideshow*. When using this widget, the setting must
* be a list of filenames; the API is set to -1.
*/
class SlideshowPictures : public Slideshow
{
Q_OBJECT
public:
SlideshowPictures( QWidget* parent );
~SlideshowPictures() override;
QWidget* widget() override;
virtual void changeSlideShowState( Action a ) override;
public slots:
void next();
private:
QLabel* m_label;
QTimer* m_timer;
int m_imageIndex;
QStringList m_images;
};
} // namespace Calamares
#endif

View File

@@ -0,0 +1,199 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is Free Software: see the License-Identifier above.
*
*/
#ifndef VIEWSTEP_H
#define VIEWSTEP_H
#include "DllMacro.h"
#include "Job.h"
#include "modulesystem/InstanceKey.h"
#include "modulesystem/Requirement.h"
#include <QList>
#include <QObject>
#include <QSize>
namespace Calamares
{
/**
* @brief The ViewStep class is the base class for all view modules.
* A view module is a Calamares module which has at least one UI page (exposed as
* ViewStep::widget), and can optionally create Calamares jobs at runtime.
* As of early 2020, a view module can be implemented by deriving from ViewStep
* in C++ (as a Qt Plugin or a Qml ViewStep).
*
* A ViewStep can describe itself in human-readable format for the SummaryPage
* (which shows all of the things which have been collected to be done in the
* next exec-step) through prettyStatus() and createSummaryWidget().
*/
class UIDLLEXPORT ViewStep : public QObject
{
Q_OBJECT
public:
explicit ViewStep( QObject* parent = nullptr );
~ViewStep() override;
/** @brief Human-readable name of the step
*
* This (translated) string is shown in the sidebar (progress)
* and during installation. There is no default.
*/
virtual QString prettyName() const = 0;
/** @brief Describe what this step will do during install
*
* Optional. May return a non-empty string describing what this
* step is going to do (should be translated). This is also used
* in the summary page to describe what is going to be done.
* Return an empty string to provide no description.
*
* The default implementation returns an empty string, so nothing
* will be displayed for this step when a summary is shown.
*/
virtual QString prettyStatus() const;
/** @brief Return a long description what this step will do during install
*
* Optional. May return a widget which will be inserted in the summary
* page. The caller takes ownership of the widget. Return nullptr to
* provide no widget. In general, this is only used for complicated
* steps where prettyStatus() is not sufficient.
*
* The default implementation returns nullptr, so nothing
* will be displayed for this step when a summary is shown.
*/
virtual QWidget* createSummaryWidget() const;
/** @brief Get (or create) the widget for this view step
*
* While a view step **may** create the widget when it is loaded,
* it is recommended to wait with widget creation until the
* widget is actually asked for: a view step **may** be used
* without a UI.
*/
virtual QWidget* widget() = 0;
/** @brief Get margins for this widget
*
* This is called by the layout manager to find the desired
* margins (width is used for left and right margin, height is
* used for top and bottom margins) for the widget. The
* @p panelSides indicates where there are panels in the overall
* layout: horizontally and / or vertically adjacent (or none!)
* to the view step's widget.
*
* Should return a size based also on QStyle metrics for layout.
* The default implementation just returns the default layout metrics
* (often 11 pixels on a side).
*/
virtual QSize widgetMargins( Qt::Orientations panelSides );
/**
* @brief Multi-page support, go next
*
* Multi-page view steps need to manage the content visible in the widget
* themselves. This method is called when the user clicks the *next*
* button, and should switch to the next of the multiple-pages. It needs
* to be consistent with both isNextEnabled() and isAtEnd().
*
* In particular: when isAtEnd() returns false, next() is called when
* the user clicks the button and a new page should be shown by this
* view step. When isAtEnd() returns true, clicking the button will
* switch to the next view step in sequence, rather than a next page
* in the current view step.
*/
virtual void next();
/// @brief Multi-page support, go back
virtual void back();
/// @brief Can the user click *next* with currently-filled-in data?
virtual bool isNextEnabled() const = 0;
/// @brief Can the user click *previous* with currently-filled-in data?
virtual bool isBackEnabled() const = 0;
/**
* @brief Multi-page support, switch to previous view step?
*
* For a multi-page view step, this indicates that the first (beginning)
* page is showing. Clicking *previous* when at the beginning of a view
* step, switches to the previous step, not the previous page of the
* current view step.
*/
virtual bool isAtBeginning() const = 0;
/// @brief Multi-page support, switch to next view step?
virtual bool isAtEnd() const = 0;
/**
* @brief onActivate called every time a ViewStep is shown, either by going forward
* or backward.
* The default implementation does nothing.
*/
virtual void onActivate();
/**
* @brief onLeave called every time a ViewStep is hidden and control passes to
* another ViewStep, either by going forward or backward.
* The default implementation does nothing.
*/
virtual void onLeave();
/**
* @brief Jobs needed to run this viewstep
*
* When a ViewStep is listed in the exec section, its jobs are executed instead.
* This function returns that list of jobs; an empty list is ok.
*/
virtual JobList jobs() const = 0;
void setModuleInstanceKey( const Calamares::ModuleSystem::InstanceKey& instanceKey );
Calamares::ModuleSystem::InstanceKey moduleInstanceKey() const { return m_instanceKey; }
virtual void setConfigurationMap( const QVariantMap& configurationMap );
/**
* @brief Can this module proceed, on this machine?
*
* This is called asynchronously at startup, and returns a list of
* the requirements that the module has checked, and their status.
* See Calamares::RequirementEntry for details.
*/
virtual RequirementsList checkRequirements();
/**
* @brief Called when the user cancels the installation
*
* View steps are expected to leave the system unchanged when
* the installation is cancelled. The default implementation
* does nothing.
*/
virtual void onCancel();
signals:
/// @brief Tells the viewmanager to enable the *next* button according to @p status
void nextStatusChanged( bool status );
/* Emitted when the viewstep thinks it needs more space than is currently
* available for display. @p size is the requested space, that is needed
* to display the entire page.
*
* This request may be silently ignored.
*/
void ensureSize( QSize enlarge ) const;
protected:
Calamares::ModuleSystem::InstanceKey m_instanceKey;
};
using ViewStepList = QList< ViewStep* >;
} // namespace Calamares
#endif // VIEWSTEP_H