diff --git a/Makefile b/Makefile index c27d8dd..2a7eb2c 100644 --- a/Makefile +++ b/Makefile @@ -601,6 +601,10 @@ clean-assets: rm -f $(BASE_TARGET_NAME)_debug.z64 fix: - wine tools/romfix64.exe build/portal.z64 + wine tools/romfix64.exe $(BASE_TARGET_NAME).z64 + +fix-nowine: + chmod +x tools/romfix64.sh + sh tools/romfix64.sh $(BASE_TARGET_NAME).z64 .SECONDARY: diff --git a/romfix64.sh b/romfix64.sh deleted file mode 100644 index 967ad3a..0000000 --- a/romfix64.sh +++ /dev/null @@ -1,25 +0,0 @@ -##!/bin/bash - -# Check if an argument is provided -if [ $# -ne 1 ]; then - echo "Usage: $0 " - exit 1 -fi - -# Get the provided binary path from the argument -BINARY_PATH="$1" - -# Check if the file exists -if [ -f "$BINARY_PATH" ]; then - # Calculate the size of the binary - size=$(stat -c%s "$BINARY_PATH") - - # Pad zeros until the size is a multiple of 512 - while [ $((size % 512)) -ne 0 ]; do - printf '\000' >> "$BINARY_PATH" - size=$((size + 1)) - done -else - echo "File not found: $BINARY_PATH" -fi -