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 "If you don't want that, you can install the dependencies manually."
21 [Yy]* ) ./linux_install.sh; break;;
23 * ) echo "Invalid answer";;
27 download_dir=wsl_downloaded
29 source "$dir/win_shared_install.sh"
34 echo "Flip need to be installed if you want to use that for programming."
35 echo "Please install it to the default location!"
36 read -p "Do you want to install it now? (Y/N) " res
38 [Yy]* ) cmd.exe /c FlipInstaller.exe; break;;
40 * ) echo "Invalid answer";;
47 echo "Creating a softlink to the utils directory as ~/qmk_utils."
48 echo "This is needed so that the the make system can find all utils it need."
49 read -p "Press enter to continue (ctrl-c to abort)"
50 ln -sfn "$dir" ~/qmk_utils
52 if grep "^source ~/qmk_utils/activate_wsl.sh$" ~/.bashrc
55 echo "The line source ~/qmk_utils/activate_wsl.sh is already added to your /.bashrc"
56 echo "Not adding it twice"
60 echo "Do you want to add 'source ~/qmk_utils/activate_wsl.sh' to the end of your"
61 echo ".bashrc file? Without this make won't find the needed utils, so if you don't"
62 echo "want to do it automatically, then you have to do it manually later."
65 [Yy]* ) echo "source ~/qmk_utils/activate_wsl.sh" >> ~/.bashrc; break;;
67 * ) echo "Invalid answer";;
74 echo "Do you want to add a symlink to the QMK repository in your home directory for"
75 echo "convenience? This will create a folder 'qmk_firmware' in your home directory."
76 echo "In the future you can use this folder instead of the full path on your Windows"
80 [Yy]* ) ln -sfn "$dir/.." ~/qmk_firmware; break;;
82 * ) echo "Invalid answer";;
87 echo "******************************************************************************"
88 echo "Installation completed!"
89 echo "You need to open a new bash command prompt for all the utils to work properly"
90 echo "******************************************************************************"