Add the UI for Package Select, allowing for fine-tuned customization of the installed system.

ubuntu/noble
Simon Quigley 1 year ago
parent f8e37f2a81
commit 4b847dae69

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CALAMARES_VERSION_REQUIRED 3.3.0 )
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} NO_CMAKE_PACKAGE_REGISTRY)
if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui)
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} REQUIRED)
endif()
message(STATUS "Found Calamares version ${Calamares_VERSION}")
message(STATUS " libraries ${Calamares_LIB_DIRS}")
message(STATUS "")
calamares_add_plugin( pkgselect
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
PackageSelectViewStep.cpp
RESOURCES
pkgselect.qrc
SHARED_LIB
)

@ -0,0 +1,29 @@
#include "PackageSelectViewStep.h"
PackageSelectViewStep::PackageSelectViewStep( QObject* parent )
: Calamares::QmlViewStep( parent )
{
}
PackageSelectViewStep::~PackageSelectViewStep() {}
QString
PackageSelectViewStep::prettyName() const
{
return tr( "Package Selection" );
}
void
PackageSelectViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
}
void
PackageSelectViewStep::onLeave()
{
Calamares::GlobalStorage* globalStorage = Calamares::JobQueue::instance()->globalStorage();
globalStorage->insert( "item3", 3 );
}
CALAMARES_PLUGIN_FACTORY_DEFINITION( PackageSelectViewStepFactory, registerPlugin< PackageSelectViewStep >(); )

@ -0,0 +1,28 @@
#ifndef PACKAGESELECTVIEWSTEP_H
#define PACKAGESELECTVIEWSTEP_H
#include "DllMacro.h"
#include "utils/PluginFactory.h"
#include "viewpages/QmlViewStep.h"
#include "GlobalStorage.h"
#include "JobQueue.h"
class PLUGINDLLEXPORT PackageSelectViewStep : public Calamares::QmlViewStep
{
Q_OBJECT
public:
PackageSelectViewStep( QObject* parent = nullptr );
virtual ~PackageSelectViewStep() override;
QString prettyName() const override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
void onLeave() override;
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageSelectViewStepFactory )
#endif

@ -0,0 +1,168 @@
import io.calamares.ui 1.0
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Window 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.1
Item {
ColumnLayout {
scale: 0.9
Text {
text: qsTr("What apps would you like to start with?")
font.bold: true
font.pointSize: 14
}
RadioButton {
checked: true
text: qsTr("Normal Installation")
font.pointSize: 12
indicator.width: 20
indicator.height: 20
}
Text {
text: qsTr("Web browser, utilities, office software, games, and media players.")
font.pointSize: 10
font.italic: true
}
RadioButton {
text: qsTr("Minimal Installation")
font.pointSize: 12
indicator.width: 20
indicator.height: 20
}
Text {
text: qsTr("Only the desktop environment.")
font.pointSize: 10
font.italic: true
}
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "grey"
}
Text {
text: qsTr("Additional Options")
font.bold: true
font.pointSize: 14
}
CheckBox {
text: qsTr("Download updates following installation")
font.pointSize: 12
indicator.width: 20
indicator.height: 20
}
Text {
text: qsTr("This saves time after the installation, and keeps your system secure.")
font.pointSize: 10
font.italic: true
}
CheckBox {
text: qsTr("Install third-party software for graphics, WiFi hardware, and additional media formats")
font.pointSize: 12
indicator.width: 20
indicator.height: 20
}
Text {
text: qsTr("This software is subject to license terms included with its documentation, and some may be proprietary.")
font.pointSize: 10
font.italic: true
}
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 1
color: "grey"
}
Text {
text: qsTr("Install additional third-party packages:")
font.bold: true
font.pointSize: 14
}
Flickable {
Layout.fillWidth: true
height: 225
contentHeight: column.height
clip: true
Column {
id: column
width: parent.width
CheckBox {
text: qsTr("Element")
objectName: "element"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
}
Text {
text: qsTr("Matrix-based end-to-end encrypted messenger and secure collaboration app")
font.italic: true
font.pointSize: 10
}
CheckBox {
text: qsTr("Thunderbird")
objectName: "thunderbird"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
}
Text {
text: qsTr("Email, newsfeed, chat, and calendaring client")
font.italic: true
font.pointSize: 10
}
CheckBox {
text: qsTr("VSCodium")
objectName: "vscodium"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
}
Text {
text: qsTr("Code editor redefined and optimized for building and debugging modern web and cloud applications")
font.italic: true
font.pointSize: 10
}
CheckBox {
text: qsTr("Virtual Machine Manager")
objectName: "virt-manager"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
}
Text {
text: qsTr("Desktop user interface for managing virtual machines through libvirt")
font.italic: true
font.pointSize: 10
}
CheckBox {
text: qsTr("Krita")
objectName: "krita"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
}
Text {
text: qsTr("Graphics editor designed primarily for digital art and 2D animation")
font.italic: true
font.pointSize: 10
}
}
ScrollBar.vertical: ScrollBar {
active: true
}
}
Text {
text: qsTr("Note: third-party packages are provided by outside vendors and are not officially supported in any way. Use at your own risk.")
font.bold: true
font.pointSize: 10
}
}
}

