Updates to mingw build.

This commit is contained in:
Themaister 2012-04-22 11:42:22 +02:00
parent 58bf26caad
commit 7bcb82a25e

View File

@ -1,6 +1,6 @@
#!/bin/sh
###############
# Build script which builds and packages SSNES for MinGW 32/64-bit.
# Build script which builds and packages RetroArch for MinGW 32/64-bit.
# Preferably build on Linux with a cross chain ... :D
##########
@ -61,7 +61,7 @@ do_phoenix_build()
message "Build Phoenix GUI"
### Build Phoenix GUI
if [ ! -d "Phoenix" ]; then
git clone git://github.com/Themaister/SSNES-Phoenix.git Phoenix
git clone git://github.com/Themaister/RetroArch-Phoenix.git Phoenix
cd Phoenix
else
cd Phoenix
@ -70,24 +70,24 @@ do_phoenix_build()
make -f Makefile.win clean || die "Failed to clean ..."
make -f Makefile.win CC="$C_COMPILER" CXX="$CXX_COMPILER" WINDRES="$WINDRES" -j4 all || die "Failed to build ..."
touch ssnes-phoenix.cfg
cp ssnes-phoenix.cfg ssnes-phoenix.exe ../ || die "Failed to copy ..."
touch retroarch-phoenix.cfg
cp retroarch-phoenix.cfg retroarch-phoenix.exe ../ || die "Failed to copy ..."
cd ..
}
do_build()
{
SSNES_DIR="$1"
RetroArch_DIR="$1"
LIBZIPNAME="$2"
BUILDTYPE="$3"
MAKEARGS="$4"
if [ ! -d "$SSNES_DIR" ]; then
git clone git://github.com/Themaister/SSNES.git "$SSNES_DIR"
cd "$SSNES_DIR"
if [ ! -d "$RetroArch_DIR" ]; then
git clone git://github.com/Themaister/RetroArch.git "$RetroArch_DIR"
cd "$RetroArch_DIR"
else
cd "$SSNES_DIR"
cd "$RetroArch_DIR"
git pull origin master
fi
@ -98,7 +98,7 @@ do_build()
make -f Makefile.win clean || die "Failed to clean ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" -j4 all SLIM=1 || die "Failed to build ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" dist_${BUILDTYPE} SLIM=1 || die "Failed to dist ..."
if [ -z "`find . | grep "ssnes-win"`" ]; then
if [ -z "`find . | grep "retroarch-win"`" ]; then
die "Did not find build ..."
fi
@ -106,12 +106,12 @@ do_build()
do_phoenix_build
fi
ZIP_BASE="`find . | grep "ssnes-win" | head -n1`"
ZIP_BASE="`find . | grep "retroarch-win" | head -n1`"
ZIP_SLIM="`echo $ZIP_BASE | sed -e 's|\.zip|-slim.zip|'`"
ZIP_FULL="`echo $ZIP_BASE | sed -e 's|\.zip|-full.zip|'`"
if [ "$BUILD_PHOENIX_GUI" = "yes" ]; then
zip "$ZIP_BASE" ssnes-phoenix.exe ssnes-phoenix.cfg
zip "$ZIP_BASE" retroarch-phoenix.exe retroarch-phoenix.cfg
fi
mv -v "$ZIP_BASE" "../$ZIP_SLIM" || die "Failed to move final build ..."
@ -120,7 +120,7 @@ do_build()
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" dist_${BUILDTYPE} || die "Failed to dist ..."
if [ "$BUILD_PHOENIX_GUI" = "yes" ]; then
zip "$ZIP_BASE" ssnes-phoenix.exe ssnes-phoenix.cfg
zip "$ZIP_BASE" retroarch-phoenix.exe retroarch-phoenix.cfg
fi
mv -v "$ZIP_BASE" "../$ZIP_FULL" || die "Failed to move final build ..."
@ -132,7 +132,7 @@ if [ "$BUILD_32BIT" = yes ]; then
C_COMPILER=${MINGW32_BASE}-gcc
CXX_COMPILER=${MINGW32_BASE}-g++
WINDRES=${MINGW32_BASE}-windres
do_build "SSNES-w32" "SSNES-win32-libs.zip" "x86" ""
do_build "RetroArch-w32" "RetroArch-win32-libs.zip" "x86" ""
fi
if [ "$BUILD_64BIT" = yes ]; then
@ -140,7 +140,7 @@ if [ "$BUILD_64BIT" = yes ]; then
C_COMPILER=${MINGW64_BASE}-gcc
CXX_COMPILER=${MINGW64_BASE}-g++
WINDRES=${MINGW64_BASE}-windres
do_build "SSNES-w64" "SSNES-win64-libs.zip" "x86_64" "HAVE_SINC=1"
do_build "RetroArch-w64" "RetroArch-win64-libs.zip" "x86_64" "HAVE_SINC=1"
fi
message "Built successfully! :)"