distribution/packages/games/emulators/dosbox-x/scripts/dosbox-x.start
fewtarius 58769c80d3
* Restructure JELOS to use .config/system and system.cfg for configuration.
* Update games to use .config/game/configs moving configurations out of the system config root.
* Split modules into a separate package (packages/misc/modules).
* Remove some unused packages and move a few virtual packages to packages/virtual.
2022-02-26 21:40:30 -05:00

28 lines
707 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
# Source predefined functions and variables
. /etc/profile
set_audio pulseaudio
# Set common variables
RR_DOSBOX_HOME=/storage/.dosbox
RR_DOSBOX_HOME_CONFIG=/storage/.config/game/configs/dosbox-x
# Create symlink to config dir
if [ ! -L ${RR_DOSBOX_HOME} ]; then
if [ -d ${RR_DOSBOX_HOME} ]; then
cp -rf ${RR_DOSBOX_HOME} ${RR_DOSBOX_HOME_CONFIG}
rm -rf ${RR_DOSBOX_HOME}
fi
ln -sf ${RR_DOSBOX_HOME_CONFIG} ${RR_DOSBOX_HOME}
fi
# Run the emulator
ARG="$(echo $1 | sed 's=.*/==;s/\.[^.]*$//')"
dosbox-x -c "${ARG}" > /tmp/logs/dosbox-x.log 2>&1
set_audio default