diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:18:04 +0800 |
| commit | 796c6c8a70c92d4675df7c2ec2d25ecda139d723 (patch) | |
| tree | 06c6d3e7788d7b2ad5ddd0565e2651c0c8d9d151 /build_files/build.sh | |
| parent | ab070aec5f1d760a2539e14cb19da61593bded15 (diff) | |
| parent | d734f2c746632772b794143762f2fcea78e62011 (diff) | |
| download | AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.tar.gz AeroCore-OS-796c6c8a70c92d4675df7c2ec2d25ecda139d723.zip | |
Merge testing into main for 44.x stable release44.20260913
Diffstat (limited to 'build_files/build.sh')
| -rwxr-xr-x | build_files/build.sh | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/build_files/build.sh b/build_files/build.sh index 5618d20..40b9efd 100755 --- a/build_files/build.sh +++ b/build_files/build.sh @@ -14,6 +14,104 @@ esac # Copy the contents of system_files/ of the git repo to / cp -avf "/ctx/system_files"/. / +# Bazzite's Kinoite/Plasma desktop shortcut used to start a privileged +# return-to-gamemode.service. Current Bazzite invokes the user-session entry +# point directly; keep the shortcut correct when the base image still ships +# the legacy Exec= line. +RETURN_TO_GAMING_DESKTOP="/etc/skel/Desktop/Return.desktop" +if [[ -f "${RETURN_TO_GAMING_DESKTOP}" ]]; then + sed -i 's|^Exec=.*|Exec=/usr/bin/return-to-gamemode|' "${RETURN_TO_GAMING_DESKTOP}" +fi + +# ujust loads explicit imports, not every fragment in the just/ directory. +# Preserve upstream recipes and register our overlay after copying its files. +AEROCORE_DECKY_IMPORT='import "/usr/share/ublue-os/just/92-aerocore-decky-mirror.just"' +if ! grep -Fxq "${AEROCORE_DECKY_IMPORT}" /usr/share/ublue-os/justfile; then + printf '\n%s\n' "${AEROCORE_DECKY_IMPORT}" >> /usr/share/ublue-os/justfile +fi +# Fail the image build if the public entry point cannot resolve the recipe. +ujust --show setup-decky-mirror >/dev/null + +install_regular_file() { + local source_file="$1" + local destination_file="$2" + + # Several Bazzite branding paths are symlinks. cp follows an existing + # destination symlink, which leaves the name Plasma resolves untouched. + # Replace the link itself so the final immutable image owns this exact path. + rm -f -- "${destination_file}" + install -Dm0644 -- "${source_file}" "${destination_file}" +} + +# KDE's Deck presets use distributor-logo-steamdeck.svg for the Kickoff +# launcher. In the Bazzite base image that name (and the related aliases) +# may already exist as links to the upstream distributor-logo.svg. Install +# the AeroCore asset explicitly after the general overlay so the final image +# cannot silently retain the upstream Bazzite logo. +AEROCORE_DISTRIBUTOR_LOGO="/ctx/system_files/usr/share/icons/hicolor/scalable/places/distributor-logo.svg" +AEROCORE_ICON_DIR="/usr/share/icons/hicolor/scalable/places" +mkdir -p "${AEROCORE_ICON_DIR}" +for icon_name in \ + distributor-logo.svg \ + distributor-logo-steamdeck.svg \ + bazzite-logo.svg \ + start-here.svg; do + install_regular_file "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/${icon_name}" +done + +# Use a downstream-specific, non-upstream icon name for Plasma's launcher. +install_regular_file \ + "/ctx/system_files/usr/share/pixmaps/bazzite-logo-le.svg" \ + "/usr/share/icons/hicolor/scalable/apps/aerocore-logo.svg" + +# KDE's About System KCM loads this path from kcm-about-distrorc. The base +# image may provide it as a symlink, so replace the directory entry itself or +# the KCM can continue rendering the upstream Bazzite logo. +install_regular_file \ + "/ctx/system_files/usr/share/pixmaps/system-logo-white.png" \ + "/usr/share/pixmaps/system-logo-white.png" + +# Game Mode's Vapor splash asset is an upstream symlink on current Bazzite +# images, while VGUI is a regular file. Replace both exact paths explicitly. +for look_and_feel in com.valve.vapor.desktop com.valve.vgui.desktop; do + install_regular_file \ + "/ctx/system_files/usr/share/plasma/look-and-feel/${look_and_feel}/contents/splash/images/bazzite_logo.svgz" \ + "/usr/share/plasma/look-and-feel/${look_and_feel}/contents/splash/images/bazzite_logo.svgz" +done + +# Steam's Game Mode transitions load these four assets directly. They are +# symlinks in some upstream layers, so replace their directory entries just +# like the Plasma splash assets above. +for animation in \ + bazzite.webm \ + bazzite-oled.webm \ + bazzite-suspend.webm \ + bazzite-suspend-oled.webm; do + install_regular_file \ + "/ctx/system_files/usr/share/ublue-os/bazzite/${animation}" \ + "/usr/share/ublue-os/bazzite/${animation}" +done + +gtk-update-icon-cache -f /usr/share/icons/hicolor || true + +# The Plasma launcher resolves the standard start-here name from both scalable +# and per-size places directories. Populate every existing Bazzite icon size +# in the installed payload, not only in the live installer image. +for icon_dir in /usr/share/icons/hicolor/*; do + [[ -d "${icon_dir}" ]] || continue + source_icon="${icon_dir}/bazzite-logo-icon.png" + if [[ -f "${source_icon}" ]]; then + mkdir -p "${icon_dir}/apps" "${icon_dir}/places" + cp -f "${source_icon}" "${icon_dir}/places/start-here.png" + cp -f "${source_icon}" "${icon_dir}/apps/fedora-logo-icon.png" + fi +done + +if ! cmp -s "${AEROCORE_DISTRIBUTOR_LOGO}" "${AEROCORE_ICON_DIR}/distributor-logo.svg"; then + echo "AeroCore distributor logo was not installed into the image" >&2 + exit 1 +fi + # Default HDMI-CEC to putting the TV into standby when the system sleeps. # `ujust toggle-cec-sleep enable` changes this same setting at runtime. Keep # the default in the base image's config so users do not need to run the @@ -58,3 +156,4 @@ find /etc/environment.d /etc/skel/.config/environment.d -name 99-aerocore-mirror /ctx/install-instruments.sh /ctx/patch-bazzite-deck-identity.sh +/ctx/patch-bazzite-rollback-helper.sh |
