refactoring app name to spacetris and new icon
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env pwsh
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Quick Production Package Creator for Tetris SDL3
|
||||
Quick Production Package Creator for Spacetris SDL3
|
||||
|
||||
.DESCRIPTION
|
||||
This script creates a production package using the existing build-msvc directory.
|
||||
@ -12,8 +12,8 @@ param(
|
||||
[string]$OutputDir = "dist"
|
||||
)
|
||||
|
||||
$ProjectName = "tetris"
|
||||
$PackageDir = Join-Path $OutputDir "TetrisGame"
|
||||
$ProjectName = "spacetris"
|
||||
$PackageDir = Join-Path $OutputDir "SpacetrisGame"
|
||||
$Version = Get-Date -Format "yyyy.MM.dd"
|
||||
|
||||
function Write-ColorOutput($ForegroundColor) {
|
||||
@ -29,13 +29,13 @@ function Write-Warning { Write-ColorOutput Yellow $args }
|
||||
function Write-Error { Write-ColorOutput Red $args }
|
||||
|
||||
Write-Info "======================================"
|
||||
Write-Info " Tetris Quick Package Creator"
|
||||
Write-Info " Spacetris Quick Package Creator"
|
||||
Write-Info "======================================"
|
||||
|
||||
# Check if build exists
|
||||
$ExecutablePath = "build-msvc\Debug\tetris.exe"
|
||||
$ExecutablePath = "build-msvc\Debug\spacetris.exe"
|
||||
if (!(Test-Path $ExecutablePath)) {
|
||||
$ExecutablePath = "build-msvc\Release\tetris.exe"
|
||||
$ExecutablePath = "build-msvc\Release\spacetris.exe"
|
||||
if (!(Test-Path $ExecutablePath)) {
|
||||
Write-Error "No executable found in build-msvc directory. Please build the project first."
|
||||
exit 1
|
||||
@ -52,7 +52,7 @@ New-Item -ItemType Directory -Path $PackageDir -Force | Out-Null
|
||||
|
||||
# Copy executable
|
||||
Copy-Item $ExecutablePath $PackageDir
|
||||
Write-Success "Copied tetris.exe"
|
||||
Write-Success "Copied spacetris.exe"
|
||||
|
||||
# Copy assets
|
||||
if (Test-Path "assets") {
|
||||
@ -82,7 +82,7 @@ if (Test-Path $VcpkgBin) {
|
||||
$LaunchContent = @"
|
||||
@echo off
|
||||
cd /d "%~dp0"
|
||||
tetris.exe
|
||||
spacetris.exe
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo Game crashed or failed to start!
|
||||
@ -91,22 +91,22 @@ if %errorlevel% neq 0 (
|
||||
pause
|
||||
)
|
||||
"@
|
||||
$LaunchContent | Out-File -FilePath (Join-Path $PackageDir "Launch-Tetris.bat") -Encoding ASCII
|
||||
Write-Success "Created Launch-Tetris.bat"
|
||||
$LaunchContent | Out-File -FilePath (Join-Path $PackageDir "Launch-Spacetris.bat") -Encoding ASCII
|
||||
Write-Success "Created Launch-Spacetris.bat"
|
||||
|
||||
# Create README
|
||||
$ReadmeContent = @"
|
||||
Tetris SDL3 Game
|
||||
================
|
||||
Spacetris SDL3 Game
|
||||
===================
|
||||
|
||||
## Quick Start
|
||||
1. Run Launch-Tetris.bat or tetris.exe
|
||||
1. Run Launch-Spacetris.bat or spacetris.exe
|
||||
2. Use arrow keys to move, Z/X to rotate, Space to drop
|
||||
3. Press F11 for fullscreen, Esc for menu
|
||||
|
||||
## Files
|
||||
- tetris.exe: Main game
|
||||
- Launch-Tetris.bat: Safe launcher with error handling
|
||||
- spacetris.exe: Main game
|
||||
- Launch-Spacetris.bat: Safe launcher with error handling
|
||||
- assets/: Game resources (music, images, fonts)
|
||||
- *.dll: Required libraries
|
||||
|
||||
@ -129,7 +129,7 @@ $PackageSize = (Get-ChildItem $PackageDir -Recurse | Measure-Object -Property Le
|
||||
$PackageSizeMB = [math]::Round($PackageSize / 1MB, 2)
|
||||
|
||||
# Create ZIP
|
||||
$ZipPath = Join-Path $OutputDir "TetrisGame-$Version.zip"
|
||||
$ZipPath = Join-Path $OutputDir "SpacetrisGame-$Version.zip"
|
||||
try {
|
||||
Compress-Archive -Path $PackageDir -DestinationPath $ZipPath -Force
|
||||
Write-Success "Created ZIP: $ZipPath"
|
||||
|
||||
Reference in New Issue
Block a user