ActionPi is an easy to use Action Camera for the Raspberry Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.sh 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/bash
  2. #install script ActionPi by Seil0
  3. #version 0.2
  4. echo "ActionPi install script by Seil0 version 0.1"
  5. cd ~/Downloads/
  6. echo "downloading and installing raspicam c++ lib ..."
  7. wget -O raspicam_c++-lib.zip https://sourceforge.net/projects/raspicam/files/raspicam-0.1.3.zip/download#
  8. unzip raspicam_c++-lib.zip
  9. cd raspicam-0.1.3/
  10. cmake install
  11. mkdir build
  12. cd build/
  13. cmake ..
  14. sudo make install
  15. sudo ldconfig
  16. echo "finished installing raspicam c++ lib, start downloading bcm2835 lib ..."
  17. wget -O bcm2835-1.50.tar.gz http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz
  18. tar zxvf bcm2835-1.50.tar.gz
  19. cd bcm2835-1.50/
  20. ./configure
  21. make
  22. sudo make check
  23. sudo make install
  24. echo "finished installing bcm2835 lib, removing unused files ..."
  25. cd ~/Downloads/
  26. sudo rm raspicam_c++-lib.zip
  27. sudo rm -r raspicam-0.1.3
  28. echo "starting to compile ActionPi Software ..."
  29. cd ActionPi-master
  30. g++ -Wall ActionPi.cpp -oActionPi -l raspicam -l bcm2835 -std=c++0x
  31. mkdir ~/ActionPi
  32. mv -i ActionPi ~/ActionPi/ActionPi
  33. cd ~/ActionPi/
  34. chmod +x ActionPi
  35. echo "Do you wish to autostart the ActionPi Software?"
  36. echo "!WARNING! this is not tested use only if you know what you do!"
  37. select yn in "Yes" "No"; do
  38. case $yn in
  39. Yes ) sudo echo "sudo ~/ActionPi./ActionPi" > /etc/rc.local; break;;
  40. No ) break;;
  41. esac
  42. done
  43. echo "Do you wish to add i2c configuration for real time clock?"
  44. echo "!WARNING! this is not tested use only if you know what you do!"
  45. select yn in "Yes" "No"; do
  46. case $yn in
  47. Yes ) sudo i2cdetect -y 1; sudo modprobe rtc-ds1307; sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device; break;;
  48. No ) break;;
  49. esac
  50. done
  51. echo "Do you wish to deactivate dhcpcd? (Not recommended)"
  52. echo "!WARNING! this is not tested use only if you know what you do!"
  53. select yn in "Yes" "No"; do
  54. case $yn in
  55. Yes ) sudo service dhcpcd stop; sudo systemctl disable dhcpcd break;;
  56. No ) break;;
  57. esac
  58. done
  59. echo "Installation completed!"
  60. echo "Would you like to reboot now (recommenden)?"
  61. echo "!WARNING! this is not tested use only if you know what you do!"
  62. select yn in "Yes" "No"; do
  63. case $yn in
  64. Yes ) sudo reboot; break;;
  65. No ) break;;
  66. esac
  67. done