Compare commits

..

1 Commits

Author SHA1 Message Date
e7d8f6fbb0 fix extensions build 2023-12-30 23:52:02 +01:00
9 changed files with 46 additions and 101 deletions

View File

@@ -11,16 +11,13 @@ the history of the 3.2 series (2018-05 - 2022-08).
# 3.3.1 (unreleased)
This release contains contributions from (alphabetically by first name):
- Adriaan de Groot
- Aleksey Samoilov
- Emir Sari
- Nobody yet!
## Core ##
- No changes of note.
## Modules ##
- The *displaymanager* module configuration for `greetd` has some more
options now. (thanks Aleksey)
- No changes of note.
# 3.3.0 (2023-12-12)

View File

@@ -1,74 +0,0 @@
# === 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})

View File

@@ -39,6 +39,7 @@
include( CalamaresAddTranslations )
include( CalamaresCheckModuleSelection )
include( FeatureSummary )
set( MODULE_DATA_DESTINATION share/calamares/modules )

View File

@@ -19,7 +19,7 @@
#
# calamares_add_plugin(
# module-name
# TYPE <viewmodule|job>
# TYPE <view|job>
# EXPORT_MACRO macro-name
# SOURCES source-file...
# UI ui-file...
@@ -35,7 +35,7 @@
# [WEIGHT w]
# )
#
# Function optional parameters:
# Function 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,9 +65,6 @@
# 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 )
@@ -129,7 +126,7 @@ function( calamares_add_plugin )
set( target "calamares_${PLUGIN_TYPE}_${PLUGIN_NAME}" )
# automatic library linkage
if(PLUGIN_TYPE STREQUAL "viewmodule")
if(PLUGIN_TYPE STREQUAL "view" OR 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)

View File

@@ -11,6 +11,7 @@
# This file has not yet been documented for use outside of Calamares itself.
include( CMakeParseArguments )
include( FeatureSummary )
# The Gettext module is still old-fashioned, ALLCAPS variables
find_package( Gettext )

View File

@@ -190,7 +190,7 @@ install(
DESTINATION include/libcalamares
)
# Install each subdir-worth of header files
foreach(subdir geoip locale modulesystem network partition utils compat packages)
foreach(subdir geoip locale modulesystem network partition utils)
file(GLOB subdir_headers "${subdir}/*.h")
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
endforeach()

View File

@@ -23,7 +23,23 @@ endif()
### OPTIONAL AppStream support in PackageModel
#
#
include(AppStreamHelper)
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()
calamares_add_plugin(packagechooser
TYPE viewmodule
@@ -43,11 +59,6 @@ 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

View File

@@ -10,8 +10,9 @@ if(NOT WITH_QML)
endif()
find_package(${qtname} ${QT_VERSION} CONFIG REQUIRED Core)
set(_extra_libraries "")
set(_extra_src "")
# Add optional libraries here
set(USER_EXTRA_LIB)
# include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser )
set(_packagechooser ${CMAKE_CURRENT_SOURCE_DIR}/../packagechooser)
@@ -33,7 +34,23 @@ endif()
### OPTIONAL AppStream support in PackageModel
#
#
include(AppStreamHelper)
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
@@ -50,8 +67,3 @@ 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()

View File

@@ -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
{