glueIt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/sh
  2. #set -o xtrace
  3. case "$1" in
  4. "clean")
  5. echo "removing ./build dir..."
  6. rm -R ./build
  7. ;;
  8. "build")
  9. echo "building SuperGlue clients..."
  10. mkdir -p ./build
  11. mkdir -p ./build/firefox
  12. mkdir -p ./build/chromium
  13. cp -R ./src/firefox/* ./build/firefox
  14. cp -R ./src/chromium/* ./build/chromium
  15. mkdir -p ./build/firefox/data/superglue-client
  16. mkdir -p ./build/chromium/superglue-client
  17. cp -R ./src/allplatforms/* ./build/firefox/data/superglue-client
  18. cp -R ./src/allplatforms/* ./build/chromium/superglue-client
  19. ;;
  20. "testFF")
  21. echo "Testing Firefox add-on..."
  22. cd ./tools/firefox-addon-sdk-1.16
  23. . ./bin/activate
  24. cd ../../build/firefox
  25. cfx run
  26. cd ../..
  27. ;;
  28. "pkgFF")
  29. echo "Packaging Firefox add-on..."
  30. cd ./tools/firefox-addon-sdk-1.16
  31. . ./bin/activate
  32. cd ../../build/firefox
  33. cfx xpi
  34. mv *.xpi ../
  35. cd ../..
  36. ;;
  37. "pkgCH")
  38. if [ ! -x $(which chromium) ]; then
  39. echo "Chromium not found, can't build.."
  40. exit 1
  41. fi
  42. echo "Packaging Chromium extension..."
  43. chromium --pack-extension=./build/chromium
  44. ;;
  45. *)
  46. echo "Usage: $0"
  47. echo " "
  48. echo " clean Remove build dir"
  49. echo " build Build SuperGlue clients"
  50. echo " "
  51. echo " testFF Test Firefox add-on in sandboxed browser"
  52. echo " pkgFF Make Firefox add-on package (./build/superglue.xpi)"
  53. echo " pkgCH Make Chromium extension package (./build/superglue.crx)"
  54. # echo " (---- To package Chromium extension, go there to chrome://extensions)"
  55. echo " "
  56. echo "ATTENTION!! Call $0 only in root of the project directory!"
  57. echo " "
  58. ;;
  59. esac