setup.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/bash
  2. if [ ! -d src/c3dlas ] ; then
  3. echo "c3dlas not found... fetching"
  4. git clone https://github.com/yzziizzy/c3dlas src/c3dlas
  5. fi
  6. if [ ! -d src/c_json ] ; then
  7. echo "c_json not found... fetching"
  8. git clone https://github.com/yzziizzy/c_json src/c_json
  9. fi
  10. if [ ! -d src/sti ] ; then
  11. echo "sti not found... fetching"
  12. git clone https://github.com/yzziizzy/sti src/sti
  13. fi
  14. # TODO: attempt to detect build-essential and other basic system deps.
  15. # the remainder at least...
  16. echo "This setup file is for Ubuntu."
  17. F=$(locate png.h | grep 'png.h' | tail -n 1)
  18. echo $F
  19. if [[ -z $F || ! -f $F ]] ; then
  20. echo "libpng dev files are missing..."
  21. sudo apt-get install libpng-dev
  22. fi
  23. F=$(locate pcre.h | grep 'pcre.h' | tail -n 1)
  24. echo $F
  25. if [[ -z $F || ! -f $F ]] ; then
  26. echo "libpcre3 dev files are missing..."
  27. sudo apt-get install libpcre3-dev
  28. fi
  29. F=$(locate freetype/freetype.h | grep 'freetype/freetype.h' | tail -n 1)
  30. echo $F
  31. if [[ -z $F || ! -f $F ]] ; then
  32. echo "freetype dev files are missing..."
  33. sudo apt-get install libfreetype6-dev
  34. fi
  35. F=$(locate GL/glew.h | grep 'GL/glew.h' | tail -n 1)
  36. echo $F
  37. if [[ -z $F || ! -f $F ]] ; then
  38. echo "glew is missing..."
  39. sudo apt-get install libglew-dev
  40. fi
  41. F=$(locate fontconfig/fontconfig.h | grep 'fontconfig/fontconfig.h' | tail -n 1)
  42. echo $F
  43. if [[ -z $F || ! -f $F ]] ; then
  44. echo "fontconfig dev files are missing..."
  45. sudo apt-get install libfontconfig1-dev
  46. fi
  47. F=$(locate X11/X.h | grep 'X11/X.h' | tail -n 1)
  48. echo $F
  49. if [[ -z $F || ! -f $F ]] ; then
  50. echo "xlib dev files are missing..."
  51. sudo apt-get install libx11-dev
  52. fi
  53. F=$(locate GL/gl.h | grep 'GL/gl.h' | tail -n 1)
  54. echo $F
  55. if [[ -z $F || ! -f $F ]] ; then
  56. echo "OpenGL dev files are missing. You may need Mesa header files, or your graphics drivers might be misinstalled or broken."
  57. exit 1
  58. fi
  59. ./debug.sh