From 0b4306938f75430ed1f44c5eb3bf4585cdfa9a9b Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Sun, 20 Sep 2026 16:33:08 +0800 Subject: feat(m6c): add Linux release package and delivery docs [Change Nature] - This commit adds the M6c Linux delivery surface without changing simulation behavior. [New Capability] - Publish self-contained linux-x64 output with framework-dependent fallback and a package-relative launcher. - Document the menu, controls, save paths, autoplay verification, milestones, and asset/license boundaries. [Implementation] - Add the M6c packaging and startup scripts. - Add release notes and an asset/license inventory. - Keep release artifacts and verification evidence under ignored artifacts/m6c-release/. [Impact] - Runtime code and M3 acceptance artifacts are unchanged. - The package was exercised under Xvfb; prior provider metadata remains an unstaged worktree change. --- scripts/m6c-package.sh | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/m6c-run.sh | 29 +++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100755 scripts/m6c-package.sh create mode 100755 scripts/m6c-run.sh (limited to 'scripts') diff --git a/scripts/m6c-package.sh b/scripts/m6c-package.sh new file mode 100755 index 0000000..d887ea6 --- /dev/null +++ b/scripts/m6c-package.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)" +PROJECT="$REPO_ROOT/src/LivingVillage.Desktop/LivingVillage.Desktop.fsproj" +STAMP="${M6C_TIMESTAMP:-$(date -u +%Y%m%dT%H%M%SZ)}" +PACKAGE_ROOT="$REPO_ROOT/artifacts/m6c-release/$STAMP" +APP_DIR="$PACKAGE_ROOT/app" +PUBLISH_LOG="$PACKAGE_ROOT/publish.log" + +if [[ -e "$PACKAGE_ROOT" ]]; then + printf 'Refusing to overwrite existing package directory: %s\n' "$PACKAGE_ROOT" >&2 + exit 2 +fi + +if ! command -v dotnet >/dev/null 2>&1; then + printf 'dotnet SDK is required to build the Linux package.\n' >&2 + exit 127 +fi + +mkdir -p "$APP_DIR" + +publish_args=( + "$PROJECT" + --configuration Release + --runtime linux-x64 + --output "$APP_DIR" + --nologo + -p:DebugType=None + -p:DebugSymbols=false +) + +runtime_mode="self-contained" +self_contained_exit=0 +if dotnet publish "${publish_args[@]}" --self-contained true >"$PUBLISH_LOG" 2>&1; then + : +else + self_contained_exit=$? + runtime_mode="framework-dependent" + rm -rf "$APP_DIR" + mkdir -p "$APP_DIR" + if ! dotnet publish "${publish_args[@]}" --self-contained false >>"$PUBLISH_LOG" 2>&1; then + printf 'Both self-contained and framework-dependent publish failed. See %s\n' "$PUBLISH_LOG" >&2 + exit 1 + fi +fi + +cp "$SCRIPT_DIR/m6c-run.sh" "$PACKAGE_ROOT/run-living-village.sh" +chmod +x "$PACKAGE_ROOT/run-living-village.sh" +cp "$REPO_ROOT/README.md" "$PACKAGE_ROOT/README.md" +cp "$REPO_ROOT/docs/release-notes-m6c.md" "$PACKAGE_ROOT/RELEASE-NOTES-M6C.md" +cp "$REPO_ROOT/docs/assets-and-licenses.md" "$PACKAGE_ROOT/ASSETS-AND-LICENSES.md" + +source_commit="unknown" +if git -C "$REPO_ROOT" rev-parse HEAD >/dev/null 2>&1; then + source_commit="$(git -C "$REPO_ROOT" rev-parse HEAD)" +fi + +{ + printf 'package=M6c Linux x64\n' + printf 'created_utc=%s\n' "$STAMP" + printf 'source_commit=%s\n' "$source_commit" + printf 'runtime_mode=%s\n' "$runtime_mode" + printf 'rid=linux-x64\n' + printf 'entrypoint=run-living-village.sh\n' + printf 'native_desktopgl_dependencies=system-provided\n' + if [[ "$runtime_mode" == "framework-dependent" ]]; then + printf 'self_contained_publish_exit=%s\n' "$self_contained_exit" + printf 'framework_dependent_requirement=.NET 8 runtime\n' + fi +} > "$PACKAGE_ROOT/PACKAGE-INFO.txt" + +printf 'M6C_PACKAGE_DIR=%s\n' "$PACKAGE_ROOT" +printf 'M6C_RUNTIME_MODE=%s\n' "$runtime_mode" diff --git a/scripts/m6c-run.sh b/scripts/m6c-run.sh new file mode 100755 index 0000000..5b73c6f --- /dev/null +++ b/scripts/m6c-run.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +APP_DIR="$SCRIPT_DIR/app" + +if [[ ! -d "$APP_DIR" ]]; then + printf 'M6c package app directory not found: %s\n' "$APP_DIR" >&2 + exit 2 +fi + +if [[ -z "${LV_SAVE_PATH:-}" ]]; then + export LV_SAVE_PATH="$SCRIPT_DIR/living-village.save" +elif [[ "$LV_SAVE_PATH" != /* ]]; then + export LV_SAVE_PATH="$SCRIPT_DIR/$LV_SAVE_PATH" +fi + +cd "$SCRIPT_DIR" + +if [[ -x "$APP_DIR/LivingVillage.Desktop" ]]; then + exec "$APP_DIR/LivingVillage.Desktop" "$@" +fi + +if [[ -f "$APP_DIR/LivingVillage.Desktop.dll" ]] && command -v dotnet >/dev/null 2>&1; then + exec dotnet "$APP_DIR/LivingVillage.Desktop.dll" "$@" +fi + +printf 'Living Village executable not found or framework-dependent dotnet is unavailable.\n' >&2 +exit 127 -- cgit v1.2.3