Skip to content

Commit

Permalink
dosbox-staging - Arena music
Browse files Browse the repository at this point in the history
  • Loading branch information
d10sfan committed Aug 8, 2024
1 parent 25bdaf0 commit 9b53977
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions engines/dosbox-staging/assets/run-dosbox-staging-arena.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR" && cd ..

sed -i 's/ACD -Ssbpdig.adv -IOS220 -IRQS7 -DMAS1 -Mgenmidi.adv -IOM330 -IRQM2 -DMAM1/ACD -Ssbdig.adv -IOS220 -IRQS7 -DMAS1 -Msbfm.adv -IOM220 -IRQM7 -DMAM1/' arena.conf

shopt -s nocasematch
cur_args=($@)
new_args=(./dosbox-staging/dosbox)
new_args+=("-fullscreen")
new_args+=("-exit")

if [[ -z $cur_args && $LUX_ORIGINAL_EXE_FILE == *"bat" ]]; then
cur_args=$(cat "$LUX_ORIGINAL_EXE" | grep dosbox)
fi

for var in ${cur_args[@]}
do
tmp_arg="${var//\\//}"
if [[ ! -f "$tmp_arg" && $tmp_arg == *"conf" && $tmp_arg != "-"* ]]; then
tmp_arg=$(basename $tmp_arg | xargs -I% find .. -type f -iname "%")
elif [[ $tmp_arg == *"bat" ]]; then
tmp_arg=$(basename $tmp_arg | xargs -I% find .. -type f -iname "%")
elif [[ $tmp_arg == "-fullscreen" || $tmp_arg == "-noconsole" || $tmp_arg == "-exit" ]]; then
tmp_arg=""
fi
if [[ -n $tmp_arg ]]; then
new_args+=("$tmp_arg")
fi
done

echo "run-dosbox-staging.sh: Launching with, ${new_args[@]}"
LD_LIBRARY_PATH="dosbox-staging/lib:$LD_LIBRARY_PATH" "${new_args[@]}"
4 changes: 2 additions & 2 deletions metadata/packagessniper_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -9205,7 +9205,7 @@
},
{
"name": "DOSBox Staging",
"command": "./dosbox-staging/run-dosbox-staging.sh",
"command": "./dosbox-staging/run-dosbox-staging-arena.sh",
"use_original_command_directory": true,
"download": [
"dosbox-staging"
Expand Down Expand Up @@ -11986,4 +11986,4 @@
"value": "Save Format Not Compatible"
}
]
}
}

0 comments on commit 9b53977

Please sign in to comment.