mirror of
https://github.com/libretro/libretro-super
synced 2025-04-15 20:42:41 +00:00
Add build mechanisms for Win32.
This commit is contained in:
parent
ee17fadbca
commit
a0c7f60fa2
169
libretro-build-win32.sh
Executable file
169
libretro-build-win32.sh
Executable file
@ -0,0 +1,169 @@
|
||||
#!/bin/sh
|
||||
|
||||
die()
|
||||
{
|
||||
echo $1
|
||||
#exit 1
|
||||
}
|
||||
|
||||
build_libretro_bsnes()
|
||||
{
|
||||
if [ -d "libretro-bsnes/perf" ]; then
|
||||
echo "=== Building bSNES performance ==="
|
||||
cd libretro-bsnes/perf
|
||||
make CC=$CC CXX=$CXX platform=win profile=performance -j4 || die "Failed to build bSNES performance core"
|
||||
cp -f out/retro.dll ../libretro-085-bsnes-performance.dll
|
||||
cd ../..
|
||||
else
|
||||
echo "bSNES performance not fetched, skipping ..."
|
||||
fi
|
||||
|
||||
if [ -d "libretro-bsnes/compat" ]; then
|
||||
echo "=== Building bSNES compatibility ==="
|
||||
cd libretro-bsnes/compat
|
||||
make CC=$CC CXX=$CXX platform=win profile=compatibility -j4 || die "Failed to build bSNES compatibility core"
|
||||
cp -f out/retro.dll ../libretro-085-bsnes-compat.dll
|
||||
cd ../..
|
||||
else
|
||||
echo "bSNES compat not fetched, skipping ..."
|
||||
fi
|
||||
|
||||
if [ -d "libretro-bsnes" ]; then
|
||||
echo "=== Building bSNES accuracy ==="
|
||||
cd libretro-bsnes
|
||||
make CC=$CC CXX=$CXX platform=win profile=accuracy -j4 || die "Failed to build bSNES accuracy core"
|
||||
cp -f out/retro.dll libretro-085-bsnes-accuracy.dll
|
||||
cd ..
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_s9x()
|
||||
{
|
||||
if [ -d "libretro-s9x" ]; then
|
||||
echo "=== Building SNES9x ==="
|
||||
cd libretro-s9x/libretro
|
||||
make CC=$CC CXX=$CXX platform=win -j4 || die "Failed to build SNES9x"
|
||||
cp libretro.dll ../libretro-git-snes9x.dll
|
||||
cd ../..
|
||||
else
|
||||
echo "SNES9x not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_s9x_next()
|
||||
{
|
||||
if [ -d "libretro-s9x-next" ]; then
|
||||
echo "=== Building SNES9x-Next ==="
|
||||
cd libretro-s9x-next/
|
||||
make CC=$CC CXX=$CXX platform=win -f Makefile.libretro -j4 || die "Failed to build SNES9x-Next"
|
||||
cp retro.dll libretro-git-snes9x-next.dll
|
||||
cd ..
|
||||
else
|
||||
echo "SNES9x-Next not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_genplus()
|
||||
{
|
||||
if [ -d "libretro-genplus" ]; then
|
||||
echo "=== Building Genplus GX ==="
|
||||
cd libretro-genplus/
|
||||
make CC=$CC CXX=$CXX platform=win -f Makefile.libretro -j4 || die "Failed to build Genplus GX"
|
||||
cp retro.dll libretro-git-genplus.dll
|
||||
cd ..
|
||||
else
|
||||
echo "Genplus GX not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_fba()
|
||||
{
|
||||
if [ -d "libretro-fba" ]; then
|
||||
echo "=== Building Final Burn Alpha ==="
|
||||
cd libretro-fba/src-0.2.97.24
|
||||
make -f makefile.libretro generate
|
||||
make CC=$CC CXX=$CXX platform=win -f makefile.libretro -j4 || die "Failed to build Final Burn Alpha"
|
||||
cp retro.dll ../libretro-git-fba.dll
|
||||
cd ../..
|
||||
else
|
||||
echo "Final Burn Alpha not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_vba()
|
||||
{
|
||||
if [ -d "libretro-vba" ]; then
|
||||
echo "=== Building VBA-Next ==="
|
||||
cd libretro-vba/
|
||||
make CC=$CC CXX=$CXX platform=win -f Makefile.libretro -j4 || die "Failed to build VBA-Next"
|
||||
cp retro.dll libretro-git-vba.dll
|
||||
cd ..
|
||||
else
|
||||
echo "VBA-Next not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_bnes()
|
||||
{
|
||||
if [ -d "libretro-bnes" ]; then
|
||||
echo "=== Building bNES ==="
|
||||
cd libretro-bnes
|
||||
mkdir -p obj
|
||||
make CC=$CC CXX=$CXX platform=win -j4 || die "Failed to build bNES"
|
||||
cp retro.dll libretro-git-bnes.dll
|
||||
cd ..
|
||||
else
|
||||
echo "bNES not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_fceu()
|
||||
{
|
||||
if [ -d "libretro-fceu" ]; then
|
||||
echo "=== Building FCEU ==="
|
||||
cd libretro-fceu
|
||||
make CC=$CC CXX=$CXX platform=win -f Makefile.libretro-fceumm -j4 || die "Failed to build FCEU"
|
||||
cp retro.dll libretro-git-fceu.dll
|
||||
cd ..
|
||||
else
|
||||
echo "FCEU not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_gambatte()
|
||||
{
|
||||
if [ -d "libretro-gambatte" ]; then
|
||||
echo "=== Building Gambatte ==="
|
||||
cd libretro-gambatte/libgambatte
|
||||
make CC=$CC CXX=$CXX platform=win -f Makefile.libretro -j4 || die "Failed to build Gambatte"
|
||||
cp retro.dll ../libretro-git-gambatte.dll
|
||||
cd ../..
|
||||
else
|
||||
echo "Gambatte not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_meteor()
|
||||
{
|
||||
if [ -d "libretro-meteor" ]; then
|
||||
echo "=== Building Meteor ==="
|
||||
cd libretro-meteor/libretro
|
||||
make platform=win CC=$CC CXX=$CXX -j4 || die "Failed to build Meteor"
|
||||
cp retro.dll ../libretro-git-meteor.dll
|
||||
cd ../
|
||||
else
|
||||
echo "Meteor not fetched, skipping ..."
|
||||
fi
|
||||
}
|
||||
|
||||
build_libretro_bsnes
|
||||
build_libretro_s9x
|
||||
build_libretro_s9x_next
|
||||
build_libretro_genplus
|
||||
build_libretro_fba
|
||||
build_libretro_vba
|
||||
build_libretro_bnes
|
||||
build_libretro_fceu
|
||||
build_libretro_gambatte
|
||||
build_libretro_meteor
|
||||
|
47
libretro-install-win32.sh
Executable file
47
libretro-install-win32.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/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
|
||||
|
||||
LIBS=""
|
||||
LIBS="$LIBS libretro-bsnes/libretro-085-bsnes-performance.dll"
|
||||
LIBS="$LIBS libretro-bsnes/libretro-085-bsnes-compat.dll"
|
||||
LIBS="$LIBS libretro-bsnes/libretro-085-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"
|
||||
|
||||
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
|
||||
|
@ -6,7 +6,7 @@ else
|
||||
LIBRETRO_DIR="$1"
|
||||
fi
|
||||
|
||||
if [ ! -d "$PREFIX/lib/libretro" ]; then
|
||||
if [ ! -d "$LIBRETRO_DIR" ]; then
|
||||
mkdir -p "$LIBRETRO_DIR"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user