12 Commits

Author SHA1 Message Date
Adriaan de Groot
51e89e58dd CMake: bump version and requirements
Builds cleanly with Calamares 3.3.1
2024-01-12 23:15:55 +01:00
Adriaan de Groot
d8d5a1fb26 CMake: find Calamares first, then other bits 2024-01-09 23:10:38 +01:00
Adriaan de Groot
85f05e8121 Merge pull request #31 from Undef-a/wip/undef/fix-ftbfs
Fix failure to configure/build with newer CMake and Calamares 3.3.0
2024-01-09 23:06:45 +01:00
undef
c28c9b8114 Port modules to Calamares 3.3.0
Calamares 3.3.0 changed the import name and namespace of
CalamaresUtilsSystem and CalamaresUtilsGui.
2023-12-17 03:40:44 +00:00
undef
935f21ace5 CMakeLists: Copy KF CoreAddons and FeatureSummary imports from Calamares
Without these the package no-longer compiles with recent versions of
cmake.
2023-12-17 03:40:40 +00:00
demmm
6bd75570de Merge pull request #30 from Undef-a/wip/undef/librem5-screen
mobile: Ensure welcome screen fits on Librem5
2023-09-29 14:19:05 +02:00
undef
acdcdea668 mobile: Ensure welcome screen fits on Librem5
Now that the sizing has changed this line overhangs the screen.
2023-09-29 11:36:34 +00:00
Adriaan de Groot
edb405a4d1 Merge pull request #29 from Undef-a/wip/undef/fix-sizing-with-3.3.x
mobile: Adjust all sizes for Calamares 3.3.x
2023-09-28 23:03:26 +02:00
undef
3ad9c221d4 mobile: Adjust all sizes for Calamares 3.3.x
Element sizing in Calamares 3.3.x seems to have dramatically changed,
with for example a button that was previously fine at width 500 now
being huge to the point of causing the installer to overhang the screen.

This reduces the size of most elements such that they fit on a mobile
screen again.

Fixes: https://github.com/calamares/calamares/issues/2192
2023-09-28 08:56:44 +00:00
Adriaan de Groot
dc3550eccd CMake: post-release housekeeping
- Update CMake requirements to shut KF5 up
- Require the next Calamares main branch
- Bump to 1.4.0 version
2023-08-28 23:52:02 +02:00
Adriaan de Groot
fac16ac6a7 CMake: be more chatty about Calamares version used 2023-08-28 21:04:36 +02:00
Adriaan de Groot
a442ed8c12 CI: remove Linuxisms from release script 2023-08-28 20:34:32 +02:00
22 changed files with 127 additions and 92 deletions

View File

@@ -32,15 +32,18 @@
# 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`
# to print out version information. Use `cmake -DVERSION_STYLE=short`
# to get just the short versioning.
#
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set( CALAMARES_EXTENSIONS_VERSION 1.3.2 )
set( CALAMARES_EXTENSIONS_VERSION 3.3.1 )
include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake )
if ( CMAKE_SCRIPT_MODE_FILE )
@@ -60,12 +63,42 @@ 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.2.46 )
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)
endif()
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
@@ -119,6 +152,8 @@ calamares_add_module_subdirectory( modules/refind LIST_SKIPPED_MODULES )
calamares_add_module_subdirectory( modules/slowpython LIST_SKIPPED_MODULES ) # Python job
calamares_add_module_subdirectory( modules/unpackfsc LIST_SKIPPED_MODULES )
message(STATUS "Calamares extensions ${CALAMARES_EXTENSIONS_VERSION} for Calamares version ${Calamares_VERSION}")
# If modules cannot be built, they usually call a macro
# which builds a list of explanations; show that list.
calamares_explain_skipped_modules( ${LIST_SKIPPED_MODULES} )

View File

