diff options
author | IBNobody <ibnobody@gmail.com> | 2016-09-14 20:22:04 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-09-14 20:22:18 -0500 |
commit | e72f8dfd7e7a95fb48f672a794c69b94d2998410 (patch) | |
tree | 8c1fd2f6e2bacb3029015b12d8cc7f2f3b01c65f | |
parent | 9c574b493c3d098d2c4f2475dfc1564a182acce0 (diff) | |
download | qmk_firmware-e72f8dfd7e7a95fb48f672a794c69b94d2998410.tar.gz qmk_firmware-e72f8dfd7e7a95fb48f672a794c69b94d2998410.zip |
Adding WinCheck Script for windows install help
-rw-r--r-- | util/Win_Check_Output.bat | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/util/Win_Check_Output.bat b/util/Win_Check_Output.bat new file mode 100644 index 000000000..3d517d940 --- /dev/null +++ b/util/Win_Check_Output.bat | |||
@@ -0,0 +1,205 @@ | |||
1 | @setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | ||
2 | @echo OFF | ||
3 | set BAT_VERSION=v1.0 | ||
4 | |||
5 | cls | ||
6 | |||
7 | echo QMK Windows Check Output %BAT_VERSION% | ||
8 | echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME% | ||
9 | |||
10 | :: ----------------------------------------------------------------------------- | ||
11 | |||
12 | set MINGW_BASE_DIR=C:\MinGW | ||
13 | set REPORT_NAME=Win_Check_Output.txt | ||
14 | |||
15 | set KEYMAP=atomic-pvc | ||
16 | set KEYMAP_CLEAN=atomic-pvc-clean | ||
17 | |||
18 | :: ----------------------------------------------------------------------------- | ||
19 | |||
20 | if %0 == VERBOSE (goto :Verbose_Make) else (goto :Normal_Make) | ||
21 | |||
22 | :Normal_Make | ||
23 | set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE | ||
24 | set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE | ||
25 | set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE | ||
26 | goto :Start_Report | ||
27 | |||
28 | :Verbose_Make | ||
29 | echo Verbose Mode | ||
30 | set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE | ||
31 | set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE | ||
32 | set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE | ||
33 | goto :Start_Report | ||
34 | |||
35 | :Start_Report | ||
36 | |||
37 | |||
38 | :: ----------------------------------------------------------------------------- | ||
39 | |||
40 | set header=CURRENT DIRECTORY & call :ReportHeader | ||
41 | |||
42 | echo %CD%>>%REPORT_NAME% 2>&1 | ||
43 | |||
44 | echo.>>%REPORT_NAME% 2>&1 | ||
45 | :: ----------------------------------------------------------------------------- | ||
46 | |||
47 | set header=CURRENT PATHS & call :ReportHeader | ||
48 | |||
49 | for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1) | ||
50 | |||
51 | echo.>>%REPORT_NAME% 2>&1 | ||
52 | |||
53 | :: ----------------------------------------------------------------------------- | ||
54 | |||
55 | set header=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader | ||
56 | |||
57 | set>>%REPORT_NAME% 2>&1 | ||
58 | echo.>>%REPORT_NAME% 2>&1 | ||
59 | |||
60 | :: ----------------------------------------------------------------------------- | ||
61 | |||
62 | set header=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader | ||
63 | |||
64 | set filename=make.exe & set version_cmd=--version & set version_find="GNU Make" & call :ReportVersion | ||
65 | set filename=git.exe & set version_cmd=--version & set version_find="git" & call :ReportVersion | ||
66 | set filename=cmp.exe & set version_cmd=--version & set version_find="cmp" & call :ReportVersion | ||
67 | |||
68 | :: ----------------------------------------------------------------------------- | ||
69 | |||
70 | set header=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader | ||
71 | |||
72 | set filename=avr-gcc.exe & set version_cmd=--version & set version_find="avr" & call :ReportVersion | ||
73 | set filename=avr-objcopy.exe & set version_cmd=--version & set version_find="GNU objcopy" & call :ReportVersion | ||
74 | set filename=avr-objdump.exe & set version_cmd=--version & set version_find="GNU objdump" & call :ReportVersion | ||
75 | set filename=avr-size.exe & set version_cmd=--version & set version_find="GNU size" & call :ReportVersion | ||
76 | set filename=avr-ar.exe & set version_cmd=--version & set version_find="GNU ar" & call :ReportVersion | ||
77 | set filename=avr-nm.exe & set version_cmd=--version & set version_find="GNU nm" & call :ReportVersion | ||
78 | |||
79 | :: ----------------------------------------------------------------------------- | ||
80 | |||
81 | set header=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader | ||
82 | |||
83 | set filename=arm-none-eabi-gcc.exe & set version_cmd=--version & set version_find="arm-none-eabi-gcc" & call :ReportVersion | ||
84 | set filename=arm-none-eabi-objcopy.exe & set version_cmd=--version & set version_find="GNU objcopy" & call :ReportVersion | ||
85 | set filename=arm-none-eabi-objdump.exe & set version_cmd=--version & set version_find="GNU objdump" & call :ReportVersion | ||
86 | set filename=arm-none-eabi-size.exe & set version_cmd=--version & set version_find="GNU size" & call :ReportVersion | ||
87 | set filename=arm-none-eabi-ar.exe & set version_cmd=--version & set version_find="GNU ar" & call :ReportVersion | ||
88 | set filename=arm-none-eabi-nm.exe & set version_cmd=--version & set version_find="GNU nm" & call :ReportVersion | ||
89 | |||
90 | :: ----------------------------------------------------------------------------- | ||
91 | |||
92 | set header=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader | ||
93 | |||
94 | set filename=gcc.exe & set version_cmd=--version & set version_find="gcc" & call :ReportVersion | ||
95 | set filename=objcopy.exe & set version_cmd=--version & set version_find="GNU objcopy" & call :ReportVersion | ||
96 | set filename=objdump.exe & set version_cmd=--version & set version_find="GNU objdump" & call :ReportVersion | ||
97 | set filename=size.exe & set version_cmd=--version & set version_find="GNU size" & call :ReportVersion | ||
98 | set filename=ar.exe & set version_cmd=--version & set version_find="GNU ar" & call :ReportVersion | ||
99 | set filename=nm.exe & set version_cmd=--version & set version_find="GNU nm" & call :ReportVersion | ||
100 | |||
101 | :: ----------------------------------------------------------------------------- | ||
102 | |||
103 | set header=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader | ||
104 | |||
105 | set filename=dfu-programmer.exe & set version_cmd=--version & set version_find="dfu" & call :ReportVersion | ||
106 | set filename=batchisp.exe & set version_cmd=-version & set version_find="batchisp" & call :ReportVersion | ||
107 | set filename=dfu-util.exe & call :Report | ||
108 | set filename=teensy_loader_cli.exe & call :Report | ||
109 | set filename=hid_bootloader_cli.exe & call :Report | ||
110 | set filename=avrdude.exe & call :Report | ||
111 | |||
112 | :: ----------------------------------------------------------------------------- | ||
113 | |||
114 | set header=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader | ||
115 | set filename=cppcheck.exe & call :Report | ||
116 | set filename=doxygen.exe & call :Report | ||
117 | set filename=gdb-config.exe & call :Report | ||
118 | set filename=wget.exe & call :Report | ||
119 | set filename=unzip.exe & call :Report | ||
120 | |||
121 | :: ----------------------------------------------------------------------------- | ||
122 | |||
123 | set header=MINGW CHECK - OPTIONAL & call :ReportHeader | ||
124 | if 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) | ||
125 | echo.>>%REPORT_NAME% 2>&1 | ||
126 | set filename=mingw32-make.exe & set version_cmd=--version & set version_find="GNU Make" & call :ReportVersion | ||
127 | if exist %MINGW_BASE_DIR%\bin\gcc.exe (ECHO It is not recommended to have make.exe in mingw/bin.>>%REPORT_NAME% 2>&1 & echo.>>%REPORT_NAME% 2>&1) | ||
128 | |||
129 | :: ----------------------------------------------------------------------------- | ||
130 | |||
131 | set header=MAKE CHECK & call :ReportHeader | ||
132 | if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound) | ||
133 | if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound) | ||
134 | if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound) | ||
135 | |||
136 | echo No Makfile Found.>>%REPORT_NAME% 2>&1 | ||
137 | echo.>>%REPORT_NAME% 2>&1 | ||
138 | echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 | ||
139 | |||
140 | goto ContinueAfterMake | ||
141 | |||
142 | :MakeFound | ||
143 | call :RunMake | ||
144 | |||
145 | :ContinueAfterMake | ||
146 | goto ExitBatch | ||
147 | |||
148 | :ExitBatch | ||
149 | echo Done! | ||
150 | echo. | ||
151 | rem type %REPORT_NAME% | ||
152 | echo. | ||
153 | echo See %REPORT_NAME% for the report. | ||
154 | endlocal | ||
155 | exit /b | ||
156 | |||
157 | :: ----------------------------------------------------------------------------- | ||
158 | |||
159 | :RunMake | ||
160 | |||
161 | echo Makfile Found.>>%REPORT_NAME% 2>&1 | ||
162 | echo.>>%REPORT_NAME% 2>&1 | ||
163 | set header=MAKE CLEAN & call :ReportHeader | ||
164 | echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1 | ||
165 | echo.>>%REPORT_NAME% 2>&1 | ||
166 | %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1 | ||
167 | set header=MAKE & call :ReportHeader | ||
168 | echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1 | ||
169 | echo.>>%REPORT_NAME% 2>&1 | ||
170 | %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1 | ||
171 | echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 | ||
172 | echo.>>%REPORT_NAME% 2>&1 | ||
173 | exit /b | ||
174 | |||
175 | :ReportHeader | ||
176 | echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 | ||
177 | echo.>>%REPORT_NAME% 2>&1 | ||
178 | echo %header%>>%REPORT_NAME% 2>&1 | ||
179 | echo.>>%REPORT_NAME% 2>&1 | ||
180 | exit /b | ||
181 | |||
182 | :Report | ||
183 | echo Filename = %filename% >>%REPORT_NAME% 2>&1 | ||
184 | <nul set /p output="Location = " >>%REPORT_NAME% 2>&1 | ||
185 | where %filename% >>%REPORT_NAME% 2> NUL | ||
186 | if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport) | ||
187 | |||
188 | :EndReport | ||
189 | echo.>>%REPORT_NAME% 2>&1 | ||
190 | <nul set /p output="." | ||
191 | exit /b | ||
192 | |||
193 | :ReportVersion | ||
194 | echo Filename = %filename% >>%REPORT_NAME% 2>&1 | ||
195 | <nul set /p output="Location = " >>%REPORT_NAME% 2>&1 | ||
196 | where %filename% >>%REPORT_NAME% 2> NUL | ||
197 | if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion) | ||
198 | <nul set /p output ="Version = " >>%REPORT_NAME% 2>&1 | ||
199 | |||
200 | (%filename% %version_cmd% | find %version_find%) >>%REPORT_NAME% 2>&1 | ||
201 | |||
202 | :EndReportVersion | ||
203 | echo.>>%REPORT_NAME% 2>&1 | ||
204 | <nul set /p output="." | ||
205 | exit /b \ No newline at end of file | ||