|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
set -o errexit # Stop executing when a command fails
|
|
|
|
|
BASE_DIR=$(dirname $0)
|
|
|
|
|
REL_DIR="$BASE_DIR/release/dist"
|
|
|
|
|
RAYLIB_DLL="$BASE_DIR/build/subprojects/raylib/libraylib.dll"
|
|
|
|
|
|
|
|
|
|
mkdir -p "$REL_DIR"
|
|
|
|
|
|
|
|
|
@ -14,12 +15,15 @@ meson setup build/
|
|
|
|
|
# Build the application
|
|
|
|
|
meson compile -C build/
|
|
|
|
|
|
|
|
|
|
# Parse the output of the 'ldd' command, and create a file with the required DLL paths.
|
|
|
|
|
ldd build/pong.exe | awk ' NF == 4 {print $3}' > "$BASE_DIR/tmp_file.txt"
|
|
|
|
|
# Parse the output of the 'ldd' command (using only DLLs that are found) and create a file with the required DLL paths.
|
|
|
|
|
ldd build/pong.exe | awk ' NF == 4 {print $3}' | grep -i "dll" > "$BASE_DIR/tmp_file.txt"
|
|
|
|
|
|
|
|
|
|
# Copy the required DLLs.
|
|
|
|
|
cp $(cat "$BASE_DIR/tmp_file.txt") "$REL_DIR"
|
|
|
|
|
|
|
|
|
|
# Copy the raylib DLL, if it does not exist in the directory
|
|
|
|
|
cp -n "$RAYLIB_DLL" "$REL_DIR"
|
|
|
|
|
|
|
|
|
|
# Copy the executable itself
|
|
|
|
|
cp "$BASE_DIR/build/pong" "$REL_DIR"
|
|
|
|
|
|
|
|
|
|