forked from libretro/stella2014-libretro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibretro-install-win32.sh
executable file
·54 lines (46 loc) · 1.62 KB
/
libretro-install-win32.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
if [ -z "$1" ]; then
LIBRETRO_DIR="libretro"
else
LIBRETRO_DIR="$1"
fi
ARCH_EXT="$2"
if [ ! -d "$LIBRETRO_DIR" ]; then
mkdir -p "$LIBRETRO_DIR"
fi
MEDNAFEN_VER=0924
LIBS=""
LIBS="$LIBS libretro-bsnes/libretro-089-bsnes-performance.dll"
LIBS="$LIBS libretro-bsnes/libretro-089-bsnes-compat.dll"
LIBS="$LIBS libretro-bsnes/libretro-089-bsnes-accuracy.dll"
LIBS="$LIBS libretro-s9x/libretro-git-snes9x.dll"
LIBS="$LIBS libretro-s9x-next/libretro-git-snes9x-next.dll"
LIBS="$LIBS libretro-genplus/libretro-git-genplus.dll"
LIBS="$LIBS libretro-fba/libretro-git-fba.dll"
LIBS="$LIBS libretro-vba/libretro-git-vba.dll"
LIBS="$LIBS libretro-fceu/libretro-git-fceu.dll"
LIBS="$LIBS libretro-bnes/libretro-git-bnes.dll"
LIBS="$LIBS libretro-gambatte/libretro-git-gambatte.dll"
LIBS="$LIBS libretro-meteor/libretro-git-meteor.dll"
LIBS="$LIBS libretro-stella/libretro-git-stella.dll"
LIBS="$LIBS libretro-mednafen-psx/libretro-${MEDNAFEN_VER}-mednafen-psx.dll"
LIBS="$LIBS libretro-mednafen-pce/libretro-${MEDNAFEN_VER}-mednafen-pce.dll"
LIBS="$LIBS libretro-mednafen-wswan/libretro-${MEDNAFEN_VER}-mednafen-wswan.dll"
LIBS="$LIBS libretro-mednafen-ngp/libretro-${MEDNAFEN_VER}-mednafen-ngp.dll"
for lib in $LIBS
do
if [ -f $lib ]; then
install -v -m644 $lib "$LIBRETRO_DIR"
else
echo "Library $lib not found, skipping ..."
fi
done
cd "$LIBRETRO_DIR"
for file in `find . -name "*.dll"`
do
REGEX_MV="s|^\(.*\)\.dll$|\1-${ARCH_EXT}.dll|"
REGEX="s|^\(.*\)\.dll$|\1-${ARCH_EXT}.zip|"
FILENAME="`echo $file | sed -e $REGEX_MV`"
mv -v "$file" "$FILENAME"
zip "`echo $file | sed -e $REGEX`" "$FILENAME"
done