|
62 | 62 | # AVR_TOOLS_DIR = /usr |
63 | 63 | # |
64 | 64 | # On Windows declare this environmental variables using the windows |
65 | | -# configuration options. Control Panel > System > Advanced system settings |
66 | | -# Also take into account that when you set them you have to add '\' on |
67 | | -# all spaces and special characters. |
| 65 | +# configuration options or Cygwin .bashrc. Control Panel > System > Advanced system settings |
| 66 | +# The paths must use Unix style forward slash and not have any spaces |
| 67 | +# or escape charactors. One must use a symbolic link if the path does |
| 68 | +# contain spaces. |
| 69 | +# |
68 | 70 | # This are just examples, you have to adapt this variables accordingly to |
69 | 71 | # your system. Note the difference between ARDMK_DIR, which can use /cygdrive/ |
70 | | -# and USER_LIB_PATH, which cannnot due to invoking with the build tools |
| 72 | +# and USER_LIB_PATH, which cannnot due to invoking with the build tools. |
| 73 | +# It is best practice to avoid cygdrive all together. |
71 | 74 | # |
72 | 75 | # ARDUINO_DIR = C:/Arduino |
73 | 76 | # AVR_TOOLS_DIR = C:/Arduino/hardware/tools/avr |
74 | 77 | # ARDMK_DIR = /cygdrive/c/Users/"YourUser"/Arduino-Makefile |
75 | 78 | # |
76 | 79 | # On Windows it is highly recommended that you create a symbolic link directory |
77 | 80 | # for avoiding using the normal directories name of windows such as |
78 | | -# c:\Program Files (x86)\Arduino |
| 81 | +# C:\Program Files (x86)\Arduino |
79 | 82 | # For this use the command mklink on the console. |
80 | 83 | # |
81 | 84 | # |
@@ -364,9 +367,15 @@ ifndef ARDUINO_SKETCHBOOK |
364 | 367 | ifneq ($(ARDUINO_SKETCHBOOK),) |
365 | 368 | $(call show_config_variable,ARDUINO_SKETCHBOOK,[AUTODETECTED],(from arduino preferences file)) |
366 | 369 | else |
367 | | - ARDUINO_SKETCHBOOK := $(firstword \ |
368 | | - $(call dir_if_exists,$(HOME)/sketchbook) \ |
369 | | - $(call dir_if_exists,$(HOME)/Documents/Arduino) ) |
| 370 | + ifeq ($(CURRENT_OS), WINDOWS) |
| 371 | + ARDUINO_SKETCHBOOK := $(firstword \ |
| 372 | + $(call dir_if_exists,$(USERPROFILE)/sketchbook) \ |
| 373 | + $(call dir_if_exists,$(USERPROFILE)/Documents/Arduino) ) |
| 374 | + else |
| 375 | + ARDUINO_SKETCHBOOK := $(firstword \ |
| 376 | + $(call dir_if_exists,$(HOME)/sketchbook) \ |
| 377 | + $(call dir_if_exists,$(HOME)/Documents/Arduino) ) |
| 378 | + endif |
370 | 379 | $(call show_config_variable,ARDUINO_SKETCHBOOK,[DEFAULT]) |
371 | 380 | endif |
372 | 381 | else |
|
0 commit comments