build.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. BUILD_ENV="1.0.6.1"
  3. SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
  4. if [ ! -d "build-env" ]; then
  5. mkdir build-env || exit 1
  6. fi
  7. cd build-env || exit 2
  8. if [ ! -f "PF-build-env-Linux64-$BUILD_ENV.zip" ]; then
  9. #wget https://github.com/3d-gussner/PF-build-env-1/releases/download/$BUILD_ENV-Linux64/PF-build-env-Linux64-$BUILD_ENV.zip || exit 3
  10. wget https://github.com/prusa3d/PF-build-env/releases/download/$BUILD_ENV-Linux64/PF-build-env-Linux64-$BUILD_ENV.zip || exit 3
  11. fi
  12. if [ ! -d "../../PF-build-env-$BUILD_ENV" ]; then
  13. unzip -q PF-build-env-Linux64-$BUILD_ENV.zip -d ../../PF-build-env-$BUILD_ENV || exit 4
  14. fi
  15. cd ../../PF-build-env-$BUILD_ENV || exit 5
  16. BUILD_ENV_PATH="$( pwd -P )"
  17. cd ..
  18. if [ ! -d "Prusa-Firmware-build" ]; then
  19. mkdir Prusa-Firmware-build || exit 6
  20. fi
  21. cd Prusa-Firmware-build || exit 7
  22. BUILD_PATH="$( pwd -P )"
  23. if [ ! -f "$SCRIPT_PATH/Firmware/Configuration_prusa.h" ]; then
  24. cp $SCRIPT_PATH/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h $SCRIPT_PATH/Firmware/Configuration_prusa.h || exit 8
  25. fi
  26. $BUILD_ENV_PATH/arduino $SCRIPT_PATH/Firmware/Firmware.ino --verify --board PrusaResearchRambo:avr:rambo --pref build.path=$BUILD_PATH --pref compiler.warning_level=all || exit 9
  27. export ARDUINO=$BUILD_ENV_PATH
  28. cd $SCRIPT_PATH/lang
  29. ./lang-build.sh || exit 10
  30. ./lang-community.sh || exit 11
  31. ./fw-build.sh || exit 12