Compare commits
5 Commits
extensions
...
headers-in
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d50897335 | |||
|
|
8a199aaaf9 | ||
|
|
02aa49d442 | ||
|
|
f847f90842 | ||
|
|
fa2b96e9cc |
@@ -11,13 +11,16 @@ the history of the 3.2 series (2018-05 - 2022-08).
|
|||||||
# 3.3.1 (unreleased)
|
# 3.3.1 (unreleased)
|
||||||
|
|
||||||
This release contains contributions from (alphabetically by first name):
|
This release contains contributions from (alphabetically by first name):
|
||||||
- Nobody yet!
|
- Adriaan de Groot
|
||||||
|
- Aleksey Samoilov
|
||||||
|
- Emir Sari
|
||||||
|
|
||||||
## Core ##
|
## Core ##
|
||||||
- No changes of note.
|
- No changes of note.
|
||||||
|
|
||||||
## Modules ##
|
## Modules ##
|
||||||
- No changes of note.
|
- The *displaymanager* module configuration for `greetd` has some more
|
||||||
|
options now. (thanks Aleksey)
|
||||||
|
|
||||||
|
|
||||||
# 3.3.0 (2023-12-12)
|
# 3.3.0 (2023-12-12)
|
||||||
|
|||||||
74
CMakeModules/AppStreamHelper.cmake
Normal file
74
CMakeModules/AppStreamHelper.cmake
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
# === 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)" ON)
|
||||||
|
|
||||||
|
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(NOT _appstream_name)
|
||||||
|
# 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})
|
||||||
|
target_link_libraries(calaappstream INTERFACE ${_appstream_name})
|
||||||
|
add_library(calamares::appstreamqt ALIAS calaappstream)
|
||||||
|
endif()
|
||||||
|
set(AppStreamQt_FOUND ${HAVE_APPSTREAM})
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
include( CalamaresAddTranslations )
|
include( CalamaresAddTranslations )
|
||||||
include( CalamaresCheckModuleSelection )
|
include( CalamaresCheckModuleSelection )
|
||||||
include( FeatureSummary )
|
|
||||||
|
|
||||||
set( MODULE_DATA_DESTINATION share/calamares/modules )
|
set( MODULE_DATA_DESTINATION share/calamares/modules )
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
# calamares_add_plugin(
|
# calamares_add_plugin(
|
||||||
# module-name
|
# module-name
|
||||||
# TYPE <view|job>
|
# TYPE <viewmodule|job>
|
||||||
# EXPORT_MACRO macro-name
|
# EXPORT_MACRO macro-name
|
||||||
# SOURCES source-file...
|
# SOURCES source-file...
|
||||||
# UI ui-file...
|
# UI ui-file...
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
# [WEIGHT w]
|
# [WEIGHT w]
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
# Function parameters:
|
# Function optional parameters:
|
||||||
# - COMPILE_DEFINITIONS
|
# - COMPILE_DEFINITIONS
|
||||||
# Definitions are set on the resulting module with a suitable
|
# Definitions are set on the resulting module with a suitable
|
||||||
# flag (i.e. `-D`) so only state the name (optionally, also the value)
|
# 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
|
# SKIPPED_MODULES is set in the parent (i.e. caller's) scope with the
|
||||||
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
# reason why. This should rarely be a concern as AddModuleSubdirectory
|
||||||
# already handles skip-reasons and collects them for reporting.
|
# 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 )
|
include( CMakeParseArguments )
|
||||||
|
|
||||||
@@ -126,7 +129,7 @@ function( calamares_add_plugin )
|
|||||||
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
|
||||||
|
|
||||||
# automatic library linkage
|
# 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)
|
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamaresui)
|
||||||
elseif(PLUGIN_TYPE STREQUAL "job")
|
elseif(PLUGIN_TYPE STREQUAL "job")
|
||||||
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
|
list(APPEND PLUGIN_LINK_PRIVATE_LIBRARIES Calamares::calamares)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
# This file has not yet been documented for use outside of Calamares itself.
|
# 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
|
# The Gettext module is still old-fashioned, ALLCAPS variables
|
||||||
find_package( Gettext )
|
find_package( Gettext )
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ install(
|
|||||||
DESTINATION include/libcalamares
|
DESTINATION include/libcalamares
|
||||||
)
|
)
|
||||||
# Install each subdir-worth of header files
|
# 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")
|
file(GLOB subdir_headers "${subdir}/*.h")
|
||||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
@@ -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,6 +43,11 @@ calamares_add_plugin(packagechooser
|
|||||||
SHARED_LIB
|
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(
|
calamares_add_test(
|
||||||
packagechoosertest
|
packagechoosertest
|
||||||
GUI
|
GUI
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ if(NOT WITH_QML)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
|
||||||
|
set(_extra_libraries "")
|
||||||
# Add optional libraries here
|
set(_extra_src "")
|
||||||
set(USER_EXTRA_LIB)
|
|
||||||
|
|
||||||
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
|
||||||
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
|
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
|
||||||
@@ -34,23 +33,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 ${_packagechooser}/ItemAppStream.cpp)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
calamares_add_plugin(packagechooserq
|
calamares_add_plugin(packagechooserq
|
||||||
TYPE viewmodule
|
TYPE viewmodule
|
||||||
@@ -67,3 +50,8 @@ calamares_add_plugin(packagechooserq
|
|||||||
${_extra_libraries}
|
${_extra_libraries}
|
||||||
SHARED_LIB
|
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 ) )
|
if ( isPartitionFreeSpace( partition ) )
|
||||||
{
|
{
|
||||||
name = tr( "Free Space", "@title );
|
name = tr( "Free Space", "@title" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user