aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/1-setup-path-win.bat11
-rw-r--r--util/2-setup-environment-win.bat31
2 files changed, 28 insertions, 14 deletions
diff --git a/util/1-setup-path-win.bat b/util/1-setup-path-win.bat
index 92e91be3e..699aee215 100644
--- a/util/1-setup-path-win.bat
+++ b/util/1-setup-path-win.bat
@@ -2,12 +2,12 @@
2@ECHO OFF 2@ECHO OFF
3SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe 3SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
4 4
5CD UTIL 5DEL script1.log > NUL 2>&1
6DEL add-paths.log > NUL 2>&1 6DEL add-paths.log > NUL 2>&1
7DEL add-paths-detail.log > NUL 2>&1 7DEL add-paths-detail.log > NUL 2>&1
8DEL UPDATE > NUL 2>&1 8DEL UPDATE > NUL 2>&1
9 9
10ELEVATE -wait %cd%\add-paths.bat > NUL 2>&1 10ELEVATE -wait add-paths.bat >> script1.log 2>&1
11 11
12IF ERRORLEVEL 1 ( 12IF ERRORLEVEL 1 (
13 ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time. 13 ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time.
@@ -44,9 +44,14 @@ EXIT /b
44:: ----------------------------------------------------------------------------- 44:: -----------------------------------------------------------------------------
45 45
46:KillExplorer 46:KillExplorer
47ECHO.
48ECHO.
47ECHO Your desktop will be restarted. 49ECHO Your desktop will be restarted.
50ECHO.
48ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED. 51ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED.
52ECHO.
49ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time. 53ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time.
54ECHO.
50PAUSE 55PAUSE
51ping -n 5 127.0.0.1 > NUL 2>&1 56ping -n 5 127.0.0.1 > NUL 2>&1
52ECHO Killing process Explorer.exe. . . 57ECHO Killing process Explorer.exe. . .
@@ -57,5 +62,5 @@ ECHO Your desktop is now loading. . .
57ECHO. 62ECHO.
58ping -n 5 127.0.0.1 > NUL 2>&1 63ping -n 5 127.0.0.1 > NUL 2>&1
59START explorer.exe 64START explorer.exe
60START explorer.exe %CD%\.. 65START explorer.exe %CD%
61EXIT /b \ No newline at end of file 66EXIT /b \ No newline at end of file
diff --git a/util/2-setup-environment-win.bat b/util/2-setup-environment-win.bat
index 905338087..3e54cc776 100644
--- a/util/2-setup-environment-win.bat
+++ b/util/2-setup-environment-win.bat
@@ -1,46 +1,55 @@
1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@ECHO OFF 2@ECHO OFF
3 3
4CD %~dp0
5
4SET STARTINGDIR=%CD% 6SET STARTINGDIR=%CD%
7echo %STARTINGDIR%
5 8
6:: Check for admin privilages 9:: Check for admin privilages
7SETX /M test test > nul 2>&1 10SETX /M test test > nul 2>&1
8IF NOT ["%ERRORLEVEL%"]==["0"] ( 11IF NOT ["%ERRORLEVEL%"]==["0"] (
9 ECHO FAILED. Rerun with administrator privileges. 12 ELEVATE -wait 2-setup-environment-win.bat & goto :EOF
10 GOTO ExitBatch
11) 13)
12 14
15DEL %STARTINGDIR%\environment-setup.log
16
13:: Make sure path to MinGW exists - if so, CD to it 17:: Make sure path to MinGW exists - if so, CD to it
14SET MINGWPATH="C:\MinGW\bin" 18SET MINGWPATH="C:\MinGW\bin"
15IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH% && GOTO ExitBatch) 19IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH%. Did you install MinGW to the default location? && GOTO ExitBatch)
16CD /D %MINGWPATH% 20CD /D %MINGWPATH%
17 21
18 22ECHO.
19ECHO ------------------------------------------ 23ECHO ------------------------------------------
20ECHO Installing wget and unzip 24ECHO Installing wget and unzip
21ECHO ------------------------------------------ 25ECHO ------------------------------------------
22mingw-get install msys-wget-bin msys-unzip-bin 26ECHO.
27mingw-get install msys-wget-bin msys-unzip-bin
23 28
24MKDIR temp 29MKDIR temp
25CD temp 30CD temp
26 31
32ECHO.
27ECHO ------------------------------------------ 33ECHO ------------------------------------------
28ECHO Installing dfu-programmer. 34ECHO Installing dfu-programmer.
29ECHO ------------------------------------------ 35ECHO ------------------------------------------
30wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip 36ECHO.
31unzip dfu-programmer-win-0.7.2.zip 37wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' >> %STARTINGDIR%\environment-setup.log
32COPY dfu-programmer.exe .. 38unzip -o dfu-programmer-win-0.7.2.zip >> %STARTINGDIR%\environment-setup.log
39COPY dfu-programmer.exe .. >> %STARTINGDIR%\environment-setup.log
33 40
34ECHO ------------------------------------------ 41ECHO ------------------------------------------
35ECHO Downloading driver 42ECHO Downloading driver
36ECHO ------------------------------------------ 43ECHO ------------------------------------------
37wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip 44wget http://downloads.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log
38unzip libusb-win32-bin-1.2.6.0.zip 45unzip -o libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log
39COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll 46COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll >> %STARTINGDIR%\environment-setup.log
40 47
48ECHO.
41ECHO ------------------------------------------ 49ECHO ------------------------------------------
42ECHO Installing driver. Accept prompt. 50ECHO Installing driver. Accept prompt.
43ECHO ------------------------------------------ 51ECHO ------------------------------------------
52ECHO.
44IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND) 53IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
45IF EXIST "%WinDir%\Sysnative\PnPUtil.exe" (%WinDir%\Sysnative\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND) 54IF EXIST "%WinDir%\Sysnative\PnPUtil.exe" (%WinDir%\Sysnative\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
46 55