Compare commits
19 Commits
extensions
...
v3.3.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ba2ef08bfa | ||
![]() |
881347b9c2 | ||
![]() |
94cb026ad8 | ||
![]() |
f8245ebb6e | ||
![]() |
1b655c26ef | ||
![]() |
5583c15291 | ||
![]() |
437a30fdcf | ||
78eeb963a3 | |||
![]() |
db4730107d | ||
![]() |
58117de3e3 | ||
![]() |
d38a48e900 | ||
![]() |
2798dee036 | ||
![]() |
76a0b00550 | ||
![]() |
062171a2f0 | ||
![]() |
94bc244965 | ||
![]() |
8a199aaaf9 | ||
![]() |
02aa49d442 | ||
![]() |
f847f90842 | ||
![]() |
fa2b96e9cc |
2
.github/workflows/nightly-debian.yml
vendored
2
.github/workflows/nightly-debian.yml
vendored
@@ -11,6 +11,8 @@ env:
|
||||
CMAKE_ARGS: |
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/nightly-fedora-qt6.yml
vendored
2
.github/workflows/nightly-fedora-qt6.yml
vendored
@@ -12,6 +12,8 @@ env:
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DWITH_QT6=ON
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
2
.github/workflows/nightly-opensuse.yml
vendored
2
.github/workflows/nightly-opensuse.yml
vendored
@@ -13,6 +13,8 @@ env:
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_SCHEMA_TESTING=ON
|
||||
-DBUILD_TESTING=ON
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
36
.github/workflows/nightly-ubuntu.yml
vendored
Normal file
36
.github/workflows/nightly-ubuntu.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: nightly-ubuntu
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "12 23 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
BUILDDIR: /build
|
||||
SRCDIR: ${{ github.workspace }}
|
||||
CMAKE_ARGS: |
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DBUILD_APPSTREAM=ON
|
||||
-DBUILD_APPDATA=ON
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://ubuntu:devel
|
||||
options: --tmpfs /build:rw --user 0:0
|
||||
steps:
|
||||
- name: "prepare git"
|
||||
shell: bash
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install git-core jq curl ninja-build
|
||||
- name: "prepare source"
|
||||
uses: calamares/actions/generic-checkout@v5
|
||||
- name: "install dependencies"
|
||||
shell: bash
|
||||
run: ./ci/deps-ubuntu.sh
|
||||
- name: "build"
|
||||
shell: bash
|
||||
run: ./ci/build.sh
|
25
CHANGES-3.3
25
CHANGES-3.3
@@ -8,16 +8,33 @@ changelog -- this log starts with version 3.3.0. See CHANGES-3.2 for
|
||||
the history of the 3.2 series (2018-05 - 2022-08).
|
||||
|
||||
|
||||
# 3.3.1 (unreleased)
|
||||
# 3.3.1 (2024-01-15)
|
||||
|
||||
This release sets `BUILD_APPDATA` and `BUILD_APSTREAM` to default to **OFF**,
|
||||
where previously they defaulted to **ON**. When enabled, the dependencies for
|
||||
both features are required -- previously they would silently switch off if
|
||||
the dependencies were not found. Distributions are strongly advised to check
|
||||
their package-building instructions.
|
||||
|
||||
This release contains contributions from (alphabetically by first name):
|
||||
- Nobody yet!
|
||||
- Adriaan de Groot
|
||||
- Aleksey Samoilov
|
||||
- Emir Sari
|
||||
- Simon Quigley
|
||||
|
||||
## Core ##
|
||||
- No changes of note.
|
||||
- There has been internal code re-organization (e.g. not using functions
|
||||
named `tr()`) to help translation tools.
|
||||
- Strings everywhere have been given more context. (thanks Emir)
|
||||
- In CMake, "view" is no longer accepted as an alias of the module
|
||||
type "viewmodule" in function `calamares_add_plugin()`.
|
||||
- Plain Ubuntu builds have been added to the CI roster. (thanks Simon)
|
||||
- Commands that run in the target system (in the chroot) no longer
|
||||
use the TMP-related environment variables from the host. #2269
|
||||
|
||||
## Modules ##
|
||||
- No changes of note.
|
||||
- The *displaymanager* module configuration for `greetd` has some more
|
||||
options now. (thanks Aleksey)
|
||||
|
||||
|
||||
# 3.3.0 (2023-12-12)
|
||||
|
@@ -48,7 +48,7 @@
|
||||
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
||||
|
||||
set(CALAMARES_VERSION 3.3.1)
|
||||
set(CALAMARES_RELEASE_MODE OFF) # Set to ON during a release
|
||||
set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release
|
||||
|
||||
if(CMAKE_SCRIPT_MODE_FILE)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake)
|
||||
|
86
CMakeModules/AppStreamHelper.cmake
Normal file
86
CMakeModules/AppStreamHelper.cmake
Normal file
@@ -0,0 +1,86 @@
|
||||
# === This file is part of Calamares - <https://calamares.io> ===
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2023 Adriaan de Groot <groot@kde.org>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
#
|
||||
###
|
||||
#
|
||||
# Finds AppStream-Qt suitable for the Qt version that is in use.
|
||||
# Creates target calamares::appstreamqt to alias whatever is found.
|
||||
# Sets AppStreamQt_FOUND appropriately, regardless of the underlying
|
||||
# variables (e.g. might be AppStreamQt6_FOUND).
|
||||
#
|
||||
|
||||
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" OFF)
|
||||
|
||||
if(TARGET calaappstream)
|
||||
if(TARGET calamares::appstreamqt)
|
||||
message(STATUS "AppStreamQt has already been found")
|
||||
set(AppStreamQt_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "AppStreamQt has been searched-for and not found")
|
||||
set(AppStreamQt_FOUND FALSE)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
if(NOT BUILD_APPSTREAM)
|
||||
return()
|
||||
endif()
|
||||
|
||||
### FIND APPSTREAM
|
||||
#
|
||||
# First, look for a Qt-versioned variety of the package.
|
||||
# If that is not found, look for an unversioned one.
|
||||
set(HAVE_APPSTREAM OFF)
|
||||
find_package(AppStream${qtname})
|
||||
# Not everyone renames the variables consistently
|
||||
if(AppStream${qtname}_FOUND OR AppStreamQt_FOUND)
|
||||
set(_appstream_name AppStream${qtname})
|
||||
set(HAVE_APPSTREAM ON)
|
||||
else()
|
||||
find_package(AppStreamQt)
|
||||
if(AppStreamQt_FOUND)
|
||||
set(_appstream_name AppStreamQt)
|
||||
# TODO: how to check underlying Qt version?
|
||||
set(HAVE_APPSTREAM ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_APPSTREAM)
|
||||
# Look for the directory name containing the headers
|
||||
find_file(_appstream_header NAMES ${_appstream_name}/pool.h AppStreamQt/pool.h)
|
||||
if(NOT _appstream_header)
|
||||
set(HAVE_APPSTREAM OFF)
|
||||
else()
|
||||
if(_appstream_header MATCHES /${_appstream_name}/)
|
||||
set(_appstream_header_directory ${_appstream_name})
|
||||
else()
|
||||
set(_appstream_header_directory AppStreamQt)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# Placeholder name
|
||||
set(_appstream_name AppStreamQt)
|
||||
endif()
|
||||
|
||||
set(_appstream_dependency_type OPTIONAL)
|
||||
if(BUILD_APPSTREAM)
|
||||
set(_appstream_dependency_type REQUIRED)
|
||||
endif()
|
||||
|
||||
set_package_properties(
|
||||
${_appstream_name}
|
||||
PROPERTIES
|
||||
DESCRIPTION "Support for AppStream (cache) data"
|
||||
URL "https://github.com/ximion/appstream"
|
||||
PURPOSE "AppStream provides package data"
|
||||
TYPE ${_appstream_dependency_type}
|
||||
)
|
||||
|
||||
add_library(calaappstream INTERFACE) # Always, but might not be populated
|
||||
if(HAVE_APPSTREAM)
|
||||
target_compile_definitions(calaappstream INTERFACE HAVE_APPSTREAM_VERSION=${${_appstream_name}_VERSION_MAJOR} HAVE_APPSTREAM_HEADERS=${_appstream_header_directory})
|
||||
target_link_libraries(calaappstream INTERFACE ${_appstream_name})
|
||||
add_library(calamares::appstreamqt ALIAS calaappstream)
|
||||
endif()
|
||||
set(AppStreamQt_FOUND ${HAVE_APPSTREAM})
|
@@ -19,7 +19,7 @@
|
||||
#
|
||||
# calamares_add_plugin(
|
||||
# module-name
|
||||
# TYPE <view|job>
|
||||
# TYPE <viewmodule|job>
|
||||
# EXPORT_MACRO macro-name
|
||||
# SOURCES source-file...
|
||||
# UI ui-file...
|
||||
@@ -35,7 +35,7 @@
|
||||
# [WEIGHT w]
|
||||
# )
|
||||
#
|
||||
# Function parameters:
|
||||
# Function optional parameters:
|
||||
# - COMPILE_DEFINITIONS
|
||||
# Definitions are set on the resulting module with a suitable
|
||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
||||
@@ -65,6 +65,9 @@
|
||||
# SKIPPED_MODULES is set in the parent (i.e. caller's) scope with the
|
||||
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
||||
# already handles skip-reasons and collects them for reporting.
|
||||
#
|
||||
# The target defined this way is called "calamares_<TYPE>_<module-name>",
|
||||
# e.g. "calamares_viewmodule_packagechooserq".
|
||||
|
||||
include( CMakeParseArguments )
|
||||
|
||||
@@ -126,7 +129,7 @@ function( calamares_add_plugin )
|
||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||
|
||||
# automatic library linkage
|
||||
if(PLUGIN_TYPE STREQUAL "view" OR PLUGIN_TYPE STREQUAL "viewmodule")
|
||||
if(PLUGIN_TYPE STREQUAL "viewmodule")
|
||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamaresui)
|
||||
elseif(PLUGIN_TYPE STREQUAL "job")
|
||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
|
||||
|
@@ -10,7 +10,8 @@
|
||||
#
|
||||
# This file has not yet been documented for use outside of Calamares itself.
|
||||
|
||||
include( CMakeParseArguments )
|
||||
include(CMakeParseArguments)
|
||||
include(FeatureSummary)
|
||||
|
||||
# The Gettext module is still old-fashioned, ALLCAPS variables
|
||||
find_package( Gettext )
|
||||
|
47
ci/deps-ubuntu.sh
Executable file
47
ci/deps-ubuntu.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Install dependencies for the nightly-ubuntu (devel) build
|
||||
# These build dependencies are grabbed directly from the Debian package
|
||||
#
|
||||
apt-get update
|
||||
apt-get -y install git-core jq curl ninja
|
||||
apt-get -y install \
|
||||
build-essential \
|
||||
cmake \
|
||||
extra-cmake-modules \
|
||||
gettext \
|
||||
libappstreamqt5-dev \
|
||||
libkf5config-dev \
|
||||
libkf5coreaddons-dev \
|
||||
libkf5crash-dev \
|
||||
libkf5i18n-dev \
|
||||
libkf5iconthemes-dev \
|
||||
libkf5kio-dev \
|
||||
libkf5parts-dev \
|
||||
libkf5plasma-dev \
|
||||
libkf5service-dev \
|
||||
libkf5solid-dev \
|
||||
libkpmcore-dev \
|
||||
libparted-dev \
|
||||
libpolkit-qt5-1-dev \
|
||||
libpwquality-dev \
|
||||
libqt5svg5-dev \
|
||||
libqt5webkit5-dev \
|
||||
libyaml-cpp-dev \
|
||||
os-prober \
|
||||
pkg-config \
|
||||
pkg-kde-tools \
|
||||
polkitd \
|
||||
python3-dev \
|
||||
python3-jsonschema \
|
||||
python3-yaml \
|
||||
qml-module-qtquick-layouts \
|
||||
qml-module-qtquick-privatewidgets \
|
||||
qml-module-qtquick-window2 \
|
||||
qml-module-qtquick2 \
|
||||
qtbase5-dev \
|
||||
qtdeclarative5-dev \
|
||||
qtlocation5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
true
|
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-12-27 20:44+0100\n"
|
||||
"POT-Creation-Date: 2024-01-14 21:33+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -68,17 +68,17 @@ msgstr ""
|
||||
msgid "SLIM config file {!s} does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/displaymanager/main.py:935
|
||||
#: src/modules/displaymanager/main.py:938
|
||||
msgid "No display managers selected for the displaymanager module."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/displaymanager/main.py:936
|
||||
#: src/modules/displaymanager/main.py:939
|
||||
msgid ""
|
||||
"The displaymanagers list is empty or undefined in both globalstorage and "
|
||||
"displaymanager.conf."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/displaymanager/main.py:1023
|
||||
#: src/modules/displaymanager/main.py:1026
|
||||
msgid "Display manager configuration was incomplete"
|
||||
msgstr ""
|
||||
|
||||
|
@@ -190,7 +190,7 @@ install(
|
||||
DESTINATION include/libcalamares
|
||||
)
|
||||
# Install each subdir-worth of header files
|
||||
foreach(subdir geoip locale modulesystem network partition utils)
|
||||
foreach(subdir geoip locale modulesystem network partition utils compat packages)
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||
endforeach()
|
||||
|
@@ -128,6 +128,14 @@ Calamares::Utils::Runner::run()
|
||||
{
|
||||
auto env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert( "LC_ALL", "C" );
|
||||
// No guarantees that host settings for /tmp/ make sense in target
|
||||
if ( m_location == RunLocation::RunInTarget )
|
||||
{
|
||||
env.remove( "TEMP" );
|
||||
env.remove( "TEMPDIR" );
|
||||
env.remove( "TMP" );
|
||||
env.remove( "TMPDIR" );
|
||||
}
|
||||
process.setProcessEnvironment( env );
|
||||
}
|
||||
process.setProcessChannelMode( QProcess::MergedChannels );
|
||||
|
@@ -66,7 +66,7 @@ private:
|
||||
QStringList m_FreeBSDLocales;
|
||||
};
|
||||
|
||||
QTEST_MAIN( LocaleTests )
|
||||
QTEST_GUILESS_MAIN( LocaleTests )
|
||||
|
||||
|
||||
LocaleTests::LocaleTests() {}
|
||||
|
@@ -10,9 +10,9 @@ set(_extra_src "")
|
||||
### 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)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
@@ -23,23 +23,7 @@ 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 ItemAppStream.cpp)
|
||||
endif()
|
||||
endif()
|
||||
include(AppStreamHelper)
|
||||
|
||||
calamares_add_plugin(packagechooser
|
||||
TYPE viewmodule
|
||||
@@ -59,6 +43,11 @@ calamares_add_plugin(packagechooser
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
if(AppStreamQt_FOUND)
|
||||
target_link_libraries(calamares_viewmodule_packagechooser PRIVATE calamares::appstreamqt)
|
||||
target_sources(calamares_viewmodule_packagechooser PRIVATE ItemAppStream.cpp)
|
||||
endif()
|
||||
|
||||
calamares_add_test(
|
||||
packagechoosertest
|
||||
GUI
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#ifdef HAVE_APPSTREAM_VERSION
|
||||
#include "ItemAppStream.h"
|
||||
#include <AppStreamQt/pool.h>
|
||||
#include <memory>
|
||||
#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 "utils/Logger.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
|
||||
static inline quint64
|
||||
sizeOrder( const QSize& size )
|
||||
|
@@ -12,10 +12,28 @@
|
||||
|
||||
#include "PackageModel.h"
|
||||
|
||||
namespace AppStream
|
||||
{
|
||||
class Pool;
|
||||
} // namespace AppStream
|
||||
/*
|
||||
* This weird include mechanism is because an #include line is allowed
|
||||
* to consist of preprocessor-tokens, which are expanded, and then
|
||||
* 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.
|
||||
*
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
QTEST_MAIN( PackageChooserTests )
|
||||
QTEST_GUILESS_MAIN( PackageChooserTests )
|
||||
|
||||
PackageChooserTests::PackageChooserTests() {}
|
||||
|
||||
|
@@ -10,9 +10,8 @@ if(NOT WITH_QML)
|
||||
endif()
|
||||
|
||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
||||
|
||||
# Add optional libraries here
|
||||
set(USER_EXTRA_LIB)
|
||||
set(_extra_libraries "")
|
||||
set(_extra_src "")
|
||||
|
||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
|
||||
@@ -21,9 +20,9 @@ include_directories(${_packagechooser})
|
||||
### 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)
|
||||
find_package(${qtname} COMPONENTS Xml)
|
||||
find_package(${qtname} REQUIRED COMPONENTS Xml)
|
||||
if(TARGET ${qtname}::Xml)
|
||||
add_definitions(-DHAVE_APPDATA)
|
||||
list(APPEND _extra_libraries ${qtname}::Xml)
|
||||
@@ -34,23 +33,7 @@ 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()
|
||||
include(AppStreamHelper)
|
||||
|
||||
calamares_add_plugin(packagechooserq
|
||||
TYPE viewmodule
|
||||
@@ -67,3 +50,8 @@ calamares_add_plugin(packagechooserq
|
||||
${_extra_libraries}
|
||||
SHARED_LIB
|
||||
)
|
||||
|
||||
if(AppStreamQt_FOUND)
|
||||
target_link_libraries(calamares_viewmodule_packagechooserq PRIVATE calamares::appstreamqt)
|
||||
target_sources(calamares_viewmodule_packagechooserq PRIVATE ${_packagechooser}/ItemAppStream.cpp)
|
||||
endif()
|
||||
|
@@ -198,7 +198,7 @@ PartitionModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( isPartitionFreeSpace( partition ) )
|
||||
{
|
||||
name = tr( "Free Space", "@title );
|
||||
name = tr( "Free Space", "@title" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user