Skip to content

Commit 8bfe980

Browse files
cmagliefacchinm
authored andcommitted
Added arduino-cli to the build (WIP)
1 parent 76f1179 commit 8bfe980

7 files changed

+47
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18f6669f8a3c328f6a096eb6709a2c1e4c9cdeae
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1309e3bf1685ec5cefbb46cb6397e7c452ac293a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2fd4bd6f4c196e45fa08bb1b6eae27494378708a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a4977a3dffb2268eee3328bfa362aa31e8bfbbe9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
47f1beae490e214d2cbde36089fe45e91cc4bd21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
30d454fb2d76bf08dd40f61414b809f3538a8d31

build/build.xml

+41
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<property name="portable" value="false" />
101101

102102
<property name="ARDUINO-BUILDER-VERSION" value="1.4.5" />
103+
<property name="ARDUINO-CLI-VERSION" value="0.3.4-alpha.preview" />
103104
<property name="LIBLISTSERIAL-VERSION" value="1.4.2" />
104105
<property name="AVRGCC-VERSION" value="7.3.0-atmel3.6.1-arduino5" />
105106
<property name="AVRDUDE-VERSION" value="6.3.0-arduino17" />
@@ -504,6 +505,7 @@
504505
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/liblistSerialsj.dylib" />
505506

506507
<antcall target="build-arduino-builder" />
508+
<antcall target="build-arduino-cli" />
507509

508510
<antcall target="portable-${portable}">
509511
<param name="parentdir" value="macosx/work/${staging_hardware_folder}/.." />
@@ -724,6 +726,7 @@
724726
</antcall>
725727

726728
<antcall target="build-arduino-builder" />
729+
<antcall target="build-arduino-cli" />
727730

728731
<antcall target="avr-toolchain-bundle">
729732
<param name="unpack_target" value="untar-native"/>
@@ -766,6 +769,7 @@
766769
</antcall>
767770

768771
<antcall target="build-arduino-builder" />
772+
<antcall target="build-arduino-cli" />
769773

770774
<antcall target="avr-toolchain-bundle">
771775
<param name="unpack_target" value="untar-native"/>
@@ -784,6 +788,7 @@
784788
</antcall>
785789

786790
<antcall target="build-arduino-builder" />
791+
<antcall target="build-arduino-cli" />
787792

788793
<antcall target="avr-toolchain-bundle">
789794
<param name="unpack_target" value="untar-native"/>
@@ -802,6 +807,7 @@
802807
</antcall>
803808

804809
<antcall target="build-arduino-builder" />
810+
<antcall target="build-arduino-cli" />
805811

806812
<antcall target="avr-toolchain-bundle">
807813
<param name="unpack_target" value="untar-native"/>
@@ -850,6 +856,26 @@
850856
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
851857
</target>
852858

859+
<target name="build-arduino-cli" unless="no_arduino_cli">
860+
<delete dir="${staging_folder}/arduino-cli-${platform}" includeemptydirs="true"/>
861+
<mkdir dir="${staging_folder}/arduino-cli-${platform}"/>
862+
<antcall target="untar">
863+
<!--
864+
<param name="archive_file" value="./arduino-cli-${ARDUINO-CLI-VERSION}-${platform}.tar.bz2" />
865+
<param name="archive_url" value="https://downloads.arduino.cc/arduino-cli/arduino-cli-${ARDUINO-CLI-VERSION}-${platform}.tar.bz2" />
866+
<param name="final_folder" value="${staging_folder}/arduino-cli-${platform}/arduino-cli" />
867+
<param name="dest_folder" value="${staging_folder}/arduino-cli-${platform}" />
868+
-->
869+
<param name="archive_file" value="./arduino-cli-${ARDUINO-CLI-VERSION}-${platform}.tar.bz2" />
870+
<param name="archive_url" value="https://downloads.arduino.cc/PR/arduino-cli/arduino-cli-${ARDUINO-CLI-VERSION}-${platform}.tar.bz2" />
871+
<param name="final_folder" value="${staging_folder}/arduino-cli-${platform}/arduino-cli" />
872+
<param name="dest_folder" value="${staging_folder}/arduino-cli-${platform}" />
873+
</antcall>
874+
<copy file="${staging_folder}/arduino-cli-${platform}/arduino-cli-${ARDUINO-CLI-VERSION}-${platform}" tofile="${staging_folder}/work/${staging_hardware_folder}/../arduino-cli" />
875+
<chmod perm="755" file="${staging_folder}/work/${staging_hardware_folder}/../arduino-cli" />
876+
<delete dir="${staging_folder}/arduino-cli-${platform}" includeemptydirs="true"/>
877+
</target>
878+
853879
<target name="build-arduino-builder" unless="no_arduino_builder">
854880
<delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
855881
<mkdir dir="${staging_folder}/arduino-builder-${platform}"/>
@@ -1098,12 +1124,27 @@
10981124
</copy>
10991125
<delete dir="${staging_folder}/arduino-builder-windows" includeemptydirs="true"/>
11001126

1127+
<delete dir="${staging_folder}/arduino-cli-windows" includeemptydirs="true"/>
1128+
<mkdir dir="${staging_folder}/arduino-cli-windows"/>
1129+
<antcall target="unzip-with-ant-task">
1130+
<param name="archive_file" value="./arduino-cli-${ARDUINO-CLI-VERSION}-windows.zip" />
1131+
<param name="archive_url" value="https://downloads.arduino.cc/arduino-cli/arduino-cli-${ARDUINO-CLI-VERSION}-windows.zip" />
1132+
<param name="final_folder" value="${staging_folder}/arduino-cli-windows/arduino-cli-${ARDUINO-CLI-VERSION}-windows.exe" />
1133+
<param name="dest_folder" value="${staging_folder}/arduino-cli-windows" />
1134+
</antcall>
1135+
<copy file="${staging_folder}/arduino-cli-windows/arduino-cli-${ARDUINO-CLI-VERSION}-windows.exe" tofile="windows/work/arduino-cli.exe" />
1136+
<antcall target="make-file-executable">
1137+
<param name="file" value="windows/work/arduino-cli.exe" />
1138+
</antcall>
1139+
<delete dir="${staging_folder}/arduino-cli-windows" includeemptydirs="true"/>
1140+
11011141
<unzip src="../arduino-core/lib/jna-4.2.2.jar" dest="windows/work/lib">
11021142
<patternset>
11031143
<include name="com/sun/jna/win32-x86/jnidispatch.dll"/>
11041144
</patternset>
11051145
<mapper type="flatten"/>
11061146
</unzip>
1147+
11071148
<move file="windows/work/lib/jnidispatch.dll" tofile="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />
11081149
<antcall target="make-file-executable">
11091150
<param name="file" value="windows/work/lib/jnidispatch-4.2.2-win32-x86.dll" />

0 commit comments

Comments
 (0)