# Configuration file for Calamares
# Syntax is YAML 1.2
---
-# Modules can be core modules (with different interfaces) and QtWidgets page modules.
+# Modules can be job modules (with different interfaces) and QtWidgets view modules.
# They could all be placed in a number of different paths.
modules-search: [ local, /path/to/dir/with/more/modules ]
-# We define the module names in the order they should show up (QtWidget page modules,
+# We define the module names in the order they should show up (QtWidget view modules,
# with one or more pages) OR be executed if enqueued (all other modules).
-# Pages can also enqueue jobs for delayed execution.
-# TBD: do we want to allow non-page modules (core-modules) to be set as immediate or
-# delayed? Is this an intrinsic property of a module? Does it depend on whether it's
-# a QProcess, a Python script or a plugin? More research is required. --teo
-modules-prepare :
+# Pages can also enqueue jobs for delayed execution in the order specified for the
+# install phase.
+
+# Phase 1 - prepare.
+# View modules are shown as UI pages, jobs from job modules are executed immediately in
+# the background.
+# Jobs should be executed sparingly (if at all) in this phase.
+prepare:
- greeting
- locale
- keyboard
- partition
- summary
-modules-postinstall :
+# Phase 2 - install.
+# View modules are not shown. Only the view modules shown in the previous phase are
+# allowed, their names should be added here as placeholders to specify the order in
+# which view module jobs should be enqueued. Job modules are also allowed.
+install: #TODO: actually use this
+- partition
+- unsquashfs
+- locale
+- keyboard
+- users
+
+# Phase 3 - postinstall.
+# View modules are shown as UI pages, jobs from job modules are executed immediately in
+# the background.
+# Jobs should be executed sparingly (if at all) in this phase.
+postinstall: #TODO: actually use this
- finished
m_mainwindow = new CalamaresWindow();
- m_moduleManager->loadRequiredModules();
+ m_moduleManager->loadModulesPrepare();
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded, [this]
{
m_mainwindow->show();
}
}
- config[ "modules-prepare" ] >> m_viewModulesPrepareList;
- config[ "modules-postinstall" ] >> m_viewModulesPostInstallList;
+ config[ "prepare" ] >> m_modulesPrepareList;
+ config[ "install" ] >> m_modulesInstallList;
+ config[ "postinstall" ] >> m_modulesPostInstallList;
}
catch ( YAML::Exception& e )
{
QStringList
-Settings::viewModulesPrepare()
+Settings::modulesPrepare()
{
- return m_viewModulesPrepareList;
+ return m_modulesPrepareList;
}
QStringList
-Settings::viewModulesPostInstall()
+Settings::modulesInstall()
{
- return m_viewModulesPostInstallList;
+ return m_modulesInstallList;
+}
+
+
+QStringList
+Settings::modulesPostInstall()
+{
+ return m_modulesPostInstallList;
}
QStringList modulesSearchPaths();
- QStringList viewModulesPrepare();
+ QStringList modulesPrepare();
- QStringList viewModulesPostInstall();
+ QStringList modulesInstall();
+
+ QStringList modulesPostInstall();
private:
static Settings* s_instance;
QStringList m_modulesSearchPaths;
- QStringList m_viewModulesPrepareList;
- QStringList m_viewModulesPostInstallList;
+ QStringList m_modulesPrepareList;
+ QStringList m_modulesInstallList;
+ QStringList m_modulesPostInstallList;
};
}
void
-ModuleManager::loadRequiredModules()
+ModuleManager::loadModulesPrepare()
{
- QTimer::singleShot( 0, this, SLOT( doLoadModules() ) );
+ QTimer::singleShot( 0, this, SLOT( doLoadModulesPrepare() ) );
}
void
-ModuleManager::doLoadModules()
+ModuleManager::doLoadModulesPrepare()
{
- foreach ( const QString& moduleName, Settings::instance()->viewModulesPrepare() )
+ foreach ( const QString& moduleName, Settings::instance()->modulesPrepare() )
{
if ( !m_availableModules.contains( moduleName ) )
{
QStringList availableModules();
Module* module( const QString& name );
- void loadRequiredModules();
+ void loadModulesPrepare();
signals:
void initDone();
private slots:
void doInit();
- void doLoadModules();
+ void doLoadModulesPrepare();
private:
void recursiveLoad( const QString& moduleName );