summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJoshua T <joshua@sonofone.net>2016-08-09 21:34:55 -0500
committerJoshua T <joshua@sonofone.net>2016-08-09 21:34:55 -0500
commit82223aec6c6711ed0fd8180b9fc2df0717bf6654 (patch)
tree5d74e1a419fa25b264fdaf0290b115ea6913b5f0 /util
parentec67d32bd4a2249186f3b84a044ee3f9f9bbc394 (diff)
Created build.bat
Helper batch file for building the keyboard.
Diffstat (limited to 'util')
-rw-r--r--util/build.bat51
1 files changed, 51 insertions, 0 deletions
diff --git a/util/build.bat b/util/build.bat
new file mode 100644
index 0000000000..316bbfd54e
--- /dev/null
+++ b/util/build.bat
@@ -0,0 +1,51 @@
+@echo off
+
+rem Use this batch file from within an IDE to automatically build your firmware.
+rem You can pass command-line arguments to indicate which keyboard and keymap to build.
+rem
+rem Usage:
+rem vscode-build.bat "Working directory" "Keyboard" "Keymap"
+rem
+rem Ex. vscode-build.bat C:\Projects\qmk_firmware Planck default
+
+SET ROOTDIR="%~dp0..\"
+
+rem Modify this to define your keyboard
+rem SET KEYBOARD="ergodox_ez"
+if [%1]==[] (
+ echo. Keyboard is undefined; defaulting to Planck
+ SET KEYBOARD="Planck"
+) ELSE (
+ SET KEYBOARD="%1"
+)
+
+rem Modify this line to adjust your keymap.
+rem SET KEYMAP="replicaJunction"
+if [%2]==[] (
+ echo. Keyboard is undefined; defaulting to default
+ SET KEYMAP="default"
+) ELSE (
+ SET KEYMAP="%2"
+)
+
+echo.
+echo. --------------
+echo. Build started.
+echo. --------------
+echo.
+echo. Working directory: %ROOTDIR%
+echo. Keyboard: %KEYBOARD%
+echo. Keymap: %KEYMAP%
+echo.
+echo.
+CD /D "%ROOTDIR%"
+echo. Cleaning build directory...
+make clean KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP%
+echo.
+echo. Making keyboard %KEYBOARD% with keymap %KEYMAP%
+make KEYBOARD=%KEYBOARD% KEYMAP=%KEYMAP%
+echo.
+echo. ----------------
+echo. Build completed.
+echo. ----------------
+exit /b \ No newline at end of file