Check that on windows ARDUINO_DIR (and MPIDE_DIR) is a relative path.

Checks for paths starting with / e.g. /cydrive/arduino or a
drive letter e.g. C:\Program Files\Arduino

Fix #201
Fix #202
This commit is contained in:
Simon John 2014-05-19 22:09:00 +01:00 committed by Sudar
parent 70dfdcc7eb
commit 9a45b80017
3 changed files with 13 additions and 0 deletions

View file

@ -279,6 +279,12 @@ else
$(call show_config_variable,ARDUINO_DIR,[USER])
endif
ifeq ($(CURRENT_OS),WINDOWS)
ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),)
echo $(error On Windows, ARDUINO_DIR must be a relative path)
endif
endif
########################################################################
# Default TARGET to pwd (ex Daniele Vergini)

View file

@ -8,6 +8,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav)
- Add: Add support for compiling assembler code. (Issue #195) (https://github.com/hrobeers)
- Add: Try to guess port from wildcards if not specified. (Issue #197) (https://github.com/tuzz)
- Fix: Check that on windows ARDUINO_DIR (and MPIDE_DIR) is a relative path. (Issue #201 and #202) (https://github.com/sej7278)
### 1.3.3 (2014-04-12)
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)

View file

@ -47,6 +47,12 @@ else
$(call show_config_variable,MPIDE_DIR,[USER])
endif
ifeq ($(CURRENT_OS),WINDOWS)
ifneq ($(shell echo $(ARDUINO_DIR) | egrep '^(/|[a-zA-Z]:\\)'),)
echo $(error On Windows, MPIDE_DIR must be a relative path)
endif
endif
ifndef MPIDE_PREFERENCES_PATH
AUTO_MPIDE_PREFERENCES_PATH := $(firstword \
$(call dir_if_exists,$(HOME)/.mpide/preferences.txt) \