Files
MontaukOS/scripts/install_apps.sh
T
daniel c2cbb47e8f legal: bundle third-party licenses on the ISO; stop shipping doom1.wad
- New 0:/os/licenses/ directory on the ISO with GPL-3.0.txt (Flat Remix
  icon theme), GPL-2.0.txt (doomgeneric DOOM engine), and NOTICES.txt
  (mirrors montaukos.org/THIRD-PARTY-NOTICES.txt).
- THIRD-PARTY-NOTICES.txt gains a Flat Remix section (GPLv3, attribution,
  modification and corresponding-source statements; the shipped SVGs are
  the source form).
- man legal now lists third-party components and points at 0:/os/licenses/.
- doom1.wad removed from the repo and the build: the shareware WAD is
  proprietary id Software content. doom.elf (GPLv2) still ships; users
  must supply their own WAD.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 12:16:55 +02:00

87 lines
3.3 KiB
Bash
Executable File

#!/bin/bash
# install_apps.sh - Bundle standalone apps into bin/apps/<name>/ directories
# Each bundle contains: binary, manifest.toml, icon SVG
# Usage: ./scripts/install_apps.sh (from project root)
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
SRC="$PROJECT_ROOT/programs/src"
BIN="$PROJECT_ROOT/programs/bin"
ICON_SRC="$PROJECT_ROOT/programs/gui/icons/Flat-Remix-Blue-Light-darkPanel"
# App definitions: name|icon_source_path
# The binary is already built by each app's Makefile into bin/apps/<name>/
APPS=(
"2048|categories/scalable/2048.svg"
"doom|apps/scalable/doom.svg"
"spreadsheet|mimetypes/scalable/spreadsheet.svg"
"wordprocessor|apps/scalable/libreoffice6.0-writer.svg"
"weather|apps/scalable/weather-widget.svg"
"wikipedia|apps/scalable/web-browser.svg"
"imageviewer|apps/scalable/utilities-terminal.svg"
"fontpreview|apps/scalable/utilities-terminal.svg"
"pdfviewer|mimetypes/scalable/application-pdf.svg"
"disks|apps/scalable/gparted.svg"
"devexplorer|apps/scalable/hardware.svg"
"installer|mimetypes/scalable/text-x-install.svg"
"audio|apps/scalable/pavucontrol.svg"
"music|apps/scalable/audio-player.svg"
"video|apps/scalable/video-player.svg"
"bluetooth|apps/scalable/bluetooth.svg"
"network|devices/scalable/network-wired.svg"
"terminal|apps/scalable/utilities-terminal.svg"
"klog|apps/scalable/utilities-terminal.svg"
"procmgr|apps/scalable/system-monitor.svg"
"powermgr|apps/scalable/gnome-power-statistics.svg"
"calculator|apps/scalable/accessories-calculator.svg"
"charmap|apps/scalable/accessories-character-map.svg"
"printers|devices/scalable/preferences-devices-printer.svg"
"timezone|categories/scalable/preferences-system-time.svg"
"rpgdemo|apps/scalable/utilities-terminal.svg"
"paint|apps/scalable/kolourpaint.svg"
"screenshot|apps/scalable/gnome-screenshot.svg"
"texteditor|apps/scalable/accessories-text-editor.svg"
"mandelbrot|apps/scalable/applications-science.svg"
)
installed=0
for entry in "${APPS[@]}"; do
IFS='|' read -r name icon_rel <<< "$entry"
app_dir="$BIN/apps/$name"
mkdir -p "$app_dir"
# Copy manifest
manifest="$SRC/$name/manifest.toml"
if [ -f "$manifest" ]; then
cp "$manifest" "$app_dir/manifest.toml"
else
echo "install_apps: warning: $manifest not found" >&2
fi
# Copy icon. Prefer a local app icon file when one exists; otherwise fall back
# to the shared theme asset declared in the app table above.
icon_src="$ICON_SRC/$icon_rel"
icon_name=$(grep '^icon' "$manifest" 2>/dev/null | sed 's/.*= *"\(.*\)"/\1/' || echo "")
local_icon="$SRC/$name/$icon_name"
if [ -n "$icon_name" ] && [ -f "$local_icon" ]; then
cp "$local_icon" "$app_dir/$icon_name"
elif [ -n "$icon_name" ] && [ -f "$icon_src" ]; then
cp "$icon_src" "$app_dir/$icon_name"
elif [ -n "$icon_name" ]; then
echo "install_apps: warning: icon $local_icon or $icon_src not found for $name" >&2
fi
installed=$((installed + 1))
done
rm -rf "$BIN/apps/dialogs"
# DOOM game data (doom1.wad) is proprietary id Software content and is
# deliberately NOT bundled; the engine (doom.elf, GPLv2) ships without it.
echo "install_apps: installed $installed app bundles to $BIN/apps/"