@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file alias="pkgselect.qml">pkgselect.qml</file>
</qresource>
</RCC>

2
debian/changelog vendored

@ -1,6 +1,8 @@
calamares-settings-ubuntu (1:24.04.1) UNRELEASED; urgency=medium
* Fix Vcs-*.
* Add a Package Select module, allowing for fine-tuned customization of the
installed system.
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 08 Oct 2023 22:02:44 -0500

16
debian/control vendored

@ -3,7 +3,18 @@ Section: devel
Priority: optional
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Uploaders: Simon Quigley <tsimonq2@ubuntu.com>
Build-Depends: debhelper-compat (= 13), intltool, qttools5-dev-tools
Build-Depends: calamares,
cmake,
debhelper-compat (= 13),
extra-cmake-modules,
intltool,
libkf5coreaddons-dev,
libqt5svg5-dev,
libyaml-cpp-dev,
qtbase5-dev,
qtdeclarative5-dev,
qttools5-dev,
qttools5-dev-tools
Standards-Version: 4.6.2
Homepage: https://code.launchpad.net/~ubuntu-qt-code/+git/calamares-settings-ubuntu
Vcs-Git: https://git.launchpad.net/~ubuntu-qt-code/+git/calamares-settings-ubuntu
@ -31,7 +42,8 @@ Depends: calamares (>= 3.2.14~),
qml-module-qtquick-window2,
qml-module-qtquick2,
squashfs-tools,
${misc:Depends}
${misc:Depends},
${shlibs:Depends}
Description: Common Calamares Settings
This package contains the common Calamares settings for all flavors.
There is also a automirror Python script to set sources based on

21
debian/rules vendored

@ -1,16 +1,29 @@
#!/usr/bin/make -f
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
PKGSELECT = "common/modules/pkgselect"
MODULES_DIR = "debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules"
%:
dh $@
override_dh_auto_configure:
cd $(PKGSELECT) && mkdir build && cd build && cmake ..
override_dh_auto_build:
make;
cd $(PKGSELECT)/build && $(MAKE)
override_dh_auto_install:
cd $(PKGSELECT)/build && $(MAKE) DESTDIR=$(CURDIR)/debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/ install
override_dh_missing:
dh_missing
mkdir -pv debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules
cp -vr common/modules/automirror debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules
cp -v common/modules/pkgselect/pkgselect.qml debian/calamares-settings-lubuntu/etc/calamares/branding/lubuntu/pkgselect.qml
mkdir -pv $(MODULES_DIR)
cp -vr common/modules/automirror $(MODULES_DIR)
mkdir -pv debian/calamares-settings-ubuntu-common/etc/calamares/modules
cp -vr common/modules/*.conf debian/calamares-settings-ubuntu-common/etc/calamares/modules
chmod -R 755 debian/calamares-settings-ubuntu-common/usr/lib/
chmod 644 debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules/automirror/automirror.conf
chmod 644 debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules/automirror/module.desc
chmod 644 $(MODULES_DIR)/automirror/automirror.conf
chmod 644 $(MODULES_DIR)/automirror/module.desc

@ -26,6 +26,7 @@ sequence:
- welcome
- locale
- keyboard
- pkgselect
- partition
- users
- summary

Loading…
Cancel
Save