Compare commits

..

1 Commits

Author SHA1 Message Date
5d88475754 fix appstream-qt5 2023-12-26 02:55:04 +01:00
9 changed files with 158 additions and 288 deletions

View File

@@ -25,9 +25,9 @@ endif()
#
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
if(BUILD_APPSTREAM)
find_package(AppStreamQt)
find_package(AppStreamQt5)
set_package_properties(
AppStreamQt
AppStreamQt5
PROPERTIES
DESCRIPTION "Support for AppStream (cache) data"
URL "https://github.com/ximion/appstream"
@@ -35,8 +35,8 @@ if(BUILD_APPSTREAM)
TYPE OPTIONAL
)
if(AppStreamQt_FOUND)
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
list(APPEND _extra_libraries AppStreamQt)
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt5_VERSION_MAJOR})
list(APPEND _extra_libraries AppStreamQt5)
list(APPEND _extra_src ItemAppStream.cpp)
endif()
endif()

View File

@@ -16,7 +16,7 @@
#ifdef HAVE_APPSTREAM_VERSION
#include "ItemAppStream.h"
#include <AppStreamQt/pool.h>
#include <AppStreamQt5/pool.h>
#include <memory>
#endif

View File

@@ -17,9 +17,9 @@
#include "utils/Logger.h"
#include "utils/Variant.h"
#include <AppStreamQt/image.h>
#include <AppStreamQt/pool.h>
#include <AppStreamQt/screenshot.h>
#include <AppStreamQt5/image.h>
#include <AppStreamQt5/pool.h>
#include <AppStreamQt5/screenshot.h>
/// @brief Return number of pixels in a size, for < ordering purposes
static inline quint64

View File

@@ -36,9 +36,9 @@ endif()
#
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
if(BUILD_APPSTREAM)
find_package(AppStreamQt)
find_package(AppStreamQt5)
set_package_properties(
AppStreamQt
AppStreamQt5
PROPERTIES
DESCRIPTION "Support for AppStream (cache) data"
URL "https://github.com/ximion/appstream"
@@ -46,8 +46,8 @@ if(BUILD_APPSTREAM)
TYPE OPTIONAL
)
if(AppStreamQt_FOUND)
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt_VERSION_MAJOR})
list(APPEND _extra_libraries AppStreamQt)
add_definitions(-DHAVE_APPSTREAM_VERSION=${AppStreamQt5_VERSION_MAJOR})
list(APPEND _extra_libraries AppStreamQt5)
list(APPEND _extra_src ${_packagechooser}/ItemAppStream.cpp)
endif()
endif()

View File

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

View File

