summaryrefslogtreecommitdiff
blob: 13f6a680b3183539e66a82ccf9701066b6f859c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

source /sbin/functions.sh

if [ ! -d ~/.epsxe ] ; then
	einfo You are running ePSXe for the first time.
	einfo Setting up your ePSXe environment... Please wait...

	mkdir -p ~/.epsxe
	cd ~/.epsxe
	mkdir memcards bios cfg cheats snap sstates patches plugins
	cp /opt/epsxe/keycodes.lst keycodes.lst

	ln -s /opt/epsxe/epsxe epsxe >& /dev/null

	cd bios
	if [ -f /usr/games/lib/psemu/bios/scph1001.bin ]; then
		ln -s /usr/games/lib/psemu/bios/scph1001.bin .
	else
		echo
		ewarn "*** Put your BIOS file into ~/.epsxe/bios,"
		ewarn "    or ePSXe may not work!"
		echo
	fi
fi

cd ~/.epsxe

(
rm plugins/*
ln -s /usr/games/lib/psemu/plugins/* plugins/
ln -s /usr/games/lib/psemu/cfg/* cfg/
ln -s /usr/games/lib/psemu/cheats/* cheats/
) >& /dev/null
export LD_PRELOAD="libpthread.so.0:${LD_PRELOAD}"
exec ./epsxe "$@"