REUSE: (GPL-3.0-or-later) C++ modules

main
Adriaan de Groot 5 years ago
parent 863a4cc2a4
commit 30a85668b7

@ -1,5 +1,10 @@
# Calamares modules # Calamares modules
<!-- SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
Calamares modules are plugins that provide features like installer pages, Calamares modules are plugins that provide features like installer pages,
batch jobs, etc. An installer page (visible to the user) is called a "view", batch jobs, etc. An installer page (visible to the user) is called a "view",
while other modules are "jobs". while other modules are "jobs".

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2017-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2017-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -77,7 +78,7 @@ fetch( QString& value, QStringList& selector, int index, const QVariant& v )
} }
const QVariantMap map = v.toMap(); const QVariantMap map = v.toMap();
const QString& key = selector.at( index ); const QString& key = selector.at( index );
if ( index == selector.length() - 1) if ( index == selector.length() - 1 )
{ {
value = map.value( key ).toString(); value = map.value( key ).toString();
return map.contains( key ); return map.contains( key );

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,8 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> (original dummypython code) * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> (original dummypython code)
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,8 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd <arnaud.ferraris@collabora.com> * SPDX-FileCopyrightText: 2019 Collabora Ltd <arnaud.ferraris@collabora.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -100,7 +101,7 @@ FinishedPage::setUpRestart()
cDebug() << "FinishedPage::setUpRestart(), Quit button" cDebug() << "FinishedPage::setUpRestart(), Quit button"
<< "setup=" << FinishedViewStep::modeName( m_mode ) << "command=" << m_restartNowCommand; << "setup=" << FinishedViewStep::modeName( m_mode ) << "command=" << m_restartNowCommand;
connect( qApp, &QApplication::aboutToQuit, [ this ]() { connect( qApp, &QApplication::aboutToQuit, [this]() {
if ( ui->restartCheckBox->isVisible() && ui->restartCheckBox->isChecked() ) if ( ui->restartCheckBox->isVisible() && ui->restartCheckBox->isChecked() )
{ {
cDebug() << "Running restart command" << m_restartNowCommand; cDebug() << "Running restart command" << m_restartNowCommand;

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,8 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot <groot@kde.org>
* Copyright 2019, Collabora Ltd <arnaud.ferraris@collabora.com> * SPDX-FileCopyrightText: 2019 Collabora Ltd <arnaud.ferraris@collabora.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -26,8 +27,8 @@
#include "utils/Units.h" #include "utils/Units.h"
#include "utils/Variant.h" #include "utils/Variant.h"
#include <QProcess>
#include <QDateTime> #include <QDateTime>
#include <QProcess>
#include <QThread> #include <QThread>
#include <kpmcore/backend/corebackend.h> #include <kpmcore/backend/corebackend.h>
@ -46,9 +47,7 @@ ResizeFSJob::ResizeFSJob( QObject* parent )
} }
ResizeFSJob::~ResizeFSJob() ResizeFSJob::~ResizeFSJob() {}
{
}
QString QString
@ -62,7 +61,8 @@ ResizeFSJob::findPartition()
{ {
using DeviceList = QList< Device* >; using DeviceList = QList< Device* >;
#if defined( WITH_KPMCORE4API ) #if defined( WITH_KPMCORE4API )
DeviceList devices = m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag(0) ); DeviceList devices
= m_kpmcore.backend()->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag( 0 ) );
#else #else
DeviceList devices = m_kpmcore.backend()->scanDevices( /* excludeReadOnly */ true ); DeviceList devices = m_kpmcore.backend()->scanDevices( /* excludeReadOnly */ true );
#endif #endif
@ -70,14 +70,17 @@ ResizeFSJob::findPartition()
cDebug() << "ResizeFSJob found" << devices.count() << "devices."; cDebug() << "ResizeFSJob found" << devices.count() << "devices.";
for ( DeviceList::iterator dev_it = devices.begin(); dev_it != devices.end(); ++dev_it ) for ( DeviceList::iterator dev_it = devices.begin(); dev_it != devices.end(); ++dev_it )
{ {
if ( ! ( *dev_it ) ) if ( !( *dev_it ) )
{
continue; continue;
}
cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode(); cDebug() << "ResizeFSJob found" << ( *dev_it )->deviceNode();
for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it ); ++part_it ) for ( auto part_it = PartitionIterator::begin( *dev_it ); part_it != PartitionIterator::end( *dev_it );
++part_it )
{ {
cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode(); cDebug() << Logger::SubEntry << ( *part_it )->mountPoint() << "on" << ( *part_it )->deviceNode();
if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname ) || if ( ( !m_fsname.isEmpty() && ( *part_it )->mountPoint() == m_fsname )
( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) ) || ( !m_devicename.isEmpty() && ( *part_it )->deviceNode() == m_devicename ) )
{ {
cDebug() << Logger::SubEntry << "matched configuration dev=" << m_devicename << "fs=" << m_fsname; cDebug() << Logger::SubEntry << "matched configuration dev=" << m_devicename << "fs=" << m_fsname;
return PartitionMatch( *dev_it, *part_it ); return PartitionMatch( *dev_it, *part_it );
@ -101,11 +104,17 @@ qint64
ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m ) ResizeFSJob::findGrownEnd( ResizeFSJob::PartitionMatch m )
{ {
if ( !m.first || !m.second ) if ( !m.first || !m.second )
{
return -1; // Missing device data return -1; // Missing device data
}
if ( !ResizeOperation::canGrow( m.second ) ) if ( !ResizeOperation::canGrow( m.second ) )
{
return -1; // Operation is doomed return -1; // Operation is doomed
}
if ( !m_size.isValid() ) if ( !m_size.isValid() )
{
return -1; // Must have a grow-size return -1; // Must have a grow-size
}
cDebug() << "Containing device size" << m.first->totalLogical(); cDebug() << "Containing device size" << m.first->totalLogical();
qint64 last_available = m.first->totalLogical() - 1; // Numbered from 0 qint64 last_available = m.first->totalLogical() - 1; // Numbered from 0
@ -170,12 +179,11 @@ ResizeFSJob::exec()
tr( "Invalid configuration" ), tr( "Invalid configuration" ),
tr( "The file-system resize job has an invalid configuration and will not run." ) ); tr( "The file-system resize job has an invalid configuration and will not run." ) );
if ( !m_kpmcore) if ( !m_kpmcore )
{ {
cWarning() << "Could not load KPMCore backend (2)."; cWarning() << "Could not load KPMCore backend (2).";
return Calamares::JobResult::error( return Calamares::JobResult::error( tr( "KPMCore not Available" ),
tr( "KPMCore not Available" ), tr( "Calamares cannot start KPMCore for the file-system resize job." ) );
tr( "Calamares cannot start KPMCore for the file-system resize job." ) );
} }
m_kpmcore.backend()->initFSSupport(); // Might not be enough, see below m_kpmcore.backend()->initFSSupport(); // Might not be enough, see below
@ -184,34 +192,32 @@ ResizeFSJob::exec()
if ( !m.first || !m.second ) if ( !m.first || !m.second )
return Calamares::JobResult::error( return Calamares::JobResult::error(
tr( "Resize Failed" ), tr( "Resize Failed" ),
!m_fsname.isEmpty() ? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname ) !m_fsname.isEmpty()
: tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) ); ? tr( "The filesystem %1 could not be found in this system, and cannot be resized." ).arg( m_fsname )
: tr( "The device %1 could not be found in this system, and cannot be resized." ).arg( m_devicename ) );
m.second->fileSystem().init(); // Initialize support for specific FS m.second->fileSystem().init(); // Initialize support for specific FS
if ( !ResizeOperation::canGrow( m.second ) ) if ( !ResizeOperation::canGrow( m.second ) )
{ {
cDebug() << "canGrow() returned false."; cDebug() << "canGrow() returned false.";
return Calamares::JobResult::error( return Calamares::JobResult::error( tr( "Resize Failed" ),
tr( "Resize Failed" ), !m_fsname.isEmpty()
!m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); : tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
} }
qint64 new_end = findGrownEnd( m ); qint64 new_end = findGrownEnd( m );
cDebug() << "Resize from" cDebug() << "Resize from" << m.second->firstSector() << '-' << m.second->lastSector() << '(' << m.second->length()
<< m.second->firstSector() << '-' << m.second->lastSector() << ')' << "to -" << new_end;
<< '(' << m.second->length() << ')'
<< "to -" << new_end;
if ( new_end < 0 ) if ( new_end < 0 )
return Calamares::JobResult::error( return Calamares::JobResult::error( tr( "Resize Failed" ),
tr( "Resize Failed" ), !m_fsname.isEmpty()
!m_fsname.isEmpty() ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname ) ? tr( "The filesystem %1 cannot be resized." ).arg( m_fsname )
: tr( "The device %1 cannot be resized." ).arg( m_devicename ) ); : tr( "The device %1 cannot be resized." ).arg( m_devicename ) );
if ( new_end == 0 ) if ( new_end == 0 )
{ {
cWarning() << "Resize operation on" << m_fsname << m_devicename cWarning() << "Resize operation on" << m_fsname << m_devicename << "skipped as not-useful.";
<< "skipped as not-useful.";
if ( m_required ) if ( m_required )
return Calamares::JobResult::error( return Calamares::JobResult::error(
tr( "Resize Failed" ), tr( "Resize Failed" ),
@ -226,13 +232,13 @@ ResizeFSJob::exec()
ResizeOperation op( *m.first, *m.second, m.second->firstSector(), new_end ); ResizeOperation op( *m.first, *m.second, m.second->firstSector(), new_end );
Report op_report( nullptr ); Report op_report( nullptr );
if ( op.execute( op_report ) ) if ( op.execute( op_report ) )
{
cDebug() << "Resize operation OK."; cDebug() << "Resize operation OK.";
}
else else
{ {
cDebug() << "Resize failed." << op_report.output(); cDebug() << "Resize failed." << op_report.output();
return Calamares::JobResult::error( return Calamares::JobResult::error( tr( "Resize Failed" ), op_report.toText() );
tr( "Resize Failed" ),
op_report.toText() );
} }
} }
@ -243,8 +249,8 @@ ResizeFSJob::exec()
void void
ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap ) ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap )
{ {
m_fsname = configurationMap["fs"].toString(); m_fsname = configurationMap[ "fs" ].toString();
m_devicename = configurationMap["dev"].toString(); m_devicename = configurationMap[ "dev" ].toString();
if ( m_fsname.isEmpty() && m_devicename.isEmpty() ) if ( m_fsname.isEmpty() && m_devicename.isEmpty() )
{ {
@ -252,10 +258,10 @@ ResizeFSJob::setConfigurationMap( const QVariantMap& configurationMap )
return; return;
} }
m_size = PartitionSize( configurationMap["size"].toString() ); m_size = PartitionSize( configurationMap[ "size" ].toString() );
m_atleast = PartitionSize( configurationMap["atleast"].toString() ); m_atleast = PartitionSize( configurationMap[ "atleast" ].toString() );
m_required = CalamaresUtils::getBool( configurationMap, "required", false ); m_required = CalamaresUtils::getBool( configurationMap, "required", false );
} }
CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin<ResizeFSJob>(); ) CALAMARES_PLUGIN_FACTORY_DEFINITION( ResizeFSJobFactory, registerPlugin< ResizeFSJob >(); )

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -51,26 +52,13 @@ public:
void setConfigurationMap( const QVariantMap& configurationMap ) override; void setConfigurationMap( const QVariantMap& configurationMap ) override;
/** @brief Is the configuration of this job valid? */ /** @brief Is the configuration of this job valid? */
bool isValid() const bool isValid() const { return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) && m_size.isValid(); }
{
return ( !m_fsname.isEmpty() || !m_devicename.isEmpty() ) && QString name() const { return m_fsname.isEmpty() ? m_devicename : m_fsname; }
m_size.isValid();
} PartitionSize size() const { return m_size; }
QString name() const PartitionSize minimumSize() const { return m_atleast; }
{
return m_fsname.isEmpty() ? m_devicename : m_fsname;
}
PartitionSize size() const
{
return m_size;
}
PartitionSize minimumSize() const
{
return m_atleast;
}
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; CalamaresUtils::Partition::KPMManager m_kpmcore;
@ -80,7 +68,7 @@ private:
QString m_devicename; QString m_devicename;
bool m_required; bool m_required;
using PartitionMatch = QPair<Device*, Partition*>; using PartitionMatch = QPair< Device*, Partition* >;
/** @brief Find the configured FS */ /** @brief Find the configured FS */
PartitionMatch findPartition(); PartitionMatch findPartition();
@ -90,4 +78,4 @@ private:
CALAMARES_PLUGIN_FACTORY_DECLARATION( ResizeFSJobFactory ) CALAMARES_PLUGIN_FACTORY_DECLARATION( ResizeFSJobFactory )
#endif // RESIZEFSJOB_H #endif // RESIZEFSJOB_H

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -36,20 +37,17 @@ using SizeUnit = CalamaresUtils::Partition::SizeUnit;
QTEST_GUILESS_MAIN( FSResizerTests ) QTEST_GUILESS_MAIN( FSResizerTests )
FSResizerTests::FSResizerTests() FSResizerTests::FSResizerTests() {}
{
}
FSResizerTests::~FSResizerTests() FSResizerTests::~FSResizerTests() {}
{
}
void void
FSResizerTests::initTestCase() FSResizerTests::initTestCase()
{ {
} }
void FSResizerTests::testConfigurationRobust() void
FSResizerTests::testConfigurationRobust()
{ {
ResizeFSJob j; ResizeFSJob j;
@ -72,7 +70,8 @@ atleast: 600MiB
QCOMPARE( j.minimumSize().value(), 0 ); QCOMPARE( j.minimumSize().value(), 0 );
} }
void FSResizerTests::testConfigurationValues() void
FSResizerTests::testConfigurationValues()
{ {
ResizeFSJob j; ResizeFSJob j;
@ -84,7 +83,7 @@ atleast: 600MiB
)" ); )" );
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
QVERIFY( !j.name().isEmpty() ); QVERIFY( !j.name().isEmpty() );
QCOMPARE( j.name(), QString("/") ); QCOMPARE( j.name(), QString( "/" ) );
QCOMPARE( j.size().unit(), SizeUnit::Percent ); QCOMPARE( j.size().unit(), SizeUnit::Percent );
QCOMPARE( j.minimumSize().unit(), SizeUnit::MiB ); QCOMPARE( j.minimumSize().unit(), SizeUnit::MiB );
QCOMPARE( j.size().value(), 100 ); QCOMPARE( j.size().value(), 100 );
@ -99,7 +98,7 @@ atleast: 127 %
)" ); )" );
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
QVERIFY( !j.name().isEmpty() ); QVERIFY( !j.name().isEmpty() );
QCOMPARE( j.name(), QString("/") ); QCOMPARE( j.name(), QString( "/" ) );
QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.size().unit(), SizeUnit::MiB );
QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
QCOMPARE( j.size().value(), 72 ); QCOMPARE( j.size().value(), 72 );
@ -113,7 +112,7 @@ atleast: 127 %
)" ); )" );
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
QVERIFY( !j.name().isEmpty() ); QVERIFY( !j.name().isEmpty() );
QCOMPARE( j.name(), QString("/dev/m00") ); QCOMPARE( j.name(), QString( "/dev/m00" ) );
QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.size().unit(), SizeUnit::MiB );
QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
QCOMPARE( j.size().value(), 72 ); QCOMPARE( j.size().value(), 72 );
@ -128,7 +127,7 @@ size: 71MiB
)" ); )" );
j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) ); j.setConfigurationMap( CalamaresUtils::yamlMapToVariant( doc0 ) );
QVERIFY( !j.name().isEmpty() ); QVERIFY( !j.name().isEmpty() );
QCOMPARE( j.name(), QString("/") ); QCOMPARE( j.name(), QString( "/" ) );
QCOMPARE( j.size().unit(), SizeUnit::MiB ); QCOMPARE( j.size().unit(), SizeUnit::MiB );
QCOMPARE( j.minimumSize().unit(), SizeUnit::None ); QCOMPARE( j.minimumSize().unit(), SizeUnit::None );
QCOMPARE( j.size().value(), 71 ); QCOMPARE( j.size().value(), 71 );

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -123,7 +124,7 @@ hostCPUmatchARM( const QString& s )
* silicon. For instance, a list from lscpu-arm.c (Linux kernel) * silicon. For instance, a list from lscpu-arm.c (Linux kernel)
* shows this: * shows this:
* *
static const struct hw_impl hw_implementer[] = { static const struct hw_impl hw_implementer[] = {
{ 0x41, arm_part, "ARM" }, { 0x41, arm_part, "ARM" },
{ 0x42, brcm_part, "Broadcom" }, { 0x42, brcm_part, "Broadcom" },
{ 0x43, cavium_part, "Cavium" }, { 0x43, cavium_part, "Cavium" },
@ -137,7 +138,7 @@ static const struct hw_impl hw_implementer[] = {
{ 0x66, faraday_part, "Faraday" }, { 0x66, faraday_part, "Faraday" },
{ 0x69, intel_part, "Intel" }, { 0x69, intel_part, "Intel" },
{ -1, unknown_part, "unknown" }, { -1, unknown_part, "unknown" },
}; };
* *
* Since the specific implementor isn't interesting, just * Since the specific implementor isn't interesting, just
* map everything to "ARM". * map everything to "ARM".

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -63,8 +64,8 @@ HostInfoTests::testHostOS()
// This is a lousy test, too: the implementation reads /proc/cpuinfo // This is a lousy test, too: the implementation reads /proc/cpuinfo
// and that's the only way we could use, too, to find what the "right" // and that's the only way we could use, too, to find what the "right"
// answer is. // answer is.
QStringList x86cpunames{ QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) }; QStringList x86cpunames { QStringLiteral( "Intel" ), QStringLiteral( "AMD" ) };
QStringList armcpunames{ QStringLiteral( "ARM" ) }; QStringList armcpunames { QStringLiteral( "ARM" ) };
const QString cpu = hostCPU(); const QString cpu = hostCPU();
QVERIFY( x86cpunames.contains( cpu ) || armcpunames.contains( cpu ) ); QVERIFY( x86cpunames.contains( cpu ) || armcpunames.contains( cpu ) );
@ -83,7 +84,7 @@ HostInfoTests::testHostOS()
} }
else else
{ {
QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg(cpumodalias) ); QCOMPARE( cpu, QString( "Unknown CPU modalias '%1'" ).arg( cpumodalias ) );
} }
} }
} }

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -88,8 +89,11 @@ InitcpioJob::setConfigurationMap( const QVariantMap& configurationMap )
} }
else if ( m_kernel == "$uname" ) else if ( m_kernel == "$uname" )
{ {
auto r = CalamaresUtils::System::runCommand( auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost,
CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) ); { "/bin/uname", "-r" },
QString(),
QString(),
std::chrono::seconds( 3 ) );
if ( r.getExitCode() == 0 ) if ( r.getExitCode() == 0 )
{ {
m_kernel = r.getOutput(); m_kernel = r.getOutput();

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -34,20 +35,17 @@ extern void fixPermissions( const QDir& d );
QTEST_GUILESS_MAIN( InitcpioTests ) QTEST_GUILESS_MAIN( InitcpioTests )
InitcpioTests::InitcpioTests() InitcpioTests::InitcpioTests() {}
{
}
InitcpioTests::~InitcpioTests() InitcpioTests::~InitcpioTests() {}
{
}
void void
InitcpioTests::initTestCase() InitcpioTests::initTestCase()
{ {
} }
void InitcpioTests::testFixPermissions() void
InitcpioTests::testFixPermissions()
{ {
Logger::setupLogLevel( Logger::LOGDEBUG ); Logger::setupLogLevel( Logger::LOGDEBUG );
cDebug() << "Fixing up /boot"; cDebug() << "Fixing up /boot";
@ -56,4 +54,3 @@ void InitcpioTests::testFixPermissions()
fixPermissions( QDir( "/nonexistent/nonexistent" ) ); fixPermissions( QDir( "/nonexistent/nonexistent" ) );
QVERIFY( true ); QVERIFY( true );
} }

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -78,8 +79,11 @@ InitramfsJob::setConfigurationMap( const QVariantMap& configurationMap )
} }
else if ( m_kernel == "$uname" ) else if ( m_kernel == "$uname" )
{ {
auto r = CalamaresUtils::System::runCommand( auto r = CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost,
CalamaresUtils::System::RunLocation::RunInHost, { "/bin/uname", "-r" }, QString(), QString(), std::chrono::seconds( 3 ) ); { "/bin/uname", "-r" },
QString(),
QString(),
std::chrono::seconds( 3 ) );
if ( r.getExitCode() == 0 ) if ( r.getExitCode() == 0 )
{ {
m_kernel = r.getOutput(); m_kernel = r.getOutput();

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -33,32 +34,30 @@
QTEST_GUILESS_MAIN( InitramfsTests ) QTEST_GUILESS_MAIN( InitramfsTests )
InitramfsTests::InitramfsTests() InitramfsTests::InitramfsTests() {}
{
}
InitramfsTests::~InitramfsTests() InitramfsTests::~InitramfsTests() {}
{
}
void void
InitramfsTests::initTestCase() InitramfsTests::initTestCase()
{ {
Logger::setupLogLevel( Logger::LOGDEBUG ); Logger::setupLogLevel( Logger::LOGDEBUG );
(void) new Calamares::JobQueue(); (void)new Calamares::JobQueue();
(void) new CalamaresUtils::System( true ); (void)new CalamaresUtils::System( true );
} }
static const char contents[] = "UMASK=0077\n"; static const char contents[] = "UMASK=0077\n";
static const char confFile[] = "/tmp/calamares-safe-umask"; static const char confFile[] = "/tmp/calamares-safe-umask";
void InitramfsTests::cleanup() void
InitramfsTests::cleanup()
{ {
QFile::remove( confFile ); QFile::remove( confFile );
} }
void InitramfsTests::testCreateTargetFile() void
InitramfsTests::testCreateTargetFile()
{ {
static const char short_confFile[] = "/calamares-safe-umask"; static const char short_confFile[] = "/calamares-safe-umask";
@ -79,8 +78,7 @@ void InitramfsTests::testCreateTargetFile()
QFileInfo fi( path ); QFileInfo fi( path );
QVERIFY( fi.exists() ); QVERIFY( fi.exists() );
QCOMPARE( ulong( fi.size() ), sizeof( contents )-1 ); // don't count trailing NUL QCOMPARE( ulong( fi.size() ), sizeof( contents ) - 1 ); // don't count trailing NUL
QFile::remove( path ); QFile::remove( path );
} }

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
#
# SPDX-FileCopyrightText: 2016 David McKinney <mckinney@subgraph.com>
# SPDX-License-Identifier: GPL-3.0-or-later
PREREQ="" PREREQ=""

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
#
# SPDX-FileCopyrightText: 2016 David McKinney <mckinney@subgraph.com>
# SPDX-License-Identifier: GPL-3.0-or-later
PREREQ="" PREREQ=""

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -18,14 +19,14 @@
#include "InteractiveTerminalPage.h" #include "InteractiveTerminalPage.h"
#include "viewpages/ViewStep.h"
#include "utils/Retranslator.h"
#include "utils/CalamaresUtilsGui.h" #include "utils/CalamaresUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/Retranslator.h"
#include "viewpages/ViewStep.h"
#include <KService>
#include <KParts/kde_terminal_interface.h>
#include <KParts/ReadOnlyPart> #include <KParts/ReadOnlyPart>
#include <KParts/kde_terminal_interface.h>
#include <KService>
#include <QApplication> #include <QApplication>
#include <QDir> #include <QDir>
@ -49,17 +50,17 @@ InteractiveTerminalPage::InteractiveTerminalPage( QWidget* parent )
void void
InteractiveTerminalPage::errorKonsoleNotInstalled() InteractiveTerminalPage::errorKonsoleNotInstalled()
{ {
QMessageBox::critical( this, QMessageBox::critical(
tr( "Konsole not installed"), this, tr( "Konsole not installed" ), tr( "Please install KDE Konsole and try again!" ), QMessageBox::Ok );
tr( "Please install KDE Konsole and try again!" ),
QMessageBox::Ok );
} }
void void
InteractiveTerminalPage::onActivate() InteractiveTerminalPage::onActivate()
{ {
if ( m_termHostWidget ) if ( m_termHostWidget )
{
return; return;
}
// For whatever reason, instead of simply linking against a library we // For whatever reason, instead of simply linking against a library we
// need to do a runtime query to KService just to get a sodding terminal // need to do a runtime query to KService just to get a sodding terminal
// widget. // widget.
@ -69,14 +70,11 @@ InteractiveTerminalPage::onActivate()
// And all of this hoping the Konsole application is installed. If not, // And all of this hoping the Konsole application is installed. If not,
// tough cookies. // tough cookies.
errorKonsoleNotInstalled(); errorKonsoleNotInstalled();
return ; return;
} }
// Create one instance of konsolepart. // Create one instance of konsolepart.
KParts::ReadOnlyPart* p = KParts::ReadOnlyPart* p = service->createInstance< KParts::ReadOnlyPart >( this, this, {} );
service->createInstance< KParts::ReadOnlyPart >( this,
this,
{} );
if ( !p ) if ( !p )
{ {
// One more opportunity for the loading operation to fail. // One more opportunity for the loading operation to fail.
@ -100,8 +98,7 @@ InteractiveTerminalPage::onActivate()
m_termHostWidget = p->widget(); m_termHostWidget = p->widget();
m_layout->addWidget( m_termHostWidget ); m_layout->addWidget( m_termHostWidget );
cDebug() << "Part widget ought to be" cDebug() << "Part widget ought to be" << m_termHostWidget->metaObject()->className();
<< m_termHostWidget->metaObject()->className();
t->showShellInDir( QDir::home().path() ); t->showShellInDir( QDir::home().path() );
t->sendInput( QString( "%1\n" ).arg( m_command ) ); t->sendInput( QString( "%1\n" ).arg( m_command ) );
@ -112,8 +109,5 @@ void
InteractiveTerminalPage::setCommand( const QString& command ) InteractiveTerminalPage::setCommand( const QString& command )
{ {
m_command = command; m_command = command;
CALAMARES_RETRANSLATE( CALAMARES_RETRANSLATE( m_headerLabel->setText( tr( "Executing script: &nbsp;<code>%1</code>" ).arg( m_command ) ); )
m_headerLabel->setText( tr( "Executing script: &nbsp;<code>%1</code>" )
.arg( m_command ) );
)
} }

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -43,4 +44,4 @@ private:
void errorKonsoleNotInstalled(); void errorKonsoleNotInstalled();
}; };
#endif // INTERACTIVETERMINALPAGE_H #endif // INTERACTIVETERMINALPAGE_H

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -24,7 +25,8 @@
#include <QVariant> #include <QVariant>
CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory, registerPlugin<InteractiveTerminalViewStep>(); ) CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory,
registerPlugin< InteractiveTerminalViewStep >(); )
InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent ) InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent )
: Calamares::ViewStep( parent ) : Calamares::ViewStep( parent )
@ -37,7 +39,9 @@ InteractiveTerminalViewStep::InteractiveTerminalViewStep( QObject* parent )
InteractiveTerminalViewStep::~InteractiveTerminalViewStep() InteractiveTerminalViewStep::~InteractiveTerminalViewStep()
{ {
if ( m_widget && m_widget->parent() == nullptr ) if ( m_widget && m_widget->parent() == nullptr )
{
m_widget->deleteLater(); m_widget->deleteLater();
}
} }
@ -102,8 +106,8 @@ InteractiveTerminalViewStep::onActivate()
void void
InteractiveTerminalViewStep::setConfigurationMap( const QVariantMap& configurationMap ) InteractiveTerminalViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{ {
if ( configurationMap.contains( "command" ) && if ( configurationMap.contains( "command" ) && configurationMap.value( "command" ).type() == QVariant::String )
configurationMap.value( "command").type() == QVariant::String ) {
m_widget->setCommand( configurationMap.value( "command" ).toString() ); m_widget->setCommand( configurationMap.value( "command" ).toString() );
}
} }

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -60,4 +61,4 @@ private:
CALAMARES_PLUGIN_FACTORY_DECLARATION( InteractiveTerminalViewStepFactory ) CALAMARES_PLUGIN_FACTORY_DECLARATION( InteractiveTerminalViewStepFactory )
#endif // INTERACTIVETERMINALPAGEPLUGIN_H #endif // INTERACTIVETERMINALPAGEPLUGIN_H

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* Copyright 2020, Camilo Higuita <milo.h@aol.com> * * SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com> *
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* Copyright 2020, Camilo Higuita <milo.h@aol.com> * SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017-2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Portions from the Manjaro Installation Framework * Portions from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Portions from the Manjaro Installation Framework * Portions from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,5 +0,0 @@
Keyboard layout configuration viewmodule
---
Requires ckbcomp script.
* Debian package console-setup or
* Manjaro package keyboardctl https://github.com/manjaro/packages-core/tree/master/keyboardctl

