Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scripts for easy Windows environment setup #170

Merged
merged 8 commits into from
Mar 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 1-setup-path-win.bat
Original file line number Diff line number Diff line change
@@ -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
)
41 changes: 41 additions & 0 deletions 2-setup-environment-win.bat
Original file line number Diff line number Diff line change
@@ -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
9 changes: 5 additions & 4 deletions keyboard/planck/PCB_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down