@@ -71,8 +71,10 @@ function build_sketches()
7171 # Paths to the arduino builder need to be c:\ referenced, not our native ones
7272 local pwd_win=$( realpath $PWD | sed ' s/\/c/C:/' )
7373 local bar_win=$( echo $build_arg | sed ' s/\/c\//C:\//g' )
74- export ARDUINO_IDE_PATH=$( realpath $arduino | sed ' s/\/c/C:/' )
74+ # Make ARDUINO_IDE_PATH to Windows slashies
75+ export ARDUINO_IDE_PATH=$( realpath $arduino | sed ' s/\/c/C:/' | tr / ' \\' )
7576 build_cmd=" python3 tools/build.py -b generic -v -w all -s 4M1M -v -k -p $pwd_win /$build_dir -n $lwip $bar_win "
77+ build_cmd=$( echo $build_cmd | tr ' "' ' ' ) # Remove quotes to see if Win Go works better
7678 fi
7779 local sketches=$( find $srcpath -name * .ino | sort)
7880 print_size_info > size.log
@@ -159,13 +161,25 @@ function install_ide()
159161 # Acquire needed packages from Windows package manager
160162 choco install --no-progress python3
161163 export PATH=" /c/Python37:$PATH " # Ensure it's live from now on...
162- cp /c/Python37/python.exe /c/Python37/python3.exe
164+ cp /c/Python37/python.exe /c/Python37/python3.exe
163165 choco install --no-progress unzip
164166 choco install --no-progress sed
167+ choco install --no-progress golang
165168 test -r arduino-nightly-windows.zip || wget -nv -O arduino-nightly-windows.zip https://www.arduino.cc/download.php? f=/arduino-nightly-windows.zip
166169 unzip -q arduino-nightly-windows.zip
170+ elif [ " $MACOSX " = " 1" ]; then
171+ # MACOS only has next-to-obsolete Python2 installed. Install Python 3 from python.org
172+ wget https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg
173+ sudo installer -pkg python-3.7.4-macosx10.9.pkg -target /
174+ # Install the Python3 certificates, because SSL connections fail w/o them and of course they aren't installed by default.
175+ ( cd " /Applications/Python 3.7/" && sudo " ./Install Certificates.command" )
176+ # Hack to place arduino-builder in the same spot as sane OSes
177+ test -r arduino.zip || wget -O arduino.zip https://downloads.arduino.cc/arduino-nightly-macosx.zip
178+ unzip -q arduino.zip
179+ mv Arduino.app arduino-nightly
180+ mv arduino-nightly/Contents/Java/* arduino-nightly/.
167181 else
168- test -r arduino.tar.xz || wget -nv - O arduino.tar.xz https://www.arduino.cc/download.php? f=/arduino-nightly-linux64.tar.xz
182+ test -r arduino.tar.xz || wget -O arduino.tar.xz https://www.arduino.cc/download.php? f=/arduino-nightly-linux64.tar.xz
169183 tar xf arduino.tar.xz
170184 fi
171185 mv arduino-nightly $ide_path
@@ -199,7 +213,6 @@ function install_arduino()
199213 echo -e " travis_fold:start:sketch_test_env_prepare"
200214 cd $TRAVIS_BUILD_DIR
201215 install_ide $HOME /arduino_ide $TRAVIS_BUILD_DIR $debug
202- which arduino
203216 cd $TRAVIS_BUILD_DIR
204217 install_libraries
205218 echo -e " travis_fold:end:sketch_test_env_prepare"
0 commit comments