feat: Preview builds of feat/v2-ui; the app stretches to the window

Pushes to feat/v2-ui publish the pre-release v2-ui-preview (never latest);
its steamify-app.sh downloads that build (STEAMIFY_RELEASE). The app's
1280x720 layout now stretches to the window's shape, so the bars reach the
edges; re-apply resets when back on the menu.
This commit is contained in:
theupriser committed 2026-09-25 16:04:59 +02:00
1 parent c9c16b9eec
commit a1eab9ac79
3 files changed
+50 -14

No files matched your search

+24 -1
View File
@@ -8,12 +8,15 @@
# Each release also has the app (v2): steamify-app.tar.gz (ui/, steamify.sh, # Each release also has the app (v2): steamify-app.tar.gz (ui/, steamify.sh,
# lib/, the icon) and its launcher, run with: # lib/, the icon) and its launcher, run with:
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify-app.sh | bash # curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify-app.sh | bash
# A push to feat/v2-ui (the app, not released yet) updates the pre-release
# v2-ui-preview instead, whose launcher gets that build:
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/download/v2-ui-preview/steamify-app.sh | bash
# Pull requests only build and check it, and warn when VERSION is already released. # Pull requests only build and check it, and warn when VERSION is already released.
name: Single-file build name: Single-file build
on: on:
push: push:
branches: [main] branches: [main, feat/v2-ui]
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
@@ -103,3 +106,23 @@ jobs:
gh release create latest --title "Steamify CachyOS - latest (v$VERSION)" --notes "$latest_notes" --latest=false gh release create latest --title "Steamify CachyOS - latest (v$VERSION)" --notes "$latest_notes" --latest=false
fi fi
gh release upload latest dist/steamify.sh dist/steamify-app.sh dist/steamify-app.tar.gz assets/steam-gaming-settings.svg --clobber gh release upload latest dist/steamify.sh dist/steamify-app.sh dist/steamify-app.tar.gz assets/steam-gaming-settings.svg --clobber
- name: Publish the v2-ui-preview pre-release
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v2-ui'
env:
GH_TOKEN: ${{ github.token }}
run: |
# Its launcher downloads this pre-release, not the newest release.
sed -i 's/STEAMIFY_RELEASE:-latest/STEAMIFY_RELEASE:-v2-ui-preview/' dist/steamify-app.sh
grep -q 'STEAMIFY_RELEASE:-v2-ui-preview' dist/steamify-app.sh
git tag -f v2-ui-preview "$GITHUB_SHA" && git push -f origin v2-ui-preview
notes="Preview of the Steamify app (v2) from feat/v2-ui ($(git describe --always), $(git log -1 --format='%cs %s')). Not a release.
Run it with:
curl -fsSL https://github.com/${{ github.repository }}/releases/download/v2-ui-preview/steamify-app.sh | bash"
if gh release view v2-ui-preview >/dev/null 2>&1; then
gh release edit v2-ui-preview --title "Steamify app (v2) preview" --notes "$notes" --prerelease --latest=false
else
gh release create v2-ui-preview --target "$GITHUB_SHA" --title "Steamify app (v2) preview" --notes "$notes" --prerelease --latest=false
fi
gh release upload v2-ui-preview dist/steamify-app.sh dist/steamify-app.tar.gz --clobber
+14 -9
View File
@@ -118,6 +118,7 @@ ApplicationWindow {
} }
function label(it) { return (texts[it.id] && texts[it.id].label) || it.label; } function label(it) { return (texts[it.id] && texts[it.id].label) || it.label; }
function syncFromStatus() { function syncFromStatus() {
reapply = false;
var w = {}; var w = {};
for (var i = 0; i < items.length; i++) w[items[i].id] = items[i].kind === "action" ? false : items[i].wanted; for (var i = 0; i < items.length; i++) w[items[i].id] = items[i].kind === "action" ? false : items[i].wanted;
want = w; want = w;
@@ -252,7 +253,7 @@ ApplicationWindow {
else if (a === "back") Qt.quit(); else if (a === "back") Qt.quit();
} else if (screen === "review") { } else if (screen === "review") {
if (a === "accept" || a === "apply") onApplyPressed(); if (a === "accept" || a === "apply") onApplyPressed();
else if (a === "back") screen = "menu"; else if (a === "back") { reapply = false; screen = "menu"; }
} else if (screen === "password") { } else if (screen === "password") {
if (a === "accept" || a === "apply") submitPassword(); if (a === "accept" || a === "apply") submitPassword();
else if (a === "back") { pw.text = ""; screen = "review"; } else if (a === "back") { pw.text = ""; screen = "review"; }
@@ -353,9 +354,13 @@ ApplicationWindow {
// --- The 1280x720 stage, scaled to the window --- // --- The 1280x720 stage, scaled to the window ---
Item { Item {
id: stage id: stage
width: 1280; height: 720 // Scaled like a 1280x720 screen, but stretched to the window's own
anchors.centerIn: parent // shape, so the bars reach the edges and the content fills it.
scale: Math.min(win.width / 1280, win.height / 720) readonly property real k: Math.min(win.width / 1280, win.height / 720)
width: win.width / k; height: win.height / k
x: 0; y: 0
transformOrigin: Item.TopLeft
scale: k
focus: true focus: true
Keys.onPressed: function (e) { if (!(screen === "password" && pw.activeFocus && e.key !== Qt.Key_Escape && e.key !== Qt.Key_Return && e.key !== Qt.Key_Enter)) keyAct(e); } Keys.onPressed: function (e) { if (!(screen === "password" && pw.activeFocus && e.key !== Qt.Key_Escape && e.key !== Qt.Key_Return && e.key !== Qt.Key_Enter)) keyAct(e); }
Keys.onReleased: function (e) { if (screen === "bios2" && !e.isAutoRepeat && (e.key === Qt.Key_Return || e.key === Qt.Key_Enter)) act("release"); } Keys.onReleased: function (e) { if (screen === "bios2" && !e.isAutoRepeat && (e.key === Qt.Key_Return || e.key === Qt.Key_Enter)) act("release"); }
@@ -393,7 +398,7 @@ ApplicationWindow {
Item { Item {
id: menuBody; visible: items.length > 0 id: menuBody; visible: items.length > 0
x: 40; y: 28; width: 1200; height: parent.height - 28 - 64 - 20 x: 40; y: 28; width: parent.width - 80; height: parent.height - 28 - 64 - 20
// Left: the list // Left: the list
Column { Column {
id: listCol; width: 740; height: parent.height; spacing: 10 id: listCol; width: 740; height: parent.height; spacing: 10
@@ -564,7 +569,7 @@ ApplicationWindow {
Text { anchors.verticalCenter: parent.verticalCenter; x: 18; text: "Your password is asked once. Changes to how the PC starts need a restart."; color: t.soft; font.family: t.body; font.pixelSize: 14 } } Text { anchors.verticalCenter: parent.verticalCenter; x: 18; text: "Your password is asked once. Changes to how the PC starts need a restart."; color: t.soft; font.family: t.body; font.pixelSize: 14 } }
} }
Rectangle { Rectangle {
x: 812; y: 32; width: 428; height: 210; radius: 16; color: t.card x: parent.width - 468; y: 32; width: 428; height: 210; radius: 16; color: t.card
Column { anchors.fill: parent; anchors.margins: 24; spacing: 12 Column { anchors.fill: parent; anchors.margins: 24; spacing: 12
Text { text: "SUMMARY"; color: t.faint; font.family: t.body; font.pixelSize: 12; font.weight: Font.DemiBold; font.letterSpacing: 0.8 } Text { text: "SUMMARY"; color: t.faint; font.family: t.body; font.pixelSize: 12; font.weight: Font.DemiBold; font.letterSpacing: 0.8 }
Repeater { model: [["Turn on", "on"], ["Re-apply", "again"], ["Turn off", "off"]] Repeater { model: [["Turn on", "on"], ["Re-apply", "again"], ["Turn off", "off"]]
@@ -576,7 +581,7 @@ ApplicationWindow {
Rectangle { Rectangle {
anchors.bottom: parent.bottom; width: parent.width; height: 64; color: t.bar anchors.bottom: parent.bottom; width: parent.width; height: 64; color: t.bar
Rectangle { width: parent.width; height: 1; color: t.line } Rectangle { width: parent.width; height: 1; color: t.line }
Btn { anchors.left: parent.left; anchors.leftMargin: 40; anchors.verticalCenter: parent.verticalCenter; k: g.back; text: "Back to the menu"; onClicked: screen = "menu" } Btn { anchors.left: parent.left; anchors.leftMargin: 40; anchors.verticalCenter: parent.verticalCenter; k: g.back; text: "Back to the menu"; onClicked: act("back") }
Btn { anchors.right: parent.right; anchors.rightMargin: 40; anchors.verticalCenter: parent.verticalCenter; k: g.ok; text: "Apply"; primary: true; visible: plan.length > 0; onClicked: onApplyPressed() } Btn { anchors.right: parent.right; anchors.rightMargin: 40; anchors.verticalCenter: parent.verticalCenter; k: g.ok; text: "Apply"; primary: true; visible: plan.length > 0; onClicked: onApplyPressed() }
} }
} }
@@ -660,7 +665,7 @@ ApplicationWindow {
} }
} }
Column { Column {
x: 632; y: 32; width: 608; height: parent.height - 64; spacing: 10 x: 632; y: 32; width: parent.width - 672; height: parent.height - 64; spacing: 10
Text { text: "DETAILS"; color: t.faint; font.family: t.body; font.pixelSize: 12; font.weight: Font.DemiBold; font.letterSpacing: 0.8 } Text { text: "DETAILS"; color: t.faint; font.family: t.body; font.pixelSize: 12; font.weight: Font.DemiBold; font.letterSpacing: 0.8 }
Rectangle { width: parent.width; height: parent.height - 30; radius: 16; color: "#0b0e13"; border.width: 1; border.color: "#1d2531" Rectangle { width: parent.width; height: parent.height - 30; radius: 16; color: "#0b0e13"; border.width: 1; border.color: "#1d2531"
ListView { id: logView; anchors.fill: parent; anchors.margins: 18; clip: true; model: logModel ListView { id: logView; anchors.fill: parent; anchors.margins: 18; clip: true; model: logModel
@@ -674,7 +679,7 @@ ApplicationWindow {
visible: screen === "bios1" visible: screen === "bios1"
anchors.top: header.bottom; anchors.bottom: parent.bottom; width: parent.width anchors.top: header.bottom; anchors.bottom: parent.bottom; width: parent.width
Rectangle { Rectangle {
x: 40; y: 28; width: 1200; height: parent.height - 28 - 64 - 24; radius: 16; color: "#1d1416"; border.width: 2; border.color: "#b33a3a" x: 40; y: 28; width: parent.width - 80; height: parent.height - 28 - 64 - 24; radius: 16; color: "#1d1416"; border.width: 2; border.color: "#b33a3a"
Row { anchors.fill: parent; anchors.margins: 32; spacing: 40 Row { anchors.fill: parent; anchors.margins: 32; spacing: 40
Column { width: 640; spacing: 16 Column { width: 640; spacing: 16
Row { spacing: 12 Row { spacing: 12
+12 -4
View File
@@ -4,11 +4,13 @@
# Downloads the newest release's app package (steamify-app.tar.gz: the app, # Downloads the newest release's app package (steamify-app.tar.gz: the app,
# steamify.sh and lib/) to ~/.local/share/steamify/app, installs PySide6 if # steamify.sh and lib/) to ~/.local/share/steamify/app, installs PySide6 if
# it's missing, adds a launcher entry, and starts the app. # it's missing, adds a launcher entry, and starts the app.
# STEAMIFY_BRANCH=<branch> takes that branch's source instead of a release # STEAMIFY_RELEASE=<tag> takes that release instead of the newest (the
# (for testing before a release). # v2-ui-preview build's copy of this script sets it). STEAMIFY_BRANCH=<branch>
# takes that branch's source instead (for testing before a build).
set -euo pipefail set -euo pipefail
REPO="theupriser/steamify-cachyos" REPO="theupriser/steamify-cachyos"
RELEASE="${STEAMIFY_RELEASE:-latest}"
DEST="${XDG_DATA_HOME:-$HOME/.local/share}/steamify/app" DEST="${XDG_DATA_HOME:-$HOME/.local/share}/steamify/app"
APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications" APPS="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
@@ -26,8 +28,14 @@ if [[ -n "${STEAMIFY_BRANCH:-}" ]]; then
mkdir "$tmp/app" mkdir "$tmp/app"
tar -xzf "$tmp/src.tar.gz" -C "$tmp/app" --strip-components=1 tar -xzf "$tmp/src.tar.gz" -C "$tmp/app" --strip-components=1
else else
say "Downloading the newest Steamify app..." if [[ "$RELEASE" == latest ]]; then
curl -fsSL "https://github.com/$REPO/releases/latest/download/steamify-app.tar.gz" -o "$tmp/app.tar.gz" || url="https://github.com/$REPO/releases/latest/download/steamify-app.tar.gz"
say "Downloading the newest Steamify app..."
else
url="https://github.com/$REPO/releases/download/$RELEASE/steamify-app.tar.gz"
say "Downloading the Steamify app ($RELEASE)..."
fi
curl -fsSL "$url" -o "$tmp/app.tar.gz" ||
die "Couldn't download the app (is there a release with steamify-app.tar.gz yet?)." die "Couldn't download the app (is there a release with steamify-app.tar.gz yet?)."
mkdir "$tmp/app" mkdir "$tmp/app"
tar -xzf "$tmp/app.tar.gz" -C "$tmp/app" tar -xzf "$tmp/app.tar.gz" -C "$tmp/app"