diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | message.mk | 4 | ||||
| -rw-r--r-- | quantum/keymap_common.c | 1 | ||||
| -rw-r--r-- | tests/basic/keymap.c | 5 | ||||
| -rw-r--r-- | tests/test_common/matrix.c | 3 | ||||
| -rw-r--r-- | tests/test_common/test_fixture.cpp | 4 | ||||
| -rw-r--r-- | tests/test_common/test_fixture.hpp | 2 | ||||
| -rw-r--r-- | tmk_core/native.mk | 5 | ||||
| -rw-r--r-- | util/activate_msys2.sh | 16 | ||||
| -rw-r--r-- | util/msys2_install.sh | 117 | ||||
| -rw-r--r-- | util/win_shared_install.sh | 80 | ||||
| -rw-r--r-- | util/wsl_install.sh | 94 |
12 files changed, 247 insertions, 85 deletions
diff --git a/.gitignore b/.gitignore index ffa7662bd..e40308193 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -23,6 +23,7 @@ quantum/version.h | |||
| 23 | CMakeLists.txt | 23 | CMakeLists.txt |
| 24 | .DS_STORE | 24 | .DS_STORE |
| 25 | /util/wsl_downloaded | 25 | /util/wsl_downloaded |
| 26 | /util/win_downloaded | ||
| 26 | 27 | ||
| 27 | # Eclipse/PyCharm/Other IDE Settings | 28 | # Eclipse/PyCharm/Other IDE Settings |
| 28 | .cproject | 29 | .cproject |
diff --git a/message.mk b/message.mk index fa051fd71..4f72202e6 100644 --- a/message.mk +++ b/message.mk | |||
| @@ -21,8 +21,8 @@ OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)\n | |||
| 21 | ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n | 21 | ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n |
| 22 | WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n | 22 | WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n |
| 23 | 23 | ||
| 24 | TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }' | 24 | TAB_LOG = printf "\n%s\n\n" "$$LOG" | $(AWK) '{ sub(/^/," | "); print }' |
| 25 | TAB_LOG_PLAIN = printf "$$LOG\n" | 25 | TAB_LOG_PLAIN = printf "%s\n" "$$LOG" |
| 26 | AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }' | 26 | AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }' |
| 27 | AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }' | 27 | AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }' |
| 28 | PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && $(ON_ERROR) | 28 | PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && $(ON_ERROR) |
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index b1460c53c..1c522e8b8 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
| @@ -169,7 +169,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | // translates key to keycode | 171 | // translates key to keycode |
| 172 | __attribute__ ((weak)) | ||
| 173 | uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | 172 | uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) |
| 174 | { | 173 | { |
| 175 | // Read entire word (16bits) | 174 | // Read entire word (16bits) |
diff --git a/tests/basic/keymap.c b/tests/basic/keymap.c index 3274f213f..3f97c0a0e 100644 --- a/tests/basic/keymap.c +++ b/tests/basic/keymap.c | |||
| @@ -40,4 +40,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | return MACRO_NONE; | 42 | return MACRO_NONE; |
| 43 | }; \ No newline at end of file | 43 | }; |
| 44 | |||
| 45 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 46 | } \ No newline at end of file | ||
diff --git a/tests/test_common/matrix.c b/tests/test_common/matrix.c index 0d9fa68b0..4b501039b 100644 --- a/tests/test_common/matrix.c +++ b/tests/test_common/matrix.c | |||
| @@ -58,3 +58,6 @@ void release_key(uint8_t col, uint8_t row) { | |||
| 58 | void clear_all_keys(void) { | 58 | void clear_all_keys(void) { |
| 59 | memset(matrix, 0, sizeof(matrix)); | 59 | memset(matrix, 0, sizeof(matrix)); |
| 60 | } | 60 | } |
| 61 | |||
| 62 | void led_set(uint8_t usb_led) { | ||
| 63 | } | ||
diff --git a/tests/test_common/test_fixture.cpp b/tests/test_common/test_fixture.cpp index df57338df..4084ee9c6 100644 --- a/tests/test_common/test_fixture.cpp +++ b/tests/test_common/test_fixture.cpp | |||
| @@ -44,8 +44,8 @@ void TestFixture::run_one_scan_loop() { | |||
| 44 | advance_time(1); | 44 | advance_time(1); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void TestFixture::idle_for(uint time) { | 47 | void TestFixture::idle_for(unsigned time) { |
| 48 | for (uint i=0; i<time; i++) { | 48 | for (unsigned i=0; i<time; i++) { |
| 49 | run_one_scan_loop(); | 49 | run_one_scan_loop(); |
| 50 | } | 50 | } |
| 51 | } \ No newline at end of file | 51 | } \ No newline at end of file |
diff --git a/tests/test_common/test_fixture.hpp b/tests/test_common/test_fixture.hpp index 4146b682b..fb37e440f 100644 --- a/tests/test_common/test_fixture.hpp +++ b/tests/test_common/test_fixture.hpp | |||
| @@ -26,5 +26,5 @@ public: | |||
| 26 | static void TearDownTestCase(); | 26 | static void TearDownTestCase(); |
| 27 | 27 | ||
| 28 | void run_one_scan_loop(); | 28 | void run_one_scan_loop(); |
| 29 | void idle_for(uint ms); | 29 | void idle_for(unsigned ms); |
| 30 | }; \ No newline at end of file | 30 | }; \ No newline at end of file |
diff --git a/tmk_core/native.mk b/tmk_core/native.mk index 50232ee9b..530b50b84 100644 --- a/tmk_core/native.mk +++ b/tmk_core/native.mk | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | SYSTEM_TYPE := $(shell gcc -dumpmachine) | ||
| 2 | |||
| 1 | CC = gcc | 3 | CC = gcc |
| 2 | OBJCOPY = | 4 | OBJCOPY = |
| 3 | OBJDUMP = | 5 | OBJDUMP = |
| @@ -14,6 +16,9 @@ COMPILEFLAGS += -funsigned-bitfields | |||
| 14 | COMPILEFLAGS += -ffunction-sections | 16 | COMPILEFLAGS += -ffunction-sections |
| 15 | COMPILEFLAGS += -fdata-sections | 17 | COMPILEFLAGS += -fdata-sections |
| 16 | COMPILEFLAGS += -fshort-enums | 18 | COMPILEFLAGS += -fshort-enums |
| 19 | ifneq ($(findstring mingw, ${SYSTEM_TYPE}),) | ||
| 20 | COMPILEFLAGS += -mno-ms-bitfields | ||
| 21 | endif | ||
| 17 | 22 | ||
| 18 | CFLAGS += $(COMPILEFLAGS) | 23 | CFLAGS += $(COMPILEFLAGS) |
| 19 | CFLAGS += -fno-inline-small-functions | 24 | CFLAGS += -fno-inline-small-functions |
diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh new file mode 100644 index 000000000..bb0485302 --- /dev/null +++ b/util/activate_msys2.sh | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | function export_variables { | ||
| 4 | local util_dir=~/qmk_utils | ||
| 5 | export PATH=$PATH:$util_dir/dfu-programmer | ||
| 6 | export PATH=$PATH:$util_dir/dfu-util-0.9-win64 | ||
| 7 | export PATH=$PATH:$util_dir/flip/bin | ||
| 8 | export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin | ||
| 9 | export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin | ||
| 10 | } | ||
| 11 | |||
| 12 | export_variables | ||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | |||
diff --git a/util/msys2_install.sh b/util/msys2_install.sh new file mode 100644 index 000000000..de03b89ac --- /dev/null +++ b/util/msys2_install.sh | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | ||
| 4 | download_dir=~/qmk_utils | ||
| 5 | avrtools=avr8-gnu-toolchain | ||
| 6 | armtools=gcc-arm-none-eabi | ||
| 7 | installflip=false | ||
| 8 | |||
| 9 | echo "Installing dependencies needed for the installation (quazip)" | ||
| 10 | pacman --needed -S msys/unzip msys/p7zip base-devel msys/git mingw-w64-x86_64-toolchain | ||
| 11 | |||
| 12 | source "$dir/win_shared_install.sh" | ||
| 13 | |||
| 14 | function install_avr { | ||
| 15 | rm -f -r "$avrtools" | ||
| 16 | wget "http://www.atmel.com/images/avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe" | ||
| 17 | 7z x avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe | ||
| 18 | rm avr8-gnu-toolchain-installer-3.5.4.91-win32.any.x86.exe | ||
| 19 | } | ||
| 20 | |||
| 21 | function install_arm { | ||
| 22 | wget -O gcc-arm-none-eabi.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip?product=GNU%20ARM%20Embedded%20Toolchain,ZIP,,Windows,6-2017-q2-update" | ||
| 23 | unzip -d gcc-arm-none-eabi gcc-arm-none-eabi.zip | ||
| 24 | rm gcc-arm-none-eabi.zip | ||
| 25 | } | ||
| 26 | |||
| 27 | function extract_flip { | ||
| 28 | rm -f -r flip | ||
| 29 | 7z -oflip x FlipInstaller.exe | ||
| 30 | } | ||
| 31 | |||
| 32 | pushd "$download_dir" | ||
| 33 | |||
| 34 | if [ -f "FlipInstaller.exe" ]; then | ||
| 35 | echo | ||
| 36 | echo "Extracting flip" | ||
| 37 | extract_flip | ||
| 38 | fi | ||
| 39 | |||
| 40 | if [ ! -d "$avrtools" ]; then | ||
| 41 | while true; do | ||
| 42 | echo | ||
| 43 | echo "The AVR toolchain is not installed." | ||
| 44 | echo "This is needed for building AVR based keboards." | ||
| 45 | read -p "Do you want to install it? (Y/N) " res | ||
| 46 | case $res in | ||
| 47 | [Yy]* ) install_avr; break;; | ||
| 48 | [Nn]* ) break;; | ||
| 49 | * ) echo "Invalid answer";; | ||
| 50 | esac | ||
| 51 | done | ||
| 52 | else | ||
| 53 | while true; do | ||
| 54 | echo | ||
| 55 | echo "The AVR toolchain is already installed" | ||
| 56 | read -p "Do you want to reinstall? (Y/N) " res | ||
| 57 | case $res in | ||
| 58 | [Yy]* ) install_avr; break;; | ||
| 59 | [Nn]* ) break;; | ||
| 60 | * ) echo "Invalid answer";; | ||
| 61 | esac | ||
| 62 | done | ||
| 63 | fi | ||
| 64 | |||
| 65 | if [ ! -d "$armtools" ]; then | ||
| 66 | while true; do | ||
| 67 | echo | ||
| 68 | echo "The ARM toolchain is not installed." | ||
| 69 | echo "This is needed for building ARM based keboards." | ||
| 70 | read -p "Do you want to install it? (Y/N) " res | ||
| 71 | case $res in | ||
| 72 | [Yy]* ) install_arm; break;; | ||
| 73 | [Nn]* ) break;; | ||
| 74 | * ) echo "Invalid answer";; | ||
| 75 | esac | ||
| 76 | done | ||
| 77 | else | ||
| 78 | while true; do | ||
| 79 | echo | ||
| 80 | echo "The ARM toolchain is already installed" | ||
| 81 | read -p "Do you want to reinstall? (Y/N) " res | ||
| 82 | case $res in | ||
| 83 | [Yy]* ) install_arm; break;; | ||
| 84 | [Nn]* ) break;; | ||
| 85 | * ) echo "Invalid answer";; | ||
| 86 | esac | ||
| 87 | done | ||
| 88 | fi | ||
| 89 | popd | ||
| 90 | |||
| 91 | cp -f "$dir/activate_msys2.sh" "$download_dir/" | ||
| 92 | |||
| 93 | if grep "^source ~/qmk_utils/activate_msys2.sh$" ~/.bashrc | ||
| 94 | then | ||
| 95 | echo | ||
| 96 | echo "The line source ~/qmk_utils/activate_msys2.sh is already added to your /.bashrc" | ||
| 97 | echo "Not adding it twice!" | ||
| 98 | else | ||
| 99 | while true; do | ||
| 100 | echo | ||
| 101 | echo "Do you want to add 'source ~/qmk_utils/activate_msys2.sh' to the end of your" | ||
| 102 | echo ".bashrc file? Without this make won't find the needed utils, so if you don't" | ||
| 103 | echo "want to do it automatically, then you have to do it manually later." | ||
| 104 | read -p "(Y/N)? " res | ||
| 105 | case $res in | ||
| 106 | [Yy]* ) echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc; break;; | ||
| 107 | [Nn]* ) break;; | ||
| 108 | * ) echo "Invalid answer";; | ||
| 109 | esac | ||
| 110 | done | ||
| 111 | fi | ||
| 112 | |||
| 113 | echo | ||
| 114 | echo "******************************************************************************" | ||
| 115 | echo "Installation completed!" | ||
| 116 | echo "Please close this Window and restart MSYS2 MinGW" | ||
| 117 | echo "******************************************************************************" \ No newline at end of file | ||
diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh new file mode 100644 index 000000000..8d1949ae9 --- /dev/null +++ b/util/win_shared_install.sh | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | function install_utils { | ||
| 4 | rm -f -r "$download_dir" | ||
| 5 | mkdir "$download_dir" | ||
| 6 | |||
| 7 | pushd "$download_dir" | ||
| 8 | |||
| 9 | echo "Installing dfu-programmer" | ||
| 10 | wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' | ||
| 11 | unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip | ||
| 12 | |||
| 13 | echo "Installing dfu-util" | ||
| 14 | wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' | ||
| 15 | unzip dfu-util-0.9-win64.zip | ||
| 16 | |||
| 17 | echo "Installing teensy_loader_cli" | ||
| 18 | wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' | ||
| 19 | unzip teensy_loader_cli_windows.zip | ||
| 20 | |||
| 21 | echo "Installing Atmel Flip" | ||
| 22 | wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' | ||
| 23 | mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe | ||
| 24 | |||
| 25 | echo "Downloading the QMK driver installer" | ||
| 26 | wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - | ||
| 27 | |||
| 28 | rm -f *.zip | ||
| 29 | |||
| 30 | popd > /dev/null | ||
| 31 | } | ||
| 32 | |||
| 33 | function install_drivers { | ||
| 34 | pushd "$download_dir" | ||
| 35 | cp -f "$dir/drivers.txt" . | ||
| 36 | echo | ||
| 37 | cmd.exe /c "qmk_driver_installer.exe $1 $2 drivers.txt" | ||
| 38 | popd > /dev/null | ||
| 39 | } | ||
| 40 | |||
| 41 | pushd "$dir" | ||
| 42 | |||
| 43 | if [ ! -d "$download_dir" ]; then | ||
| 44 | install_utils | ||
| 45 | else | ||
| 46 | while true; do | ||
| 47 | echo | ||
| 48 | echo "The utils seem to already be downloaded." | ||
| 49 | read -p "Do you want to re-download them and update to the newest version (Y/N) " res | ||
| 50 | case $res in | ||
| 51 | [Yy]* ) install_utils; break;; | ||
| 52 | [Nn]* ) break;; | ||
| 53 | * ) echo "Invalid answer";; | ||
| 54 | esac | ||
| 55 | done | ||
| 56 | fi | ||
| 57 | |||
| 58 | while true; do | ||
| 59 | echo | ||
| 60 | echo "Which USB drivers do you want to install?" | ||
| 61 | echo "(A)all - All supported drivers will be installed" | ||
| 62 | echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode)" | ||
| 63 | echo " will be installed" | ||
| 64 | echo "(F)force - Like all, but will also override existing drivers for connected" | ||
| 65 | echo " keyboards" | ||
| 66 | echo "(N)one - No drivers will be installed," | ||
| 67 | echo " flashing your keyboard will most likely not work" | ||
| 68 | read -p "(A/C/F/N)? " res | ||
| 69 | case $res in | ||
| 70 | [Aa]* ) install_drivers --all; break;; | ||
| 71 | [Cc]* ) install_drivers; break;; | ||
| 72 | [Ff]* ) install_drivers --all --force; break;; | ||
| 73 | [Nn]* ) break;; | ||
| 74 | * ) echo "Invalid answer";; | ||
| 75 | esac | ||
| 76 | done | ||
| 77 | |||
| 78 | |||
| 79 | popd > /dev/null | ||
| 80 | |||
diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 8999da8a4..157480353 100644 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh | |||
| @@ -1,44 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | download_dir=wsl_downloaded | ||
| 4 | |||
| 5 | function install_utils { | ||
| 6 | rm -f -r $download_dir | ||
| 7 | mkdir $download_dir | ||
| 8 | |||
| 9 | pushd $download_dir | ||
| 10 | |||
| 11 | echo "Installing dfu-programmer" | ||
| 12 | wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' | ||
| 13 | unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip | ||
| 14 | |||
| 15 | echo "Installing dfu-util" | ||
| 16 | wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' | ||
| 17 | unzip dfu-util-0.9-win64.zip | ||
| 18 | |||
| 19 | echo "Installing teensy_loader_cli" | ||
| 20 | wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' | ||
| 21 | unzip teensy_loader_cli_windows.zip | ||
| 22 | |||
| 23 | echo "Installing Atmel Flip" | ||
| 24 | wget 'http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe' | ||
| 25 | mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe | ||
| 26 | |||
| 27 | echo "Downloading the QMK driver installer" | ||
| 28 | wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - | ||
| 29 | |||
| 30 | rm -f *.zip | ||
| 31 | |||
| 32 | popd > /dev/null | ||
| 33 | } | ||
| 34 | |||
| 35 | function install_drivers { | ||
| 36 | pushd $download_dir | ||
| 37 | cmd.exe /C qmk_driver_installer.exe $1 $2 ../drivers.txt | ||
| 38 | popd > /dev/null | ||
| 39 | } | ||
| 40 | |||
| 41 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | 3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) |
| 4 | pushd "$dir"; | ||
| 42 | 5 | ||
| 43 | if [[ $dir != /mnt/* ]]; | 6 | if [[ $dir != /mnt/* ]]; |
| 44 | then | 7 | then |
| @@ -48,7 +11,6 @@ then | |||
| 48 | exit 1 | 11 | exit 1 |
| 49 | fi | 12 | fi |
| 50 | 13 | ||
| 51 | pushd "$dir" | ||
| 52 | 14 | ||
| 53 | while true; do | 15 | while true; do |
| 54 | echo | 16 | echo |
| @@ -67,49 +29,25 @@ echo "Installing dependencies needed for the installation (unzip, wget)" | |||
| 67 | echo "This will ask for the sudo password" | 29 | echo "This will ask for the sudo password" |
| 68 | sudo apt-get install unzip wget | 30 | sudo apt-get install unzip wget |
| 69 | 31 | ||
| 32 | download_dir=wsl_downloaded | ||
| 70 | 33 | ||
| 71 | if [ ! -d "$download_dir" ]; then | 34 | source "$dir/win_shared_install.sh" |
| 72 | install_utils | ||
| 73 | else | ||
| 74 | while true; do | ||
| 75 | echo | ||
| 76 | read -p "The utils seem to already be downloaded, do you want to re-download them and update to the newest version (Y/N) " res | ||
| 77 | case $res in | ||
| 78 | [Yy]* ) install_utils; break;; | ||
| 79 | [Nn]* ) break;; | ||
| 80 | * ) echo "Invalid answer";; | ||
| 81 | esac | ||
| 82 | done | ||
| 83 | fi | ||
| 84 | 35 | ||
| 36 | pushd "$download_dir" | ||
| 85 | while true; do | 37 | while true; do |
| 86 | echo | 38 | echo |
| 87 | read -p "Flip need to be installed if you want to use that for programming, do you want to install it now? (Y/N) " res | 39 | echo "Flip need to be installed if you want to use that for programming." |
| 40 | echo "Please install it to the default location!" | ||
| 41 | read -p "Do you want to install it now? (Y/N) " res | ||
| 88 | case $res in | 42 | case $res in |
| 89 | [Yy]* ) cmd.exe /c $download_dir\\FlipInstaller.exe; break;; | 43 | [Yy]* ) cmd.exe /c FlipInstaller.exe; break;; |
| 90 | [Nn]* ) break;; | 44 | [Nn]* ) break;; |
| 91 | * ) echo "Invalid answer";; | 45 | * ) echo "Invalid answer";; |
| 92 | esac | 46 | esac |
| 93 | done | 47 | done |
| 48 | popd | ||
| 94 | 49 | ||
| 95 | 50 | ||
| 96 | while true; do | ||
| 97 | echo | ||
| 98 | echo "Which USB drivers do you want to install?" | ||
| 99 | echo "(A)all - All supported drivers will be installed" | ||
| 100 | echo "(C)onnected - Only drivers for connected keyboards (in bootloader/flashing mode) will be installed" | ||
| 101 | echo "(F)force - Like all, but will also override existing drivers for connected keyboards" | ||
| 102 | echo "(N)one - No drivers will be installed, flashing your keyboard will most likely not work" | ||
| 103 | read -p "(A/C/F/N)? " res | ||
| 104 | case $res in | ||
| 105 | [Aa]* ) install_drivers --all; break;; | ||
| 106 | [Cc]* ) install_drivers; break;; | ||
| 107 | [Ff]* ) install_drivers --all --force; break;; | ||
| 108 | [Nn]* ) break;; | ||
| 109 | * ) echo "Invalid answer";; | ||
| 110 | esac | ||
| 111 | done | ||
| 112 | |||
| 113 | echo | 51 | echo |
| 114 | echo "Creating a softlink to the utils directory as ~/qmk_utils." | 52 | echo "Creating a softlink to the utils directory as ~/qmk_utils." |
| 115 | echo "This is needed so that the the make system can find all utils it need." | 53 | echo "This is needed so that the the make system can find all utils it need." |
| @@ -124,9 +62,9 @@ then | |||
| 124 | else | 62 | else |
| 125 | while true; do | 63 | while true; do |
| 126 | echo | 64 | echo |
| 127 | echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of you .bashrc file?" | 65 | echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of your" |
| 128 | echo "Without this make won't find the needed utils, so if you don't want to do it automatically," | 66 | echo ".bashrc file? Without this make won't find the needed utils, so if you don't" |
| 129 | echo "then you have to do it manually." | 67 | echo "want to do it automatically, then you have to do it manually later." |
| 130 | read -p "(Y/N)? " res | 68 | read -p "(Y/N)? " res |
| 131 | case $res in | 69 | case $res in |
| 132 | [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;; | 70 | [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;; |
| @@ -138,9 +76,10 @@ fi | |||
| 138 | 76 | ||
| 139 | while true; do | 77 | while true; do |
| 140 | echo | 78 | echo |
| 141 | echo "Do you want to add a symlink to the QMK repository in your home directory for convenience?" | 79 | echo "Do you want to add a symlink to the QMK repository in your home directory for" |
| 142 | echo "This will create a folder 'qmk_firmware' in your home directory." | 80 | echo "convenience? This will create a folder 'qmk_firmware' in your home directory." |
| 143 | echo "In the future you can use this folder instead of the full path on your windows file system" | 81 | echo "In the future you can use this folder instead of the full path on your Windows" |
| 82 | echo "file system." | ||
| 144 | read -p "(Y/N)? " res | 83 | read -p "(Y/N)? " res |
| 145 | case $res in | 84 | case $res in |
| 146 | [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;; | 85 | [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;; |
| @@ -156,4 +95,3 @@ echo "You need to open a new batch command prompt for all the utils to work prop | |||
| 156 | echo "******************************************************************************" | 95 | echo "******************************************************************************" |
| 157 | 96 | ||
| 158 | popd > /dev/null | 97 | popd > /dev/null |
| 159 | |||
