Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,10 @@ For more information about the upstream Calamares project, visit
https://calamares.euroquis.nl/

# Release notes
## Version 1.2.0
* Fix slideshow image display
* Add bmap support for SEAPATH Debian images
* Use the finishedq module instead the finished module

## Version 1.1.0
Initial release
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
export DESTDIR=/tmp/sysroot-seapath-installer
export BUILDDIR=./build
export CMAKE_ARGS="-DWITH_QT6=OFF"
export VERSION="1.1.0"
export VERSION="1.2.0"
./ci/build.sh
mkdir -p seapath-installer_${VERSION}_all/etc/calamares
mkdir -p seapath-installer_${VERSION}_all/usr/share/calamares/modules
cp settings.conf seapath-installer_${VERSION}_all/etc/calamares
cp partition.conf seapath-installer_${VERSION}_all/usr/share/calamares/modules
cp build/src/modules/finishedq/finishedq.conf seapath-installer_${VERSION}_all/usr/share/calamares/modules
cp -r ./debian/* seapath-installer_${VERSION}_all/
cp -r $DESTDIR/* seapath-installer_${VERSION}_all/
dpkg-deb --build seapath-installer_${VERSION}_all
6 changes: 4 additions & 2 deletions debian/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: seapath-installer
Version: 1.1.0
Version: 1.2.0
Architecture: all
Essential: no
Priority: optional
Expand Down Expand Up @@ -34,6 +34,8 @@ Depends: os-prober,
libyaml-cpp0.7 (>= 0.7.0),
efibootmgr (>=17-2),
qml-module-qtquick2,
qml-module-qtquick-controls
qml-module-qtquick-controls,
qml-module-qtquick-controls2,
qml-module-org-kde-kirigami2
Maintainer: Savoir-faire Linux
Description: A UI installer to install SEAPATH distribution, based on the Calamares installer framework
2 changes: 1 addition & 1 deletion settings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ sequence:
- sshkeyselection
- umount
- show:
- finished
- finishedq

# A branding component is a directory, either in SHARE/calamares/branding or
# in /etc/calamares/branding (the latter takes precedence). The directory must
Expand Down
10 changes: 5 additions & 5 deletions src/branding/seapath/branding.desc
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ navigation: widget
strings:
productName: "LFEnergy SEAPATH"
shortProductName: "SEAPATH"
version: 1.1.0
shortVersion: 1.1.0
versionedName: LFEnergy SEAPATH 1.1.0
shortVersionedName: SEAPATH 1.1.0
version: 1.2.0
shortVersion: 1.2.0
versionedName: LFEnergy SEAPATH 1.2.0
shortVersionedName: SEAPATH 1.2.0
bootloaderEntryName: SEAPATH
productUrl: https://lfenergy.org/projects/seapath/
supportUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/overview
knownIssuesUrl:
releaseNotesUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/pages/248250373/1.1.0
releaseNotesUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/pages/248250373/1.2.0
donateUrl:

# These images are loaded from the branding module directory.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/finishedq/finishedq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
#
# For the **specific** example QML included with this module, only
# *user-unchecked* really makes sense.
restartNowMode: user-unchecked
restartNowMode: always
restartNowCommand: "systemctl -i reboot"
notifyOnFinished: false
110 changes: 0 additions & 110 deletions src/modules/imageselection/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,47 +39,6 @@ Config::Config( QObject* parent )
{
}

void
Config::setRestartNowMode( Config::RestartMode m )
{
// Can only go "down" in state (Always > UserDefaultChecked > .. > Never)
if ( m > m_restartNowMode )
{
return;
}

// If changing to an unconditional mode, also set other flag
if ( m == RestartMode::Always || m == RestartMode::Never )
{
setRestartNowWanted( m == RestartMode::Always );
}

if ( m != m_restartNowMode )
{
m_restartNowMode = m;
emit restartModeChanged( m );
}
}

void
Config::setRestartNowWanted( bool w )
{
// Follow the mode which may affect @p w
if ( m_restartNowMode == RestartMode::Always )
{
w = true;
}
if ( m_restartNowMode == RestartMode::Never )
{
w = false;
}

if ( w != m_userWantsRestart )
{
m_userWantsRestart = w;
emit restartNowWantedChanged( w );
}
}

void
Config::onInstallationFailed( const QString& message, const QString& details )
Expand All @@ -99,24 +58,9 @@ Config::onInstallationFailed( const QString& message, const QString& details )
if ( ( msgChange || detChange ) )
{
emit failureChanged( hasFailed() );
if ( hasFailed() )
{
setRestartNowMode( Config::RestartMode::Never );
}
}
}

void
Config::doRestart( bool restartAnyway )
{
cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user wants restart?" << restartNowWanted()
<< "force restart?" << restartAnyway;
if ( restartNowMode() != RestartMode::Never && restartAnyway )
{
cDebug() << Logger::SubEntry << "Running restart command" << m_restartNowCommand;
QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } );
}
}

void
Config::doNotify( bool hasFailed, bool sendAnyway )
Expand Down Expand Up @@ -174,57 +118,3 @@ Config::doNotify( bool hasFailed, bool sendAnyway )
cWarning() << "Could not get dbus interface for notifications at end of installation." << notify.lastError();
}
}

void
Config::setConfigurationMap( const QVariantMap& configurationMap )
{
RestartMode mode = RestartMode::Never;

//TODO:3.3 remove deprecated restart settings
QString restartMode = Calamares::getString( configurationMap, "restartNowMode" );
if ( restartMode.isEmpty() )
{
if ( configurationMap.contains( "restartNowEnabled" ) )
{
cWarning() << "Configuring the finished module with deprecated restartNowEnabled settings";
}

bool restartNowEnabled = Calamares::getBool( configurationMap, "restartNowEnabled", false );
bool restartNowChecked = Calamares::getBool( configurationMap, "restartNowChecked", false );

if ( !restartNowEnabled )
{
mode = RestartMode::Never;
}
else
{
mode = restartNowChecked ? RestartMode::UserDefaultChecked : RestartMode::UserDefaultUnchecked;
}
}
else
{
bool ok = false;
mode = restartModes().find( restartMode, ok );
if ( !ok )
{
cWarning() << "Configuring the finished module with bad restartNowMode" << restartMode;
}
}

m_restartNowMode = mode;
m_userWantsRestart = ( mode == RestartMode::Always || mode == RestartMode::UserDefaultChecked );
emit restartModeChanged( m_restartNowMode );
emit restartNowWantedChanged( m_userWantsRestart );

if ( mode != RestartMode::Never )
{
QString restartNowCommand = Calamares::getString( configurationMap, "restartNowCommand" );
if ( restartNowCommand.isEmpty() )
{
restartNowCommand = QStringLiteral( "shutdown -r now" );
}
m_restartNowCommand = restartNowCommand;
}

m_notifyOnFinished = Calamares::getBool( configurationMap, "notifyOnFinished", false );
}
38 changes: 0 additions & 38 deletions src/modules/imageselection/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ class Config : public QObject
{
Q_OBJECT

Q_PROPERTY( RestartMode restartNowMode READ restartNowMode WRITE setRestartNowMode NOTIFY restartModeChanged )
Q_PROPERTY( bool restartNowWanted READ restartNowWanted WRITE setRestartNowWanted NOTIFY restartNowWantedChanged )

Q_PROPERTY( QString restartNowCommand READ restartNowCommand CONSTANT FINAL )
Q_PROPERTY( bool notifyOnFinished READ notifyOnFinished CONSTANT FINAL )

Q_PROPERTY( QString failureMessage READ failureMessage NOTIFY failureMessageChanged )
Expand All @@ -40,47 +37,15 @@ class Config : public QObject
};
Q_ENUM( RestartMode )

void setConfigurationMap( const QVariantMap& configurationMap );

public Q_SLOTS:
RestartMode restartNowMode() const { return m_restartNowMode; }
void setRestartNowMode( RestartMode m );

bool restartNowWanted() const
{
if ( restartNowMode() == RestartMode::Never )
{
return false;
}
return ( restartNowMode() == RestartMode::Always ) || m_userWantsRestart;
}
void setRestartNowWanted( bool w );

QString restartNowCommand() const { return m_restartNowCommand; }
bool notifyOnFinished() const { return m_notifyOnFinished; }

QString failureMessage() const { return m_failureMessage; }
QString failureDetails() const { return m_failureDetails; }
/// Failure is if any of the failure messages is non-empty
bool hasFailed() const { return !m_failureMessage.isEmpty() || !m_failureDetails.isEmpty(); }

/** @brief Run the restart command, if desired.
*
* This should generally not be called somewhere during the
* application's execution, but only in response to QApplication::quit()
* or something like that when the user expects the system to restart.
*
* The "if desired" part is: only if the restart mode allows it,
* **and** the user has checked the box (or done whatever to
* turn on restartNowWanted()).
*
* - The one-argument form ignores what the user wants and restarts
* if @p restartAnyway is @c true **unless** the mode is Never
* - The no-argument form uses the user setting
*/
void doRestart( bool restartAnyway );
void doRestart() { doRestart( restartNowWanted() ); }

