forked from artix/calamares-extensions
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6371cc151 | |||
| 678aeeba58 | |||
| 8009e357ed | |||
| 0f242c944a | |||
| e04b3b69e8 | |||
|
277603cf60
|
|||
|
2cce754737
|
|||
| 23edb4e685 | |||
| 63be1deec3 | |||
| 09edbfeffb | |||
| dd1a91fbbd | |||
| 559daeaa53 | |||
|
8d56cc49df
|
|||
|
80ca6b23eb
|
|||
|
f75efc73a0
|
|||
|
9c0c5ea291
|
|||
| 767a7bac29 | |||
|
|
47cda51f8f | ||
|
|
18e68245c1 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,4 +7,4 @@ build/
|
|||||||
*.qmlc
|
*.qmlc
|
||||||
b.sh
|
b.sh
|
||||||
modules/netinstall/
|
modules/netinstall/
|
||||||
modules/packages/
|
#modules/packages/
|
||||||
|
|||||||
13
CHANGES
13
CHANGES
@@ -6,6 +6,19 @@ This is the changelog for Calamares-Extensions. For each release, the major
|
|||||||
changes and contributors are listed. Note that Calamares-Extensions does not
|
changes and contributors are listed. Note that Calamares-Extensions does not
|
||||||
have a historical changelog -- this log starts with version 1.0.0.
|
have a historical changelog -- this log starts with version 1.0.0.
|
||||||
|
|
||||||
|
# 3.3.1 (2024-01-15)
|
||||||
|
|
||||||
|
This is the first *calamares-extensions* release to go with a Calamares 3.3
|
||||||
|
release. The extensions now require Calamares 3.3. There is a branch for
|
||||||
|
3.2 legacy support but no releases are planned for it. The main reason
|
||||||
|
for this release is to have a 3.3-compatible release of *-extensions* at all.
|
||||||
|
|
||||||
|
This release contains contributions from (alphabetically by first name):
|
||||||
|
- Adriaan de Groot
|
||||||
|
- Anke Boersma
|
||||||
|
- undef
|
||||||
|
|
||||||
|
|
||||||
# 1.3.2 (2023-08-28)
|
# 1.3.2 (2023-08-28)
|
||||||
|
|
||||||
We skipped a couple of releases in the release-notes, then tagged
|
We skipped a couple of releases in the release-notes, then tagged
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#
|
#
|
||||||
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||||
|
|
||||||
set( CALAMARES_EXTENSIONS_VERSION 3.3.1 )
|
set( CALAMARES_EXTENSIONS_VERSION 3.3.5 )
|
||||||
|
|
||||||
include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake )
|
include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake )
|
||||||
if ( CMAKE_SCRIPT_MODE_FILE )
|
if ( CMAKE_SCRIPT_MODE_FILE )
|
||||||
@@ -86,9 +86,11 @@ set_package_properties(
|
|||||||
# consumers by loading the developer's config from a build
|
# consumers by loading the developer's config from a build
|
||||||
# directory (which doesn't have the rest of the config
|
# directory (which doesn't have the rest of the config
|
||||||
# installed inside it).
|
# installed inside it).
|
||||||
set( CALAMARES_VERSION_REQUIRED 3.3.1 )
|
set( CALAMARES_VERSION_REQUIRED 3.3.5 )
|
||||||
|
message(STATUS "Looking for Calamares system-wide")
|
||||||
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} NO_CMAKE_PACKAGE_REGISTRY)
|
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} NO_CMAKE_PACKAGE_REGISTRY)
|
||||||
if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui)
|
if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui)
|
||||||
|
message(STATUS "Looking for Calamares in the package registry")
|
||||||
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} REQUIRED)
|
find_package(Calamares ${CALAMARES_VERSION_REQUIRED} REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -161,7 +163,6 @@ calamares_add_module_subdirectory( modules/basestrap LIST_SKIPPED_MODULES )
|
|||||||
calamares_add_module_subdirectory( modules/services-artix LIST_SKIPPED_MODULES )
|
calamares_add_module_subdirectory( modules/services-artix LIST_SKIPPED_MODULES )
|
||||||
calamares_add_module_subdirectory( modules/postcfg LIST_SKIPPED_MODULES )
|
calamares_add_module_subdirectory( modules/postcfg LIST_SKIPPED_MODULES )
|
||||||
calamares_add_module_subdirectory( modules/packagechooser LIST_SKIPPED_MODULES )
|
calamares_add_module_subdirectory( modules/packagechooser LIST_SKIPPED_MODULES )
|
||||||
calamares_add_module_subdirectory( modules/packagechooserq LIST_SKIPPED_MODULES )
|
|
||||||
|
|
||||||
message(STATUS "Calamares extensions ${CALAMARES_EXTENSIONS_VERSION} for Calamares version ${Calamares_VERSION}")
|
message(STATUS "Calamares extensions ${CALAMARES_EXTENSIONS_VERSION} for Calamares version ${Calamares_VERSION}")
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ strings:
|
|||||||
images:
|
images:
|
||||||
productBanner: "artix-banner.png"
|
productBanner: "artix-banner.png"
|
||||||
productLogo: "artix-logo.svg"
|
productLogo: "artix-logo.svg"
|
||||||
productIcon: "artix-icon.svg"
|
productIcon: "artix-icon.png"
|
||||||
productWelcome: "languages.png"
|
productWelcome: "languages.png"
|
||||||
|
|
||||||
slideshow: "show.qml"
|
slideshow: "show.qml"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ windowExpanding: normal
|
|||||||
# This setting is ignored if "fullscreen" is selected for
|
# This setting is ignored if "fullscreen" is selected for
|
||||||
# *windowExpanding*, above. If not set, use constants defined
|
# *windowExpanding*, above. If not set, use constants defined
|
||||||
# in CalamaresUtilsGui, 800x520.
|
# in CalamaresUtilsGui, 800x520.
|
||||||
windowSize: 1000px,800px
|
windowSize: 1100px,700px
|
||||||
|
|
||||||
# Placement of Calamares window. Either "center" or "free".
|
# Placement of Calamares window. Either "center" or "free".
|
||||||
# Whether "center" actually works does depend on the window
|
# Whether "center" actually works does depend on the window
|
||||||
@@ -216,7 +216,7 @@ slideshow: "show.qml"
|
|||||||
# the QML components).
|
# the QML components).
|
||||||
#
|
#
|
||||||
# An image slideshow does not need to have the API defined.
|
# An image slideshow does not need to have the API defined.
|
||||||
slideshowAPI: 2
|
slideshowAPI: 1
|
||||||
|
|
||||||
|
|
||||||
# These options are to customize online uploading of logs to pastebins:
|
# These options are to customize online uploading of logs to pastebins:
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 775 KiB After Width: | Height: | Size: 662 KiB |
@@ -177,6 +177,22 @@ Presentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
source: "background.png"
|
||||||
|
width: parent.width * 4; height: parent.height * 4
|
||||||
|
fillMode: Image.Stretch
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
Image {
|
||||||
|
source: "packages1.png"
|
||||||
|
width: parent.width * 1.12; height: parent.height * 1.5
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
anchors.verticalCenterOffset: - parent.height / 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Slide {
|
Slide {
|
||||||
Image {
|
Image {
|
||||||
source: "background.png"
|
source: "background.png"
|
||||||
@@ -225,22 +241,6 @@ Presentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Slide {
|
|
||||||
Image {
|
|
||||||
source: "background.png"
|
|
||||||
width: parent.width * 4; height: parent.height * 4
|
|
||||||
fillMode: Image.Stretch
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
Image {
|
|
||||||
source: "packages2.png"
|
|
||||||
width: parent.width * 1.12; height: parent.height * 1.5
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
anchors.centerIn: parent
|
|
||||||
anchors.verticalCenterOffset: - parent.height / 16
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Slide {
|
Slide {
|
||||||
Image {
|
Image {
|
||||||
source: "background.png"
|
source: "background.png"
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ set(_extra_src "")
|
|||||||
### OPTIONAL AppData XML support in PackageModel
|
### OPTIONAL AppData XML support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
|
||||||
if(BUILD_APPDATA)
|
if(BUILD_APPDATA)
|
||||||
find_package(${qtname} COMPONENTS Xml)
|
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||||
if(TARGET ${qtname}::Xml)
|
if(TARGET ${qtname}::Xml)
|
||||||
add_definitions(-DHAVE_APPDATA)
|
add_definitions(-DHAVE_APPDATA)
|
||||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||||
@@ -23,23 +23,7 @@ endif()
|
|||||||
### OPTIONAL AppStream support in PackageModel
|
### OPTIONAL AppStream support in PackageModel
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
include(AppStreamHelper)
|
||||||
if(BUILD_APPSTREAM)
|
|
||||||
find_package(AppStreamQt)
|
|
||||||
set_package_properties(
|
|
||||||
AppStreamQt
|
|
||||||
PROPERTIES
|
|
||||||
DESCRIPTION "Support for AppStream (cache) data"
|
|
||||||
URL "https://github.com/ximion/appstream"
|
|
||||||
PURPOSE "AppStream provides package data"
|
|
||||||
TYPE OPTIONAL
|
|
||||||
)
|
|
||||||
if(AppStreamQt_FOUND)
|
|
||||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
|
||||||
list(APPEND _extra_libraries AppStreamQt)
|
|
||||||
list(APPEND _extra_src ItemAppStream.cpp)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
calamares_add_plugin(packagechooser
|
calamares_add_plugin(packagechooser
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
@@ -59,7 +43,11 @@ calamares_add_plugin(packagechooser
|
|||||||
SHARED_LIB
|
SHARED_LIB
|
||||||
)
|
)
|
||||||
|
|
||||||
# include(CalamaresAddTest)
|
if(AppStreamQt_FOUND)
|
||||||
|
target_link_libraries(calamares_viewmodule_packagechooser PRIVATE calamares::appstreamqt)
|
||||||
|
target_sources(calamares_viewmodule_packagechooser PRIVATE ItemAppStream.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
# calamares_add_test(
|
# calamares_add_test(
|
||||||
# packagechoosertest
|
# packagechoosertest
|
||||||
# GUI
|
# GUI
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#ifdef HAVE_APPSTREAM_VERSION
|
#ifdef HAVE_APPSTREAM_VERSION
|
||||||
#include "ItemAppStream.h"
|
#include "ItemAppStream.h"
|
||||||
#include <AppStreamQt/pool.h>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -7,20 +7,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @brief Loading items from AppData XML files.
|
/** @brief Loading items from AppStream database.
|
||||||
*
|
*
|
||||||
* Only used if QtXML is found, implements PackageItem::fromAppData().
|
* Only used if AppStreamQt is found, implements PackageItem::fromAppStream().
|
||||||
*/
|
*/
|
||||||
#include "PackageModel.h"
|
#include "ItemAppStream.h"
|
||||||
|
|
||||||
#include "locale/TranslationsModel.h"
|
#include "locale/TranslationsModel.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Variant.h"
|
#include "utils/Variant.h"
|
||||||
|
|
||||||
#include <AppStreamQt/image.h>
|
|
||||||
#include <AppStreamQt/pool.h>
|
|
||||||
#include <AppStreamQt/screenshot.h>
|
|
||||||
|
|
||||||
/// @brief Return number of pixels in a size, for < ordering purposes
|
/// @brief Return number of pixels in a size, for < ordering purposes
|
||||||
static inline quint64
|
static inline quint64
|
||||||
sizeOrder( const QSize& size )
|
sizeOrder( const QSize& size )
|
||||||
|
|||||||
@@ -12,10 +12,28 @@
|
|||||||
|
|
||||||
#include "PackageModel.h"
|
#include "PackageModel.h"
|
||||||
|
|
||||||
namespace AppStream
|
/*
|
||||||
{
|
* This weird include mechanism is because an #include line is allowed
|
||||||
class Pool;
|
* to consist of preprocessor-tokens, which are expanded, and then
|
||||||
} // namespace AppStream
|
* the #include is *re*processed. But if it starts with < or ", then
|
||||||
|
* preprocessor tokens are not expanded. So we build up a #include <>
|
||||||
|
* style line with a suitable path -- if we are given a value for
|
||||||
|
* HAVE_APPSTREAM_HEADERS, that is the directory that the AppStreamQt
|
||||||
|
* headers live in.
|
||||||
|
*/
|
||||||
|
#define CALAMARES_LT <
|
||||||
|
#define CALAMARES_GT >
|
||||||
|
|
||||||
|
#ifndef HAVE_APPSTREAM_HEADERS
|
||||||
|
#define HAVE_APPSTREAM_HEADERS AppStreamQt
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/pool.h CALAMARES_GT
|
||||||
|
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/image.h CALAMARES_GT
|
||||||
|
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/screenshot.h CALAMARES_GT
|
||||||
|
|
||||||
|
#undef CALAMARES_LT
|
||||||
|
#undef CALAMARES_GT
|
||||||
|
|
||||||
/** @brief Loads an item from AppStream data.
|
/** @brief Loads an item from AppStream data.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
QTEST_MAIN( PackageChooserTests )
|
QTEST_GUILESS_MAIN( PackageChooserTests )
|
||||||
|
|
||||||
PackageChooserTests::PackageChooserTests() {}
|
PackageChooserTests::PackageChooserTests() {}
|
||||||
|
|
||||||
|
|||||||
BIN
modules/packagechooser/images/calamares.png
Normal file
BIN
modules/packagechooser/images/calamares.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
2
modules/packagechooser/images/calamares.png.license
Normal file
2
modules/packagechooser/images/calamares.png.license
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
||||||
|
SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
BIN
modules/packagechooser/images/no-selection.png
Normal file
BIN
modules/packagechooser/images/no-selection.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
2
modules/packagechooser/images/no-selection.png.license
Normal file
2
modules/packagechooser/images/no-selection.png.license
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SPDX-FileCopyrightText: 2014 Uri Herrera <uri_herrera@nitrux.in> and others
|
||||||
|
SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
# === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
#
|
|
||||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
|
||||||
# SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause
|
|
||||||
#
|
|
||||||
if( NOT Calamares_WITH_QML )
|
|
||||||
calamares_skip_module( "packagechooserq (QML is not supported in this build)" )
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
|
||||||
|
|
||||||
# Add optional libraries here
|
|
||||||
set(USER_EXTRA_LIB)
|
|
||||||
|
|
||||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
|
||||||
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
|
|
||||||
include_directories(${_packagechooser})
|
|
||||||
|
|
||||||
### OPTIONAL AppData XML support in PackageModel
|
|
||||||
#
|
|
||||||
#
|
|
||||||
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
|
|
||||||
if(BUILD_APPDATA)
|
|
||||||
find_package(${qtname} COMPONENTS Xml)
|
|
||||||
if(TARGET ${qtname}::Xml)
|
|
||||||
add_definitions(-DHAVE_APPDATA)
|
|
||||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
|
||||||
list(APPEND _extra_src ${_packagechooser}/ItemAppData.cpp)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
### OPTIONAL AppStream support in PackageModel
|
|
||||||
#
|
|
||||||
#
|
|
||||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
|
|
||||||
if(BUILD_APPSTREAM)
|
|
||||||
find_package(AppStreamQt)
|
|
||||||
set_package_properties(
|
|
||||||
AppStreamQt
|
|
||||||
PROPERTIES
|
|
||||||
DESCRIPTION "Support for AppStream (cache) data"
|
|
||||||
URL "https://github.com/ximion/appstream"
|
|
||||||
PURPOSE "AppStream provides package data"
|
|
||||||
TYPE OPTIONAL
|
|
||||||
)
|
|
||||||
if(AppStreamQt_FOUND)
|
|
||||||
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
|
|
||||||
list(APPEND _extra_libraries AppStreamQt)
|
|
||||||
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
calamares_add_plugin(packagechooserq
|
|
||||||
TYPE viewmodule
|
|
||||||
EXPORT_MACRO PLUGINDLLEXPORT_PRO
|
|
||||||
SOURCES
|
|
||||||
PackageChooserQmlViewStep.cpp
|
|
||||||
${_packagechooser}/Config.cpp
|
|
||||||
${_packagechooser}/PackageModel.cpp
|
|
||||||
${_extra_src}
|
|
||||||
RESOURCES
|
|
||||||
packagechooserq${QT_VERSION_SUFFIX}.qrc
|
|
||||||
LINK_PRIVATE_LIBRARIES
|
|
||||||
calamaresui
|
|
||||||
${_extra_libraries}
|
|
||||||
SHARED_LIB
|
|
||||||
)
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
|
||||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "PackageChooserQmlViewStep.h"
|
|
||||||
|
|
||||||
#include "GlobalStorage.h"
|
|
||||||
#include "JobQueue.h"
|
|
||||||
#include "locale/TranslatableConfiguration.h"
|
|
||||||
#include "utils/Logger.h"
|
|
||||||
#include "utils/System.h"
|
|
||||||
#include "utils/Variant.h"
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( PackageChooserQmlViewStepFactory, registerPlugin< PackageChooserQmlViewStep >(); )
|
|
||||||
|
|
||||||
PackageChooserQmlViewStep::PackageChooserQmlViewStep( QObject* parent )
|
|
||||||
: Calamares::QmlViewStep( parent )
|
|
||||||
, m_config( new Config( this ) )
|
|
||||||
{
|
|
||||||
emit nextStatusChanged( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
QString
|
|
||||||
PackageChooserQmlViewStep::prettyName() const
|
|
||||||
{
|
|
||||||
return m_config->prettyName();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString
|
|
||||||
PackageChooserQmlViewStep::prettyStatus() const
|
|
||||||
{
|
|
||||||
//QString option = m_pkgc;
|
|
||||||
//return tr( "Install option: %1" ).arg( option );
|
|
||||||
return m_config->prettyStatus();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
PackageChooserQmlViewStep::isNextEnabled() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
PackageChooserQmlViewStep::isBackEnabled() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
PackageChooserQmlViewStep::isAtBeginning() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
PackageChooserQmlViewStep::isAtEnd() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Calamares::JobList
|
|
||||||
PackageChooserQmlViewStep::jobs() const
|
|
||||||
{
|
|
||||||
Calamares::JobList l;
|
|
||||||
return l;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
PackageChooserQmlViewStep::onLeave()
|
|
||||||
{
|
|
||||||
m_config->updateGlobalStorage();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
PackageChooserQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
||||||
{
|
|
||||||
m_config->setDefaultId( moduleInstanceKey() );
|
|
||||||
m_config->setConfigurationMap( configurationMap );
|
|
||||||
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
|
||||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PACKAGECHOOSERQMLVIEWSTEP_H
|
|
||||||
#define PACKAGECHOOSERQMLVIEWSTEP_H
|
|
||||||
|
|
||||||
// Config from packagechooser module
|
|
||||||
#include "Config.h"
|
|
||||||
|
|
||||||
#include "DllMacro.h"
|
|
||||||
#include "locale/TranslatableConfiguration.h"
|
|
||||||
#include "utils/PluginFactory.h"
|
|
||||||
#include "viewpages/QmlViewStep.h"
|
|
||||||
|
|
||||||
#include <QVariantMap>
|
|
||||||
|
|
||||||
class Config;
|
|
||||||
class PackageChooserPage;
|
|
||||||
|
|
||||||
class PLUGINDLLEXPORT PackageChooserQmlViewStep : public Calamares::QmlViewStep
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PackageChooserQmlViewStep( QObject* parent = nullptr );
|
|
||||||
|
|
||||||
QString prettyName() const override;
|
|
||||||
QString prettyStatus() const override;
|
|
||||||
|
|
||||||
bool isNextEnabled() const override;
|
|
||||||
bool isBackEnabled() const override;
|
|
||||||
|
|
||||||
bool isAtBeginning() const override;
|
|
||||||
bool isAtEnd() const override;
|
|
||||||
|
|
||||||
//void onActivate() override;
|
|
||||||
void onLeave() override;
|
|
||||||
|
|
||||||
Calamares::JobList jobs() const override;
|
|
||||||
|
|
||||||
void setConfigurationMap( const QVariantMap& configurationMap ) override;
|
|
||||||
|
|
||||||
QObject* getConfig() override { return m_config; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
Config* m_config;
|
|
||||||
};
|
|
||||||
|
|
||||||
CALAMARES_PLUGIN_FACTORY_DECLARATION( PackageChooserQmlViewStepFactory )
|
|
||||||
|
|
||||||
#endif // PACKAGECHOOSERQMLVIEWSTEP_H
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
@@ -1,2 +0,0 @@
|
|||||||
SPDX-FileCopyrightText: 2020 demmm <anke62@gmail.com>
|
|
||||||
SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
@@ -1,304 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import io.calamares.core 1.0
|
|
||||||
import io.calamares.ui 1.0
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Controls
|
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
Item {
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "#f2f2f2"
|
|
||||||
|
|
||||||
ButtonGroup {
|
|
||||||
id: switchGroup
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: column
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
//id: rectangle
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("OpenRC base system.<br/>
|
|
||||||
Default option.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element1
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("OpenRC")
|
|
||||||
checked: true
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element1.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element1.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element1.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element1.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element1.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "openrc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image1
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Dinit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element2
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Dinit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element2.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element2.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element2.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element2.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "dinit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image2
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Runit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element3
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Runit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element3.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element3.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element3.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element3.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "runit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image3
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("S6 base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element4
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("S6")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element4.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element4.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element4.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element4.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "s6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image4
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 25
|
|
||||||
color: "#f2f2f2"
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
height: 25
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
|
|
||||||
font.pointSize: 10
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource>
|
|
||||||
<file alias="packagechooserq.qml">packagechooserq-qt6.qml</file>
|
|
||||||
<file>images/if.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
# SPDX-FileCopyrightText: no
|
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
|
||||||
#
|
|
||||||
# Configuration for the low-density software chooser, QML implementation
|
|
||||||
#
|
|
||||||
# The example QML implementation uses single-selection, rather than
|
|
||||||
# a model for the available packages. That makes it simpler: the
|
|
||||||
# QML itself codes the available options, descriptions and images
|
|
||||||
# -- after all, this is **low density** selection, so a custom UI
|
|
||||||
# can make sense for the few choices that need to be made.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
---
|
|
||||||
# Software installation method:
|
|
||||||
#
|
|
||||||
# - "legacy" or "custom" or "contextualprocess"
|
|
||||||
# When set to "legacy", writes a GlobalStorage value for the choice that
|
|
||||||
# has been made. The key is *packagechooser_<id>*. The module's
|
|
||||||
# instance name is used; see the *instances* section of `settings.conf`.
|
|
||||||
# If there is just one packagechooserq module, and no special instance is set,
|
|
||||||
# resulting GS key is probably *packagechooser_packagechooserq*.
|
|
||||||
# (Do note that the prefix of the GS key remains "packagechooser_")
|
|
||||||
#
|
|
||||||
# The GS value is a comma-separated list of the IDs of the selected
|
|
||||||
# packages, or an empty string if none is selected.
|
|
||||||
#
|
|
||||||
# With "legacy" installation, you should have a contextualprocess or similar
|
|
||||||
# module somewhere in the `exec` phase to process the GlobalStorage key
|
|
||||||
# and actually **do** something for the packages.
|
|
||||||
#
|
|
||||||
# - "packages"
|
|
||||||
# When set to "packages", writes GlobalStorage values suitable for
|
|
||||||
# consumption by the *packages* module (which should appear later
|
|
||||||
# in the `exec` section. These package settings will then be handed
|
|
||||||
# off to whatever package manager is configured there.
|
|
||||||
#
|
|
||||||
# There is no need to put this module in the `exec` section. There
|
|
||||||
# are no jobs that this module provides. You should put **other**
|
|
||||||
# modules, either *contextualprocess* or *packages* or some custom
|
|
||||||
# module, in the `exec` section to do the actual work.
|
|
||||||
#
|
|
||||||
method: legacy
|
|
||||||
|
|
||||||
# Human-visible strings in this module. These are all optional.
|
|
||||||
# The following translated keys are used:
|
|
||||||
# - *step*, used in the overall progress view (left-hand pane)
|
|
||||||
#
|
|
||||||
# Each key can have a [locale] added to it, which is used as
|
|
||||||
# the translated string for that locale. For the strings
|
|
||||||
# associated with the "no-selection" item, see *items*, below
|
|
||||||
# with the explicit item-*id* "".
|
|
||||||
#
|
|
||||||
labels:
|
|
||||||
step: "Packages"
|
|
||||||
step[nl]: "Pakketten"
|
|
||||||
|
|
||||||
# The *packageChoice* value is used for setting the default selection
|
|
||||||
# in the QML view; this should match one of the keys used in the QML
|
|
||||||
# module for package names.
|
|
||||||
#
|
|
||||||
# (e.g. the sample QML uses "no_office_suite", "minimal_install" and
|
|
||||||
# "libreoffice" as possible choices).
|
|
||||||
#
|
|
||||||
packageChoice: libreoffice
|
|
||||||
|
|
||||||
@@ -1,304 +0,0 @@
|
|||||||
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
||||||
*
|
|
||||||
* SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*
|
|
||||||
* Calamares is Free Software: see the License-Identifier above.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
import io.calamares.core 1.0
|
|
||||||
import io.calamares.ui 1.0
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
|
|
||||||
Item {
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "#f2f2f2"
|
|
||||||
|
|
||||||
ButtonGroup {
|
|
||||||
id: switchGroup
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: column
|
|
||||||
anchors.centerIn: parent
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
//id: rectangle
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("OpenRC base system.<br/>
|
|
||||||
Default option.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element1
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("OpenRC")
|
|
||||||
checked: true
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element1.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element1.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element1.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element1.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element1.checked ? (element1.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "openrc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image1
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Dinit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element2
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Dinit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element2.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element2.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element2.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element2.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element2.checked ? (element2.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "dinit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image2
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Runit base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element3
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("Runit")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element3.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element3.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element3.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element3.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element3.checked ? (element3.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "runit"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image3
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 150
|
|
||||||
color: "#ffffff"
|
|
||||||
radius: 10
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
width: 450
|
|
||||||
height: 104
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("S6 base system.")
|
|
||||||
font.pointSize: 10
|
|
||||||
anchors.verticalCenterOffset: -10
|
|
||||||
anchors.horizontalCenterOffset: 100
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
|
|
||||||
Switch {
|
|
||||||
id: element4
|
|
||||||
x: 500
|
|
||||||
y: 110
|
|
||||||
width: 187
|
|
||||||
height: 14
|
|
||||||
text: qsTr("S6")
|
|
||||||
checked: false
|
|
||||||
hoverEnabled: true
|
|
||||||
ButtonGroup.group: switchGroup
|
|
||||||
|
|
||||||
indicator: Rectangle {
|
|
||||||
implicitWidth: 40
|
|
||||||
implicitHeight: 14
|
|
||||||
radius: 10
|
|
||||||
color: element4.checked ? "#3498db" : "#B9B9B9"
|
|
||||||
border.color: element4.checked ? "#3498db" : "#cccccc"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
x: element4.checked ? parent.width - width : 0
|
|
||||||
y: (parent.height - height) / 2
|
|
||||||
width: 20
|
|
||||||
height: 20
|
|
||||||
radius: 10
|
|
||||||
color: element4.down ? "#cccccc" : "#ffffff"
|
|
||||||
border.color: element4.checked ? (element4.down ? "#3498db" : "#3498db") : "#999999"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCheckedChanged: {
|
|
||||||
if ( checked ) {
|
|
||||||
config.packageChoice = "s6"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: image4
|
|
||||||
x: 8
|
|
||||||
y: 25
|
|
||||||
height: 100
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
source: "images/if.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 700
|
|
||||||
height: 25
|
|
||||||
color: "#f2f2f2"
|
|
||||||
border.width: 0
|
|
||||||
Text {
|
|
||||||
height: 25
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
|
|
||||||
font.pointSize: 10
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource>
|
|
||||||
<file>packagechooserq.qml</file>
|
|
||||||
<file>images/if.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -1,35 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export XAUTHCOOKIE=$XAUTHORITY
|
|
||||||
readonly conf=/etc/calamares-config-switcher.conf
|
readonly conf=/etc/calamares-config-switcher.conf
|
||||||
|
|
||||||
online_text='<span font="Roboto Regular 12"><b>Online</b> method lets you choose your desktop and most of your system components. It requires a (fast) internet connection and you get the most up-to-date software.
|
if [[ -f "${conf}" ]]; then
|
||||||
It may lead to incorrectly configured and even unbootable system, if the user makes wrong choices or the internet connection fails.
|
# shellcheck source=/etc/calamares-config-switcher.conf
|
||||||
<b>Still experimental.</b></span>:LBL'
|
. "${conf}"
|
||||||
|
|
||||||
offline_text='<span font="Roboto Regular 12"><b>Offline</b> method copies this awesome live image to your disk. It is faster and immune to user errors.
|
|
||||||
Choose this if even slightly unsure; you can update at any time after installation.
|
|
||||||
|
|
||||||
You know what they say about red buttons.
|
|
||||||
<b>Seriously, choose offline.</b></span>:LBL'
|
|
||||||
|
|
||||||
online_icon='/etc/calamares-online/network-online.svg'
|
|
||||||
offline_icon='/etc/calamares-offline/network-offline.svg'
|
|
||||||
|
|
||||||
online_button='<span foreground="red" font="Roboto Bold 14"> Online</span>!'$online_icon'!:5'
|
|
||||||
offline_button='<span foreground="lime" font="Roboto Bold 14"> Offline</span>!'$offline_icon'!:7'
|
|
||||||
|
|
||||||
yad --center --on-top --form --window-icon='/usr/share/icons/artix/logo.svg' --height=384 --width=768 \
|
|
||||||
--title='Choose installation method' --image='/usr/share/icons/breeze-dark/apps/48/calamares.svg' \
|
|
||||||
--text-align='center' --text='<span font="Roboto Bold 14">Choose installation method\n\n</span>' \
|
|
||||||
--columns=2 --borders=10 --homogeneous --scroll --buttons-layout='spread' \
|
|
||||||
--field="$online_text" --field="$offline_text" --button="$online_button" --button="$offline_button"
|
|
||||||
|
|
||||||
if [ $? -eq 5 ]; then
|
|
||||||
mode='online'
|
|
||||||
else
|
|
||||||
mode='offline'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkexec ln -snf /etc/calamares-"$mode" /etc/calamares
|
title=${title:-"Switcher"}
|
||||||
pkexec env DISPLAY=:0 XAUTHORITY=$XAUTHCOOKIE QT_QPA_PLATFORMTHEME=gtk2 calamares "$@"
|
text=${text:-"Select:"}
|
||||||
|
if [[ -z "${configs[*]}" ]]; then
|
||||||
|
configs=(online offline)
|
||||||
|
fi
|
||||||
|
|
||||||
|
select=$(kdialog --title "${title}" --combobox "${text}" "${configs[@]}" --default "${configs[0]}")
|
||||||
|
|
||||||
|
pkexec ln -snf /etc/calamares-"$select" /etc/calamares
|
||||||
|
pkexec calamares "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user