3 dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
6 if [[ $dir != /mnt/* ]];
9 echo "You need to clone the qmk_firmware repository outside the linux filesystem."
10 echo "Otherwise the windows executables can't be run."
17 echo "Do you want to install all toolchain dependencies needed for compiling QMK?"
18 echo "This will run install_dependencies.sh, which calls apt-get upgrade."
19 echo "If you don't want that, you can install the dependencies manually."
22 [Yy]* ) sudo ./install_dependencies.sh; break;;
24 * ) echo "Invalid answer";;
28 echo "Installing dependencies needed for the installation (unzip, wget)"
29 echo "This will ask for the sudo password"
30 sudo apt-get install unzip wget
32 download_dir=wsl_downloaded
34 source "$dir/win_shared_install.sh"
37 echo "Creating a softlink to the utils directory as ~/qmk_utils."
38 echo "This is needed so that the the make system can find all utils it need."
39 read -p "Press any key to continue (ctrl-c to abort)"
40 ln -sfn "$dir" ~/qmk_utils
42 if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc
45 echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc"
46 echo "Not adding it twice"
50 echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of your"
51 echo ".bashrc file? Without this make won't find the needed utils, so if you don't"
52 echo "want to do it automatically, then you have to do it manually later."
55 [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;;
57 * ) echo "Invalid answer";;
64 echo "Do you want to add a symlink to the QMK repository in your home directory for"
65 echo "convenience? This will create a folder 'qmk_firmware' in your home directory."
66 echo "In the future you can use this folder instead of the full path on your Windows"
70 [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;;
72 * ) echo "Invalid answer";;
77 echo "******************************************************************************"
78 echo "Installation completed!"
79 echo "You need to open a new batch command prompt for all the utils to work properly"
80 echo "******************************************************************************"