You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
793 B
Bash
27 lines
793 B
Bash
#!/bin/bash
|
|
|
|
# This script creates and packages a statically-linked build of the game, for Linux.
|
|
# It must be placed in the root of the source code.
|
|
|
|
set -o errexit # Stop executing when a command fails
|
|
BASE_DIR=$(dirname 0)
|
|
REL_DIR="$BASE_DIR/release/static/pong"
|
|
|
|
mkdir -p "$REL_DIR"
|
|
|
|
# Set the default build target to static
|
|
meson configure -Ddefault_library=static "$BASE_DIR/build/"
|
|
|
|
# Build the application
|
|
meson compile -C "$BASE_DIR/build/"
|
|
|
|
# Package the application:
|
|
# 1. Copy the executable to REL_DIR
|
|
# 2. Create a tarball after cd'ing into the parent directory.
|
|
|
|
cp "$BASE_DIR/build/pong" "$REL_DIR"
|
|
tar -C "$BASE_DIR/release/static" -czf "$BASE_DIR/release/pong.tar.gz" "pong/"
|
|
|
|
# Reset default build target to shared
|
|
meson configure -Ddefault_library=shared "$BASE_DIR/build/"
|