Skip to content

Commit

Permalink
Merge pull request #31 from Undef-a/wip/undef/fix-ftbfs
Browse files Browse the repository at this point in the history
Fix failure to configure/build with newer CMake and Calamares 3.3.0
  • Loading branch information
adriaandegroot authored Jan 9, 2024
2 parents 6bd7557 + c28c9b8 commit 85f05e8
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 12 deletions.
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,28 @@ project(calamares-extensions
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )

if(WITH_QT6)
set(kfname "KF6")
set(KF_VERSION 5.240) # KDE Neon weirdness
else()
message(STATUS "Building Calamares with Qt5")
set(kfname "KF5")
set(KF_VERSION 5.78)
# API that was deprecated before Qt 5.15 causes a compile error
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050f00)
endif()

include( FeatureSummary )
find_package(${kfname}CoreAddons ${KF_VERSION} QUIET)
set_package_properties(
${kfname}CoreAddons
PROPERTIES
TYPE REQUIRED
DESCRIPTION "KDE Framework CoreAddons"
URL "https://api.kde.org/frameworks/"
PURPOSE "Essential Framework for AboutData and Macros"
)

# On developer's machine, the user package registry breaks
# consumers by loading the developer's config from a build
# directory (which doesn't have the rest of the config
Expand Down
2 changes: 1 addition & 1 deletion modules/mobile/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Config::Config( QObject* parent )
void
Config::setConfigurationMap( const QVariantMap& cfgMap )
{
using namespace CalamaresUtils;
using namespace Calamares;

if ( getBool( cfgMap, "bogus", false ) )
{
Expand Down
4 changes: 2 additions & 2 deletions modules/mobile/PartitionJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "Settings.h"
#include "utils/CalamaresUtilsSystem.h"
#include "utils/System.h"
#include "utils/Logger.h"

#include <QDir>
Expand Down Expand Up @@ -75,7 +75,7 @@ Calamares::JobResult
PartitionJob::exec()
{
using namespace Calamares;
using namespace CalamaresUtils;
using namespace Calamares;
using namespace std;

const QString pathMount = "/mnt/install";
Expand Down
4 changes: 2 additions & 2 deletions modules/mobile/UsersJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "GlobalStorage.h"
#include "JobQueue.h"
#include "Settings.h"
#include "utils/CalamaresUtilsSystem.h"
#include "utils/System.h"
#include "utils/Logger.h"

#include <QDir>
Expand Down Expand Up @@ -47,7 +47,7 @@ Calamares::JobResult
UsersJob::exec()
{
using namespace Calamares;
using namespace CalamaresUtils;
using namespace Calamares;
using namespace std;

QList< QPair< QStringList, QString > > commands = {
Expand Down
2 changes: 1 addition & 1 deletion modules/unpackfsc/FSArchiverRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ FSArchiverRunner::checkPrerequisites( QString& fsarchiverExecutable ) const
Calamares::JobResult
FSArchiverRunner::checkDestination( QString& destinationPath ) const
{
destinationPath = CalamaresUtils::System::instance()->targetPath( m_destination );
destinationPath = Calamares::System::instance()->targetPath( m_destination );
if ( destinationPath.isEmpty() )
{
return Calamares::JobResult::internalError(
Expand Down
2 changes: 1 addition & 1 deletion modules/unpackfsc/Runners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "Runners.h"

#include <utils/CalamaresUtilsSystem.h>
#include <utils/System.h>
#include <utils/Logger.h>

#include <QFileInfo>
Expand Down
2 changes: 1 addition & 1 deletion modules/unpackfsc/TarballRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ TarballRunner::run()
Calamares::JobResult::MissingRequirements );
}

const QString destinationPath = CalamaresUtils::System::instance()->targetPath( m_destination );
const QString destinationPath = Calamares::System::instance()->targetPath( m_destination );
if ( destinationPath.isEmpty() )
{
return Calamares::JobResult::internalError(
Expand Down
6 changes: 3 additions & 3 deletions modules/unpackfsc/UnpackFSCJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ UnpackFSCJob::exec()
void
UnpackFSCJob::setConfigurationMap( const QVariantMap& map )
{
QString source = CalamaresUtils::getString( map, "source" );
QString sourceTypeName = CalamaresUtils::getString( map, "sourcefs" );
QString source = Calamares::getString( map, "source" );
QString sourceTypeName = Calamares::getString( map, "sourcefs" );
if ( source.isEmpty() || sourceTypeName.isEmpty() )
{
cWarning() << "Skipping item with bad source data:" << map;
Expand All @@ -115,7 +115,7 @@ UnpackFSCJob::setConfigurationMap( const QVariantMap& map )
cWarning() << "Skipping item with source type None";
return;
}
QString destination = CalamaresUtils::getString( map, "destination" );
QString destination = Calamares::getString( map, "destination" );
if ( destination.isEmpty() )
{
cWarning() << "Skipping item with empty destination";
Expand Down
2 changes: 1 addition & 1 deletion modules/unpackfsc/UnsquashRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ UnsquashRunner::run()
Calamares::JobResult::MissingRequirements );
}

const QString destinationPath = CalamaresUtils::System::instance()->targetPath( m_destination );
const QString destinationPath = Calamares::System::instance()->targetPath( m_destination );
if ( destinationPath.isEmpty() )
{
return Calamares::JobResult::internalError(
Expand Down

0 comments on commit 85f05e8

Please sign in to comment.