Added check to release script, to check if DLL exists
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
set -o errexit # Stop executing when a command fails
|
set -o errexit # Stop executing when a command fails
|
||||||
BASE_DIR=$(dirname $0)
|
BASE_DIR=$(dirname $0)
|
||||||
REL_DIR="$BASE_DIR/release/dist"
|
REL_DIR="$BASE_DIR/release/dist"
|
||||||
|
RAYLIB_DLL="$BASE_DIR/build/subprojects/raylib/libraylib.dll"
|
||||||
|
|
||||||
mkdir -p "$REL_DIR"
|
mkdir -p "$REL_DIR"
|
||||||
|
|
||||||
@@ -14,12 +15,15 @@ meson setup build/
|
|||||||
# Build the application
|
# Build the application
|
||||||
meson compile -C build/
|
meson compile -C build/
|
||||||
|
|
||||||
# Parse the output of the 'ldd' command, and create a file with the required DLL paths.
|
# 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}' > "$BASE_DIR/tmp_file.txt"
|
ldd build/pong.exe | awk ' NF == 4 {print $3}' | grep -i "dll" > "$BASE_DIR/tmp_file.txt"
|
||||||
|
|
||||||
# Copy the required DLLs.
|
# Copy the required DLLs.
|
||||||
cp $(cat "$BASE_DIR/tmp_file.txt") "$REL_DIR"
|
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
|
# Copy the executable itself
|
||||||
cp "$BASE_DIR/build/pong" "$REL_DIR"
|
cp "$BASE_DIR/build/pong" "$REL_DIR"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user