Merge branch 'master' of https://github.com/calamares/calamares into development
This commit is contained in:
commit
6cf365e11d
4
CHANGES
4
CHANGES
@ -15,6 +15,10 @@ This release contains contributions from (alphabetically by first name):
|
||||
- *branding* now supports os-release variables in the *strings* section,
|
||||
which allows re-using (at runtime) information set in /etc/os-release .
|
||||
This requires KDE Frameworks 5.58. #1150
|
||||
- *branding* allows the use of FreeDesktop.org icon names for the
|
||||
*productLogo* and *productIcon* keys. If a file is named there, then
|
||||
the file is used, and otherwise the icon is looked up in the current
|
||||
theme.
|
||||
|
||||
# 3.2.8 (2019-05-10) #
|
||||
|
||||
|
@ -7,14 +7,26 @@
|
||||
# path to a directory or the keyword "local".
|
||||
#
|
||||
# "local" means:
|
||||
# - modules in $LIBDIR/calamares/moduleswith
|
||||
# - modules in $LIBDIR/calamares/modules, with
|
||||
# - settings in SHARE/calamares/modules or /etc/calamares/modules.
|
||||
# In debug-mode (e.g. calamares -d) "local" also adds some paths
|
||||
# that make sense from inside the build-directory, so that you
|
||||
# can build-and-run with the latest modules immediately.
|
||||
#
|
||||
# Strings other than "local" are taken as paths and interpreted
|
||||
# relative to wherever Calamares is started. It is therefore **strongly**
|
||||
# recommended to use only absolute paths here. This is mostly useful
|
||||
# if your distro has forks of standard Calamares modules, but also
|
||||
# uses some form of upstream packaging which might overwrite those
|
||||
# forked modules -- then you can keep modules somewhere outside of
|
||||
# the "regular" module tree.
|
||||
#
|
||||
#
|
||||
# YAML: list of strings.
|
||||
modules-search: [ local ]
|
||||
|
||||
# Instances section. This section is optional, and it defines custom instances
|
||||
# for modules of any kind. An instance entry has an instance name, a module
|
||||
# for modules of any kind. An instance entry has an module name, an instance
|
||||
# name, and a configuration file name. The primary goal of this mechanism is
|
||||
# to allow loading multiple instances of the same module, with different
|
||||
# configuration. If you don't need this, the instances section can safely be
|
||||
@ -22,24 +34,27 @@ modules-search: [ local ]
|
||||
#
|
||||
# Module name plus instance name makes an instance key, e.g.
|
||||
# "webview@owncloud", where "webview" is the module name (for the webview
|
||||
# viewmodule) and "owncloud" is the instance name, which loads a configuration
|
||||
# file named "owncloud.conf" from any of the configuration file paths,
|
||||
# including the webview module directory. This instance key can then be
|
||||
# referenced in the sequence section.
|
||||
# viewmodule) and "owncloud" is the instance name. In the *sequence*
|
||||
# section below, use instance-keys to name instances (instead of just
|
||||
# a module name, for modules which have only a single instance).
|
||||
#
|
||||
# For all modules without a custom instance specification, a default instance
|
||||
# is generated automatically by Calamares. Therefore a statement such as
|
||||
# "webview" in the sequence section automatically implies an instance key of
|
||||
# "webview@webview" even without explicitly defining this instance, and the
|
||||
# configuration file for this default instance "<modulename>@<modulename>" is
|
||||
# always assumed to be "<modulename>.conf".
|
||||
# Every module implicitly has an instance with the instance name equal
|
||||
# to its module name, e.g. "welcome@welcome". In the *sequence* section,
|
||||
# mentioning a module without a full instance key (e.g. "welcome")
|
||||
# means that implicit module.
|
||||
#
|
||||
# An instance must specify its configuration file (e.g. `webview-home.conf`).
|
||||
# The implicit instances all have configuration files named `<module>.conf`.
|
||||
# This (implict) way matches the source examples, where the welcome
|
||||
# module contains an example `welcome.conf`.
|
||||
#
|
||||
# For more information on running module instances, run Calamares in debug
|
||||
# mode and check the Modules page in the Debug information interface.
|
||||
#
|
||||
# A module that is often used with instances is dummyprocess, which will
|
||||
# run a single (shell) command. By configuring more than one instance of
|
||||
# the module, multiple shell commands can be run during install.
|
||||
# A module that is often used with instances is shellprocess, which will
|
||||
# run shell commands specified in the configuration file. By configuring
|
||||
# more than one instance of the module, multiple shell sessions can be run
|
||||
# during install.
|
||||
#
|
||||
# YAML: list of maps of string:string key-value pairs.
|
||||
#instances:
|
||||
|
@ -363,6 +363,12 @@ CalamaresApplication::initViewSteps()
|
||||
ProgressTreeModel* m = new ProgressTreeModel( nullptr );
|
||||
ProgressTreeView::instance()->setModel( m );
|
||||
cDebug() << "STARTUP: Window now visible and ProgressTreeView populated";
|
||||
|
||||
const auto steps = Calamares::ViewManager::instance()->viewSteps();
|
||||
cDebug() << Logger::SubEntry << steps.count() << "view steps loaded.";
|
||||
// Tell the first view that it's been shown.
|
||||
if ( steps.count() > 0 )
|
||||
steps[0]->onActivate();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -132,6 +132,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||||
if ( Calamares::Settings::instance()->debugMode() )
|
||||
{
|
||||
QPushButton* debugWindowBtn = new QPushButton;
|
||||
debugWindowBtn->setObjectName( "debugButton" );
|
||||
CALAMARES_RETRANSLATE(
|
||||
debugWindowBtn->setText( tr( "Show debug information" ) );
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2014-2015, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2017-2018, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2017-2019, Adriaan de Groot <groot@kde.org>
|
||||
* Copyright 2018, Raul Rodrigo Segura (raurodse)
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QIcon>
|
||||
#include <QPixmap>
|
||||
#include <QVariantMap>
|
||||
|
||||
@ -185,9 +186,16 @@ Branding::Branding( const QString& brandingFilePath,
|
||||
loadStrings( m_images, doc, "images",
|
||||
[&]( const QString& s ) -> QString
|
||||
{
|
||||
QFileInfo imageFi( componentDir.absoluteFilePath( expand( s ) ) );
|
||||
const QString imageName( expand( s ) );
|
||||
QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) );
|
||||
if ( !imageFi.exists() )
|
||||
{
|
||||
const auto icon = QIcon::fromTheme( imageName );
|
||||
// Not found, bail out with the filename used
|
||||
if ( icon.isNull() )
|
||||
bail( QString( "Image file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) );
|
||||
return imageName; // Not turned into a path
|
||||
}
|
||||
return imageFi.absoluteFilePath();
|
||||
}
|
||||
);
|
||||
@ -289,16 +297,22 @@ Branding::imagePath( Branding::ImageEntry imageEntry ) const
|
||||
QPixmap
|
||||
Branding::image( Branding::ImageEntry imageEntry, const QSize& size ) const
|
||||
{
|
||||
QPixmap pixmap =
|
||||
ImageRegistry::instance()->pixmap( imagePath( imageEntry ), size );
|
||||
|
||||
if ( pixmap.isNull() )
|
||||
const auto path = imagePath( imageEntry );
|
||||
if ( path.contains( '/' ) )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
return QPixmap();
|
||||
}
|
||||
QPixmap pixmap = ImageRegistry::instance()->pixmap( path, size );
|
||||
|
||||
Q_ASSERT( !pixmap.isNull() );
|
||||
return pixmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto icon = QIcon::fromTheme(path);
|
||||
|
||||
Q_ASSERT( !icon.isNull() );
|
||||
return icon.pixmap( size );
|
||||
}
|
||||
}
|
||||
|
||||
QString
|
||||
Branding::stylesheet() const
|
||||
|
@ -99,12 +99,18 @@ RequirementsChecker::run()
|
||||
void
|
||||
RequirementsChecker::finished()
|
||||
{
|
||||
if ( std::all_of( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && w->isFinished(); } ) )
|
||||
static QMutex finishedMutex;
|
||||
QMutexLocker lock( &finishedMutex );
|
||||
|
||||
if ( m_progressTimer && std::all_of( m_watchers.cbegin(), m_watchers.cend(), []( const Watcher *w ) { return w && w->isFinished(); } ) )
|
||||
{
|
||||
cDebug() << "All requirements have been checked.";
|
||||
|
||||
if ( m_progressTimer )
|
||||
{
|
||||
m_progressTimer->stop();
|
||||
delete m_progressTimer;
|
||||
m_progressTimer = nullptr;
|
||||
}
|
||||
|
||||
bool acceptable = true;
|
||||
int count = 0;
|
||||
|
@ -61,9 +61,9 @@ ImageRegistry::cacheKey( const QSize& size, float opacity, QColor tint )
|
||||
QPixmap
|
||||
ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, float opacity, QColor tint )
|
||||
{
|
||||
Q_ASSERT( !(size.width() < 0 || size.height() < 0) );
|
||||
if ( size.width() < 0 || size.height() < 0 )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
@ -159,15 +159,9 @@ ImageRegistry::putInCache( const QString& image, const QSize& size, CalamaresUti
|
||||
if ( s_cache.contains( image ) )
|
||||
{
|
||||
subcache = s_cache.value( image );
|
||||
|
||||
if ( subcache.contains( mode ) )
|
||||
{
|
||||
subsubcache = subcache.value( mode );
|
||||
|
||||
/* if ( subsubcache.contains( size.width() * size.height() ) )
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include "InteractiveTerminalPage.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( InteractiveTerminalViewStepFactory, registerPlugin<InteractiveTerminalViewStep>(); )
|
||||
@ -84,6 +86,7 @@ InteractiveTerminalViewStep::isAtEnd() const
|
||||
QList< Calamares::job_ptr >
|
||||
InteractiveTerminalViewStep::jobs() const
|
||||
{
|
||||
cDebug() << "InteractiveTerminal" << prettyName() << "asked for jobs(), this is probably wrong.";
|
||||
return QList< Calamares::job_ptr >();
|
||||
}
|
||||
|
||||
@ -91,6 +94,7 @@ InteractiveTerminalViewStep::jobs() const
|
||||
void
|
||||
InteractiveTerminalViewStep::onActivate()
|
||||
{
|
||||
cDebug() << "InteractiveTerminal" << prettyName() << "activated.";
|
||||
m_widget->onActivate();
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ class PMPacman(PackageManager):
|
||||
check_target_env_call(["pacman", "-Sy"])
|
||||
|
||||
def update_system(self):
|
||||
check_target_env_call(["pacman", "-Su"])
|
||||
check_target_env_call(["pacman", "-Su", "--noconfirm"])
|
||||
|
||||
|
||||
class PMPortage(PackageManager):
|
||||
|
Loading…
Reference in New Issue
Block a user