refactoring app name to spacetris and new icon

This commit is contained in:
2025-12-21 10:29:01 +01:00
parent 18c29fed1e
commit a6c2c78cb5
26 changed files with 402 additions and 951 deletions

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
# macOS Production Build Script for the SDL3 Tetris project
# macOS Production Build Script for the SDL3 Spacetris project
# Mirrors the Windows PowerShell workflow but uses common POSIX tooling so it
# can be executed on macOS runners or local developer machines.
PROJECT_NAME="tetris"
PROJECT_NAME="spacetris"
BUILD_DIR="build-release"
OUTPUT_DIR="dist"
PACKAGE_DIR=""
@ -67,7 +67,7 @@ parse_args() {
}
configure_paths() {
PACKAGE_DIR="${OUTPUT_DIR}/TetrisGame-mac"
PACKAGE_DIR="${OUTPUT_DIR}/SpacetrisGame-mac"
}
generate_icns_if_needed() {
@ -246,15 +246,15 @@ create_launchers() {
launch_command="open \"./${app_dir}\""
fi
cat > "$PACKAGE_DIR/Launch-Tetris.command" <<EOF
cat > "$PACKAGE_DIR/Launch-Spacetris.command" <<EOF
#!/usr/bin/env bash
cd "\$(dirname \"\$0\")"
${launch_command}
EOF
chmod +x "$PACKAGE_DIR/Launch-Tetris.command"
chmod +x "$PACKAGE_DIR/Launch-Spacetris.command"
cat > "$PACKAGE_DIR/README-mac.txt" <<EOF
Tetris SDL3 Game - macOS Release $VERSION
Spacetris SDL3 Game - macOS Release $VERSION
=========================================
Requirements:
@ -262,12 +262,12 @@ Requirements:
- GPU with Metal support
Installation:
1. Unzip the archive anywhere (e.g., ~/Games/Tetris).
1. Unzip the archive anywhere (e.g., ~/Games/Spacetris).
2. Ensure the executable bit stays set (script already does this).
3. Double-click Launch-Tetris.command or run the binary/app manually from Terminal or Finder.
3. Double-click Launch-Spacetris.command or run the binary/app manually from Terminal or Finder.
Files:
- tetris / Launch-Tetris.command (start the game)
- spacetris / Launch-Spacetris.command (start the game)
- assets/ (art, audio, fonts)
- *.dylib from SDL3 and related dependencies
- FreeSans.ttf font
@ -298,7 +298,7 @@ validate_package() {
create_zip() {
mkdir -p "$OUTPUT_DIR"
local zip_name="TetrisGame-mac-${VERSION}.zip"
local zip_name="SpacetrisGame-mac-${VERSION}.zip"
local zip_path="$OUTPUT_DIR/$zip_name"
log INFO "Creating zip archive $zip_path ..."
if command -v ditto >/dev/null 2>&1; then
@ -349,7 +349,7 @@ create_dmg() {
fi
local app_name="${APP_BUNDLE_PATH##*/}"
local dmg_name="TetrisGame-mac-${VERSION}.dmg"
local dmg_name="SpacetrisGame-mac-${VERSION}.dmg"
local dmg_path="$OUTPUT_DIR/$dmg_name"
if [[ ! -f "scripts/create-dmg.sh" ]]; then