Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # building a windows 64bit binary
- prefix=/tmp/q2w-win64
- home=/root/quake2world
- host=x86_64-w64-mingw32
- today=`date +%Y%m%d`
- # compile the resource file for the icon
- $host-windres icons/q2wmap-icon.rc -O coff -o $home/src/tools/q2wmap/q2wmap-icon.res
- $host-windres icons/quake2world-icon.rc -O coff -o $home/src/main/quake2world-icon.res
- # build the actual programs
- cd $home
- hash=`git log --pretty=format:'%h' -n 1`
- make clean
- autoreconf -i
- ./configure --host=$host --prefix=$prefix
- cd $home/src/main
- sed -i '/quake2world$(EXEEXT):/{N;N;s/$/ quake2world-icon.res/}' Makefile
- cd $home/src/game/default
- sed -i '/-fstack-protector-strong/s/-fstack-protector-strong\ //' Makefile
- cd $home/src/tools/q2wmap
- sed -i '/q2wmap$(EXEEXT):/{N;N;s/$/ q2wmap-icon.res/}' Makefile
- cd $home
- make
- make install
- # copy the update script and rsync
- cp $home/mingw-cross/Quake2World-x86_64/update.bat $prefix
- cp $home/mingw-cross/Quake2World-x86_64/run.bat $prefix
- cp $home/mingw-cross/Quake2World-x86_64/bin/rsync.exe $prefix/bin
- cp $home/mingw-cross/Quake2World-x86_64/bin/cygwin1.dll $prefix/bin
- # copy the DLLs
- cd $home/mingw-cross
- ./dllbundler.sh -h $host $prefix/bin/q2wmap.exe
- ./dllbundler.sh -h $host $prefix/bin/quake2world.exe
- cd $prefix
- zip -r /tmp/q2w-win64-$today-$hash.zip ./*
- rsync -avz -e ssh /tmp/q2w-win64-$today-$hash.zip root@packetflinger.com:/var/www/domains/packetflinger.com/dl/q2w
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement