Skip to content

Commit

Permalink
Merge pull request #3575 from nemo93/nemo93/dosboxstaging079
Browse files Browse the repository at this point in the history
DOSBox Staging 0.79 update
  • Loading branch information
joolswills committed Oct 14, 2022
2 parents 342f767 + e8cf6ee commit eb4e781
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions scriptmodules/emulators/dosbox-staging.sh
Expand Up @@ -14,32 +14,26 @@ rp_module_desc="modern DOS/x86 emulator focusing on ease of use"
rp_module_help="ROM Extensions: .bat .com .exe .sh .conf\n\nCopy your DOS games to $romdir/pc"
rp_module_licence="GPL2 https://raw.githubusercontent.com/dosbox-staging/dosbox-staging/master/COPYING"
rp_module_repo="git https://github.com/dosbox-staging/dosbox-staging.git :_get_branch_dosbox-staging"
rp_module_section="exp"
rp_module_section="opt"
rp_module_flags="sdl2"

function _get_branch_dosbox-staging() {
download https://api.github.com/repos/dosbox-staging/dosbox-staging/releases/latest - | grep -m 1 tag_name | cut -d\" -f4
}

function depends_dosbox-staging() {
getDepends cmake libasound2-dev libglib2.0-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-net-dev meson ninja-build
getDepends cmake libasound2-dev libglib2.0-dev libopusfile-dev libpng-dev libsdl2-dev libsdl2-net-dev libspeexdsp-dev meson ninja-build
}

function sources_dosbox-staging() {
gitPullOrClone
}

function build_dosbox-staging() {
local params=(-Dbuildtype=release -Ddefault_library=static --prefix="$md_inst")
local params=(-Dprefix="$md_inst" -Ddatadir="resources")

# Fluidsynth (static)
cd "$md_build/contrib/static-fluidsynth"
make
export PKG_CONFIG_PATH="${md_build}/contrib/static-fluidsynth/fluidsynth/build"

cd "$md_build"
meson setup "${params[@]}" build
ninja -C build
meson compile -j${__jobs} -C build

md_ret_require=(
"$md_build/build/dosbox"
Expand All @@ -56,15 +50,25 @@ function configure_dosbox-staging() {

[[ "$md_id" == "remove" ]] && return

local config_dir="$md_conf_root/pc"
chown -R $user: "$config_dir"

local staging_output="texturenb"
if isPlatform "kms"; then
staging_output="openglnb"
fi

local config_path=$(su "$user" -c "\"$md_inst/bin/dosbox\" -printconf")
if [[ -f "$config_path" ]]; then
iniConfig " = " "" "$config_path"
if isPlatform "rpi"; then
iniSet "fullscreen" "true"
iniSet "fullresolution" "desktop"
iniSet "output" "texturenb"
iniSet "fullresolution" "original"
iniSet "vsync" "true"
iniSet "output" "$staging_output"
iniSet "core" "dynamic"
iniSet "cycles" "25000"
iniSet "blocksize" "2048"
iniSet "prebuffer" "50"
fi
fi
}

0 comments on commit eb4e781

Please sign in to comment.