Merge pull request #170 from NoahAndrews/improve-windows-docs

Add scripts for easy Windows environment setup
This commit is contained in:
Jack Humbert 2016-03-04 10:19:00 -05:00
commit 3f7180a73e
3 changed files with 55 additions and 4 deletions

9
1-setup-path-win.bat Normal file
View file

@ -0,0 +1,9 @@
@echo off
setx /M path "%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin" > nul 2>&1
if NOT ["%errorlevel%"]==["0"] (
echo FAILED. Rerun with administrator privileges.
pause
) else (
echo Success!
pause
)

View file

@ -0,0 +1,41 @@
@echo off
setx /M test test > nul 2>&1
if NOT ["%errorlevel%"]==["0"] (
echo FAILED. Rerun with administrator privileges.
pause
exit
)
echo ------------------------------------------
echo Installing wget and unzip
echo ------------------------------------------
mingw-get install msys-wget-bin msys-unzip-bin
cd \MinGW\bin
mkdir temp
cd temp
echo ------------------------------------------
echo Installing dfu-programmer.
echo ------------------------------------------
wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
unzip dfu-programmer-win-0.7.2.zip
copy dfu-programmer.exe ..
echo ------------------------------------------
echo Downloading driver
echo ------------------------------------------
wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip
unzip libusb-win32-bin-1.2.6.0.zip
cp libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll
echo ------------------------------------------
echo Installing driver. Accept prompt.
echo ------------------------------------------
pnputil -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
cd ..
rm -rf temp
echo ------------------------------------------
echo Finished!
pause

View file

@ -3,10 +3,11 @@
## Setting up the environment
### Windows
1. Install [WinAVR Tools](http://sourceforge.net/projects/winavr/) for AVR GCC compiler.
2. Install [DFU-Programmer][dfu-prog] (the -win one).
3. Start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you will need to update its driver on 'Device Manager' to the `dfu-programmer` driver.
1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
### Mac