/** @brief Send DBus notification
*
* At the end of installation (when the FinishedViewStep is activated),
Expand All @@ -106,16 +71,13 @@ public Q_SLOTS:
void onInstallationFailed( const QString& message, const QString& details );

signals:
void restartModeChanged( RestartMode m );
void restartNowWantedChanged( bool w );
void failureMessageChanged( const QString& );
void failureDetailsChanged( const QString& );
void failureChanged( bool );

private:
// Configuration parts
QString m_restartNowCommand;
RestartMode m_restartNowMode = RestartMode::Never;
bool m_userWantsRestart = false;
bool m_notifyOnFinished = false;

Expand Down
13 changes: 0 additions & 13 deletions src/modules/imageselection/ImageSelection.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions src/modules/imageselection/ImageSelectionViewStep.conf

This file was deleted.

8 changes: 0 additions & 8 deletions src/modules/imageselection/ImageSelectionViewStep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ ImageSelectionViewStep::isAtEnd() const
void
ImageSelectionViewStep::onActivate()
{
m_config->doNotify();
connect( qApp, &QApplication::aboutToQuit, m_config, qOverload<>( &Config::doRestart ) );
}

void
Expand Down Expand Up @@ -221,10 +219,4 @@ ImageSelectionViewStep::jobs() const
return Calamares::JobList();
}

void
ImageSelectionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
m_config->setConfigurationMap( configurationMap );
}

CALAMARES_PLUGIN_FACTORY_DEFINITION( ImageSelectionViewStepFactory, registerPlugin< ImageSelectionViewStep >(); )
1 change: 0 additions & 1 deletion src/modules/imageselection/ImageSelectionViewStep.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class PLUGINDLLEXPORT ImageSelectionViewStep : public Calamares::ViewStep

Calamares::JobList jobs() const override;

void setConfigurationMap( const QVariantMap& configurationMap ) override;

private:
Config* m_config;
Expand Down
Loading