msys2_install.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
  3. download_dir=~/qmk_utils
  4. util_dir=$(dirname "$0")
  5. echo "Installing dependencies needed for the installation"
  6. pacman --needed --noconfirm --disable-download-timeout -Sy \
  7. base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \
  8. mingw-w64-x86_64-python-pip \
  9. mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
  10. mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \
  11. mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-dfu-util mingw-w64-x86_64-teensy-loader-cli
  12. source "$dir/win_shared_install.sh"
  13. pip3 install -r "${util_dir}/../requirements.txt"
  14. cp -f "$dir/activate_msys2.sh" "$download_dir/"
  15. if grep "^source ~/qmk_utils/activate_msys2.sh$" ~/.bashrc
  16. then
  17. echo
  18. echo "The line source ~/qmk_utils/activate_msys2.sh is already added to your /.bashrc"
  19. echo "Not adding it twice!"
  20. else
  21. echo
  22. echo "Adding 'source ~/qmk_utils/activate_msys2.sh' to the end of your"
  23. echo ".bashrc file. Without this make won't find the needed utils."
  24. echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc;
  25. fi
  26. echo
  27. echo "******************************************************************************"
  28. echo "Installation completed!"
  29. echo "Please close this Window and restart MSYS2 MinGW"
  30. echo "******************************************************************************"