fix(Calamares): Installater will ask the desktop env before the calamares install

- The installer is still W.I.P
This commit is contained in:
2026-06-04 23:30:33 +02:00
parent a7a5055ee8
commit 98d47d497c
25 changed files with 700 additions and 179 deletions
@@ -1,44 +0,0 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import calamares 1.0
Page {
id: page
title: qsTr("Choix de l'environnement")
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 12
Text {
text: qsTr("Choisissez l'environnement de bureau à installer :")
font.pixelSize: 20
color: "#00d4ff"
}
RadioButton { id: rb_xfce; text: "Xfce"; checked: true; onCheckedChanged: if (checked) saveChoice() }
RadioButton { id: rb_kde; text: "KDE"; onCheckedChanged: if (checked) saveChoice() }
RadioButton { id: rb_gnome; text: "GNOME"; onCheckedChanged: if (checked) saveChoice() }
RadioButton { id: rb_hypr; text: "Hyprland"; onCheckedChanged: if (checked) saveChoice() }
Button {
text: qsTr("Enregistrer le choix")
onClicked: saveChoice()
}
function saveChoice() {
var choice = rb_xfce.checked ? "xfce" : (rb_kde.checked ? "kde" : (rb_gnome.checked ? "gnome" : "hyprland"))
try {
calamares.globalStorage.insert("FWS_DESKTOP", choice)
} catch (e) {
// ignore if unavailable
}
try {
calamares.utils.runCommand("/bin/sh", ["-c", "printf '%s' \"" + choice + "\" > /run/fws-desktop"], true)
} catch (e) {
// best effort
}
}
}
}