@@ -10,7 +10,7 @@
# NOTE: this is largely a copy of the release script for Calamares,
# with not-applicable parts (such as translation-freeze) either
# commented-out, or skipped with if(false).
# NOTE: this script contains Linuxisms (in particular, expects GNU mktemp(1))
# NOTE: this script may contain Linuxisms
#
# This attempts to perform the different steps of the RELEASE.md
# document automatically. It's not tested on other machines or
@@ -93,7 +93,7 @@ fi
### Setup
#
#
BUILDDIR=$(mktemp -d --suffix=-build --tmpdir=.)
BUILDDIR=$(mktemp -d -p . -t build.XXXXX)
### Build with default compiler
#
@@ -167,7 +167,7 @@ gpg -s -u $KEY_ID --detach --armor $TAR_FILE # Sign the tarball
#
#
D=$(date +%Y%m%d-%H%M%S)
TMPDIR=$(mktemp -d --suffix="-calamares-$D")
TMPDIR=$(mktemp -d -p . -t calamares.XXXXX)
test -d "$TMPDIR" || { echo "Could not create tarball-build directory." ; exit 1 ; }
tar xzf "$TAR_FILE" -C "$TMPDIR" || { echo "Could not unpack tarball." ; exit 1 ; }
test -d "$TMPDIR/$TAR_V" || { echo "Tarball did not contain source directory." ; exit 1 ; }

View File

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

View File

@@ -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";

View File

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

View File

@@ -22,7 +22,7 @@ Item {
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: "To protect your data in case your device gets stolen," +
@@ -33,15 +33,15 @@ Item {
" boot your device or access any data on it. Make sure that" +
" you don't lose this password!"
width: 500
width: 200
}
Button {
id: firstButton
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Enable")
onClicked: {
@@ -53,8 +53,8 @@ Item {
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: firstButton.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Disable")
onClicked: {

View File

@@ -36,7 +36,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
TextField {
@@ -49,8 +49,8 @@ Item {
text: config.fdePassword
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
}
Text {
@@ -59,15 +59,15 @@ Item {
visible: false
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
wrapMode: Text.WordWrap
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: errorText.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Continue")
onClicked: {

View File

@@ -22,21 +22,21 @@ Item {
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: "Select the filesystem for root partition. If unsure, leave the default."
width: 500
width: 200
}
ComboBox {
id: fsTypeCB
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 40
width: 500
height: 60
anchors.topMargin: 10
width: 150
height: 30
editable: false
model: config.fsList
/* Save the current state on selection so it is there when the back button is pressed */
@@ -47,8 +47,8 @@ Item {
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: fsTypeCB.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Continue")
onClicked: {

View File

@@ -22,7 +22,7 @@ Item {
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 25
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: (function() {
@@ -44,15 +44,15 @@ Item {
return ret;
}())
width: 550
width: 200
}
Button {
id: firstButton
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 20
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Install")
onClicked: navFinish()

View File

@@ -22,7 +22,7 @@ Item {
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: "The installation was started from an external storage medium." +
@@ -32,15 +32,15 @@ Item {
"<br>" +
"Where would you like to install " + config.osName + "?"
width: 500
width: 200
}
Button {
id: firstButton
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Internal (eMMC)")
onClicked: {
@@ -52,8 +52,8 @@ Item {
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: firstButton.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("External (SD card)")
onClicked: {

View File

@@ -22,21 +22,21 @@ Item {
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: "Are you sure that you want to overwrite the internal storage?" +
"<br><br>" +
"<b>All existing data on the device will be lost!</b>"
width: 500
width: 200
}
Button {
id: firstButton
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Yes")
onClicked: {
@@ -47,8 +47,8 @@ Item {
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: firstButton.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("No")
onClicked: {

View File

@@ -77,7 +77,7 @@ Page
Rectangle {
id: mobileNavigation
width: parent.width
height: 60
height: 30
color: "#e6e4e1"
Layout.fillWidth: true
@@ -98,8 +98,8 @@ Page
text: "<"
background: Rectangle {
implicitWidth: 32
implicitHeight: 30
implicitWidth: 10
implicitHeight: 7
border.color: "#c1bab5"
border.width: 1
radius: 4
@@ -109,7 +109,7 @@ Page
onClicked: navBack()
}
Rectangle {
implicitHeight: 30
implicitHeight: 10
Layout.fillWidth: true
color: "#e6e4e1"

View File

@@ -36,7 +36,7 @@ Item {
"More information:<br>" +
"https://postmarketos.org/ssh"
width: 500
width: 200
}
Button {
@@ -44,7 +44,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 40
width: 500
width: 200
text: qsTr("Enable")
onClicked: {
@@ -57,7 +57,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: firstButton.bottom
anchors.topMargin: 40
width: 500
width: 200
text: qsTr("Disable")
onClicked: {

View File

@@ -34,7 +34,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
Text {
@@ -45,7 +45,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
TextField {
@@ -59,7 +59,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
TextField {
@@ -73,7 +73,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
Text {
@@ -84,13 +84,13 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
width: 200
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: errorTextPassword.bottom
anchors.topMargin: 40
width: 500
width: 200
text: qsTr("Continue")
onClicked: {

View File

@@ -35,7 +35,7 @@ Item {
id: usernameDescription
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: (function() {
@@ -43,7 +43,7 @@ Item {
" username is \"" + config.username + "\".";
}())
width: 500
width: 200
}
TextField {
@@ -53,15 +53,15 @@ Item {
onTextChanged: validateNameFunc(username, errorText)
text: config.username
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
}
Text {
id: userPassDescription
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: username.bottom
anchors.topMargin: 30
anchors.topMargin: 10
wrapMode: Text.WordWrap
text: (function() {
@@ -76,7 +76,7 @@ Item {
}
}())
width: 500
width: 200
}
TextField {
@@ -96,8 +96,8 @@ Item {
}
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
}
TextField {
@@ -110,8 +110,8 @@ Item {
text: config.userPassword
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
}
Text {
@@ -121,15 +121,15 @@ Item {
wrapMode: Text.WordWrap
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: errorText.bottom
anchors.topMargin: 40
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Continue")
onClicked: {

View File

@@ -26,8 +26,8 @@ Page
id: logo
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 50
height: 250
anchors.topMargin: 10
height: 50
fillMode: Image.PreserveAspectFit
source: "file:///usr/share/calamares/branding/default-mobile/logo.png"
}
@@ -35,11 +35,11 @@ Page
id: waitText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: logo.bottom
anchors.topMargin: 150
anchors.topMargin: 50
wrapMode: Text.WordWrap
text: "Formatting and mounting target partition. This may" +
" take up to ten minutes, please be patient."
width: 500
width: 200
}
}
}

View File

@@ -28,8 +28,8 @@ Page
id: logo
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 50
height: 250
anchors.topMargin: 10
height: 50
fillMode: Image.PreserveAspectFit
source: "file:///usr/share/calamares/branding/default-mobile/logo.png"
}
@@ -37,7 +37,7 @@ Page
id: mainText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: logo.bottom
anchors.topMargin: 50
anchors.topMargin: 10
horizontalAlignment: Text.AlignRight
text: "You are about to install<br>" +
"<b>" + config.osName +
@@ -46,16 +46,16 @@ Page
"<b>" + config.userInterface + "</b><br>" +
"architecture " +
"<b>" + config.arch + "</b><br>" +
"on your " +
"on your <br>" +
"<b>" + config.device + "</b><br>"
width: 500
width: 200
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: mainText.bottom
anchors.topMargin: 50
width: 500
anchors.topMargin: 10
width: 200
text: qsTr("Continue")
onClicked: navNext()

View File

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

View File

@@ -9,7 +9,7 @@
#include "Runners.h"
#include <utils/CalamaresUtilsSystem.h>
#include <utils/System.h>
#include <utils/Logger.h>
#include <QFileInfo>

View File

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

View File

@@ -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";

View File

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