3 # epsxe.bash -- an ePSXe wrapper script
5 # This script will setup an environment for ePSXe 1.5.2 and 1.6.0 and run the
8 # The directory where the configuration will be stored.
11 # The full path -- including the filename -- to the ePSXe 1.6.0 executable.
12 EPSXE
="/opt/epsxe/epsxe"
14 # The full path -- including the filename -- to the ePSXe 1.5.2 executable.
15 EPSXE_OLD
="/opt/epsxe/epsxe-1.5.2"
17 # The full path -- including the filename -- to keycodes.lst
18 KEYFILE
="/opt/epsxe/keycodes.lst"
20 BIOSDIRS
=("/opt/epsxe/bios" "/usr/lib/games/psemu" "/usr/lib/psemu")
21 BIOSPATTERN
="*.[Bb][Ii][Nn]"
23 PLUGINDIRS
=("/opt/epsxe/plugins" "/usr/lib/games/psemu" "/usr/lib/psemu")
24 PLUGINPATTERN
="lib*.so*"
26 CFGDIRS
=("/opt/epsxe/cfg" "/usr/lib/games/psemu" "/usr/lib/psemu")
29 # Array of filenames of plugins which will never work with ePSXe but with other
30 # PSX emulators. To allow to run everything side by side smoothly you can
31 # blacklist them here.
32 if [ -z "$EPSXE_BLACKLIST"]; then
33 EPSXE_BLACKLIST
=("libcdrmooby*.so*" "libDFIso*.so*")
38 mkdir
-p bios plugins cfg memcards snap sstates
40 echo "Linking executables..."
41 ln -fsv "$EPSXE" epsxe-160
42 ln -fsv "$EPSXE_OLD" epsxe-152
44 echo "Linking keycode file..."
45 ln -fsv "$KEYFILE" keycodes.lst
47 echo "Linking BIOS files..."
48 for dir
in ${BIOSDIRS[@]}; do
49 ln -fsv $dir/$BIOSPATTERN -t bios
52 echo "Linking plugins..."
53 for dir
in ${PLUGINDIRS[@]}; do
54 ln -fsv $dir/$PLUGINPATTERN -t plugins
57 echo "Linking configuration utilities..."
58 for dir
in ${CFGDIRS[@]}; do
59 ln -fsv $dir/$CFGPATTERN -t cfg
63 find -P bios cfg plugins
-type l |
while read link
; do
64 [ -e "$link" ] ||
rm -fv "$link"
66 for plugin
in ${EPSXE_BLACKLIST[@]}; do
67 rm -fv plugins
/$plugin
75 exec "$DOTDIR/epsxe-152" "$@"
78 exec "$DOTDIR/epsxe-160" "$@"