|
50 | 50 | <condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxarm" /></condition>
|
51 | 51 | <condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
|
52 | 52 |
|
| 53 | + <condition property="download_os" value="macOS_64bit"><equals arg1="${platform}" arg2="macosx" /></condition> |
| 54 | + <condition property="download_os" value="Windows_32bit"><equals arg1="${platform}" arg2="windows" /></condition> |
| 55 | + <condition property="download_os" value="Linux_32bit"><equals arg1="${platform}" arg2="linux32" /></condition> |
| 56 | + <condition property="download_os" value="Linux_64bit"><equals arg1="${platform}" arg2="linux64" /></condition> |
| 57 | + <condition property="download_os" value="Linux_ARMv6"><equals arg1="${platform}" arg2="linuxarm" /></condition> |
| 58 | + <condition property="download_os" value="Linux_ARM64"><equals arg1="${platform}" arg2="linuxaarch64" /></condition> |
| 59 | + |
| 60 | + <condition property="exec_ext" value=".exe"><isset property="windows" /></condition> |
| 61 | + <property name="exec_ext" value="" /> |
| 62 | + |
53 | 63 | <condition property="arch-bits" value="32">
|
54 | 64 | <equals arg1="${platform}" arg2="linux32"/>
|
55 | 65 | </condition>
|
|
108 | 118 | <property name="WIFI101-FW-UPDATER_VERSION" value="0.11.0" />
|
109 | 119 | <!-- https://github.com/arduino/built-in-examples -->
|
110 | 120 | <property name="BUILT-IN-EXAMPLES-VERSION" value="1.9.1" />
|
| 121 | + <property name="CLANG-FORMAT-VERSION" value="12.0.0" /> |
111 | 122 |
|
112 | 123 | <!-- Libraries required for running arduino -->
|
113 | 124 | <fileset dir=".." id="runtime.jars">
|
|
223 | 234 |
|
224 | 235 | <antcall target="assemble-libraries" />
|
225 | 236 |
|
| 237 | + <antcall target="assemble-clang-format" /> |
| 238 | + |
226 | 239 | <!-- Add WiFi101 updater tool -->
|
227 | 240 | <antcall target="unzip">
|
228 | 241 | <param name="archive_file" value="shared/WiFi101-Updater-ArduinoIDE-Plugin-${WIFI101-FW-UPDATER_VERSION}.zip" />
|
|
316 | 329 | <copy file="../hardware/package_index_bundled.json" todir="${target.path}/hardware/" />
|
317 | 330 | </target>
|
318 | 331 |
|
| 332 | + <!-- clang-format --> |
| 333 | + <target name="assemble-clang-format" unless="light_bundle"> |
| 334 | + <property name="clang_arch_name" value="clang_${CLANG-FORMAT-VERSION}_${download_os}" /> |
| 335 | + <antcall target="unzip"> |
| 336 | + <param name="archive_file" value="${staging_folder}/${clang_arch_name}.zip"/> |
| 337 | + <param name="archive_url" value="https://github.com/arduino/clang-static-binaries/releases/download/${CLANG-FORMAT-VERSION}/${clang_arch_name}.zip"/> |
| 338 | + <param name="dest_folder" value="${staging_folder}/${clang_arch_name}/"/> |
| 339 | + <param name="final_folder" value="${staging_folder}/${clang_arch_name}/clang-format"/> |
| 340 | + </antcall> |
| 341 | + |
| 342 | + <copy file="${staging_folder}/${clang_arch_name}/clang-format${exec_ext}" tofile="${staging_folder}/work/${staging_hardware_folder}/../clang-format${exec_ext}" overwrite="true"/> |
| 343 | + <antcall target="make-file-executable"> |
| 344 | + <param name="file" value="${staging_folder}/work/${staging_hardware_folder}/../clang-format${exec_ext}" /> |
| 345 | + </antcall> |
| 346 | + |
| 347 | + <delete dir="${staging_folder}/${clang_arch_name}"/> |
| 348 | + </target> |
| 349 | + |
319 | 350 | <!-- - - - - - - - - -->
|
320 | 351 | <!-- Revision check -->
|
321 | 352 | <!-- - - - - - - - - -->
|
|
0 commit comments