aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--util/1-setup-path-win.bat66
-rw-r--r--util/2-setup-environment-win.bat72
-rw-r--r--util/ELEVATE_LICENSE.md25
-rw-r--r--util/Win_Check.bat208
-rw-r--r--util/add-paths.bat30
-rw-r--r--util/elevate.exebin79360 -> 0 bytes
7 files changed, 0 insertions, 402 deletions
diff --git a/.gitignore b/.gitignore
index 2d2621f42..20437224f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,7 +48,6 @@ doxygen/
48*.iml 48*.iml
49.browse.VC.db* 49.browse.VC.db*
50*.stackdump 50*.stackdump
51util/Win_Check_Output.txt
52# Let these ones be user specific, since we have so many different configurations 51# Let these ones be user specific, since we have so many different configurations
53.vscode/c_cpp_properties.json 52.vscode/c_cpp_properties.json
54.vscode/launch.json 53.vscode/launch.json
diff --git a/util/1-setup-path-win.bat b/util/1-setup-path-win.bat
deleted file mode 100644
index 699aee215..000000000
--- a/util/1-setup-path-win.bat
+++ /dev/null
@@ -1,66 +0,0 @@
1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@ECHO OFF
3SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
4
5DEL script1.log > NUL 2>&1
6DEL add-paths.log > NUL 2>&1
7DEL add-paths-detail.log > NUL 2>&1
8DEL UPDATE > NUL 2>&1
9
10ELEVATE -wait add-paths.bat >> script1.log 2>&1
11
12IF ERRORLEVEL 1 (
13 ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time.
14) ELSE (
15 TYPE add-paths.log 2> NUL
16)
17ECHO.
18
19:: Branch to UpdateEnv if we need to update
20IF EXIST UPDATE (
21 DEL UPDATE
22 GOTO UpdateEnv
23)
24
25GOTO ExitBatch
26
27:: -----------------------------------------------------------------------------
28
29:UpdateEnv
30ECHO Making updated PATH go live . . .
31REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
32setx TEMPVAR 1 > NUL
33REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
34IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer)
35GOTO ExitBatch
36
37:: -----------------------------------------------------------------------------
38
39:ExitBatch
40ENDLOCAL
41PAUSE
42EXIT /b
43
44:: -----------------------------------------------------------------------------
45
46:KillExplorer
47ECHO.
48ECHO.
49ECHO Your desktop will be restarted.
50ECHO.
51ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED.
52ECHO.
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.
55PAUSE
56ping -n 5 127.0.0.1 > NUL 2>&1
57ECHO Killing process Explorer.exe. . .
58ECHO.
59taskkill /f /im explorer.exe > NUL
60ECHO.
61ECHO Your desktop is now loading. . .
62ECHO.
63ping -n 5 127.0.0.1 > NUL 2>&1
64START explorer.exe
65START explorer.exe %CD%
66EXIT /b \ No newline at end of file
diff --git a/util/2-setup-environment-win.bat b/util/2-setup-environment-win.bat
deleted file mode 100644
index 22a2e17f7..000000000
--- a/util/2-setup-environment-win.bat
+++ /dev/null
@@ -1,72 +0,0 @@
1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@ECHO OFF
3
4CD %~dp0
5
6SET STARTINGDIR=%CD%
7echo %STARTINGDIR%
8
9:: Check for admin privilages
10SETX /M test test > nul 2>&1
11IF NOT ["%ERRORLEVEL%"]==["0"] (
12 ELEVATE -wait 2-setup-environment-win.bat & goto :EOF
13)
14
15DEL %STARTINGDIR%\environment-setup.log
16
17:: Make sure path to MinGW exists - if so, CD to it
18SET MINGWPATH="C:\MinGW\bin"
19IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH%. Did you install MinGW to the default location? && GOTO ExitBatch)
20CD /D %MINGWPATH%
21
22ECHO.
23ECHO ------------------------------------------
24ECHO Installing wget and unzip
25ECHO ------------------------------------------
26ECHO.
27mingw-get install msys-wget-bin msys-unzip-bin
28
29MKDIR temp
30CD temp
31
32ECHO.
33ECHO ------------------------------------------
34ECHO Installing dfu-programmer.
35ECHO ------------------------------------------
36ECHO.
37wget --no-check-certificate 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' >> %STARTINGDIR%\environment-setup.log
38unzip -o dfu-programmer-win-0.7.2.zip >> %STARTINGDIR%\environment-setup.log
39COPY dfu-programmer.exe .. >> %STARTINGDIR%\environment-setup.log
40
41ECHO ------------------------------------------
42ECHO Downloading driver
43ECHO ------------------------------------------
44wget --no-check-certificate 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
45unzip -o libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log
46COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll >> %STARTINGDIR%\environment-setup.log
47
48ECHO.
49ECHO ------------------------------------------
50ECHO Installing driver. Accept prompt.
51ECHO ------------------------------------------
52ECHO.
53IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\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)
55
56ECHO FAILED. Could not find PnPUtil.exe in "%WinDir%\System32" or "%WinDir%\Sysnative".
57
58:PNPUTILFOUND
59
60:: Wait then delete directory
61ping -n 5 127.0.0.1 > NUL 2>&1
62CD ..
63RD /s /q temp
64
65ECHO ------------------------------------------
66ECHO Finished!
67
68:ExitBatch
69CD /D %STARTINGDIR%
70ENDLOCAL
71PAUSE
72EXIT /b \ No newline at end of file
diff --git a/util/ELEVATE_LICENSE.md b/util/ELEVATE_LICENSE.md
deleted file mode 100644
index 1cf4fda91..000000000
--- a/util/ELEVATE_LICENSE.md
+++ /dev/null
@@ -1,25 +0,0 @@
1Elevate was downloaded from [here](https://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/).
2
3### LICENSE
4
5The MIT License (MIT)
6
7Copyright (c) <year> <copyright holders>
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE. \ No newline at end of file
diff --git a/util/Win_Check.bat b/util/Win_Check.bat
deleted file mode 100644
index 3fdb656f9..000000000
--- a/util/Win_Check.bat
+++ /dev/null
@@ -1,208 +0,0 @@
1@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@echo OFF
3set BAT_VERSION=v1.0
4set REPORT_NAME=Win_Check_Output.txt
5
6:: -----------------------------------------------------------------------------
7
8cls
9
10echo QMK Windows Check Output %BAT_VERSION%
11echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME%
12
13:: -----------------------------------------------------------------------------
14
15set MINGW_BASE_DIR=C:\MinGW
16
17set KEYMAP=atomic-pvc
18set KEYMAP_CLEAN=atomic-pvc-clean
19
20:: -----------------------------------------------------------------------------
21
22if /I "%1" EQU VERBOSE (goto :Verbose_Make) else (goto :Normal_Make)
23
24:Normal_Make
25set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE
26set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE
27set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE
28goto :Start_Report
29
30:Verbose_Make
31echo Verbose Mode
32set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE
33set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE
34set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE
35goto :Start_Report
36
37:Start_Report
38
39
40:: -----------------------------------------------------------------------------
41
42set HEADER=CURRENT DIRECTORY & call :ReportHeader
43
44echo %CD%>>%REPORT_NAME% 2>&1
45
46echo.>>%REPORT_NAME% 2>&1
47
48:: -----------------------------------------------------------------------------
49
50set HEADER=CURRENT PATHS & call :ReportHeader
51
52for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1)
53
54echo.>>%REPORT_NAME% 2>&1
55
56:: -----------------------------------------------------------------------------
57
58rem set HEADER=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader
59
60rem set>>%REPORT_NAME% 2>&1
61rem echo.>>%REPORT_NAME% 2>&1
62
63:: -----------------------------------------------------------------------------
64
65set HEADER=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader
66
67set FILENAME=make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
68set FILENAME=git.exe & set VERSION_CMD=--version & set VERSION_FIND="git" & call :ReportVersion
69set FILENAME=cmp.exe & set VERSION_CMD=--version & set VERSION_FIND="cmp" & call :ReportVersion
70
71:: -----------------------------------------------------------------------------
72
73set HEADER=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader
74
75set FILENAME=avr-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="avr" & call :ReportVersion
76set FILENAME=avr-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
77set FILENAME=avr-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
78set FILENAME=avr-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
79set FILENAME=avr-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
80set FILENAME=avr-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
81
82:: -----------------------------------------------------------------------------
83
84set HEADER=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader
85
86set FILENAME=arm-none-eabi-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="arm-none-eabi-gcc" & call :ReportVersion
87set FILENAME=arm-none-eabi-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
88set FILENAME=arm-none-eabi-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
89set FILENAME=arm-none-eabi-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
90set FILENAME=arm-none-eabi-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
91set FILENAME=arm-none-eabi-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
92
93:: -----------------------------------------------------------------------------
94
95set HEADER=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader
96
97set FILENAME=gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="gcc" & call :ReportVersion
98set FILENAME=objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
99set FILENAME=objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
100set FILENAME=size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
101set FILENAME=ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
102set FILENAME=nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
103
104:: -----------------------------------------------------------------------------
105
106set HEADER=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader
107
108set FILENAME=dfu-programmer.exe & set VERSION_CMD=--version & set VERSION_FIND="dfu" & call :ReportVersion
109set FILENAME=batchisp.exe & set VERSION_CMD=-version & set VERSION_FIND="batchisp" & call :ReportVersion
110set FILENAME=dfu-util.exe & call :Report
111set FILENAME=teensy_loader_cli.exe & call :Report
112set FILENAME=hid_bootloader_cli.exe & call :Report
113set FILENAME=avrdude.exe & call :Report
114
115:: -----------------------------------------------------------------------------
116
117set HEADER=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader
118set FILENAME=cppcheck.exe & call :Report
119set FILENAME=doxygen.exe & call :Report
120set FILENAME=gdb-config.exe & call :Report
121set FILENAME=wget.exe & call :Report
122set FILENAME=unzip.exe & call :Report
123
124:: -----------------------------------------------------------------------------
125
126set HEADER=MINGW CHECK - OPTIONAL & call :ReportHeader
127if exist %MINGW_BASE_DIR% (echo Expected MinGW Base Dir = %MINGW_BASE_DIR%>>%REPORT_NAME% 2>&1) else (echo Expected MinGW Base Dir = %MINGW_BASE_DIR% - Not Found>>%REPORT_NAME% 2>&1)
128echo.>>%REPORT_NAME% 2>&1
129set FILENAME=mingw32-make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
130if exist %MINGW_BASE_DIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin.>>%REPORT_NAME% 2>&1 & echo.>>%REPORT_NAME% 2>&1)
131
132:: -----------------------------------------------------------------------------
133
134set HEADER=MAKE CHECK & call :ReportHeader
135if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound)
136if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound)
137if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound)
138
139echo No Makfile Found.>>%REPORT_NAME% 2>&1
140echo.>>%REPORT_NAME% 2>&1
141echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
142
143goto :ContinueAfterMake
144
145:MakeFound
146call :RunMake
147
148:ContinueAfterMake
149goto :ExitBatch
150
151:ExitBatch
152 echo Done!
153 echo.
154 rem type %REPORT_NAME%
155 echo.
156 echo See %REPORT_NAME% for the report.
157 endlocal
158exit /b
159
160:: -----------------------------------------------------------------------------
161
162:RunMake
163
164 echo Makfile Found.>>%REPORT_NAME% 2>&1
165 echo.>>%REPORT_NAME% 2>&1
166 set HEADER=MAKE CLEAN & call :ReportHeader
167 echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
168 echo.>>%REPORT_NAME% 2>&1
169 %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
170 set HEADER=MAKE & call :ReportHeader
171 echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
172 echo.>>%REPORT_NAME% 2>&1
173 %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
174 echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
175 echo.>>%REPORT_NAME% 2>&1
176exit /b
177
178:ReportHeader
179 echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
180 echo.>>%REPORT_NAME% 2>&1
181 echo %HEADER%>>%REPORT_NAME% 2>&1
182 echo.>>%REPORT_NAME% 2>&1
183exit /b
184
185:Report
186 echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
187 <nul set /p output="Location = " >>%REPORT_NAME% 2>&1
188 where %FILENAME% >>%REPORT_NAME% 2> NUL
189 if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport)
190
191 :EndReport
192 echo.>>%REPORT_NAME% 2>&1
193 <nul set /p output="."
194exit /b
195
196:ReportVersion
197 echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
198 <nul set /p output="Location = " >>%REPORT_NAME% 2>&1
199 where %FILENAME% >>%REPORT_NAME% 2> NUL
200 if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion)
201 <nul set /p output ="Version = " >>%REPORT_NAME% 2>&1
202
203 (%FILENAME% %VERSION_CMD% | find %VERSION_FIND%) >>%REPORT_NAME% 2>&1
204
205 :EndReportVersion
206 echo.>>%REPORT_NAME% 2>&1
207 <nul set /p output="."
208exit /b \ No newline at end of file
diff --git a/util/add-paths.bat b/util/add-paths.bat
deleted file mode 100644
index ab3d91da1..000000000
--- a/util/add-paths.bat
+++ /dev/null
@@ -1,30 +0,0 @@
1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@ECHO off
3
4SET NEWPATH1="C:\MinGW\msys\1.0\bin"
5SET NEWPATH2="C:\MinGW\bin"
6
7CD %~dp0
8
9ECHO. > add-paths.log
10
11CALL :AddPath %NEWPATH1%
12CALL :AddPath %NEWPATH2%
13
14EXIT /b
15
16:AddPath <pathToAdd>
17ECHO %PATH% | FINDSTR /C:"%~1" > nul
18IF ERRORLEVEL 1 (
19 REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" >> add-paths-detail.log
20 IF ERRORLEVEL 0 (
21 ECHO Adding %1 . . . Success! >> add-paths.log
22 SET "PATH=%PATH%;%~1"
23 COPY NUL UPDATE
24 ) ELSE (
25 ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. >> add-paths.log
26 )
27) ELSE (
28 ECHO Skipping %1 - Already in PATH >> add-paths.log
29 )
30EXIT /b \ No newline at end of file
diff --git a/util/elevate.exe b/util/elevate.exe
deleted file mode 100644
index fc6180ec9..000000000
--- a/util/elevate.exe
+++ /dev/null
Binary files differ