build.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/usr/bin/env bash
  2. set -x
  3. # Set those lines to fit your setup.
  4. # This is where glife.qsp will be copied. If you don't want to move it just comment (#) the line below.
  5. #DESTDIR=../GL_ECV
  6. # The file that will be generated or open
  7. QSPFILE=glife.qsp
  8. #######################################################################
  9. python tools/txtmerge.py locations glife.txt
  10. if [[ "$OSTYPE" == "linux-gnu" ]]; then
  11. ./tools/txt2gam.linux glife.txt "${QSPFILE}" 1> /dev/null
  12. elif [[ "$OSTYPE" == "darwin"* ]]; then
  13. ./tools/txt2gam.mac glife.txt "${QSPFILE}" 1> /dev/null
  14. elif [[ "$OSTYPE" == "msys" ]]; then
  15. if [[ "$MSYSTEM_CARCH" == "x86_64" ]]; then
  16. ./tools/txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
  17. else
  18. ./tools/txt2gam.exe glife.txt "${QSPFILE}" 1> /dev/null
  19. fi
  20. elif [[ "$OSTYPE" == "cygwin" ]]; then
  21. # Unsure if non-AMD CPUs give this or AMD64, tested on an actual AMD brand chip
  22. # requires a python install visible to cygwin (for the txtmerge above)
  23. if [[ "$PROCESSOR_ARCHITECTURE" == "x86_64" ]]; then
  24. ./tools/txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
  25. elif [[ "$PROCESSOR_ARCHITECTURE" == "AMD64" ]]; then
  26. ./tools/txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
  27. else
  28. ./tools/txt2gam.exe glife.txt "${QSPFILE}" 1> /dev/null
  29. fi
  30. fi
  31. if [ -d "${DESTDIR}" ]; then
  32. cp --reflink=auto "${QSPFILE}" "${DESTDIR}"
  33. fi