feat: the Steamify page fetches the newest steamify.sh + rows before Calamares starts; fix layout warning and Theme.qml copy

This commit is contained in:
theupriser committed 2026-09-28 12:50:58 +02:00
1 parent 754a6a14da
commit f58fa9bb1b
3 files changed
+39 -5

No files matched your search

@@ -44,6 +44,38 @@ main() {
########## System: $SYSTEM
EOF
# Steamify: try the newest release before Calamares starts, so the page
# and the install step both show/use it; keep the ISO's copy (from
# steamify-prepare.sh) on any failure (no network, GitHub unreachable).
local sdir=/usr/local/share/steamify sbin="$sdir/steamify.sh" sqml="$sdir/qml"
local tmp; tmp="$(mktemp)"
if curl -fsSL --max-time 20 https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify.sh -o "$tmp" &&
grep -q -- '--defaults' "$tmp"; then
sudo install -Dm755 "$tmp" "$sbin"
fi
rm -f "$tmp"
tmp="$(mktemp -d)"
if curl -fsSL --max-time 20 https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify-app.tar.gz |
tar -xz -C "$tmp" --strip-components=2 ui/qml/Theme.qml ui/qml/Texts.qml 2>/dev/null; then
sudo cp "$tmp/Theme.qml" "$tmp/Texts.qml" "$sqml/"
fi
rm -rf "$tmp"
# The page's rows, from whichever steamify.sh ended up on the ISO
# (regenerated even when the download failed: the fallback Items.qml
# doesn't know this machine, e.g. no VRAM region or no Steam account yet).
# JSON is valid JS array-literal syntax, so the output goes straight into
# the singleton as-is (--list guarantees one line of only its own JSON
# punctuation and text fields Steamify itself writes: nothing here can
# break out of the property).
tmp="$(mktemp)"
if "$sbin" --defaults --list > "$tmp" 2>/dev/null && [[ -s "$tmp" ]]; then
{ printf 'pragma Singleton\nimport QtQuick\n\nQtObject {\n readonly property var rows: '
cat "$tmp"
printf '\n}\n'
} | sudo tee "$sqml/Items.qml" > /dev/null
fi
rm -f "$tmp"
sudo cp "/usr/share/calamares/settings_${mode}.conf" /etc/calamares/settings.conf
# Steamify: its page (packagechooserq@steamifypage, right after the
# packages page) and its step (modules/shellprocess_steamify.conf) before
@@ -88,7 +88,8 @@ Item {
ListView {
id: list
Layout.fillHeight: true
Layout.preferredWidth: parent.width * 0.55
Layout.fillWidth: true
Layout.preferredWidth: 55
clip: true
spacing: 4
boundsBehavior: Flickable.StopAtBounds
@@ -150,6 +151,7 @@ Item {
readonly property var tx: Texts.items[it.id] || ({})
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 45
radius: 4
color: pal.base
border.width: 1
+4 -4
View File
@@ -19,19 +19,19 @@ else
curl -fsSL https://raw.githubusercontent.com/theupriser/steamify-cachyos/main/patches/steamify-fremont-poweroff.c -o "$poweroff"
fi
# The installer's Steamify page (/usr/local/share/steamify-installer/
# SteamifyPage.qml) shows the app's explanations (Texts.qml, from the
# SteamifyPage.qml) shows the app's explanations (Theme.qml, Texts.qml, from the
# checkout, else the newest release's app) and its rows (Items.qml: this
# fallback until calamares-online.sh writes the real list).
qml="$(dirname "$dest")/qml"
rm -rf "$qml"; mkdir -p "$qml"
if [[ -n "${1:-}" ]]; then
cp "$1/ui/qml/Texts.qml" "$qml/"
cp "$1"/ui/qml/{Theme,Texts}.qml "$qml/"
else
curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify-app.tar.gz |
tar -xz -C "$qml" --strip-components=2 ui/qml/Texts.qml
tar -xz -C "$qml" --strip-components=2 ui/qml/Theme.qml ui/qml/Texts.qml
fi
cp "$(cd "$(dirname "$0")" && pwd)/archiso/airootfs/usr/local/share/steamify-installer/Items.qml" "$qml/"
printf '%s\n' 'singleton Texts 1.0 Texts.qml' 'singleton Items 1.0 Items.qml' > "$qml/qmldir"
printf '%s\n' 'singleton Theme 1.0 Theme.qml' 'singleton Texts 1.0 Texts.qml' 'singleton Items 1.0 Items.qml' > "$qml/qmldir"
grep -q -- '--defaults' "$dest" || { echo "This Steamify has no --defaults (needs 2.6.0 or newer)." >&2; exit 1; }
chmod 755 "$dest"
# Temporary: cachyos-calamares-next 3.4.2-13 is linked against Boost 1.91