summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorOlivier <olivier@gid0.org>2016-11-27 23:23:21 +0100
committerOlivier <olivier@gid0.org>2016-11-27 23:23:21 +0100
commitd6d0b7eadaa568853b21d74057db306a33b7a847 (patch)
treee935179ed0db152f94d31ef187c01a40f0fb42d6 /util
parent73d2a470eed73a1ba28520343bd1cfc81498d183 (diff)
parent1585fc4b616cb28b8d4a418cd31c8ce0dd64f731 (diff)
downloadqmk_firmware-d6d0b7eadaa568853b21d74057db306a33b7a847.tar.gz
qmk_firmware-d6d0b7eadaa568853b21d74057db306a33b7a847.zip
Merge https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'util')
-rw-r--r--util/Win_Check.bat208
-rwxr-xr-x[-rw-r--r--]util/install_dependencies.sh17
-rwxr-xr-xutil/new_project.sh1
-rw-r--r--util/travis_compiled_push.sh4
4 files changed, 221 insertions, 9 deletions
diff --git a/util/Win_Check.bat b/util/Win_Check.bat
new file mode 100644
index 0000000000..3fdb656f9c
--- /dev/null
+++ b/util/Win_Check.bat
@@ -0,0 +1,208 @@
+@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
+@echo OFF
+set BAT_VERSION=v1.0
+set REPORT_NAME=Win_Check_Output.txt
+
+:: -----------------------------------------------------------------------------
+
+cls
+
+echo QMK Windows Check Output %BAT_VERSION%
+echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME%
+
+:: -----------------------------------------------------------------------------
+
+set MINGW_BASE_DIR=C:\MinGW
+
+set KEYMAP=atomic-pvc
+set KEYMAP_CLEAN=atomic-pvc-clean
+
+:: -----------------------------------------------------------------------------
+
+if /I "%1" EQU VERBOSE (goto :Verbose_Make) else (goto :Normal_Make)
+
+:Normal_Make
+set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE
+set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE
+set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE
+goto :Start_Report
+
+:Verbose_Make
+echo Verbose Mode
+set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE
+set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE
+set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE
+goto :Start_Report
+
+:Start_Report
+
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=CURRENT DIRECTORY & call :ReportHeader
+
+echo %CD%>>%REPORT_NAME% 2>&1
+
+echo.>>%REPORT_NAME% 2>&1
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=CURRENT PATHS & call :ReportHeader
+
+for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1)
+
+echo.>>%REPORT_NAME% 2>&1
+
+:: -----------------------------------------------------------------------------
+
+rem set HEADER=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader
+
+rem set>>%REPORT_NAME% 2>&1
+rem echo.>>%REPORT_NAME% 2>&1
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader
+
+set FILENAME=make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
+set FILENAME=git.exe & set VERSION_CMD=--version & set VERSION_FIND="git" & call :ReportVersion
+set FILENAME=cmp.exe & set VERSION_CMD=--version & set VERSION_FIND="cmp" & call :ReportVersion
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader
+
+set FILENAME=avr-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="avr" & call :ReportVersion
+set FILENAME=avr-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
+set FILENAME=avr-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
+set FILENAME=avr-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
+set FILENAME=avr-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
+set FILENAME=avr-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader
+
+set FILENAME=arm-none-eabi-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="arm-none-eabi-gcc" & call :ReportVersion
+set FILENAME=arm-none-eabi-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
+set FILENAME=arm-none-eabi-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
+set FILENAME=arm-none-eabi-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
+set FILENAME=arm-none-eabi-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
+set FILENAME=arm-none-eabi-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader
+
+set FILENAME=gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="gcc" & call :ReportVersion
+set FILENAME=objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion
+set FILENAME=objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion
+set FILENAME=size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion
+set FILENAME=ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion
+set FILENAME=nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader
+
+set FILENAME=dfu-programmer.exe & set VERSION_CMD=--version & set VERSION_FIND="dfu" & call :ReportVersion
+set FILENAME=batchisp.exe & set VERSION_CMD=-version & set VERSION_FIND="batchisp" & call :ReportVersion
+set FILENAME=dfu-util.exe & call :Report
+set FILENAME=teensy_loader_cli.exe & call :Report
+set FILENAME=hid_bootloader_cli.exe & call :Report
+set FILENAME=avrdude.exe & call :Report
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader
+set FILENAME=cppcheck.exe & call :Report
+set FILENAME=doxygen.exe & call :Report
+set FILENAME=gdb-config.exe & call :Report
+set FILENAME=wget.exe & call :Report
+set FILENAME=unzip.exe & call :Report
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=MINGW CHECK - OPTIONAL & call :ReportHeader
+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)
+echo.>>%REPORT_NAME% 2>&1
+set FILENAME=mingw32-make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion
+if 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)
+
+:: -----------------------------------------------------------------------------
+
+set HEADER=MAKE CHECK & call :ReportHeader
+if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound)
+if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound)
+if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound)
+
+echo No Makfile Found.>>%REPORT_NAME% 2>&1
+echo.>>%REPORT_NAME% 2>&1
+echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
+
+goto :ContinueAfterMake
+
+:MakeFound
+call :RunMake
+
+:ContinueAfterMake
+goto :ExitBatch
+
+:ExitBatch
+ echo Done!
+ echo.
+ rem type %REPORT_NAME%
+ echo.
+ echo See %REPORT_NAME% for the report.
+ endlocal
+exit /b
+
+:: -----------------------------------------------------------------------------
+
+:RunMake
+
+ echo Makfile Found.>>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+ set HEADER=MAKE CLEAN & call :ReportHeader
+ echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+ %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1
+ set HEADER=MAKE & call :ReportHeader
+ echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+ %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1
+ echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+exit /b
+
+:ReportHeader
+ echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+ echo %HEADER%>>%REPORT_NAME% 2>&1
+ echo.>>%REPORT_NAME% 2>&1
+exit /b
+
+:Report
+ echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
+ <nul set /p output="Location = " >>%REPORT_NAME% 2>&1
+ where %FILENAME% >>%REPORT_NAME% 2> NUL
+ if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport)
+
+ :EndReport
+ echo.>>%REPORT_NAME% 2>&1
+ <nul set /p output="."
+exit /b
+
+:ReportVersion
+ echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1
+ <nul set /p output="Location = " >>%REPORT_NAME% 2>&1
+ where %FILENAME% >>%REPORT_NAME% 2> NUL
+ if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion)
+ <nul set /p output ="Version = " >>%REPORT_NAME% 2>&1
+
+ (%FILENAME% %VERSION_CMD% | find %VERSION_FIND%) >>%REPORT_NAME% 2>&1
+
+ :EndReportVersion
+ echo.>>%REPORT_NAME% 2>&1
+ <nul set /p output="."
+exit /b \ No newline at end of file
diff --git a/util/install_dependencies.sh b/util/install_dependencies.sh
index 24564a2ac5..936a865938 100644..100755
--- a/util/install_dependencies.sh
+++ b/util/install_dependencies.sh
@@ -20,7 +20,8 @@ if [[ -n "$(type -P pacman )" ]]; then
arm-none-eabi-gcc \
arm-none-eabi-binutils \
arm-none-eabi-newlib \
- git
+ git \
+ diffutils
elif [[ -n "$(type -P apt-get)" ]]; then
# Debian and derivatives
@@ -47,7 +48,8 @@ elif [[ -n "$(type -P apt-get)" ]]; then
gcc-arm-none-eabi \
binutils-arm-none-eabi \
libnewlib-arm-none-eabi \
- git
+ git \
+ diffutils
elif [[ -n "$(type -P yum)" ]]; then
# Fedora, CentOS or RHEL and derivatives
@@ -66,10 +68,10 @@ elif [[ -n "$(type -P yum)" ]]; then
avr-libc \
dfu-programmer \
dfu-util \
- gcc-arm-none-eabi \
- binutils-arm-none-eabi \
- libnewlib-arm-none-eabi \
- git
+ arm-none-eabi-gcc-cs \
+ arm-none-eabi-newlib \
+ git \
+ diffutils
# The listed eabi pacackes do unfortunately not exist for CentOS,
# But at least in Fedora they do, so try to install them anyway
# TODO: Build them from sources, if the installation fails
@@ -85,7 +87,8 @@ elif [[ -n "$(type -P zypper)" ]]; then
patch \
wget \
dfu-programmer \
- git
+ git \
+ diffutils
# TODO: The avr and eabi tools are not available as default packages, so we need
# another way to install them
diff --git a/util/new_project.sh b/util/new_project.sh
index b3535f449e..18d16e560c 100755
--- a/util/new_project.sh
+++ b/util/new_project.sh
@@ -20,6 +20,7 @@ sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboards/$KEYBO
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboards/$KEYBOARD/config.h
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/readme.md > keyboards/$KEYBOARD/readme.md
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboards/$KEYBOARD/Makefile
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/rules.mk > keyboards/$KEYBOARD/rules.mk
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/config.h > keyboards/$KEYBOARD/keymaps/default/config.h
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/keymap.c > keyboards/$KEYBOARD/keymaps/default/keymap.c
sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default/Makefile > keyboards/$KEYBOARD/keymaps/default/Makefile
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index c2a994ef02..f432976d03 100644
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -7,7 +7,7 @@ rev=$(git rev-parse --short HEAD)
git config --global user.name "Travis CI"
git config --global user.email "jack.humb+travis.ci@gmail.com"
-make all-keymaps keyboard=ergodox/ez AUTOGEN=true
+make ergodox-ez AUTOGEN=true
find . -name ".build" | xargs rm -rf
cd ..
@@ -24,4 +24,4 @@ cp ../qmk_firmware/readme.md qmk_readme.md
git add -A
git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}"
-git push \ No newline at end of file
+git push