@ -1,7 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2011 Lennart Poettering
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: Kay Sievers
* SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Portions from systemd (localed.c): * Portions from systemd (localed.c):
* Copyright 2011 Lennart Poettering * Copyright 2011 Lennart Poettering

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
SPDX-License-Identifier: GPL-3.0-or-later

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2015 Systemd authors and contributors
# SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copied from systemd-localed # Copied from systemd-localed
# #
# https://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map # https://cgit.freedesktop.org/systemd/systemd/log/src/locale/kbd-model-map

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Originally from the Manjaro Installation Framework * Originally from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>
@ -43,18 +45,22 @@ static const char XKB_FILE[] = "/usr/share/X11/xkb/rules/base.lst";
* or hits end-of-file. Returns true if the section is found. The * or hits end-of-file. Returns true if the section is found. The
* @p name must include the "! " section marker as well. * @p name must include the "! " section marker as well.
*/ */
static bool findSection( QFile& fh, const char* name ) static bool
findSection( QFile& fh, const char* name )
{ {
while ( !fh.atEnd() ) while ( !fh.atEnd() )
{ {
QByteArray line = fh.readLine(); QByteArray line = fh.readLine();
if ( line.startsWith( name ) ) if ( line.startsWith( name ) )
{
return true; return true;
}
} }
return false; return false;
} }
static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath ) static KeyboardGlobal::ModelsMap
parseKeyboardModels( const char* filepath )
{ {
KeyboardGlobal::ModelsMap models; KeyboardGlobal::ModelsMap models;
@ -75,7 +81,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
// check if we start a new section // check if we start a new section
if ( line.startsWith( '!' ) ) if ( line.startsWith( '!' ) )
{
break; break;
}
// here we are in the model section, otherwhise we would continue or break // here we are in the model section, otherwhise we would continue or break
QRegExp rx; QRegExp rx;
@ -88,7 +96,9 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
QString model = rx.cap( 1 ); QString model = rx.cap( 1 );
if ( model == "pc105" ) if ( model == "pc105" )
{
modelDesc += " - " + QObject::tr( "Default Keyboard Model" ); modelDesc += " - " + QObject::tr( "Default Keyboard Model" );
}
models.insert( modelDesc, model ); models.insert( modelDesc, model );
} }
@ -98,7 +108,8 @@ static KeyboardGlobal::ModelsMap parseKeyboardModels( const char* filepath )
} }
KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath ) KeyboardGlobal::LayoutsMap
parseKeyboardLayouts( const char* filepath )
{ {
KeyboardGlobal::LayoutsMap layouts; KeyboardGlobal::LayoutsMap layouts;
@ -120,7 +131,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
QByteArray line = fh.readLine(); QByteArray line = fh.readLine();
if ( line.startsWith( '!' ) ) if ( line.startsWith( '!' ) )
{
break; break;
}
QRegExp rx; QRegExp rx;
rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" ); rx.setPattern( "^\\s+(\\S+)\\s+(\\w.*)\n$" );
@ -147,7 +160,9 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
QByteArray line = fh.readLine(); QByteArray line = fh.readLine();
if ( line.startsWith( '!' ) ) if ( line.startsWith( '!' ) )
{
break; break;
}
QRegExp rx; QRegExp rx;
rx.setPattern( "^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$" ); rx.setPattern( "^\\s+(\\S+)\\s+(\\S+): (\\w.*)\n$" );
@ -176,14 +191,15 @@ KeyboardGlobal::LayoutsMap parseKeyboardLayouts( const char* filepath )
} }
KeyboardGlobal::LayoutsMap KeyboardGlobal::getKeyboardLayouts() KeyboardGlobal::LayoutsMap
KeyboardGlobal::getKeyboardLayouts()
{ {
return parseKeyboardLayouts( XKB_FILE ); return parseKeyboardLayouts( XKB_FILE );
} }
KeyboardGlobal::ModelsMap KeyboardGlobal::getKeyboardModels() KeyboardGlobal::ModelsMap
KeyboardGlobal::getKeyboardModels()
{ {
return parseKeyboardModels( XKB_FILE ); return parseKeyboardModels( XKB_FILE );
} }

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2017, 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 2019, Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Originally from the Manjaro Installation Framework * Originally from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>
@ -24,21 +26,22 @@
#ifndef KEYBOARDGLOBAL_H #ifndef KEYBOARDGLOBAL_H
#define KEYBOARDGLOBAL_H #define KEYBOARDGLOBAL_H
#include <QString> #include <QDebug>
#include <QFile>
#include <QTextStream>
#include <QDir> #include <QDir>
#include <QStringList> #include <QFile>
#include <QList>
#include <QHash> #include <QHash>
#include <QList>
#include <QMap> #include <QMap>
#include <QRegExp> #include <QRegExp>
#include <QDebug> #include <QString>
#include <QStringList>
#include <QTextStream>
class KeyboardGlobal class KeyboardGlobal
{ {
public: public:
struct KeyboardInfo { struct KeyboardInfo
{
QString description; QString description;
QMap< QString, QString > variants; QMap< QString, QString > variants;
}; };
@ -50,4 +53,4 @@ public:
static ModelsMap getKeyboardModels(); static ModelsMap getKeyboardModels();
}; };
#endif // KEYBOARDGLOBAL_H #endif // KEYBOARDGLOBAL_H

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Portions from the Manjaro Installation Framework * Portions from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>
@ -33,96 +35,126 @@ KeyBoardPreview::KeyBoardPreview( QWidget* parent )
, usable_width( 0 ) , usable_width( 0 )
, key_w( 0 ) , key_w( 0 )
{ {
setMinimumSize(700, 191); setMinimumSize( 700, 191 );
// We must set up the font size in pixels to fit the keys // We must set up the font size in pixels to fit the keys
lowerFont = QFont("Helvetica", 10, QFont::DemiBold); lowerFont = QFont( "Helvetica", 10, QFont::DemiBold );
lowerFont.setPixelSize(16); lowerFont.setPixelSize( 16 );
upperFont = QFont("Helvetica", 8); upperFont = QFont( "Helvetica", 8 );
upperFont.setPixelSize(13); upperFont.setPixelSize( 13 );
// Setup keyboard types // Setup keyboard types
kbList[KB_104].kb_extended_return = false; kbList[ KB_104 ].kb_extended_return = false;
kbList[KB_104].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd); kbList[ KB_104 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
kbList[KB_104].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b << 0x2b); << 0xb << 0xc << 0xd );
kbList[KB_104].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28); kbList[ KB_104 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
kbList[KB_104].keys.append(QList<int>() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35); << 0x19 << 0x1a << 0x1b << 0x2b );
kbList[ KB_104 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
kbList[KB_105].kb_extended_return = true; << 0x27 << 0x28 );
kbList[KB_105].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd); kbList[ KB_104 ].keys.append( QList< int >()
kbList[KB_105].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b); << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 );
kbList[KB_105].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x2b);
kbList[KB_105].keys.append(QList<int>() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35); kbList[ KB_105 ].kb_extended_return = true;
kbList[ KB_105 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
kbList[KB_106].kb_extended_return = true; << 0xb << 0xc << 0xd );
kbList[KB_106].keys.append(QList<int>() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa << 0xb << 0xc << 0xd << 0xe); kbList[ KB_105 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
kbList[KB_106].keys.append(QList<int>() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18 << 0x19 << 0x1a << 0x1b); << 0x19 << 0x1a << 0x1b );
kbList[KB_106].keys.append(QList<int>() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26 << 0x27 << 0x28 << 0x29); kbList[ KB_105 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
kbList[KB_106].keys.append(QList<int>() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34 << 0x35 << 0x36); << 0x27 << 0x28 << 0x2b );
kbList[ KB_105 ].keys.append( QList< int >() << 0x54 << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33
kb = &kbList[KB_104]; << 0x34 << 0x35 );
kbList[ KB_106 ].kb_extended_return = true;
kbList[ KB_106 ].keys.append( QList< int >() << 0x29 << 0x2 << 0x3 << 0x4 << 0x5 << 0x6 << 0x7 << 0x8 << 0x9 << 0xa
<< 0xb << 0xc << 0xd << 0xe );
kbList[ KB_106 ].keys.append( QList< int >() << 0x10 << 0x11 << 0x12 << 0x13 << 0x14 << 0x15 << 0x16 << 0x17 << 0x18
<< 0x19 << 0x1a << 0x1b );
kbList[ KB_106 ].keys.append( QList< int >() << 0x1e << 0x1f << 0x20 << 0x21 << 0x22 << 0x23 << 0x24 << 0x25 << 0x26
<< 0x27 << 0x28 << 0x29 );
kbList[ KB_106 ].keys.append( QList< int >() << 0x2c << 0x2d << 0x2e << 0x2f << 0x30 << 0x31 << 0x32 << 0x33 << 0x34
<< 0x35 << 0x36 );
kb = &kbList[ KB_104 ];
} }
void
void KeyBoardPreview::setLayout(QString _layout) { KeyBoardPreview::setLayout( QString _layout )
{
layout = _layout; layout = _layout;
} }
void
void KeyBoardPreview::setVariant(QString _variant) { KeyBoardPreview::setVariant( QString _variant )
{
variant = _variant; variant = _variant;
if (!loadCodes()) if ( !loadCodes() )
{
return; return;
}
loadInfo(); loadInfo();
repaint(); repaint();
} }
//### //###
//### Private //### Private
//### //###
void
void KeyBoardPreview::loadInfo() { KeyBoardPreview::loadInfo()
{
// kb_104 // kb_104
if (layout == "us" || layout == "th") if ( layout == "us" || layout == "th" )
kb = &kbList[KB_104]; {
kb = &kbList[ KB_104 ];
}
// kb_106 // kb_106
else if (layout == "jp") else if ( layout == "jp" )
kb = &kbList[KB_106]; {
kb = &kbList[ KB_106 ];
}
// most keyboards are 105 key so default to that // most keyboards are 105 key so default to that
else else
kb = &kbList[KB_105]; {
kb = &kbList[ KB_105 ];
}
} }
bool
bool KeyBoardPreview::loadCodes() { KeyBoardPreview::loadCodes()
if (layout.isEmpty()) {
if ( layout.isEmpty() )
{
return false; return false;
}
QStringList param; QStringList param;
param << "-model" << "pc106" << "-layout" << layout << "-compact"; param << "-model"
if (!variant.isEmpty()) << "pc106"
<< "-layout" << layout << "-compact";
if ( !variant.isEmpty() )
{
param << "-variant" << variant; param << "-variant" << variant;
}
QProcess process; QProcess process;
process.setEnvironment(QStringList() << "LANG=C" << "LC_MESSAGES=C"); process.setEnvironment( QStringList() << "LANG=C"
process.start("ckbcomp", param); << "LC_MESSAGES=C" );
if (!process.waitForStarted()) process.start( "ckbcomp", param );
if ( !process.waitForStarted() )
{ {
cWarning() << "ckbcomp not found , keyboard preview disabled"; cWarning() << "ckbcomp not found , keyboard preview disabled";
return false; return false;
} }
if (!process.waitForFinished()) if ( !process.waitForFinished() )
{ {
cWarning() << "ckbcomp failed, keyboard preview disabled"; cWarning() << "ckbcomp failed, keyboard preview disabled";
return false; return false;
@ -131,209 +163,247 @@ bool KeyBoardPreview::loadCodes() {
// Clear codes // Clear codes
codes.clear(); codes.clear();
const QStringList list = QString(process.readAll()).split("\n", SplitSkipEmptyParts); const QStringList list = QString( process.readAll() ).split( "\n", SplitSkipEmptyParts );
for (const QString &line : list) { for ( const QString& line : list )
if (!line.startsWith("keycode") || !line.contains('=')) {
if ( !line.startsWith( "keycode" ) || !line.contains( '=' ) )
{
continue; continue;
}
QStringList split = line.split('=').at(1).trimmed().split(' '); QStringList split = line.split( '=' ).at( 1 ).trimmed().split( ' ' );
if (split.size() < 4) if ( split.size() < 4 )
{
continue; continue;
}
Code code; Code code;
code.plain = fromUnicodeString(split.at(0)); code.plain = fromUnicodeString( split.at( 0 ) );
code.shift = fromUnicodeString(split.at(1)); code.shift = fromUnicodeString( split.at( 1 ) );
code.ctrl = fromUnicodeString(split.at(2)); code.ctrl = fromUnicodeString( split.at( 2 ) );
code.alt = fromUnicodeString(split.at(3)); code.alt = fromUnicodeString( split.at( 3 ) );
if (code.ctrl == code.plain) if ( code.ctrl == code.plain )
{
code.ctrl = ""; code.ctrl = "";
}
if (code.alt == code.plain) if ( code.alt == code.plain )
{
code.alt = ""; code.alt = "";
}
codes.append(code); codes.append( code );
} }
return true; return true;
} }
QString
QString KeyBoardPreview::fromUnicodeString(QString raw) { KeyBoardPreview::fromUnicodeString( QString raw )
if (raw.startsWith("U+")) {
return QChar(raw.mid(2).toInt(nullptr, 16)); if ( raw.startsWith( "U+" ) )
else if (raw.startsWith("+U")) {
return QChar(raw.mid(3).toInt(nullptr, 16)); return QChar( raw.mid( 2 ).toInt( nullptr, 16 ) );
}
else if ( raw.startsWith( "+U" ) )
{
return QChar( raw.mid( 3 ).toInt( nullptr, 16 ) );
}
return ""; return "";
} }
QString
QString KeyBoardPreview::regular_text(int index) { KeyBoardPreview::regular_text( int index )
if (index < 0 || index >= codes.size()) {
if ( index < 0 || index >= codes.size() )
{
return ""; return "";
}
return codes.at(index - 1).plain; return codes.at( index - 1 ).plain;
} }
QString
QString KeyBoardPreview::shift_text(int index) { KeyBoardPreview::shift_text( int index )
if (index < 0 || index >= codes.size()) {
if ( index < 0 || index >= codes.size() )
{
return ""; return "";
}
return codes.at(index - 1).shift; return codes.at( index - 1 ).shift;
} }
QString
QString KeyBoardPreview::ctrl_text(int index) { KeyBoardPreview::ctrl_text( int index )
if (index < 0 || index >= codes.size()) {
if ( index < 0 || index >= codes.size() )
{
return ""; return "";
}
return codes.at(index - 1).ctrl; return codes.at( index - 1 ).ctrl;
} }
QString
QString KeyBoardPreview::alt_text(int index) { KeyBoardPreview::alt_text( int index )
if (index < 0 || index >= codes.size()) {
if ( index < 0 || index >= codes.size() )
{
return ""; return "";
}
return codes.at(index - 1).alt; return codes.at( index - 1 ).alt;
} }
void
void KeyBoardPreview::resizeEvent(QResizeEvent *) { KeyBoardPreview::resizeEvent( QResizeEvent* )
{
space = 6; space = 6;
usable_width = width()-7; usable_width = width() - 7;
key_w = (usable_width - 14 * space)/15; key_w = ( usable_width - 14 * space ) / 15;
setMaximumHeight(key_w*4 + space*5 + 1); setMaximumHeight( key_w * 4 + space * 5 + 1 );
} }
void
KeyBoardPreview::paintEvent( QPaintEvent* event )
{
QPainter p( this );
p.setRenderHint( QPainter::Antialiasing );
void KeyBoardPreview::paintEvent(QPaintEvent* event) { p.setBrush( QColor( 0xd6, 0xd6, 0xd6 ) );
QPainter p(this); p.drawRect( rect() );
p.setRenderHint(QPainter::Antialiasing);
p.setBrush(QColor(0xd6, 0xd6, 0xd6));
p.drawRect(rect());
QPen pen; QPen pen;
pen.setWidth(1); pen.setWidth( 1 );
pen.setColor(QColor(0x58, 0x58, 0x58)); pen.setColor( QColor( 0x58, 0x58, 0x58 ) );
p.setPen(pen); p.setPen( pen );
p.setBrush(QColor(0x58, 0x58, 0x58)); p.setBrush( QColor( 0x58, 0x58, 0x58 ) );
p.setBackgroundMode(Qt::TransparentMode); p.setBackgroundMode( Qt::TransparentMode );
p.translate(0.5, 0.5); p.translate( 0.5, 0.5 );
int rx = 3; int rx = 3;
int x=6; int x = 6;
int y=6; int y = 6;
int first_key_w = 0; int first_key_w = 0;
int remaining_x[] = {0,0,0,0}; int remaining_x[] = { 0, 0, 0, 0 };
int remaining_widths[] = {0,0,0,0}; int remaining_widths[] = { 0, 0, 0, 0 };
for (int i = 0; i < 4; i++) { for ( int i = 0; i < 4; i++ )
if (first_key_w > 0) { {
first_key_w = int(first_key_w * 1.375); if ( first_key_w > 0 )
{
first_key_w = int( first_key_w * 1.375 );
if (kb == &kbList[KB_105] && i == 3) if ( kb == &kbList[ KB_105 ] && i == 3 )
first_key_w = int(key_w * 1.275); {
first_key_w = int( key_w * 1.275 );
}
p.drawRoundedRect(QRectF(6, y, first_key_w, key_w), rx, rx); p.drawRoundedRect( QRectF( 6, y, first_key_w, key_w ), rx, rx );
x = 6 + first_key_w + space; x = 6 + first_key_w + space;
} }
else { else
{
first_key_w = key_w; first_key_w = key_w;
} }
bool last_end = ( i == 1 && !kb->kb_extended_return );
int rw = usable_width - x;
int ii = 0;
bool last_end = (i==1 && ! kb->kb_extended_return); for ( int k : kb->keys.at( i ) )
int rw=usable_width-x; {
int ii=0; QRectF rect = QRectF( x, y, key_w, key_w );
for (int k : kb->keys.at(i)) {
QRectF rect = QRectF(x, y, key_w, key_w);
if (ii == kb->keys.at(i).size()-1 && last_end) if ( ii == kb->keys.at( i ).size() - 1 && last_end )
rect.setWidth(rw); {
rect.setWidth( rw );
}
p.drawRoundedRect(rect, rx, rx); p.drawRoundedRect( rect, rx, rx );
rect.adjust(5, 1, 0, 0); rect.adjust( 5, 1, 0, 0 );
p.setPen(QColor(0x9e, 0xde, 0x00)); p.setPen( QColor( 0x9e, 0xde, 0x00 ) );
p.setFont(upperFont); p.setFont( upperFont );
p.drawText(rect, Qt::AlignLeft | Qt::AlignTop, shift_text(k)); p.drawText( rect, Qt::AlignLeft | Qt::AlignTop, shift_text( k ) );
rect.setBottom(rect.bottom() - 2.5); rect.setBottom( rect.bottom() - 2.5 );
p.setPen(QColor(0xff, 0xff, 0xff)); p.setPen( QColor( 0xff, 0xff, 0xff ) );
p.setFont(lowerFont); p.setFont( lowerFont );
p.drawText(rect, Qt::AlignLeft | Qt::AlignBottom, regular_text(k)); p.drawText( rect, Qt::AlignLeft | Qt::AlignBottom, regular_text( k ) );
rw = rw - space - key_w; rw = rw - space - key_w;
x = x + space + key_w; x = x + space + key_w;
ii = ii+1; ii = ii + 1;
p.setPen(pen); p.setPen( pen );
} }
remaining_x[ i ] = x;
remaining_widths[ i ] = rw;
remaining_x[i] = x; if ( i != 1 && i != 2 )
remaining_widths[i] = rw; {
p.drawRoundedRect( QRectF( x, y, rw, key_w ), rx, rx );
if (i != 1 && i != 2) }
p.drawRoundedRect(QRectF(x, y, rw, key_w), rx, rx);
y = y + space + key_w; y = y + space + key_w;
} }
if (kb->kb_extended_return) { if ( kb->kb_extended_return )
rx=rx*2; {
int x1 = remaining_x[1]; rx = rx * 2;
int y1 = 6 + key_w*1 + space*1; int x1 = remaining_x[ 1 ];
int w1 = remaining_widths[1]; int y1 = 6 + key_w * 1 + space * 1;
int x2 = remaining_x[2]; int w1 = remaining_widths[ 1 ];
int y2 = 6 + key_w*2 + space*2; int x2 = remaining_x[ 2 ];
int y2 = 6 + key_w * 2 + space * 2;
// this is some serious crap... but it has to be so // this is some serious crap... but it has to be so
// maybe one day keyboards won't look like this... // maybe one day keyboards won't look like this...
// one can only hope // one can only hope
QPainterPath pp; QPainterPath pp;
pp.moveTo(x1, y1+rx); pp.moveTo( x1, y1 + rx );
pp.arcTo(x1, y1, rx, rx, 180, -90); pp.arcTo( x1, y1, rx, rx, 180, -90 );
pp.lineTo(x1+w1-rx, y1); pp.lineTo( x1 + w1 - rx, y1 );
pp.arcTo(x1+w1-rx, y1, rx, rx, 90, -90); pp.arcTo( x1 + w1 - rx, y1, rx, rx, 90, -90 );
pp.lineTo(x1+w1, y2+key_w-rx); pp.lineTo( x1 + w1, y2 + key_w - rx );
pp.arcTo(x1+w1-rx, y2+key_w-rx, rx, rx, 0, -90); pp.arcTo( x1 + w1 - rx, y2 + key_w - rx, rx, rx, 0, -90 );
pp.lineTo(x2+rx, y2+key_w); pp.lineTo( x2 + rx, y2 + key_w );
pp.arcTo(x2, y2+key_w-rx, rx, rx, -90, -90); pp.arcTo( x2, y2 + key_w - rx, rx, rx, -90, -90 );
pp.lineTo(x2, y1+key_w); pp.lineTo( x2, y1 + key_w );
pp.lineTo(x1+rx, y1+key_w); pp.lineTo( x1 + rx, y1 + key_w );
pp.arcTo(x1, y1+key_w-rx, rx, rx, -90, -90); pp.arcTo( x1, y1 + key_w - rx, rx, rx, -90, -90 );
pp.closeSubpath(); pp.closeSubpath();
p.drawPath(pp); p.drawPath( pp );
} }
else { else
x= remaining_x[2]; {
y = 6 + key_w*2 + space*2; x = remaining_x[ 2 ];
p.drawRoundedRect(QRectF(x, y, remaining_widths[2], key_w), rx, rx); y = 6 + key_w * 2 + space * 2;
p.drawRoundedRect( QRectF( x, y, remaining_widths[ 2 ], key_w ), rx, rx );
} }
QWidget::paintEvent(event); QWidget::paintEvent( event );
} }

@ -1,6 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Portions from the Manjaro Installation Framework * Portions from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>
@ -23,17 +25,17 @@
#ifndef KEYBOARDPREVIEW_H #ifndef KEYBOARDPREVIEW_H
#define KEYBOARDPREVIEW_H #define KEYBOARDPREVIEW_H
#include <QWidget> #include <QColor>
#include <QRectF>
#include <QFont> #include <QFont>
#include <QPainter> #include <QPainter>
#include <QPen>
#include <QPainterPath> #include <QPainterPath>
#include <QColor> #include <QPen>
#include <QPixmap> #include <QPixmap>
#include <QProcess> #include <QProcess>
#include <QRectF>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QWidget>
class KeyBoardPreview : public QWidget class KeyBoardPreview : public QWidget
@ -42,39 +44,45 @@ class KeyBoardPreview : public QWidget
public: public:
explicit KeyBoardPreview( QWidget* parent = nullptr ); explicit KeyBoardPreview( QWidget* parent = nullptr );
void setLayout(QString layout); void setLayout( QString layout );
void setVariant(QString variant); void setVariant( QString variant );
private: private:
enum KB_TYPE { KB_104, KB_105, KB_106 }; enum KB_TYPE
{
KB_104,
KB_105,
KB_106
};
struct KB { struct KB
{
bool kb_extended_return; bool kb_extended_return;
QList<QList<int> > keys; QList< QList< int > > keys;
}; };
struct Code { struct Code
{
QString plain, shift, ctrl, alt; QString plain, shift, ctrl, alt;
}; };
QString layout, variant; QString layout, variant;
QFont lowerFont, upperFont; QFont lowerFont, upperFont;
KB* kb, kbList[3]; KB *kb, kbList[ 3 ];
QList<Code> codes; QList< Code > codes;
int space, usable_width, key_w; int space, usable_width, key_w;
void loadInfo(); void loadInfo();
bool loadCodes(); bool loadCodes();
QString regular_text(int index); QString regular_text( int index );
QString shift_text(int index); QString shift_text( int index );
QString ctrl_text(int index); QString ctrl_text( int index );
QString alt_text(int index); QString alt_text( int index );
QString fromUnicodeString(QString raw); QString fromUnicodeString( QString raw );
protected: protected:
void paintEvent(QPaintEvent* event); void paintEvent( QPaintEvent* event );
void resizeEvent(QResizeEvent* event); void resizeEvent( QResizeEvent* event );
}; };
#endif // KEYBOARDPREVIEW_H #endif // KEYBOARDPREVIEW_H

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2020, Camilo Higuita <milo.h@aol.com> * SPDX-FileCopyrightText: 2020 Camilo Higuita <milo.h@aol.com>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com> * SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com> * SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com> * SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2015, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2015 Anke Boersma <demm@kaosx.us>
* Copyright 2015, Alexandre Arnt <qtgzmanager@gmail.com> * SPDX-FileCopyrightText: 2015 Alexandre Arnt <qtgzmanager@gmail.com>
* Copyright 2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,11 +1,25 @@
### License Approval Module ### License Approval Module
---------
For distributions shipping proprietary software, this module creates a globalstorage entry when the user accepts or declines one or more presented End User License Agreements files.
The number of licenses shown are configurable. The license.conf file has a few examples of how to add URLs.
If you do not want to include this module in your Calamares build, add ```-DSKIP_MODULES="license"``` to your build settings (CMake call). <!-- SPDX-FileCopyrightText: 2015 Anke Boersma
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
For distributions shipping proprietary software, this module creates a
Global Storage entry when the user accepts or declines one or more of
the End User License Agreements files that are presented here.
The number of licenses shown are configurable. The `license.conf` file
has a few examples of how to add URLs.
If you do not want to include this module in your Calamares build,
add `-DSKIP_MODULES="license"` to your build settings (CMake call).
How to implement the removal or not installing of proprietary software is
up to any distribution to implement. For example, proprietary graphics
drivers cannot simply be removed in the packages module, a free version
will need to be installed.
How to implement the removal or not installing of proprietary software is up to any distribution to implement. For example, proprietary graphics drivers cannot simply be removed in the packages module, a free version will need to be installed.
An example of where the licenseAgree globalstorage entry is used: An example of where the licenseAgree globalstorage entry is used:
https://github.com/KaOSx/calamares/blob/master/src/modules/nonfree_drivers/main.py https://github.com/KaOSx/calamares/blob/master/src/modules/nonfree_drivers/main.py

@ -2,7 +2,6 @@
* *
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
* License-Filename: LICENSE
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -2,7 +2,6 @@
* *
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
* License-Filename: LICENSE
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* Copyright 2017, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2016 Teo Mrnjavac <teo@kde.org>
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* Copyright 2015, Rohan Garg <rohan@garg.io> * SPDX-FileCopyrightText: 2015 Rohan Garg <rohan@garg.io>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
SPDX-License-Identifier: GPL-3.0-or-later

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
SPDX-License-Identifier: GPL-3.0-or-later

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017-2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Originally from the Manjaro Installation Framework * Originally from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>

@ -1,7 +1,9 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2007 Free Software Foundation, Inc.
* Copyright 2018, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Originally from the Manjaro Installation Framework * Originally from the Manjaro Installation Framework
* by Roland Singer <roland@manjaro.org> * by Roland Singer <roland@manjaro.org>

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org> * SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* Copyright 2018,2020 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 20182020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019-2020 Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 https://github.com/FortAwesome/Font-Awesome
SPDX-License-Identifier: CC-BY-4.0

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
SPDX-License-Identifier: GPL-3.0-or-later

@ -1,7 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
* Copyright 2020, Anke Boersma <demm@kaosx.us> * SPDX-FileCopyrightText: 2020 Anke Boersma <demm@kaosx.us>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,19 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "LuksBootKeyFileJob.h" #include "LuksBootKeyFileJob.h"

@ -1,19 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef LUKSBOOTKEYFILEJOB_H #ifndef LUKSBOOTKEYFILEJOB_H

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2016, Philip Müller <philm@manjaro.org> * SPDX-FileCopyrightText: 2016 Philip Müller <philm@manjaro.org>
* Copyright 2017, Alf Gaida <agaida@siduction.org> * SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -130,7 +131,7 @@ MachineIdTests::testJob()
// Prepare part of the target filesystem // Prepare part of the target filesystem
{ {
QVERIFY( system->createTargetDirs("/etc") ); QVERIFY( system->createTargetDirs( "/etc" ) );
auto r = system->createTargetFile( "/etc/machine-id", "Hello" ); auto r = system->createTargetFile( "/etc/machine-id", "Hello" );
QVERIFY( !r.failed() ); QVERIFY( !r.failed() );
QVERIFY( r ); QVERIFY( r );
@ -164,7 +165,7 @@ MachineIdTests::testJob()
QFileInfo fi( "/tmp/var/lib/dbus/machine-id" ); QFileInfo fi( "/tmp/var/lib/dbus/machine-id" );
QVERIFY( fi.exists() ); QVERIFY( fi.exists() );
QVERIFY( fi.isSymLink() ); QVERIFY( fi.isSymLink() );
QCOMPARE( fi.size(), 5); QCOMPARE( fi.size(), 5 );
#endif #endif
} }
tempRoot.setAutoRemove( true ); // All tests succeeded tempRoot.setAutoRemove( true ); // All tests succeeded

@ -1,9 +1,10 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2014, Kevin Kofler <kevin.kofler@chello.at> * SPDX-FileCopyrightText: 2014 Kevin Kofler <kevin.kofler@chello.at>
* Copyright 2016, Philip Müller <philm@manjaro.org> * SPDX-FileCopyrightText: 2016 Philip Müller <philm@manjaro.org>
* Copyright 2017, Alf Gaida <agaida@siduction.org> * SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
* Copyright 2019-2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,6 +1,7 @@
/* === This file is part of Calamares - <https://github.com/calamares> === /* === This file is part of Calamares - <https://github.com/calamares> ===
* *
* Copyright 2019, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* /*
* Copyright 2016, Luca Giambonini <almack@chakraos.org> * SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org> * SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com> * SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
* Copyright 2017, Gabriel Craciunescu <crazy@frugalware.org> * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,8 +1,9 @@
/* /*
* Copyright 2016, Luca Giambonini <almack@chakraos.org> * SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org> * SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com> * SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

@ -1,9 +1,10 @@
/* /*
* Copyright 2016, Luca Giambonini <almack@chakraos.org> * SPDX-FileCopyrightText: 2016 Luca Giambonini <almack@chakraos.org>
* Copyright 2016, Lisa Vitolo <shainer@chakraos.org> * SPDX-FileCopyrightText: 2016 Lisa Vitolo <shainer@chakraos.org>
* Copyright 2017, Kyle Robbertze <krobbertze@gmail.com> * SPDX-FileCopyrightText: 2017 Kyle Robbertze <krobbertze@gmail.com>
* Copyright 2017-2018, 2020, Adriaan de Groot <groot@kde.org> * SPDX-FileCopyrightText: 2017-2018 2020, Adriaan de Groot <groot@kde.org>
* Copyright 2017, Gabriel Craciunescu <crazy@frugalware.org> * SPDX-FileCopyrightText: 2017 Gabriel Craciunescu <crazy@frugalware.org>
* SPDX-License-Identifier: GPL-3.0-or-later
* *
* Calamares is free software: you can redistribute it and/or modify * Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save