Skip to content

Commit 908537e

Browse files
Use fwd slashes and drop quotes in paths
1 parent 34429db commit 908537e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/common.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ function build_sketches()
6868
mkdir -p $build_dir
6969
local build_cmd="python3 tools/build.py -b generic -v -w all -s 4M1M -v -k --build_cache $cache_dir -p $PWD/$build_dir -n $lwip $build_arg "
7070
if [ "$WINDOWS" = "1" ]; then
71-
# Paths to the arduino builder need to be c:\ referenced, not our native ones
72-
local pwd_win=$(realpath $PWD | sed 's/\/c/C:/')
73-
local bar_win=$(echo $build_arg | sed 's/\/c\//C:\//g')
71+
# Paths to the arduino builder need to be / referenced, not our native ones
72+
local pwd_win=$(realpath $PWD | sed 's/^\/c//')
73+
local bar_win=$(echo $build_arg | sed 's/^\/c\//')
7474
# Make ARDUINO_IDE_PATH to Windows slashies
7575
export ARDUINO_IDE_PATH=$(realpath $arduino | sed 's/\/c/C:/' | tr / '\\' )
7676
build_cmd="python3 tools/build.py -b generic -v -w all -s 4M1M -v -k -p $pwd_win/$build_dir -n $lwip $bar_win "

tools/build.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
3333
cmd = ide_path + '/arduino-builder '
3434
cmd += '-compile -logger=human '
35-
cmd += '-build-path "' + tmp_dir + '" '
36-
cmd += '-tools "' + ide_path + '/tools-builder" '
35+
cmd += '-build-path ' + tmp_dir + ' '
36+
cmd += '-tools ' + ide_path + '/tools-builder '
3737
if cache != "":
38-
cmd += '-build-cache "' + cache + '" '
38+
cmd += '-build-cache ' + cache + ' '
3939
if args.library_path:
4040
for lib_dir in args.library_path:
41-
cmd += '-libraries "' + lib_dir + '" '
42-
cmd += '-hardware "' + ide_path + '/hardware" '
41+
cmd += '-libraries ' + lib_dir + ' '
42+
cmd += '-hardware ' + ide_path + '/hardware '
4343
if args.hardware_dir:
4444
for hw_dir in args.hardware_dir:
45-
cmd += '-hardware "' + hw_dir + '" '
45+
cmd += '-hardware ' + hw_dir + ' '
4646
else:
47-
cmd += '-hardware "' + hardware_dir + '" '
47+
cmd += '-hardware ' + hardware_dir + ' '
4848
# Debug=Serial,DebugLevel=Core____
4949
cmd += '-fqbn=esp8266com:esp8266:{board_name}:' \
5050
'xtal={cpu_freq},' \
@@ -57,16 +57,16 @@ def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
5757
if args.debug_port and args.debug_level:
5858
cmd += 'dbg={debug_port},lvl={debug_level}'.format(**vars(args))
5959
cmd += ' '
60-
cmd += '-built-in-libraries "' + ide_path + '/libraries" '
60+
cmd += '-built-in-libraries ' + ide_path + '/libraries '
6161
cmd += '-ide-version=10607 '
6262
cmd += '-warnings={warnings} '.format(**vars(args))
6363
if args.verbose:
6464
cmd += '-verbose '
6565
cmd += sketch
6666

67-
# Try removing quotes to make arduino-cli sork
68-
if platform.system() == "Windows":
69-
cmd = cmd.replace('/', '\\')
67+
# Try removing quotes to make arduino-cli work
68+
#if platform.system() == "Windows":
69+
# cmd = cmd.replace('/', '\\')
7070

7171
if args.verbose:
7272
print('Building: ' + cmd, file=f)

0 commit comments

Comments
 (0)