@@ -42,7 +42,7 @@ Item {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("OpenRC base system.<br/>
text: qsTr("LibreOffice is a powerful and free office suite, used by millions of people around the world. It includes several applications that make it the most versatile Free and Open Source office suite on the market.<br/>
Default option.")
font.pointSize: 10
anchors.verticalCenterOffset: -10
@@ -50,14 +50,76 @@ Item {
wrapMode: Text.WordWrap
}
Switch {
id: element2
x: 500
y: 110
width: 187
height: 14
text: qsTr("LibreOffice")
checked: true
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 ? (element1.down ? "#3498db" : "#3498db") : "#999999"
}
}
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "libreoffice"
}
}
}
Image {
id: image2
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/libreoffice.jpg"
}
}
Rectangle {
width: 700
height: 150
radius: 10
border.width: 0
Text {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("If you don't want to install an office suite, just select No Office Suite. You can always add one (or more) later on your installed system as the need arrives.")
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
text: qsTr("No Office Suite")
checked: false
hoverEnabled: true
ButtonGroup.group: switchGroup
@@ -81,80 +143,18 @@ Item {
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "elogind-openrc"
config.packageChoice = "no_office_suite"
}
}
}
Image {
id: image1
id: image
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.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 = "elogind-dinit"
}
}
}
Image {
id: image2
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.png"
source: "images/no-selection.png"
}
}
@@ -169,7 +169,7 @@ Item {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("Runit base system.")
text: qsTr("Create a minimal Desktop install, remove all extra applications and decide later on what you would like to add to your system. Examples of what won't be on such an install, there will be no Office Suite, no media players, no image viewer or print support. It will be just a desktop, file browser, package manager, text editor and simple web-browser.")
font.pointSize: 10
anchors.verticalCenterOffset: -10
anchors.horizontalCenterOffset: 100
@@ -182,7 +182,7 @@ Item {
y: 110
width: 187
height: 14
text: qsTr("Runit")
text: qsTr("Minimal Install")
checked: false
hoverEnabled: true
ButtonGroup.group: switchGroup
@@ -207,7 +207,7 @@ Item {
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "elogind-runit"
config.packageChoice = "minimal_install"
}
}
}
@@ -218,70 +218,7 @@ Item {
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.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 = "elogind-s6"
}
}
}
Image {
id: image4
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.png"
source: "images/plasma.png"
}
}
@@ -293,7 +230,7 @@ Item {
Text {
height: 25
anchors.centerIn: parent
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
text: qsTr("Please select an option for your install, or use the default: LibreOffice included.")
font.pointSize: 10
wrapMode: Text.WordWrap
}

View File

@@ -4,6 +4,5 @@
<file>images/libreoffice.jpg</file>
<file>images/no-selection.png</file>
<file>images/plasma.png</file>
<file>images/artix.png</file>
</qresource>
</RCC>

View File

@@ -42,7 +42,7 @@ Item {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("OpenRC base system.<br/>
text: qsTr("LibreOffice is a powerful and free office suite, used by millions of people around the world. It includes several applications that make it the most versatile Free and Open Source office suite on the market.<br/>
Default option.")
font.pointSize: 10
anchors.verticalCenterOffset: -10
@@ -50,14 +50,76 @@ Item {
wrapMode: Text.WordWrap
}
Switch {
id: element2
x: 500
y: 110
width: 187
height: 14
text: qsTr("LibreOffice")
checked: true
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 ? (element1.down ? "#3498db" : "#3498db") : "#999999"
}
}
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "libreoffice"
}
}
}
Image {
id: image2
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/libreoffice.jpg"
}
}
Rectangle {
width: 700
height: 150
radius: 10
border.width: 0
Text {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("If you don't want to install an office suite, just select No Office Suite. You can always add one (or more) later on your installed system as the need arrives.")
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
text: qsTr("No Office Suite")
checked: false
hoverEnabled: true
ButtonGroup.group: switchGroup
@@ -81,80 +143,18 @@ Item {
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "elogind-openrc"
config.packageChoice = "no_office_suite"
}
}
}
Image {
id: image1
id: image
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.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 = "elogind-dinit"
}
}
}
Image {
id: image2
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.png"
source: "images/no-selection.png"
}
}
@@ -169,7 +169,7 @@ Item {
width: 450
height: 104
anchors.centerIn: parent
text: qsTr("Runit base system.")
text: qsTr("Create a minimal Desktop install, remove all extra applications and decide later on what you would like to add to your system. Examples of what won't be on such an install, there will be no Office Suite, no media players, no image viewer or print support. It will be just a desktop, file browser, package manager, text editor and simple web-browser.")
font.pointSize: 10
anchors.verticalCenterOffset: -10
anchors.horizontalCenterOffset: 100
@@ -182,7 +182,7 @@ Item {
y: 110
width: 187
height: 14
text: qsTr("Runit")
text: qsTr("Minimal Install")
checked: false
hoverEnabled: true
ButtonGroup.group: switchGroup
@@ -207,7 +207,7 @@ Item {
onCheckedChanged: {
if ( checked ) {
config.packageChoice = "elogind-runit"
config.packageChoice = "minimal_install"
}
}
}
@@ -218,70 +218,7 @@ Item {
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.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 = "elogind-s6"
}
}
}
Image {
id: image4
x: 8
y: 25
height: 100
fillMode: Image.PreserveAspectFit
source: "images/artix.png"
source: "images/plasma.png"
}
}
@@ -293,7 +230,7 @@ Item {
Text {
height: 25
anchors.centerIn: parent
text: qsTr("Please select an option for your install, or use the default: OpenRC.")
text: qsTr("Please select an option for your install, or use the default: LibreOffice included.")
font.pointSize: 10
wrapMode: Text.WordWrap
}

View File

@@ -4,6 +4,5 @@
<file>images/libreoffice.jpg</file>
<file>images/no-selection.png</file>
<file>images/plasma.png</file>
<file>images/artix.png</file>
</qresource>
</RCC>