Advertisement
jar3817

build-q2w-win64.sh

May 19th, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.41 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # building a windows 64bit binary
  4.  
  5. prefix=/tmp/q2w-win64
  6. home=/root/quake2world
  7. host=x86_64-w64-mingw32
  8. today=`date +%Y%m%d`
  9.  
  10. # compile the resource file for the icon
  11. $host-windres icons/q2wmap-icon.rc -O coff -o $home/src/tools/q2wmap/q2wmap-icon.res
  12. $host-windres icons/quake2world-icon.rc -O coff -o $home/src/main/quake2world-icon.res
  13.  
  14. # build the actual programs
  15. cd $home
  16. hash=`git log --pretty=format:'%h' -n 1`
  17. make clean
  18. autoreconf -i
  19. ./configure --host=$host --prefix=$prefix
  20. cd $home/src/main
  21. sed -i '/quake2world$(EXEEXT):/{N;N;s/$/ quake2world-icon.res/}' Makefile
  22. cd $home/src/game/default
  23. sed -i '/-fstack-protector-strong/s/-fstack-protector-strong\ //' Makefile
  24. cd $home/src/tools/q2wmap
  25. sed -i '/q2wmap$(EXEEXT):/{N;N;s/$/ q2wmap-icon.res/}' Makefile
  26. cd $home
  27. make
  28. make install
  29.  
  30. # copy the update script and rsync
  31. cp $home/mingw-cross/Quake2World-x86_64/update.bat $prefix
  32. cp $home/mingw-cross/Quake2World-x86_64/run.bat $prefix
  33. cp $home/mingw-cross/Quake2World-x86_64/bin/rsync.exe $prefix/bin
  34. cp $home/mingw-cross/Quake2World-x86_64/bin/cygwin1.dll $prefix/bin
  35.  
  36. # copy the DLLs
  37. cd $home/mingw-cross
  38. ./dllbundler.sh -h $host $prefix/bin/q2wmap.exe
  39. ./dllbundler.sh -h $host $prefix/bin/quake2world.exe
  40.  
  41. cd $prefix
  42. zip -r /tmp/q2w-win64-$today-$hash.zip ./*
  43.  
  44. 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