################# PINBALL FOR WINDOWS
########################################
# @author: RzR - http://rzr.online.fr/game.htm
##############################################################################
#
# If having trouble contact me at the url at the top
# MSVC++6 port will come later
### ENV + LIBS + GCC
########################################################
### If you are on debian Install those packages
apt-get install make autoconf automake g++
apt-get install xlibmesa-dev libsdl1.2debian-all
apt-get source libpng
### [ to be compleated ]
### let get the mingw32 for linux (there is a debian
one also)
mkdir -p /usr/local/cross-tools
cd /usr/local/cross-tools
wget -r -l1 http://www.libsdl.org/extras/win32/cross/
# http://www.libsdl.org/extras/win32/cross/README.txt
wget --no-parent -r
http://www.libsdl.org/extras/win32 && \
wget --no-parent -r -l2 -p
http://cefiro.homelinux.org/SDL/sdl-devel-files/binary/
/usr/local/cross-tools/bin/i386-mingw32msvc-g++ --version
#2.95.3-6
# [to be completed]
### getting pinball tarball
mkdir -p $HOME/usr/local/src ; cd $HOME/usr/local/src
wget -c
http://aleron.dl.sourceforge.net/sourceforge/pinball/pinball-0.2.0a.tar.gz
### extracting source
cd $HOME/usr/local/src ; rm -rf pinball-0.2.0
tar xvfz pinball-0.2.0.tar.gz
### Patch was build this way (skip this operation , was
for me)
cd $HOME/usr/local/src/pinball-0.2.0-$USER && \
find . -name "*~" -exec rm {} \; && \
( rm -f ../pinball-0.2.0-$USER.patch ; \
diff -ruwN --exclude="*.orig" ../pinball-0.2.0 . >
../pinball-0.2.0-$USER.patch )
### PATCH & BUILD
###########################################################
# wget sf.net/pinball-0.2.0.tar.gz
cd $HOME/usr/local/src/pinball-0.2.0
# patch pinconfig.h + src/Makefile + src/Loader.cpp
base/Config.cpp+.h ...
patch -b -p0 < ../pinball-0.2.0-rzr.patch
#make clean # distclean
### and let's cross compile it for Windows plateform
cross-configure.sh --prefix=/pinball --disable-sdltest
cross-make.sh # err wrongs args ??? (ignore)
sh ./config.status # what is this ?
cross-make.sh # now works correctly
# error @ src/pinball on bad generated rule (ignore)
cross-make.sh -C src wpinball.exe
### install
# mkdir -p /mnt/c/pinball
# ln -fs /mnt/c/pinball /pinball
# \cp -f src/wpinball.exe /pinball/ # /pinball/share +
/pinball/lib
# cross-make.sh -k install
### NOTES ETC
###############################################################
### it still works on linux as well :
make clean
./configure --prefix=/pinball
make && make -k install
# \cp -f src/pinball /pinball/pinball-linux
### cross configure may be replaced by :
# sh #new ENV with new path
PREFIX=/usr/local/cross-tools
BUILDTARGET=i386-mingw32msvc
[ -d ${PREFIX}/bin ] || exit
[ -d ${PREFIX}/${BUILDTARGET}/bin ] || exit
PATH="$PREFIX/bin:$PREFIX/${BUILDTARGET}/bin:$PATH"
LD_LIBRARY_PATH="/usr/local/cross-tools/dll:$LD_LIBRARY_PATH"
export PATH LD_LIBRARY_PATH
echo $PATH
GCCLOCALDIR=/usr/local/cross-tools/${BUILDTARGET}/
EXESUFFIX=.exe
rm config.cache
sh ./configure \
--target=${BUILDTARGET} \
--program-suffix=${EXESUFFIX} \
--prefix=${GCCLOCALDIR} \
--cache-file="config-${BUILDTARGET}.cache" \
--prefix=/pinball --disable-sdltest \
$*
# cross-make is make + PATH
#exit # restore prev env
pinball-0.2.0 / compiling / win32 / gcc / mingw32