summaryrefslogtreecommitdiff
path: root/games/epsxe/wrapper.epsxe
diff options
context:
space:
mode:
Diffstat (limited to 'games/epsxe/wrapper.epsxe')
-rw-r--r--games/epsxe/wrapper.epsxe25
1 files changed, 25 insertions, 0 deletions
diff --git a/games/epsxe/wrapper.epsxe b/games/epsxe/wrapper.epsxe
new file mode 100644
index 0000000000..af0adb9999
--- /dev/null
+++ b/games/epsxe/wrapper.epsxe
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# This script has 2 reasons to exist.
+# 1) Run the real executable, since it looks for the plugins in the same
+# directory where it is located; therefore, the file structure given
+# by the epsxe team must be preserved.
+# 2) Check if the user's $HOME has a ".epsxe" directory. This is only a way
+# to have links to the plugins directory, that was given write permissions
+# to the games group.
+
+# Check for the $HOME/.epsxe dir.
+if [ ! -d $HOME/.epsxe ]; then
+ mkdir -p $HOME/.epsxe
+ cd $HOME/.epsxe
+ ln -s @INSTALLDIR@/cfg cfg
+ ln -s @INSTALLDIR@/bios bios
+ ln -s @INSTALLDIR@/cheats cheats
+ ln -s @INSTALLDIR@/memcards memcards
+ ln -s @INSTALLDIR@/plugins plugins
+ cd -
+fi
+
+# Run the program
+@INSTALLDIR@/epsxe
+