forked from artix/calamares-extensions
		
	Compare commits
	
		
			5 Commits
		
	
	
		
			old-module
			...
			calamares
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 51e89e58dd | ||
|   | d8d5a1fb26 | ||
|   | 85f05e8121 | ||
|   | c28c9b8114 | ||
|   | 935f21ace5 | 
| @@ -32,6 +32,9 @@ | ||||
| # In this repository, there is just one "group" to which USE_* applies: | ||||
| #   USE_os          : operating-system-specific modules. | ||||
| # | ||||
| # There is a knob WITH_QT6 which can be used to build against Qt6 rather | ||||
| # than Qt5. This must match what Calamares itself is built with. | ||||
| # | ||||
| ### NOTES | ||||
| # | ||||
| # Call this CMake file in script mode, e.g. `cmake -P CMakeLists.txt` | ||||
| @@ -40,7 +43,7 @@ | ||||
| # | ||||
| cmake_minimum_required(VERSION 3.16 FATAL_ERROR) | ||||
|  | ||||
| set( CALAMARES_EXTENSIONS_VERSION 1.4.0 ) | ||||
| set( CALAMARES_EXTENSIONS_VERSION 3.3.1 ) | ||||
|  | ||||
| include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake ) | ||||
| if ( CMAKE_SCRIPT_MODE_FILE ) | ||||
| @@ -60,7 +63,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON ) | ||||
| # consumers by loading the developer's config from a build | ||||
| # directory (which doesn't have the rest of the config | ||||
| # installed inside it). | ||||
| set( CALAMARES_VERSION_REQUIRED 3.3.0 ) | ||||
| set( CALAMARES_VERSION_REQUIRED 3.3.1 ) | ||||
| find_package(Calamares ${CALAMARES_VERSION_REQUIRED} NO_CMAKE_PACKAGE_REGISTRY) | ||||
| if (NOT TARGET Calamares::calamares OR NOT TARGET Calamares::calamaresui) | ||||
|     find_package(Calamares ${CALAMARES_VERSION_REQUIRED} REQUIRED) | ||||
| @@ -70,6 +73,32 @@ message(STATUS "Found Calamares version ${Calamares_VERSION}") | ||||
| message(STATUS "              libraries ${Calamares_LIB_DIRS}") | ||||
| message(STATUS "") | ||||
|  | ||||
| ### EXTRACTING DEPENDENCIES AND CONFIGURATION FROM CALAMARES | ||||
| # | ||||
| # | ||||
| 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" | ||||
| ) | ||||
|  | ||||
|  | ||||
| ### CMAKE SETUP | ||||
| # | ||||
| # Enable IN_LIST | ||||
|   | ||||
| @@ -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 ) ) | ||||
|     { | ||||
|   | ||||
| @@ -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> | ||||
| @@ -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"; | ||||
|   | ||||
| @@ -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> | ||||
| @@ -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 = { | ||||
|   | ||||
| @@ -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( | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  | ||||
| #include "Runners.h" | ||||
|  | ||||
| #include <utils/CalamaresUtilsSystem.h> | ||||
| #include <utils/System.h> | ||||
| #include <utils/Logger.h> | ||||
|  | ||||
| #include <QFileInfo> | ||||
|   | ||||
| @@ -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( | ||||
|   | ||||
| @@ -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; | ||||
| @@ -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"; | ||||
|   | ||||
| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user