forked from apache/royale-asjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installer.xml
1177 lines (1072 loc) · 53 KB
/
installer.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"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="asjs_ide_install" default="install" basedir=".">
<property name="FLEXJS_HOME" location="${basedir}"/>
<!-- this script supports the usingDownloadCache property and
downloadCacheFolder property to cache downloads in the
folder specified by downloadCacheFolder. This can make
a huge difference in future runs although there is some
risk around caching bad downloads and/or needing to
clean up the cache -->
<!-- Required for OSX 10.6 / Snow Leopard Performance. -->
<!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
<!-- local.d32 is set/used in build.properties so this needs to be done first. -->
<condition property="local.d32" value="-d32">
<and>
<os family="windows"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
<equals arg1="${ant.java.version}" arg2="1.6"/>
</and>
</condition>
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEXJS_HOME}/local.properties"/>
<property file="${FLEXJS_HOME}/nightly.properties"/>
<property file="${FLEXJS_HOME}/build.properties"/>
<property name="bundle" value="en_US" />
<property name="flex.properties.url" value="http://flex.apache.org/installer/properties/flexjs/${bundle}.properties" />
<get src="${flex.properties.url}" dest="${basedir}/${bundle}.properties" ignoreerrors="true" />
<property file="${basedir}/${bundle}.properties"/>
<property file="${FLEXJS_HOME}/installer.properties/${bundle}.properties"/>
<property file="${FLEXJS_HOME}/installer.properties/en_US.properties"/>
<property name="download.dir" value="${FLEXJS_HOME}/in"/>
<property name="air.sdk.version" value="14.0"/>
<property name="flash.sdk.version" value="14.0"/>
<property name="flexjs.version" value="0.6.0"/>
<property name="falcon.version" value="0.6.0"/>
<property name="swfobject.url.server" value="https://github.com" />
<property name="swfobject.url.folder" value="swfobject/swfobject/archive" />
<property name="swfobject.url.file" value="2.2.zip" />
<condition property="platform" value="mac">
<os family="mac" />
</condition>
<condition property="platform" value="windows">
<os family="windows" />
</condition>
<condition property="platform" value="linux">
<os family="unix" />
</condition>
<condition property="isMac" value="mac">
<os family="mac" />
</condition>
<condition property="isWindows" value="windows">
<os family="windows" />
</condition>
<condition property="isLinux" value="linux">
<os family="unix" />
</condition>
<condition property="AIRDownloadEcho" value="${INFO_DOWNLOADING_AIR_RUNTIME_KIT_WINDOWS}">
<os family="windows" />
</condition>
<property name="AIRDownloadEcho" value="${INFO_DOWNLOADING_AIR_RUNTIME_KIT_MAC}" />
<condition property="air.donot.ask" value="true">
<isset property="installer" />
</condition>
<condition property="flash.donot.ask" value="true">
<isset property="installer" />
</condition>
<condition property="flat.donot.ask" value="true">
<isset property="installer" />
</condition>
<condition property="COMPC" value="compc.bat">
<os family="windows" />
</condition>
<property name="COMPC" value="compc" />
<condition property="MXMLC" value="mxmlc.bat">
<os family="windows" />
</condition>
<property name="MXMLC" value="mxmlc" />
<condition property="ASJSC" value="asjsc.bat">
<os family="windows" />
</condition>
<property name="ASJSC" value="asjsc" />
<condition property="java.home" value="${env.JAVA_HOME}" >
<and>
<available file="${env.JAVA_HOME}" type="dir" />
<not>
<equals arg1="" arg2="${env.JAVA_HOME}" />
</not>
</and>
</condition>
<target name="get-md5-data" depends="get-air-md5-data,get-flash-md5-data">
</target>
<target name="get-air-md5-data" if="air-has-md5">
<property name="air.sdk.url.md5" refid="${air.sdk.url.md5.ref}" />
</target>
<target name="get-flash-md5-data" if="flash-has-md5">
<property name="flash.sdk.url.md5" refid="${flash.sdk.url.md5.ref}" />
</target>
<target name="get-data">
<tstamp />
<property name="ts" value="${DSTAMP}${TSTAMP}" />
<property name="xml.properties" value="http://flex.apache.org/installer/sdk-installer-config-4.0.xml?ts=${ts}" />
<get src="${xml.properties}" dest="${basedir}/sdk-installer-config-4.0.xml" />
<xmlproperty file="${basedir}/sdk-installer-config-4.0.xml" semanticAttributes="true" collapseAttributes="true"/>
<condition property="air.sdk.version" value="${config.airsdk.linux.versions.default}">
<equals arg1="${platform}" arg2="linux" />
</condition>
<condition property="air.sdk.version" value="${config.airsdk.windows.versions.default}">
<equals arg1="${platform}" arg2="windows" />
</condition>
<condition property="air.sdk.version" value="${config.airsdk.mac.versions.default}">
<equals arg1="${platform}" arg2="mac" />
</condition>
<property name="flash.sdk.version" value="${config.flashsdk.versions.default}"/>
<condition property="air.sdk.version.ref" value="${air.sdk.versionID}" >
<isset property="air.sdk.versionID" />
</condition>
<property name="air.sdk.version.ref" value="${air.sdk.version}" />
<condition property="flash.sdk.version.ref" value="${flash.sdk.versionID}" >
<isset property="flash.sdk.versionID" />
</condition>
<property name="flash.sdk.version.ref" value="${flash.sdk.version}" />
<property name="air.sdk.url.server.ref" value="air.sdk.server.${platform}.${air.sdk.version.ref}" />
<property name="air.sdk.url.server" refid="${air.sdk.url.server.ref}" />
<property name="air.sdk.url.folder.ref" value="air.sdk.folder.${platform}.${air.sdk.version.ref}" />
<property name="air.sdk.url.folder" refid="${air.sdk.url.folder.ref}" />
<property name="air.sdk.url.file.ref" value="air.sdk.file.${platform}.${air.sdk.version.ref}" />
<property name="air.sdk.url.file" refid="${air.sdk.url.file.ref}" />
<property name="air.sdk.url.md5.ref" value="air.sdk.md5.${platform}.${air.sdk.version.ref}" />
<condition property="air-has-md5">
<isreference refid="${air.sdk.url.md5.ref}" />
</condition>
<property name="flash.sdk.url.server.ref" value="flash.sdk.server.${flash.sdk.version.ref}" />
<property name="flash.sdk.url.server" refid="${flash.sdk.url.server.ref}" />
<property name="flash.sdk.url.folder.ref" value="flash.sdk.folder.${flash.sdk.version.ref}" />
<property name="flash.sdk.url.folder" refid="${flash.sdk.url.folder.ref}" />
<property name="flash.sdk.url.file.ref" value="flash.sdk.file.${flash.sdk.version.ref}" />
<property name="flash.sdk.url.file" refid="${flash.sdk.url.file.ref}" />
<property name="flash.sdk.url.md5.ref" value="flash.sdk.md5.${flash.sdk.version.ref}" />
<condition property="flash-has-md5">
<isreference refid="${flash.sdk.url.md5.ref}" />
</condition>
<property name="flash.sdk.swfversion.ref" value="flash.sdk.swfversion.${flash.sdk.version.ref}" />
<property name="flash.sdk.swfversion" refid="${flash.sdk.swfversion.ref}" />
<property name="flexjs.dev.version" value="${config.products.ApacheFlexJS.developmentVersion}" />
<property name="falcon.dev.version" value="${config.products.ApacheFlexFalconJX.developmentVersion}" />
<property name="falcon.latest.version" value="${config.products.ApacheFlexFalconJX.latestVersion}" />
<property name="falcon.rc" value="${config.products.ApacheFlexFalconJX.rc}" />
<!-- if both flexjs and falcon are development versions, then get falcon from the rc server -->
<!-- for nightly builds, we package a nightly.properties that sets these values to the nightly falcon builds -->
<condition property="falcon.server.url" value="https://dist.apache.org/repos/dist/dev" >
<and>
<equals arg1="${flexjs.dev.version}" arg2="${flexjs.version}" />
<equals arg1="${falcon.dev.version}" arg2="${falcon.version}" />
</and>
</condition>
<condition property="falcon.folder" value="flex/falcon/${falcon.version}/${falcon.rc}/binaries" >
<and>
<equals arg1="${flexjs.dev.version}" arg2="${flexjs.version}" />
<equals arg1="${falcon.dev.version}" arg2="${falcon.version}" />
</and>
</condition>
<!-- otherwise, pull the specified version -->
<condition property="falcon.server.url" value="http://www.apache.org/dyn/mirrors/mirrors.cgi" >
<equals arg1="${falcon.version}" arg2="${falcon.latest.version}" />
</condition>
<condition property="falcon.uses.mirror" value="true" >
<and>
<not>
<isset property="nightly" />
</not>
<equals arg1="${falcon.version}" arg2="${falcon.latest.version}" />
</and>
</condition>
<condition property="falcon.md5.server.url" value="https://dist.apache.org/repos/dist/release" >
<equals arg1="${falcon.uses.mirror}" arg2="true" />
</condition>
<property name="falcon.server.url" value="http://archive.apache.org/dist" />
<property name="falcon.md5.server.url" value="${falcon.server.url}" />
<property name="falcon.folder" value="flex/falcon/${falcon.version}/binaries" />
<property name="falcon.file" value="apache-flex-falconjx-${falcon.version}-bin.zip" />
</target>
<target name="install" depends="get-data,find-java,get-md5-data,check-binary,ask-licenses,get-falcon,get-third-party-files,fixup-config-files,hack-fb-files,setup-launch-configs,setup-launch-configs-windows,delete-download-dir" description="Converts binary package to IDE compatible folder">
<echo>${install.complete.echo}</echo>
</target>
<target name="find-java" depends="find-java-executable-windows,find-java-executable-others,search-java,check-java" description="get path to java executable">
<echo file="${basedir}/findjava.properties">find.java.echo=${find.java.echo.pattern}</echo>
<property file="${basedir}/findjava.properties" />
<delete file="${basedir}/findjava.properties" />
<echo>${find.java.echo}</echo>
</target>
<target name="check-java" description="fail if java doesn't exist">
<fail message="${unable.to.find.java}">
<condition>
<not>
<isset property="java.executable" />
</not>
</condition>
</fail>
</target>
<target name="find-java-executable-windows" if="isWindows">
<condition property="java.executable" value="${java.home}/bin/java.exe" >
<and>
<isset property="java.home" />
<available file="${java.home}/bin/java.exe" />
</and>
</condition>
</target>
<target name="find-java-executable-others" unless="isWindows">
<condition property="java.executable" value="${java.home}/bin/java" >
<and>
<isset property="java.home" />
<available file="${java.home}" />
</and>
</condition>
</target>
<target name="search-java" depends="search-java-windows,search-java-others" description="search for java executable" unless="java.home">
</target>
<target name="search-java-windows" unless="java.home">
<exec executable="where.exe" os="windows" outputproperty="java.executable" >
<arg value="java"/>
</exec>
</target>
<target name="search-java-others" unless="java.home">
<exec executable="which" os="mac,linux" outputproperty="java.executable" >
<arg value="java"/>
</exec>
</target>
<target name="check-binary" description="Make sure this is a binary package">
<fail message="${basedir} is not an FlexJS binary package">
<condition>
<not>
<available file="${basedir}/frameworks/libs/Binding.swc" />
</not>
</condition>
</fail>
<fail message="${basedir} is not an FlexJS binary package and is probably a git repo">
<condition>
<available file="$[basedir}/.gitignore" />
</condition>
</fail>
</target>
<target name="ask-licenses" depends="ask-air,ask-flash,ask-flat" description="Ask about the various licenses">
</target>
<target name="ask-air" unless="air.donot.ask"
description="Prompt the user before downloading AIR">
<input
message="${air.prompt.text}"
validargs="${yes.no.prompts}"
defaultvalue="${no}"
addproperty="input.air.download"/>
<condition property="do.air.install">
<equals arg1="${yes}" arg2="${input.air.download}"/>
</condition>
<fail message="${ERROR_REQUIRED_LICENSE}" unless="do.air.install" />
<!-- Only ask once per ant run. -->
<property name="air.donot.ask" value="set"/>
</target>
<target name="ask-flash" unless="flash.donot.ask"
description="Prompt the user before downloading playerglobal.swc">
<input
message="${flash.prompt.text}"
validargs="${yes.no.prompts}"
defaultvalue="${no}"
addproperty="input.flash.download"/>
<condition property="do.flash.install">
<equals arg1="${yes}" arg2="${input.flash.download}"/>
</condition>
<fail message="${ERROR_REQUIRED_LICENSE}" unless="do.flash.install" />
<!-- Only ask once per ant run. -->
<property name="flash.donot.ask" value="set"/>
</target>
<target name="ask-flat" unless="flat.donot.ask"
description="Prompt the user before downloading Flat fonts">
<input
message="${flat.prompt.text}"
validargs="${yes.no.prompts}"
defaultvalue="${no}"
addproperty="input.flat.download"/>
<condition property="do.flat.install">
<equals arg1="${yes}" arg2="${input.flat.download}"/>
</condition>
<!-- Only ask once per ant run. -->
<property name="flat.donot.ask" value="set"/>
</target>
<target name="mac-chmod" description="makes some scripts executable" unless="isWindows">
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/mxmlc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/compc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/asjsc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/asjscompc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/asnodec"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/jquery"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/js/bin/externc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/bin/mxmlc"/>
</exec>
<exec executable="chmod" dir="${FLEXJS_HOME}">
<arg value="+x" />
<arg value="${FLEXJS_HOME}/bin/compc"/>
</exec>
</target>
<target name="get-falcon" depends="falcon-check,falcon-get" unless="falcon.present"
description="downloads and installs Falcon compiler">
<echo>${INFO_UNZIPPING} ${download.dir}/${falcon.file}</echo>
<unzip src="${download.dir}/${falcon.file}" dest="${download.dir}/falcon"/>
<antcall target="falcon-install" />
<antcall target="mac-chmod" />
</target>
<target name="falcon-install" >
<property name="flexjs" value="true" />
<property name="FLEX_HOME" value="${basedir}" />
<ant dir="${download.dir}/falcon" antfile="installer.xml" />
</target>
<target name="falcon-check" description="Checks if Falcon compiler has been downloaded.">
<available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" property="falcon.present"/>
</target>
<target name="falcon-get-check" >
<available file="${download.dir}/${falcon.file}" property="falcon.downloaded" />
</target>
<target name="falcon-get" depends="falcon-get-check,set-falcon-cache-flag" unless="falcon.downloaded" >
<mkdir dir="${download.dir}"/>
<echo>${INFO_INSTALLING_FALCON} ${falcon.server.url}/${falcon.folder}/${falcon.file}</echo>
<antcall target="falcon_get_from_mirror" >
<param name="server" value="${falcon.server.url}" />
<param name="md5server" value="${falcon.md5.server.url}" />
<param name="folder" value="${falcon.folder}" />
<param name="file" value="${falcon.file}" />
<param name="dest" value="${download.dir}/${falcon.file}" />
<param name="message" value="${INFO_INSTALLING_FALCON}" />
<param name="failmessage" value="FalconJX download failed" />
</antcall>
<antcall target="falcon_get_download" >
<param name="server" value="${falcon.server.url}" />
<param name="md5server" value="${falcon.md5.server.url}" />
<param name="folder" value="${falcon.folder}" />
<param name="file" value="${falcon.file}" />
<param name="dest" value="${download.dir}/${falcon.file}" />
<param name="message" value="${INFO_INSTALLING_FALCON}" />
<param name="failmessage" value="FalconJX download failed" />
</antcall>
</target>
<target name="falcon_get_from_mirror" if="falcon.uses.mirror" >
<antcall target="download_using_mirror" >
<param name="srcMD5Domain" value="${md5server}" />
<param name="srcDomain" value="${server}" />
<param name="srcFolder" value="${folder}" />
<param name="srcFile" value="${file}" />
</antcall>
</target>
<target name="falcon_get_download" unless="falcon.uses.mirror" >
<antcall target="download_using_get" >
<param name="srcMD5Domain" value="${md5server}" />
<param name="srcDomain" value="${server}" />
<param name="srcFolder" value="${folder}" />
<param name="srcFile" value="${file}" />
</antcall>
</target>
<target name="set-falcon-cache-flag" if="nightly" >
<property name="skipCache" value="true" />
</target>
<target name="get-third-party-files" depends="air-download,flash-download,flat-download,swfobject-download" />
<target name="air-check" description="Checks if AIR SDK has been downloaded.">
<available file="${FLEXJS_HOME}/lib/adt.jar" property="skip.air.install"/>
<condition property="skip.air.install" value="true">
<not>
<isset property="do.air.install" />
</not>
</condition>
</target>
<target name="air-download" depends="air-check" unless="skip.air.install"
description="Downloads AIR SDK and copies to correct locations">
<mkdir dir="${download.dir}"/>
<antcall target="air-get" />
<echo>${INFO_UNZIPPING} ${download.dir}/${air.sdk.url.file}</echo>
<antcall target="air-setup-win" />
<antcall target="air-setup-mac" />
</target>
<target name="air-get-check" >
<available file="${download.dir}/${air.sdk.url.file}" property="air.downloaded" />
</target>
<target name="air-get" depends="air-get-check" unless="air.downloaded" >
<echo>${AIRDownloadEcho} ${air.sdk.url.server}/${air.sdk.url.folder}/${air.sdk.url.file}</echo>
<antcall target="download_air" >
<param name="srcDomain" value="${air.sdk.url.server}" />
<param name="srcFolder" value="${air.sdk.url.folder}" />
<param name="srcFile" value="${air.sdk.url.file}" />
<param name="dest" value="${download.dir}/${air.sdk.url.file}" />
<param name="failmessage" value="AIR SDK download failed" />
</antcall>
<antcall target="download_air_with_md5" >
<param name="srcDomain" value="${air.sdk.url.server}" />
<param name="srcFolder" value="${air.sdk.url.folder}" />
<param name="srcFile" value="${air.sdk.url.file}" />
<param name="dest" value="${download.dir}/${air.sdk.url.file}" />
<param name="failmessage" value="AIR SDK download failed" />
<param name="md5" value="${air.sdk.url.md5}" />
</antcall>
</target>
<target name="air-setup-win" if="isWindows">
<unzip src="${download.dir}/${air.sdk.url.file}" dest="${download.dir}/airsdk" />
<echo>${INFO_FINISHED_UNZIPPING} ${download.dir}/${air.sdk.url.file}</echo>
<copy todir="${FLEXJS_HOME}" overwrite="true">
<fileset dir="${download.dir}/airsdk">
<include name="AIR SDK license.pdf" />
<include name="AIR SDK Readme.txt" />
<include name="airsdk.xml" />
<include name="bin/adl.exe" />
<include name="bin/adt.bat" />
<include name="frameworks/libs/air/**" />
<include name="frameworks/projects/air/**" />
<include name="include/**" />
<include name="install/android/**" />
<include name="lib/adt.jar" />
<include name="lib/android/**" />
<include name="lib/aot/**" />
<include name="lib/nai/**" />
<include name="lib/win/**" />
<include name="runtimes/**" />
<include name="samples/badge/**" />
<include name="samples/descriptor-sample.xml" />
<include name="samples/icons/**" />
<include name="templates/air/**" />
<include name="templates/extensions/**" />
<include name="templates/sdk/**" />
</fileset>
</copy>
</target>
<target name="air-setup-mac" unless="isWindows">
<!--The tbz2 contains symlinks which Ant does not preserve
<untar compression="bzip2" src="${download.dir}/${air.sdk.url.file}" dest="${download.dir}/airsdk" />-->
<mkdir dir="${download.dir}/airsdk" />
<move file="${download.dir}/${air.sdk.url.file}" todir="${download.dir}/airsdk" />
<exec executable="bunzip2" dir="${download.dir}/airsdk" >
<arg value="${air.sdk.url.file}" />
</exec>
<echo file="${basedir}/airtar.properties">air.tar.name=${air.sdk.url.file}</echo>
<replace file="${basedir}/airtar.properties" token="tbz2" value="tar" />
<property file="${basedir}/airtar.properties" />
<exec executable="tar" dir="${download.dir}/airsdk" >
<arg value="-xvf" />
<arg value="${air.tar.name}" />
</exec>
<echo>${INFO_FINISHED_UNTARING} ${download.dir}/airsdk/${air.tar.name}</echo>
<delete file="${basedir}/airtar.properties" />
<antcall target="mac-copy-file">
<param name="srcdir" value="." />
<param name="filename" value="AIR SDK license.pdf"/>
<param name="destdir" value="${FLEXJS_HOME}" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="." />
<param name="filename" value="AIR SDK Readme.txt"/>
<param name="destdir" value="${FLEXJS_HOME}" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="." />
<param name="filename" value="airsdk.xml"/>
<param name="destdir" value="${FLEXJS_HOME}" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="bin" />
<param name="filename" value="adl"/>
<param name="destdir" value="${FLEXJS_HOME}/bin" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="bin" />
<param name="filename" value="adt"/>
<param name="destdir" value="${FLEXJS_HOME}/bin" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="lib" />
<param name="filename" value="adt.jar"/>
<param name="destdir" value="${FLEXJS_HOME}/lib" />
</antcall>
<antcall target="mac-copy-file">
<param name="srcdir" value="samples" />
<param name="filename" value="descriptor-sample.xml"/>
<param name="destdir" value="${FLEXJS_HOME}/samples" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="frameworks/libs/air" />
<param name="destdir" value="${FLEXJS_HOME}/frameworks/libs" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="frameworks/projects/air" />
<param name="destdir" value="${FLEXJS_HOME}/frameworks/projects" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="include" />
<param name="destdir" value="${FLEXJS_HOME}" />
</antcall>
<antcall target="mac-copy-dir-if-exists">
<param name="srcdir" value="install/android" />
<param name="destdir" value="${FLEXJS_HOME}/install" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="lib/android" />
<param name="destdir" value="${FLEXJS_HOME}/lib" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="lib/aot" />
<param name="destdir" value="${FLEXJS_HOME}/lib" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="lib/nai" />
<param name="destdir" value="${FLEXJS_HOME}/lib" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="runtimes" />
<param name="destdir" value="${FLEXJS_HOME}" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="samples/badge" />
<param name="destdir" value="${FLEXJS_HOME}/samples" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="samples/icons" />
<param name="destdir" value="${FLEXJS_HOME}/samples" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="templates/air" />
<param name="destdir" value="${FLEXJS_HOME}/templates" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="templates/extensions" />
<param name="destdir" value="${FLEXJS_HOME}/templates" />
</antcall>
<antcall target="mac-copy-dir">
<param name="srcdir" value="templates/sdk" />
<param name="destdir" value="${FLEXJS_HOME}/templates" />
</antcall>
</target>
<target name="mac-copy-file" description="copies a file">
<mkdir dir="${destdir}" />
<exec executable="cp" dir="${FLEXJS_HOME}">
<arg value="-p" />
<arg value="${download.dir}/airsdk/${srcdir}/${filename}"/>
<arg value="${destdir}" />
</exec>
</target>
<target name="mac-copy-dir" description="copies a directory using exec and rsync so that symbolic links are preserved">
<echo file="${basedir}/maccopy.properties">mac.copy.echo=${mac.copy.echo.pattern}</echo>
<property file="${basedir}/maccopy.properties" />
<delete file="${basedir}/maccopy.properties" />
<echo>${mac.copy.echo}</echo>
<exec executable="rsync" dir="${FLEXJS_HOME}">
<arg value="--archive" />
<arg value="--ignore-existing" />
<arg value="--force" />
<arg value="${download.dir}/airsdk/${srcdir}"/>
<arg value="${destdir}" />
</exec>
</target>
<target name="mac-copy-dir-if-exists" depends="mac-check-exists" if="${srcdir}.exists" description="copies a directory using exec and rsync so that symbolic links are preserved">
<echo file="${basedir}/maccopy.properties">mac.copy.echo=${mac.copy.echo.pattern}</echo>
<property file="${basedir}/maccopy.properties" />
<echo>${mac.copy.echo}</echo>
<exec executable="rsync" dir="${FLEXJS_HOME}">
<arg value="--archive" />
<arg value="--ignore-existing" />
<arg value="--force" />
<arg value="${download.dir}/airsdk/${srcdir}"/>
<arg value="${destdir}" />
</exec>
</target>
<target name="mac-check-exists">
<available file="${download.dir}/airsdk/${srcdir}" type="dir" property="${srcdir}.exists" />
</target>
<!-- Because this requires a network connection it downloads Flash SDK only if it doesn't already exist. -->
<target name="flash-check" description="Checks if Flash SDK has been downloaded.">
<available file="${FLEXJS_HOME}/frameworks/libs/player/${flash.sdk.version}/playerglobal.swc" property="skip.flash.install"/>
<condition property="skip.flash.install" value="true">
<not>
<isset property="do.flash.install" />
</not>
</condition>
</target>
<target name="flash-download" depends="flash-check" unless="skip.flash.install"
description="Downloads playerglobal.swc and copies to correct locations">
<mkdir dir="${download.dir}"/>
<mkdir dir="${FLEXJS_HOME}/frameworks/libs/player/${flash.sdk.version}"/>
<echo>${INFO_INSTALLING_PLAYERGLOBAL_SWC} ${flash.sdk.url.server}/${flash.sdk.url.folder}/${flash.sdk.url.file}</echo>
<antcall target="download_flash" >
<param name="srcDomain" value="${flash.sdk.url.server}" />
<param name="srcFolder" value="${flash.sdk.url.folder}" />
<param name="srcFile" value="${flash.sdk.url.file}" />
<param name="dest" value="${FLEXJS_HOME}/frameworks/libs/player/${flash.sdk.version}/playerglobal.swc" />
<param name="message" value="${INFO_INSTALLING_PLAYERGLOBAL_SWC} ${flash.sdk.url.server}/${flash.sdk.url.folder}/${flash.sdk.url.file}" />
<param name="failmessage" value="Flash SDK download failed" />
</antcall>
<antcall target="download_flash_with_md5" >
<param name="srcDomain" value="${flash.sdk.url.server}" />
<param name="srcFolder" value="${flash.sdk.url.folder}" />
<param name="srcFile" value="${flash.sdk.url.file}" />
<param name="dest" value="${FLEXJS_HOME}/frameworks/libs/player/${flash.sdk.version}/playerglobal.swc" />
<param name="message" value="${INFO_INSTALLING_PLAYERGLOBAL_SWC} ${flash.sdk.url.server}/${flash.sdk.url.folder}/${flash.sdk.url.file}" />
<param name="failmessage" value="Flash SDK download failed" />
<param name="md5" value="${flash.sdk.url.md5}" />
</antcall>
</target>
<!-- Because this requires a network connection it downloads Flash SDK only if it doesn't already exist. -->
<target name="flat-check" description="Checks if Flat fonts has been downloaded.">
<!-- make this folder anyway so example scripts don't fail -->
<mkdir dir="${FLEXJS_HOME}/frameworks/fonts"/>
<available file="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.woff" property="skip.flat.install"/>
<condition property="skip.flat.install" value="true">
<not>
<isset property="do.flat.install" />
</not>
</condition>
</target>
<target name="flat-download" depends="flat-check" unless="skip.flat.install"
description="Downloads Flat fonts and copies to correct locations">
<mkdir dir="${download.dir}"/>
<echo>${INFO_INSTALLING_FLAT_FONTS} https://github.com/designmodo/Flat-UI/archive/2.2.2.zip</echo>
<get src="https://github.com/designmodo/Flat-UI/archive/2.2.2.zip"
dest="${download.dir}/flat-ui_2_2.zip"
verbose="false"/>
<mkdir dir="${download.dir}/flat/fonts"/>
<unzip src="${download.dir}/flat-ui_2_2.zip" dest="${download.dir}/flat/fonts" />
<copy file="${download.dir}/flat/fonts/Flat-UI-2.2.2/fonts/glyphicons/flat-ui-icons-regular.eot"
tofile="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.eot"/>
<copy file="${download.dir}/flat/fonts/Flat-UI-2.2.2/fonts/glyphicons/flat-ui-icons-regular.ttf"
tofile="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.ttf"/>
<copy file="${download.dir}/flat/fonts/Flat-UI-2.2.2/fonts/glyphicons/flat-ui-icons-regular.svg"
tofile="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.svg"/>
<copy file="${download.dir}/flat/fonts/Flat-UI-2.2.2/fonts/glyphicons/flat-ui-icons-regular.woff"
tofile="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.woff"/>
<copy file="${download.dir}/flat/fonts/Flat-UI-2.2.2/README.md"
tofile="${FLEXJS_HOME}/frameworks/fonts/README.md"/>
<get src="http://apacheflexbuild.cloudapp.net:8080/job/flat-ui-icons-regular.swf/lastSuccessfulBuild/artifact/frameworks/fonts/flat-ui-icons-regular.swf"
dest="${FLEXJS_HOME}/frameworks/fonts/flat-ui-icons-regular.swf"
verbose="false"/>
</target>
<!-- swfobject.js (Version 2.2) -->
<!-- Because this requires a network connection it downloads SWFObject only if it doesn't already exist. -->
<target name="swfobject-check" description="Checks if SWFObject has been downloaded.">
<available file="${basedir}/../templates/swfobject/swfobject.js" property="swfobject.js.present"/>
</target>
<target name="swfobject-download" depends="swfobject-check" unless="swfobject.js.present"
description="Copies SWFObject from github">
<echo file="${basedir}/swfobject.properties">swfobject.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
<replace file="${basedir}/swfobject.properties" token="{0}" value="${swfobject.url.file}" />
<replace file="${basedir}/swfobject.properties" token="{1}" value="${swfobject.url.server}/${swfobject.url.folder}" />
<property file="${basedir}/swfobject.properties" />
<delete file="${basedir}/swfobject.properties" />
<echo>${swfobject.echo}</echo>
<mkdir dir="${download.dir}"/>
<antcall target="download_using_get" >
<param name="srcDomain" value="${swfobject.url.server}" />
<param name="srcFolder" value="${swfobject.url.folder}" />
<param name="srcFile" value="${swfobject.url.file}" />
<param name="dest" value="${download.dir}/swfobject_2_2.zip" />
<param name="failmessage" value="SWFObject download failed" />
</antcall>
<echo>${INFO_DOWNLOADED}</echo>
<mkdir dir="${download.dir}/swfobject"/>
<unzip src="${download.dir}/swfobject_2_2.zip" dest="${download.dir}/swfobject">
<patternset>
<include name="swfobject-2.2/swfobject/expressInstall.swf"/>
<include name="swfobject-2.2/swfobject/swfobject.js"/>
</patternset>
</unzip>
<mkdir dir="${FLEXJS_HOME}/templates/swfobject"/>
<copy file="${download.dir}/swfobject/swfobject-2.2/swfobject/expressInstall.swf"
tofile="${FLEXJS_HOME}/templates/swfobject/expressInstall.swf" />
<copy file="${download.dir}/swfobject/swfobject-2.2/swfobject/swfobject.js"
tofile="${FLEXJS_HOME}/templates/swfobject/swfobject.js" />
</target>
<target name="fixup-config-files">
<echo>${INFO_INSTALLING_CONFIG_FILES}</echo>
<copy file="${FLEXJS_HOME}/frameworks/flex-config-template.xml"
tofile="${FLEXJS_HOME}/frameworks/flex-config.xml" overwrite="true"/>
<copy file="${FLEXJS_HOME}/frameworks/air-config-template.xml"
tofile="${FLEXJS_HOME}/frameworks/air-config.xml" overwrite="true"/>
<copy file="${FLEXJS_HOME}/frameworks/js-config-template.xml"
tofile="${FLEXJS_HOME}/frameworks/js-config.xml" overwrite="true"/>
<replace file="${FLEXJS_HOME}/frameworks/flex-config.xml">
<replacefilter token="@playerversion@"
value="${flash.sdk.version}"/>
<replacefilter token="@swfversion@"
value="${flash.sdk.swfversion}"/>
<replacefilter token="{playerglobalHome}"
value="libs/player"/>
</replace>
<replace file="${FLEXJS_HOME}/frameworks/air-config.xml" >
<replacefilter token="@playerversion@"
value="${flash.sdk.version}"/>
<replacefilter token="@swfversion@"
value="${flash.sdk.swfversion}"/>
<replacefilter token="{airHome}/frameworks/libs"
value="libs"/>
</replace>
<replace file="${FLEXJS_HOME}/frameworks/js-config.xml" >
<replacefilter token="@playerversion@"
value="${flash.sdk.version}"/>
<replacefilter token="@swfversion@"
value="${flash.sdk.swfversion}"/>
<replacefilter token="{airHome}/frameworks/libs"
value="libs"/>
</replace>
</target>
<target name="hack-fb-files" description="create files needed by Adobe Flash Builder">
<!-- read in flex-sdk-description -->
<xmlproperty file="${FLEXJS_HOME}/flex-sdk-description.xml" semanticAttributes="true" collapseAttributes="true"/>
<!-- write out new one based on original values -->
<echo file="${FLEXJS_HOME}/flex-sdk-description.xml"><?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<flex-sdk-description>
<name>${release.name} ${release.version} FP${flash.sdk.version} AIR${air.sdk.version} en_US</name>
<version>${fb.release.version}</version>
<build>${flex-sdk-description.build}</build>
</flex-sdk-description>
</echo>
<echo file="${FLEXJS_HOME}/ide/flashbuilder/flashbuilder-config.xml"><?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<flashbuilder-config>
<express-install-swf>expressInstall.swf</express-install-swf>
</flashbuilder-config>
</echo>
<echo file="${FLEXJS_HOME}/frameworks/mxml-manifest.xml"><?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<componentPackage>
</componentPackage>
</echo>
<echo file="${FLEXJS_HOME}/frameworks/spark-manifest.xml"><?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<componentPackage>
</componentPackage>
</echo>
<mkdir dir="${FLEXJS_HOME}/frameworks/locale" />
<mkdir dir="${FLEXJS_HOME}/frameworks/mx" />
<mkdir dir="${FLEXJS_HOME}/frameworks/projects" />
<mkdir dir="${FLEXJS_HOME}/frameworks/rsls" />
<mkdir dir="${FLEXJS_HOME}/frameworks/themes/Halo" />
<mkdir dir="${FLEXJS_HOME}/frameworks/themes/Spark" />
<copy file="${FLEXJS_HOME}/frameworks/libs/Binding.swc"
tofile="${FLEXJS_HOME}/frameworks/themes/Halo/Halo.swc" />
<touch file="${FLEXJS_HOME}/frameworks/themes/Spark/spark.css" />
<copy file="${FLEXJS_HOME}/frameworks/air-config.xml"
tofile="${FLEXJS_HOME}/frameworks/airmobile-config.xml" />
<touch file="${FLEXJS_HOME}/frameworks/macfonts.ser" />
<touch file="${FLEXJS_HOME}/frameworks/winfonts.ser" />
<touch file="${FLEXJS_HOME}/frameworks/localfonts.ser" />
</target>
<target name="setup-launch-configs" description="Creates custom Flash Builder launch configurations">
<echo>${INFO_INSTALLING_LAUNCH_CONFIG_FILES}</echo>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (FalconJX Debug and Release Build).launch">
<replacefilter
token="$MXMLC"
value="${MXMLC}"/>
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (FalconJX Debug Build).launch">
<replacefilter
token="$MXMLC"
value="${MXMLC}"/>
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (JS COMPC).launch">
<replacefilter
token="$COMPC"
value="${COMPC}"/>
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/ASJSC (Debug and Release Build).launch">
<replacefilter
token="$ASJSC"
value="${ASJSC}"/>
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/ASJSC (Debug Build).launch">
<replacefilter
token="$ASJSC"
value="${ASJSC}"/>
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Build).launch">
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Run).launch">
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/Convert New Flex Project to FlexJS MVC Project.launch">
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/ide/flashbuilder/Convert New Flex Project to FlexJS Project.launch">
<replacefilter
token="$FLEXJS_HOME"
value="${FLEXJS_HOME}"/>
</replace>
<replace file="${FLEXJS_HOME}/js/bin/mxmlc.bat">
<replacefilter
token="@java"
value=""${java.executable}""/>
</replace>
<replace file="${FLEXJS_HOME}/js/bin/compc.bat">
<replacefilter
token="@java"
value=""${java.executable}""/>
</replace>
</target>
<target name="setup-launch-configs-windows" description="Custom Flash Builder launch configurations for Windows" if="isWindows">
<replace file="${FLEXJS_HOME}/ide/flashbuilder/FlexJS (Cordova Build).launch">
<replacefilter
token="PATH"