-
-
Notifications
You must be signed in to change notification settings - Fork 7k
/
build.xml
1301 lines (1090 loc) · 57.4 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<project name="Arduino" default="build">
<!--echo message="os.name = ${os.name}" /-->
<!--echo message="os.arch = ${os.arch}" /-->
<!--echo message="os.version = ${os.version}" /-->
<tstamp>
<format property="BUILD_DATE" pattern="yyyy/MM/dd hh:mm"/>
</tstamp>
<!-- Sets properties for macosx/windows/linux depending on current system -->
<condition property="platform" value="macosx-old">
<and>
<os family="mac" />
<matches string="${os.version}" pattern="^10.[56]." />
</and>
</condition>
<condition property="macosx-old"><equals arg1="${platform}" arg2="macosx-old" /></condition>
<fail if="macosx-old" message="MacOSX older than 10.7 are not supported"/>
<condition property="platform" value="macosx"><os family="mac" /></condition>
<condition property="platform" value="windows"><os family="windows" /></condition>
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
<condition property="platform" value="linuxarm"><os family="unix" arch="arm" /></condition>
<condition property="platform" value="linuxaarch64"><os family="unix" arch="aarch64" /></condition>
<condition property="windows_host" value="true"><os family="windows" /></condition>
<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linux32"/>
</condition>
<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linuxarm"/>
</condition>
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linux64"/>
</condition>
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linuxaarch64"/>
</condition>
<condition property="launch4j-download-unpack-target-name" value="launch4j-windows"><os family="windows" /></condition>
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/>
<property name="MACOSX_BUNDLED_JVM" value="${java.home}/../"/>
<property name="WINDOWS_BUNDLED_JVM" value="${java.home}"/>
<property name="LINUX32_BUNDLED_JVM" value="none"/>
<property name="LINUX64_BUNDLED_JVM" value="none"/>
<property name="LINUXARM_BUNDLED_JVM" value="none"/>
<property name="LINUXAARCH64_BUNDLED_JVM" value="none"/>
<condition property="linux-bundle-jvm-task" value="noop">
<and>
<equals arg1="${LINUX32_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUX64_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXARM_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXAARCH64_BUNDLED_JVM}" arg2="none"/>
</and>
</condition>
<condition property="linux-bundle-jvm-task" value="bundle">
<or>
<not>
<equals arg1="${LINUX32_BUNDLED_JVM}" arg2="none"/>
</not>
<not>
<equals arg1="${LINUX64_BUNDLED_JVM}" arg2="none"/>
</not>
<not>
<equals arg1="${LINUXARM_BUNDLED_JVM}" arg2="none"/>
</not>
<not>
<equals arg1="${LINUXAARCH64_BUNDLED_JVM}" arg2="none"/>
</not>
</or>
</condition>
<property name="portable" value="false" />
<property name="ARDUINO-BUILDER-VERSION" value="1.6.1" />
<property name="LIBLISTSERIAL-VERSION" value="1.4.2-2" />
<property name="AVRGCC-VERSION" value="7.3.0-atmel3.6.1-arduino7" />
<property name="AVRDUDE-VERSION" value="6.3.0-arduino17" />
<property name="AVRCORE-VERSION" value="1.8.3" />
<property name="arduinoOTA-VERSION" value="1.3.0" />
<property name="WIFI101-FW-UPDATER_VERSION" value="0.12.0" />
<!-- https://github.com/arduino/built-in-examples -->
<property name="BUILT-IN-EXAMPLES-VERSION" value="1.9.1" />
<!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars">
<include name="arduino-core/arduino-core.jar" />
<include name="app/pde.jar" />
<include name="app/lib/*.jar" />
<include name="arduino-core/lib/*.jar" />
</fileset>
<!-- Remove all default excludes for directory tasks (see https://ant.apache.org/manual/dirtasks.html#defaultexcludes) -->
<defaultexcludes remove="**/.git"/>
<defaultexcludes remove="**/.git/**"/>
<defaultexcludes remove="**/.gitattributes"/>
<defaultexcludes remove="**/.gitignore"/>
<defaultexcludes remove="**/.gitmodules"/>
<defaultexcludes remove="**/.hg"/>
<defaultexcludes remove="**/.hg/**"/>
<defaultexcludes remove="**/.hgignore"/>
<defaultexcludes remove="**/.hgsub"/>
<defaultexcludes remove="**/.hgsubstate"/>
<defaultexcludes remove="**/.hgtags"/>
<defaultexcludes remove="**/.bzr"/>
<defaultexcludes remove="**/.bzr/**"/>
<defaultexcludes remove="**/.bzrignore"/>
<target name="build" description="Build Arduino.">
<antcall target="${platform}-build" />
<antcall target="generate-hourly-build-txt"/>
</target>
<target name="run" description="Packs and runs Arduino">
<antcall target="${platform}-run" />
</target>
<target name="start" description="Starts Arduino">
<antcall target="${platform}-start" />
</target>
<target name="dist" depends="revision-check" description="Build Arduino for distribution.">
<input message="Enter version number:" addproperty="version" defaultvalue="${revision}"/>
<condition property="full-version" value="${version}-${platform}">
<not>
<equals arg1="${portable}" arg2="true"/>
</not>
</condition>
<condition property="full-version" value="${version}-${platform}-portable">
<equals arg1="${portable}" arg2="true"/>
</condition>
<antcall target="${platform}-dist">
<param name="full-version" value="${full-version}"/>
</antcall>
</target>
<!-- "§$§$&, ant doesn't have a built-in help target :( -->
<target name="help" description="Show project help">
<java classname="org.apache.tools.ant.Main">
<arg value="-p" />
</java>
</target>
<target name="test" depends="subprojects-build, subprojects-test"/>
<!-- - - - - - - - - - - - - - - - - - -->
<!-- Subprojects: Core, App, Libraries -->
<!-- - - - - - - - - - - - - - - - - - -->
<target name="subprojects-clean">
<subant buildpath="../arduino-core" target="clean"/>
<subant buildpath="../app" target="clean"/>
</target>
<target name="subprojects-build">
<subant buildpath="../arduino-core" target="build"/>
<subant buildpath="../app" target="build"/>
</target>
<target name="subprojects-test">
<subant buildpath="../app" target="test">
<propertyset>
<!-- Forward these to subant. Use propertyset/propertyref instead of a direct property so we do not need to specify a value -->
<propertyref name="single-test-class"/>
<propertyref name="single-test-methods"/>
<propertyref name="running-from-github-actions"/>
</propertyset>
</subant>
</target>
<!-- - - - - - - - - -->
<!-- Basic Assembly -->
<!-- - - - - - - - - -->
<target name="assemble">
<fail unless="target.path" message="Do not call assemble from the command line." />
<!-- copy shared tools folder -->
<copy todir="${target.path}/tools">
<fileset dir="shared/tools" />
</copy>
<copy file="shared/icons/48x48/apps/arduino.png" tofile="${target.path}/lib/arduino_small.png"/>
<antcall target="assemble-hardware" />
<antcall target="assemble-examples" />
<!-- Write the revision file! -->
<echo file="${target.path}/lib/version.txt" message="${version}" />
<antcall target="assemble-libraries" />
<!-- Add WiFi101 updater tool -->
<antcall target="unzip">
<param name="archive_file" value="shared/WiFi101-Updater-ArduinoIDE-Plugin-${WIFI101-FW-UPDATER_VERSION}.zip" />
<param name="archive_url" value="https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v${WIFI101-FW-UPDATER_VERSION}/WiFi101-Updater-ArduinoIDE-Plugin-${WIFI101-FW-UPDATER_VERSION}.zip" />
<param name="final_folder" value="${target.path}/tools/WiFi101" />
<param name="dest_folder" value="${target.path}/tools/" />
</antcall>
</target>
<target name="assemble-examples">
<!-- Add the built-in example sketches -->
<property name="BUILT-IN-EXAMPLES-REPOSITORY-OWNER" value="arduino" />
<property name="BUILT-IN-EXAMPLES-REPOSITORY-NAME" value="arduino-examples" />
<property name="BUILT-IN-EXAMPLES-STAGING-PATH" value="shared" />
<property name="BUILT-IN-EXAMPLES-FINAL-PATH" value="${target.path}/examples" />
<!-- Download built-in examples from repository -->
<antcall target="unzip">
<param name="archive_file" value="${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}.zip" />
<param name="archive_url" value="https://github.com/${BUILT-IN-EXAMPLES-REPOSITORY-OWNER}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}/archive/${BUILT-IN-EXAMPLES-VERSION}.zip" />
<!-- Because the presence of this folder determines whether the extraction happens, this must point to a version-dependent path, otherwise updates will fail -->
<param name="final_folder" value="${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
<param name="dest_folder" value="${BUILT-IN-EXAMPLES-STAGING-PATH}" />
</antcall>
<!-- Copy examples from subfolder of the downloaded repository -->
<copy todir="${BUILT-IN-EXAMPLES-FINAL-PATH}">
<fileset dir="${BUILT-IN-EXAMPLES-STAGING-PATH}/${BUILT-IN-EXAMPLES-REPOSITORY-NAME}-${BUILT-IN-EXAMPLES-VERSION}/examples" />
</copy>
</target>
<!-- copy library folder -->
<target name="assemble-libraries" unless="light_bundle">
<download-library name="Ethernet" version="2.0.0"/>
<download-library name="GSM" version="1.0.6"/>
<download-library name="Stepper" version="1.1.3"/>
<download-library name="TFT" version="1.0.6"/>
<download-library name="WiFi" version="1.2.7"/>
<download-library githubuser="firmata" name="arduino" version="2.5.8" foldername="Firmata"/>
<download-library name="Bridge" version="1.7.0"/>
<download-library name="Robot_Control" version="1.0.4"/>
<download-library name="Robot_Motor" version="1.0.3"/>
<download-library name="RobotIRremote" version="2.0.0"/>
<download-library name="SpacebrewYun" version="1.0.2"/>
<download-library name="Temboo" version="1.2.1"/>
<download-library name="Esplora" version="1.0.4"/>
<download-library name="Mouse" version="1.0.1"/>
<download-library name="Keyboard" version="1.0.2"/>
<download-library name="SD" version="1.2.4"/>
<download-library name="Servo" version="1.1.8"/>
<download-library name="LiquidCrystal" version="1.0.7"/>
<download-library githubuser="Adafruit" name="Adafruit_CircuitPlayground" version="1.11.3" foldername="Adafruit_Circuit_Playground"/>
</target>
<macrodef name="download-library">
<attribute name="name"/>
<attribute name="foldername" default="@{name}"/>
<attribute name="version"/>
<attribute name="tag" default="@{version}"/>
<attribute name="githubuser" default="arduino-libraries"/>
<sequential>
<antcall target="unzip">
<param name="archive_file" value="@{foldername}-@{version}.zip"/>
<param name="archive_url" value="https://github.com/@{githubuser}/@{name}/archive/@{tag}.zip"/>
<param name="final_folder" value="${target.path}/libraries/@{name}-@{version}"/>
<param name="dest_folder" value="${target.path}/libraries"/>
</antcall>
<move file="${target.path}/libraries/@{name}-@{version}" tofile="${target.path}/libraries/@{foldername}"/>
</sequential>
</macrodef>
<!-- copy hardware folder -->
<target name="assemble-hardware" unless="light_bundle">
<mkdir dir="${target.path}/hardware/arduino" />
<antcall target="untar-bz2">
<param name="archive_file" value="avr-${AVRCORE-VERSION}.tar.bz2"/>
<param name="archive_url" value="https://downloads.arduino.cc/cores/avr-${AVRCORE-VERSION}.tar.bz2"/>
<param name="final_folder" value="${target.path}/hardware/arduino/avr"/>
<param name="dest_folder" value="${target.path}/hardware/arduino"/>
</antcall>
<copy file="../hardware/package_index_bundled.json" todir="${target.path}/hardware/" />
</target>
<!-- - - - - - - - - -->
<!-- Revision check -->
<!-- - - - - - - - - -->
<target name="revision-check">
<!-- figure out the latest AVR core version number in package_index.json -->
<loadfile srcfile="../hardware/package_index_bundled.json" property="revision.avr.index">
<filterchain>
<tokenfilter>
<linetokenizer />
<containsregex pattern="archiveFileName.*"avr-.......?tar.bz2"/>
<replaceregex pattern=".*avr-(.*).tar.bz2.*" flags="g" replace="\1"/>
</tokenfilter>
<striplinebreaks/>
<tailfilter lines="1"/>
</filterchain>
</loadfile>
<echo message="AVR Arduino core version in build.xml is: ${AVRCORE-VERSION}" />
<echo message=" latest in package_index_bundled.json is: ${revision.avr.index}" />
<condition property="revision.avr.ok">
<or>
<!-- fail build if -Drevision.check=enforce is set -->
<not><equals arg1="${revision.check}" arg2="enforce"/></not>
<equals arg1="${revision.avr.index}" arg2="${AVRCORE-VERSION}"/>
</or>
</condition>
<fail unless="revision.avr.ok">
Mismatching versions for bundled AVR core and package_index_bundled.json.
Please check your package_index_bundled.json.
</fail>
<!-- figure out the IDE version number -->
<loadfile srcfile="shared/revisions.txt" property="revision">
<filterchain>
<ignoreblank />
<headfilter lines="1"/>
<tokenfilter>
<linetokenizer includeDelims="false" />
<!-- grab the thing from the first line that's 4 digits -->
<containsregex pattern="ARDUINO ([^ ]*)" />
<replaceregex pattern="ARDUINO ([^ ]*).*" replace="\1" />
</tokenfilter>
<tokenfilter>
<stringtokenizer suppressdelims="true" />
</tokenfilter>
</filterchain>
</loadfile>
<!-- figure out the IDE version number in base.java -->
<loadfile srcfile="../arduino-core/src/processing/app/BaseNoGui.java"
property="revision.base">
<filterchain>
<tokenfilter>
<linetokenizer />
<containsregex pattern="String VERSION_NAME = "/>
<replaceregex pattern=".*"(.*)".*" flags="g" replace="\1"/>
</tokenfilter>
</filterchain>
</loadfile>
<echo message="Latest revision detected in shared/revision.txt is: ${revision}" />
<echo message=" Revision in BaseNoGui.java is: ${revision.base}" />
</target>
<!-- - - - - - - - -->
<!-- Mac OS X -->
<!-- - - - - - - - -->
<target name="macosx-clean" depends="subprojects-clean" description="Clean Mac OS X build">
<delete dir="macosx/work" />
<delete dir="macosx/working_dir" />
<delete dir="macosx/working.dmg" />
<delete file="macosx/arduino-*.dmg" />
<delete>
<fileset dir="macosx" includes="arduino-*macosx*.zip"/>
</delete>
</target>
<target name="macosx-checkos" unless="macosx">
<echo>
=======================================================
Arduino for Mac OS X can only be built on Mac OS X.
Bye.
=======================================================
</echo>
<fail message="wrong platform (${os.name})" />
</target>
<target name="macosx-build" if="macosx" depends="revision-check, macosx-checkos, subprojects-build" description="Build Mac OS X version">
<fail unless="MACOSX_BUNDLED_JVM" message="MacOSX requires MACOSX_BUNDLED_JVM property set"/>
<mkdir dir="${staging_folder}/work" />
<antcall target="unzip">
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-arduino9.jar.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/appbundler-1.0ea-arduino9.jar.zip" />
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-arduino9" />
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-arduino9" />
</antcall>
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-arduino9/appbundler-1.0ea-arduino9.jar"/>
<bundleapp
jvmRequired="1.8"
jrepreferred="true"
outputdirectory="${staging_folder}/work"
name="Arduino"
displayname="Arduino"
executablename="Arduino"
identifier="cc.arduino.Arduino"
shortversion="${version}"
version="${revision}"
signature="Pde1"
icon="macosx/processing.icns"
mainclassname="processing.app.Base"
copyright="Arduino LLC"
applicationCategory="public.app-category.education"
minimumsystemversion="10.8"
highresolutioncapable="true">
<runtime dir="${MACOSX_BUNDLED_JVM}"/>
<arch name="x86_64"/>
<arch name="i386"/>
<classpath refid="runtime.jars"/>
<option value="-Dapple.awt.application.name=Arduino"/>
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
<option value="-Dcom.apple.smallTabs=true"/>
<option value="-DAPP_DIR=$APP_ROOT/Contents/Java"/>
<option value="-Djava.ext.dirs=$JVM_RUNTIME/Contents/Home/lib/ext/:$JVM_RUNTIME/Contents/Home/jre/lib/ext/"/>
<option value="-Djava.net.preferIPv4Stack=true"/>
<!--
<option value="-Dapple.awt.showGrowBox=false"/>
<option value="-Dapple.awt.Antialiasing=false"/>
<option value="-Dapple.awt.TextAntialiasing=true"/>
<option value="-Dcom.apple.hwaccel=true"/>
<option value="-Dapple.awt.graphics.UseQuartz=true"/>
-->
<!--<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>-->
<!-- Workaround since the icon parameter for bundleapp doesn't work -->
<option value="-Xdock:name=Arduino"/>
<option value="-Dcom.apple.mrj.application.apple.menu.about.name=Arduino"/>
<option value="-Dfile.encoding=UTF-8"/>
<option value="-Xms128M"/>
<option value="-Xmx512M"/>
<option value="-splash:$APP_ROOT/Contents/Java/lib/splash.png"/>
<bundledocument extensions="ino,c,cpp,h"
icon="macosx/pde.icns"
name="Arduino Source File"
role="Editor" ispackage="false">
</bundledocument>
</bundleapp>
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" />
<copy todir="${staging_folder}/work/${staging_hardware_folder}/../">
<fileset dir="shared" includes="lib/**" />
<fileset file="shared/revisions.txt" />
</copy>
<mkdir dir="${staging_folder}/work" />
<mkdir dir="${staging_folder}/work/${staging_hardware_folder}" />
<antcall target="macosx-build-avr-toolchain" />
<antcall target="assemble">
<param name="target.path" value="${staging_folder}/work/${staging_hardware_folder}/.." />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-5.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="macosx/libastylej-2.05.1/libastylej.jnilib" todir="macosx/work/${staging_hardware_folder}/../lib/" />
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.jnilib" />
<copy file="macosx/libastylej-2.05.1/libastylej.jnilib" tofile="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/libastylej.dylib" />
<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="macosx/liblistSerials-${LIBLISTSERIAL-VERSION}/osx/liblistSerialsj.dylib" todir="macosx/work/${staging_hardware_folder}/../lib/" />
<chmod perm="755" file="macosx/work/${staging_hardware_folder}/../lib/liblistSerialsj.dylib" />
<property name="ARDUINO-BUILDER-EXTRA-VERSION" value="-signed" />
<antcall target="build-arduino-builder" />
<antcall target="portable-${portable}">
<param name="parentdir" value="macosx/work/${staging_hardware_folder}/.." />
</antcall>
</target>
<!-- Unzip AVR tools -->
<target name="macosx-build-avr-toolchain" unless="light_bundle">
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar-native"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-x86_64-apple-darwin14-signed.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-x86_64-apple-darwin12-signed.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-darwin_amd64-signed.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
<chmod perm="+x">
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/bin/*"/>
<fileset dir="${staging_folder}/work/${staging_hardware_folder}/tools" includes="**/libexec/gcc/avr/4.8.1/*"/>
</chmod>
</target>
<target name="macosx-run" depends="build,start"/>
<target name="macosx-start">
<exec executable="macosx/work/Arduino.app/Contents/MacOS/Arduino" spawn="false" failonerror="true"/>
</target>
<!-- - - - - - - - - - - - - - - - -->
<!-- Sign application for MacOSX. -->
<!-- - - - - - - - - - - - - - - - -->
<target name="macosx-signed-dist" if="macosx" depends="macosx-singed-dist-check, dist"
description="Create a downloadable and signed .zip for the Mac OS X version">
<fail unless="version" message="Please set the property 'version' to correctly sign distribution file" />
<!-- Remove everything from working folder -->
<delete dir="macosx/work/Arduino.app" />
<!-- Unzip unsigned app into working dir -->
<exec executable="unzip" dir="macosx/work" failonerror="true">
<arg line="../arduino-${version}-${platform}.zip" />
</exec>
<!-- Unlock keychain file -->
<exec executable="security" dir="macosx/work" failonerror="true">
<arg line="unlock-keychain -p "${macosx-sign-keychain-pass}" "${macosx-sign-keychain}"" />
</exec>
<!-- Sign app -->
<exec executable="codesign" dir="macosx/work" failonerror="true">
<arg line="--keychain "${macosx-sign-keychain}" --force -s "${macosx-sign-id}" --timestamp --options runtime --deep -v Arduino.app/" />
</exec>
<!-- Check for successful signing -->
<exec executable="codesign" dir="macosx/work" failonerror="true">
<arg line="-vvvv Arduino.app/" />
</exec>
<delete file="macosx/arduino-${version}-${platform}.zip" />
<!-- Create signed zip file -->
<exec executable="zip" dir="macosx/work" failonerror="true">
<arg line="-q -r ../arduino-${full-version}-signed.zip ." />
</exec>
<echo>
=======================================================
Arduino for Mac OS X built and signed.
macosx/arduino-${full-version}-signed.zip
=======================================================
</echo>
</target>
<target name="macosx-singed-dist-check">
<fail unless="macosx-sign-keychain" message="Please set the property 'macosx-sign-keychain' to the correct keychain file" />
<fail unless="macosx-sign-keychain-pass" message="Please set the property 'macosx-sign-keychain-pass' with the password to unlock the keychain" />
<fail unless="macosx-sign-id" message="Please set the property 'macosx-sign-id' to the correct cert identifier" />
</target>
<!-- - - - - - - - - - - - - - - - - - - -->
<!-- Build distribution file for MacOSX. -->
<!-- - - - - - - - - - - - - - - - - - - -->
<target name="macosx-dist" if="macosx" depends="build" description="Create a downloadable .zip for the Mac OS X version">
<exec executable="zip" dir="macosx/work" failonerror="true">
<arg line="-q -r ../arduino-${full-version}.zip ." />
</exec>
<echo>
=======================================================
Arduino for Mac OS X was built. Grab the image from
macosx/arduino-${full-version}.zip
=======================================================
</echo>
</target>
<!-- - - - - - - - -->
<!-- Linux -->
<!-- - - - - - - - -->
<target name="linux-clean" depends="subprojects-clean" description="Clean linux version">
<delete dir="linux/work" />
<delete>
<fileset dir="linux" includes="arduino-*linux*.tar.xz"/>
</delete>
<delete>
<fileset dir="linux" includes="arduino-*linux*.tar.xz"/>
</delete>
</target>
<target name="linux-checkos" unless="linux">
<echo>
=======================================================
Arduino for Linux can only be built on unix systems.
Bye.
=======================================================
</echo>
<fail message="wrong platform (${os.name})" />
</target>
<target name="linux-build" depends="revision-check, linux-checkos, subprojects-build" description="Build linux version">
<mkdir dir="linux/work" />
<mkdir dir="linux/work/${staging_hardware_folder}" />
<copy todir="linux/work">
<fileset dir="shared" includes="lib/**" />
<fileset file="shared/revisions.txt" />
</copy>
<copy todir="linux/work">
<fileset dir="linux/dist" includes="lib/**" />
</copy>
<copy todir="linux/work/lib">
<fileset dir="shared" includes="icons/**/*.png" />
</copy>
<copy todir="linux/work/lib" flatten="true">
<fileset refid="runtime.jars" />
</copy>
<antcall target="assemble">
<param name="target.path" value="linux/work" />
</antcall>
<copy tofile="linux/work/lib/arduino-arduinoide.xml" file="linux/dist/mime.xml" />
<copy todir="linux/work/lib" file="linux/dist/desktop.template" />
<copy todir="linux/work/lib" file="linux/dist/appdata.xml" />
<copy todir="linux/work" file="linux/dist/arduino" />
<copy todir="linux/work" file="linux/dist/install.sh" />
<copy todir="linux/work" file="linux/dist/arduino-linux-setup.sh" />
<copy todir="linux/work" file="linux/dist/uninstall.sh" />
<chmod perm="ugo+x">
<fileset dir="linux/work" includes="arduino" />
<fileset dir="linux/work" includes="**/*.sh" />
<fileset dir="linux/work/lib" includes="**/*desktop*" />
</chmod>
</target>
<target name="linux-libastyle-x86" depends="linux-build" description="Download libastyle.so for x86/x64 arch">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-5.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/libastylej-2.05.1/libastylej${arch-bits}.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
<antcall target="portable-${portable}">
<param name="parentdir" value="linux/work" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-${LIBLISTSERIAL-VERSION}/linux${arch-bits}/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />
</target>
<target name="linux-libastyle-arm" depends="linux-build" description="Download libastyle.so for ARM">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-5.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/libastylej-2.05.1/libastylej_arm.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
<antcall target="portable-${portable}">
<param name="parentdir" value="linux/work" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-${LIBLISTSERIAL-VERSION}/arm/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />
</target>
<target name="linuxarm-build" depends="linux-libastyle-arm" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUXARM_BUNDLED_JVM}"/>
</antcall>
<antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar-native"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-arm-linux-gnueabihf.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-armhf-pc-linux-gnu.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-linux_arm.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
</target>
<target name="linux-libastyle-aarch64" depends="linux-build" description="Download libastyle.so for AArch64">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-5.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/libastylej-2.05.1-5.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/libastylej-2.05.1/libastylej_aarch64.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
<antcall target="portable-${portable}">
<param name="parentdir" value="linux/work" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-${LIBLISTSERIAL-VERSION}/aarch64/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />
</target>
<target name="linuxaarch64-build" depends="linux-libastyle-aarch64" description="Build Linux (AArch64) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUXAARCH64_BUNDLED_JVM}"/>
</antcall>
<antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar-native"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-aarch64-pc-linux-gnu.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-aarch64-pc-linux-gnu.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-linux_aarch64.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
</target>
<target name="linux32-build" depends="linux-libastyle-x86" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/>
</antcall>
<antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar-native"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-i686-pc-linux-gnu.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-i686-pc-linux-gnu.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-linux_386.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
</target>
<target name="linux64-build" depends="linux-libastyle-x86" description="Build linux (64-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX64_BUNDLED_JVM}"/>
</antcall>
<antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar-native"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-x86_64-pc-linux-gnu.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-x86_64-pc-linux-gnu.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-linux_amd64.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
</target>
<target name="linux-jvm-noop"/>
<target name="linux-jvm-bundle">
<mkdir dir="${staging_folder}/work/java" />
<exec executable="rsync">
<arg value="-a"/>
<arg value="${JVM}"/>
<arg value="${staging_folder}/work/java/"/>
</exec>
</target>
<target name="linux32-run" depends="build,start"/>
<target name="linux64-run" depends="build,start"/>
<target name="linuxarm-run" depends="build,start"/>
<target name="linuxaarch64-run" depends="build,start"/>
<target name="linux32-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="linux64-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="linuxarm-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="linuxaarch64-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="build-arduino-builder" unless="no_arduino_builder">
<property name="ARDUINO-BUILDER-EXTRA-VERSION" value="" /> <!-- default if not set already -->
<delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
<mkdir dir="${staging_folder}/arduino-builder-${platform}"/>
<antcall target="untar-native">
<param name="archive_file" value="./arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}${ARDUINO-BUILDER-EXTRA-VERSION}.tar.bz2" />
<param name="archive_url" value="https://downloads.arduino.cc/tools/arduino-builder-${platform}-${ARDUINO-BUILDER-VERSION}${ARDUINO-BUILDER-EXTRA-VERSION}.tar.bz2" />
<param name="final_folder" value="${staging_folder}/arduino-builder-${platform}/arduino-builder" />
<param name="dest_folder" value="${staging_folder}/arduino-builder-${platform}" />
</antcall>
<copy file="${staging_folder}/arduino-builder-${platform}/arduino-builder" tofile="${staging_folder}/work/${staging_hardware_folder}/../arduino-builder" />
<chmod perm="755" file="${staging_folder}/work/${staging_hardware_folder}/../arduino-builder" />
<move file="${staging_folder}/arduino-builder-${platform}/tools" tofile="${staging_folder}/work/${staging_hardware_folder}/../tools-builder"/>
<copy todir="${staging_folder}/work/${staging_hardware_folder}" overwrite="true">
<fileset dir="${staging_folder}/arduino-builder-${platform}/hardware" includes="*.txt"/>
</copy>
<delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
</target>
<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
<!-- hardware/tools/${dist_check_file} is checked for existence -->
<target name="untar-unzip-check">
<available file="${archive_file}" property="${archive_file}_available" />
<available file="${final_folder}" property="${archive_file}_installed" />
</target>
<!-- Retrieve tool -->
<target name="untar-unzip-download" depends="untar-unzip-check" unless="${archive_file}_available">
<antcall target="untar-unzip-download-web" />
<antcall target="untar-unzip-download-local" />
</target>
<target name="untar-unzip-download-web" unless="local_sources">
<get src="${archive_url}" dest="${archive_file}" verbose="true" ignoreerrors="true" />
</target>
<target name="untar-unzip-download-local" if="local_sources">
<basename file="${archive_file}" property="basename" />
<echo>Skipping download of ${archive_url}, using makepkg downloaded ${basename}</echo>
<exec executable="ln" failonerror="true">
<arg value="-s" />
<arg value="${basedir}/../../${basename}" />
<arg value="${archive_file}" />
</exec>
</target>
<target name="untar-unzip-checksum" depends="untar-unzip-download">
<echo>Testing checksum of "${archive_file}"</echo>
<checksum file="${archive_file}" algorithm="sha" fileext=".sha" verifyproperty="checksum.matches"/>
<condition property="checksum.matches.fail">
<equals arg1="${checksum.matches}" arg2="false"/>
</condition>
<fail if="checksum.matches.fail">Checksum failed.
File ${archive_file} failed checksum.
Please remove "${archive_file}" to download it again.
</fail>
</target>
<!-- Ensure that the tool is downloaded and test checksums, if everything's ok unzip it on the tools folder -->
<target name="untar" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
<untar src="${archive_file}" dest="${dest_folder}"/>
</target>
<target name="untar-bz2" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
<untar src="${archive_file}" dest="${dest_folder}" compression="bzip2"/>
</target>
<target name="untar-native" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Untarring ${archive_file} into folder ${dest_folder}</echo>
<exec executable="tar" failonerror="true">
<arg value="xf"/>
<arg value="${archive_file}"/>
<arg value="--directory=${dest_folder}"/>
</exec>
</target>
<target name="unzip" depends="untar-unzip-checksum" unless="${archive_file}_installed">
<echo>Unzipping ${archive_file} into folder ${dest_folder}</echo>
<mkdir dir="${dest_folder}" />
<unzip src="${archive_file}" dest="${dest_folder}"/>
</target>
<!-- Ensure that the executable flag is set in all enviroments/OS -->
<target name="make-file-executable" depends="make-file-executable-windows">
<chmod perm="755" file="${file}" />
</target>
<target name="make-file-executable-windows" if="windows_host">
<exec executable="icacls" failonerror="false">
<arg value="${file}"/>
<arg value="/grant"/>
<arg value="Everyone:(RX)"/>
</exec>
</target>
<target name="linux-dist" depends="build"
description="Build .tar.xz of linux version">
<move file="linux/work" tofile="linux/arduino-${version}" />
<exec executable="tar" dir="linux" failonerror="true">
<arg value="--lzma"/>
<arg value="-c"/>
<arg value="-f"/>
<arg value="arduino-${full-version}.tar.xz"/>
<arg value="arduino-${version}"/>
</exec>
<move file="linux/arduino-${version}" tofile="linux/work" />
<echo>
=======================================================
Arduino for Linux was built. Grab the archive from
linux/arduino-${full-version}.tar.xz
=======================================================
</echo>
</target>
<target name="linux32-dist" depends="linux-dist"
description="Build .tar.xz of linux x86_32 version" />
<target name="linux64-dist" depends="linux-dist"
description="Build .tar.xz of linux x86_64 version" />
<target name="linuxarm-dist" depends="linux-dist"
description="Build .tar.xz of linux armhf version" />
<target name="linuxaarch64-dist" depends="linux-dist"
description="Build .tar.xz of linux aarch64 version" />
<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->
<target name="windows-clean" depends="subprojects-clean"
description="Clean windows version">
<delete dir="windows/work" />
<delete>
<fileset dir="windows" includes="arduino-*windows*.zip"/>
</delete>
</target>
<target name="windows-checkos" unless="windows">
<echo>
=======================================================
Arduino for Windows can only be built on windows.
Bye.
=======================================================