-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.xml
1124 lines (1026 loc) · 53.8 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"?>
<!-- build.xml
Sweet Home 3D, Copyright (c) 2007-2013 Emmanuel PUYBARET / eTeks <[email protected]>.
Ant build file. Available targets :
- build : Builds SweetHome3D.jar file in build directory
- application : Builds SweetHome3D.jar file without applet classes in build directory
- furniture : Builds Furniture.jar file in build directory
- textures : Builds Textures.jar file in build directory
- help : Builds Help.jar file in build directory
- java3dLibraries : Builds JNLP Java 3D libraries in deploy/lib subdirectories
- javaWebStart : Builds Java Web Start signed files in deploy/lib directory
- applet : Builds applet signed files in deploy/lib directory
- viewer : Builds viewer signed files in deploy/lib directory
- jarExecutable : Builds SweetHome3D-version.jar file in install directory
- windowsInstaller : Builds SweetHome3D-version-windows.exe file in install directory
- windowsSignedInstaller : Builds signed SweetHome3D-version-windows.exe file in install directory
- macosxInstaller : Builds SweetHome3D-version-macosx.dmg file in install directory
- macosxSignedInstaller : Builds signed SweetHome3D-version-macosx.dmg file in install directory
- linux32Installer : Builds SweetHome3D-version-linux-x86.tgz file in install directory
- linux64Installer : Builds SweetHome3D-version-linux-x64.tgz file in install directory
- portableArchive : Builds SweetHome3D-version-portable files in install/portable directory
- viewerInstaller : Builds SweetHome3DViewer-version.zip file in install directory
- sourceArchive : Builds SweetHome3D-version-src.zip file in install directory
- javadoc : Builds SweetHome3D-version-javadoc.zip file install directory
- jdepend : Launchs a JDepend graphical UI to help update dependencies in PackageDependenciesTest
-->
<project basedir="." default="jarExecutable" name="SweetHome3D">
<!-- The current version of Sweet Home 3D -->
<property name="version" value="4.1"/>
<target name="build"
description="Builds build/SweetHome3D.jar with all its classes">
<!-- Compile Sweet Home 3D -->
<mkdir dir="build/classes"/>
<!-- Compile Sweet Home 3D applets first with javac 1.1 to be able to detect current Java version
during applet launch (otherwise Java 1.1 to 1.4 plug-ins refuse to load Applet class) -->
<javac srcdir="src" destdir="build/classes"
includes="com/eteks/sweethome3d/applet/SweetHome3D*.java"
encoding="ISO-8859-1" target="1.1" source="1.2"/>
<!-- Compile other classes -->
<javac srcdir="src" destdir="build/classes"
encoding="ISO-8859-1" target="1.5" source="1.5">
<!-- Use lib as an extension directory to override default Java 3D libraries -->
<extdirs>
<pathelement location="lib"/>
</extdirs>
<classpath>
<pathelement location="libtest/AppleJavaExtensions.jar"/>
<pathelement location="libtest/jnlp.jar"/>
</classpath>
</javac>
<!-- Copy resources excepted furniture, textures and help files -->
<copy todir="build/classes">
<fileset dir="src">
<include name="**"/>
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
<exclude name="com/eteks/sweethome3d/io/*Catalog*.properties"/>
<exclude name="com/eteks/sweethome3d/io/resources/**"/>
<exclude name="**/help/**"/>
</fileset>
<fileset dir="src">
<include name="com/eteks/sweethome3d/io/resources/patterns/**"/>
</fileset>
</copy>
<!-- Create SweetHome3D.jar -->
<zip destfile="build/SweetHome3D.jar"
basedir="build/classes"/>
<delete dir="build/classes"/>
</target>
<target name="application" depends="build"
description="Builds build/SweetHome3D.jar application with all its classes">
<zip destfile="build/SweetHome3DStandalone.jar">
<zipfileset src="build/SweetHome3D.jar"
excludes="com/eteks/sweethome3d/applet/**"/>
</zip>
<move file="build/SweetHome3DStandalone.jar" tofile="build/SweetHome3D.jar"/>
</target>
<target name="furniture"
description="Builds build/Furniture.jar that contains the furniture files">
<mkdir dir="build"/>
<zip destfile="build/Furniture.jar" basedir="src">
<include name="com/eteks/sweethome3d/io/*FurnitureCatalog*.properties"/>
<include name="com/eteks/sweethome3d/io/resources/**"/>
<exclude name="com/eteks/sweethome3d/io/resources/textures/**"/>
<exclude name="com/eteks/sweethome3d/io/resources/patterns/**"/>
</zip>
</target>
<target name="textures"
description="Builds build/Textures.jar that contains the textures files">
<mkdir dir="build"/>
<zip destfile="build/Textures.jar" basedir="src">
<include name="com/eteks/sweethome3d/io/*TexturesCatalog*.properties"/>
<include name="com/eteks/sweethome3d/io/resources/textures/**"/>
</zip>
</target>
<target name="help"
description="Builds build/Help.jar that contains the help files">
<mkdir dir="build"/>
<zip destfile="build/Help.jar" basedir="src">
<include name="**/help/**"/>
</zip>
</target>
<target name="jogl-java3d"
description="Builds jogl-java3d.jar that contains only packages required for Java 3D">
<mkdir dir="build"/>
<zip destfile="build/macosx/java3d-1.6/jogl-java3d.jar">
<zipfileset src="lib/macosx/java3d-1.6/jogl-all.jar"
excludes="com/jogamp/graph/**, com/jogamp/newt/**, com/jogamp/opengl/swt/**, com/jogamp/opengl/util/**,
javax/media/opengl/Debug*, javax/media/opengl/Trace*,
jogamp/graph/**, jogamp/newt/**, jogl/util/data/av/**"/>
<zipfileset src="lib/macosx/java3d-1.6/jogl-all.jar"
includes="com/jogamp/opengl/util/GLBuffers.class"/>
</zip>
</target>
<target name="manifest" depends="build"
description="Builds build/META-INF/MANIFEST.MF with Trusted-Library attribute set to true">
<mkdir dir="build/META-INF"/>
<manifest file="build/META-INF/MANIFEST.MF">
<attribute name="Trusted-Library" value="true"/>
</manifest>
</target>
<target name="java3dLibraries" depends="jogl-java3d,manifest"
description="Builds JNLP Java 3D libraries in deploy/lib subdirectories">
<!-- Create java3d.jar containing Windows 32 bits Java 3D DLLs and jars -->
<mkdir dir="deploy/lib/windows/i386"/>
<jar destfile="deploy/lib/windows/i386/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/i386/*.dll"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Windows 64 bits Java 3D DLLs and jars -->
<mkdir dir="deploy/lib/windows/x64"/>
<jar destfile="deploy/lib/windows/x64/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/x64/*.dll"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Linux 32 bits Java 3D DLLs and jars -->
<mkdir dir="deploy/lib/linux/i386"/>
<jar destfile="deploy/lib/linux/i386/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="linux/i386/*.so"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Linux 64 bits Java 3D DLLs and jars -->
<mkdir dir="deploy/lib/linux/x64"/>
<jar destfile="deploy/lib/linux/x64/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="linux/x64/*.so"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Mac OS X Java 3D DLLs and jars -->
<mkdir dir="deploy/lib/macosx"/>
<jar destfile="deploy/lib/macosx/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="macosx/**/*.jnilib"/>
<include name="macosx/**/*.jar"/>
<exclude name="macosx/*/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="macosx/java3d-1.6/jogl-java3d.jar"/>
</fileset>
</jar>
</target>
<target name="javaWebStart" depends="application,furniture,textures,help,java3dLibraries"
description="Builds deploy/lib/SweetHome3D.jar and signs jars required by Sweet Home 3D with Java Web Start">
<!-- Build SweetHome3DJavaWebStartBootstrap.jar file containing main class and signed JNLP file -->
<mkdir dir="build/JNLP-INF"/>
<copy file="deploy/SweetHome3D.jnlp" tofile="build/JNLP-INF/APPLICATION.JNLP"/>
<mkdir dir="deploy/lib"/>
<zip destfile="deploy/lib/SweetHome3DJavaWebStartBootstrap.jar">
<zipfileset src="build/SweetHome3D.jar"
includes="com/eteks/sweethome3d/SweetHome3DJavaWebStartBootstrap.class"/>
<fileset dir="build" includes="JNLP-INF/APPLICATION.JNLP"/>
</zip>
<!-- Build SweetHome3D.jar file from the content of built jars -->
<zip destfile="deploy/lib/SweetHome3D.jar">
<zipfileset src="build/SweetHome3D.jar"
excludes="com/eteks/sweethome3d/SweetHome3DJavaWebStartBootstrap.class"/>
<zipfileset src="build/Furniture.jar"/>
<zipfileset src="build/Textures.jar"/>
<zipfileset src="build/Help.jar"/>
</zip>
<!-- Copy other jar files -->
<copy todir="deploy/lib">
<fileset dir="lib">
<include name="*.jar"/>
<exclude name="j3dcore.jar"/>
<exclude name="j3dutils.jar"/>
<exclude name="vecmath.jar"/>
</fileset>
</copy>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:"
addproperty="password"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.keytool"
alias="SweetHome3D" storepass="${password}">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="applet" depends="build,java3dLibraries,manifest"
description="Builds deploy/lib/SweetHome3DApplet.jar and signs jars required by Sweet Home 3D applet">
<!-- Create SweetHome3DApplet.jar containing Sweet Home 3D classes and resources -->
<mkdir dir="deploy/lib"/>
<jar destfile="deploy/lib/SweetHome3DApplet.jar" manifest="build/META-INF/MANIFEST.MF">
<zipfileset src="build/SweetHome3D.jar"
excludes="com/eteks/sweethome3d/*.*, com/eteks/sweethome3d/resources/**, com/eteks/sweethome3d/applet/*Viewer*.*"/>
</jar>
<!-- Create java3d.jar containing Java 3D DLLs and jars for Windows, Linux 32/64 bits and Mac OS X
(this library is used when Javascript doesn't succeed to detect user's OS) -->
<jar destfile="deploy/lib/java3d.jar" manifest="build/META-INF/MANIFEST.MF">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/**/*.dll"/>
<include name="linux/**/*.so"/>
<include name="macosx/**/*.jnilib"/>
<include name="macosx/**/*.jar"/>
<exclude name="macosx/*/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="macosx/java3d-1.6/jogl-java3d.jar"/>
</fileset>
</jar>
<!-- Copy other jar files adding to their manifest a Trusted-Library attribute set to true
(this attribute is necessary to be able to call applet methods from JavaScript) -->
<jar destfile="deploy/lib/jnlp.jar" filesetmanifest="merge" >
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="libtest/jnlp.jar"/>
</jar>
<jar destfile="deploy/lib/Loader3DS1_2u.jar" filesetmanifest="merge">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/Loader3DS1_2u.jar"/>
</jar>
<jar destfile="deploy/lib/batik-svgpathparser-1.7.jar">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/batik-svgpathparser-1.7.jar"/>
</jar>
<jar destfile="deploy/lib/freehep-vectorgraphics-svg-2.1.1.jar" filesetmanifest="merge">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/freehep-vectorgraphics-svg-2.1.1.jar"/>
</jar>
<jar destfile="deploy/lib/sunflow-0.07.3h.jar" filesetmanifest="merge">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/sunflow-0.07.3h.jar"/>
</jar>
<jar destfile="deploy/lib/iText-2.1.7.jar" filesetmanifest="merge">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/iText-2.1.7.jar"/>
</jar>
<jar destfile="deploy/lib/jmf.jar">
<manifest>
<attribute name="Trusted-Library" value="true"/>
</manifest>
<zipfileset src="lib/jmf.jar"/>
</jar>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:"
addproperty="password"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.keytool"
alias="SweetHome3D" storepass="${password}">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="viewer" depends="java3dLibraries"
description="Builds deploy/lib/SweetHome3DViewer.jar and signs jars required by Sweet Home 3D viewer">
<!-- Compile Sweet Home 3D Viewer-->
<mkdir dir="build/classes"/>
<!-- Compile Sweet Home 3D Viewer applet first with javac 1.1 to be able to detect current Java version
during applet launch (otherwise Java 1.1 to 1.4 plug-ins refuse to load Applet class) -->
<javac srcdir="src" destdir="build/classes"
includes="com/eteks/sweethome3d/applet/SweetHome3DViewer.java"
encoding="ISO-8859-1" target="1.1" source="1.2"/>
<!-- Compile only classes depending on ViewerHelper to reduce Jar size -->
<javac srcdir="src" destdir="build/classes"
encoding="ISO-8859-1" target="1.5">
<include name="com/eteks/sweethome3d/applet/ViewerHelper.java"/>
<include name="com/eteks/sweethome3d/io/DefaultPatternTexture.java"/>
<!-- Use lib as an extension directory to override default Java 3D libraries -->
<extdirs>
<pathelement location="lib"/>
</extdirs>
<classpath>
<pathelement location="libtest/jnlp.jar"/>
</classpath>
</javac>
<!-- Copy only resources used by viewer -->
<copy todir="build/classes">
<fileset dir="src">
<include name="com/eteks/sweethome3d/applet/*.properties"/>
<include name="com/eteks/sweethome3d/model/*.properties"/>
<include name="com/eteks/sweethome3d/tools/*.properties"/>
<include name="com/eteks/sweethome3d/io/resources/patterns/*.png"/>
<include name="com/eteks/sweethome3d/swing/resources/icons/tango/go-*.png"/>
<include name="com/eteks/sweethome3d/swing/HomeComponent3D.properties"/>
</fileset>
</copy>
<!-- Create SweetHome3DViewer.jar containing only classes and resources required by Sweet Home 3D Viewer -->
<mkdir dir="deploy/lib"/>
<zip destfile="deploy/lib/SweetHome3DViewer.jar"
basedir="build/classes">
<include name="com/eteks/sweethome3d/applet/*"/>
<include name="com/eteks/sweethome3d/io/**"/>
<include name="com/eteks/sweethome3d/j3d/*"/>
<include name="com/eteks/sweethome3d/model/*"/>
<include name="com/eteks/sweethome3d/swing/**"/>
<include name="com/eteks/sweethome3d/tools/*"/>
<include name="com/eteks/sweethome3d/viewcontroller/*View*"/>
<include name="com/eteks/sweethome3d/viewcontroller/Controller.*"/>
<include name="com/eteks/sweethome3d/viewcontroller/ContentManager*"/>
<include name="com/eteks/sweethome3d/viewcontroller/HomeController3D*"/>
<include name="com/eteks/sweethome3d/viewcontroller/Object3DFactory*"/>
<include name="com/eteks/sweethome3d/viewcontroller/ThreadedTaskController*"/>
</zip>
<delete dir="build/classes"/>
<!-- Create java3d.jar containing Java 3D DLLs and jars for Windows, Linux and Mac OS X
(this library is used for Java versions older than Java SE 6 update 10) -->
<zip destfile="deploy/lib/java3d.jar">
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/**/*.dll"/>
<include name="linux/**/*.so"/>
<include name="macosx/**/*.jnilib"/>
<include name="macosx/**/*.jar"/>
<exclude name="macosx/*/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="macosx/java3d-1.6/jogl-java3d.jar"/>
</fileset>
</zip>
<!-- Copy other jar files -->
<copy todir="deploy/lib">
<fileset dir="lib">
<include name="*.jar"/>
<exclude name="j3dcore.jar"/>
<exclude name="j3dutils.jar"/>
<exclude name="vecmath.jar"/>
<!-- No Print to PDF, Export to SVG, Export to PNG and Create video in viewer -->
<exclude name="iText-2.1.7.jar"/>
<exclude name="freehep-vectorgraphics-svg-2.1.1.jar"/>
<exclude name="sunflow-0.07.3h.jar"/>
<exclude name="jmf.jar"/>
</fileset>
</copy>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:"
addproperty="password"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.keytool"
alias="SweetHome3D" storepass="${password}">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="jarExecutable" depends="application,furniture,textures,help"
description="Builds install/SweetHome3D-version.jar executable Jar">
<!-- Create SweetHome3D-version.jar containing Sweet Home 3D classes and resources,
and other DLLs and jars -->
<jar destfile="install/SweetHome3D-${version}.jar">
<manifest>
<attribute name="Main-Class" value="com.eteks.sweethome3d.SweetHome3DBootstrap"/>
</manifest>
<zipfileset src="build/SweetHome3D.jar"/>
<zipfileset src="build/Furniture.jar"/>
<zipfileset src="build/Textures.jar"/>
<zipfileset src="build/Help.jar"/>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/**/*.dll"/>
<include name="linux/**/*.so"/>
<include name="macosx/*.jnilib"/>
<include name="macosx/*.jar"/>
</fileset>
<fileset dir="libtest">
<include name="jnlp.jar"/>
</fileset>
<fileset dir=".">
<include name="LICENSE.TXT"/>
<include name="COPYING.TXT"/>
<include name="THIRDPARTY-LICENSE-JAVA3D.TXT"/>
<include name="THIRDPARTY-LICENSE-LOADER3DS.TXT"/>
<include name="THIRDPARTY-LICENSE-BATIK.TXT"/>
<include name="THIRDPARTY-LICENSE-ITEXT.TXT"/>
<include name="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT"/>
<include name="THIRDPARTY-LICENSE-SUNFLOW.TXT"/>
<include name="THIRDPARTY-LICENSE-JMF.HTML"/>
<include name="THIRDPARTY-LICENSE-TANGO.TXT"/>
<include name="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT"/>
</fileset>
</jar>
<!-- Clean build directory -->
<delete dir="build"/>
<echo message="install/SweetHome3D-${version}.jar ready for ftp"/>
</target>
<!-- Builds Sweet Home 3D Windows launcher in install/windows/build directory.
CAUTION : May be run only under Windows and requires a Windows 32 bits JRE and launch4j
installed in their default location -->
<target name="windowsLauncher" depends="application,furniture,textures,help"
description="Builds Sweet Home 3D Windows launcher">
<!-- Copy SweetHome3D JARs and Windows Java 3D DLLs and JARs for Java 3D
to install/windows/build/lib -->
<mkdir dir="install/windows/build/lib"/>
<move file="build/SweetHome3D.jar" todir="install/windows/build/lib" />
<move file="build/Furniture.jar" todir="install/windows/build/lib" />
<move file="build/Textures.jar" todir="install/windows/build/lib" />
<move file="build/Help.jar" todir="install/windows/build/lib" />
<copy todir="install/windows/build/lib" >
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/windows/i386">
<include name="*.dll"/>
</fileset>
</copy>
<!-- Copy COPYING.TXT and licenses texts to install/windows/build/ -->
<copy file="COPYING.TXT" todir="install/windows/build"/>
<copy file="LICENSE.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-JAVA.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-LOADER3DS.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/windows/build"/>
<copy file="THIRDPARTY-LICENSE-ITEXT.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/windows/build"/>
<copy file="THIRDPARTY-LICENSE-LAUNCH4J.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-INNOSETUP.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-TANGO.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/windows/build" />
<!-- Copy JRE to install/windows/build/jre... excluding files mentioned
in JRE README.TXT file (JRE bin/javaw.exe command excepted) -->
<copy todir="install/windows/build/jre6">
<fileset dir="C:\Program Files\Java\jre6">
<include name="*"/>
<include name="bin/**"/>
<include name="lib/**"/>
<exclude name="lib/ext/sunjce_provider.jar"/>
<exclude name="bin/rmid.exe"/>
<exclude name="bin/rmiregistry.exe"/>
<exclude name="bin/tnameserv.exe"/>
<exclude name="bin/keytool.exe"/>
<exclude name="bin/kinit.exe"/>
<exclude name="bin/klist.exe"/>
<exclude name="bin/ktab.exe"/>
<exclude name="bin/policytool.exe"/>
<exclude name="bin/orbd.exe"/>
<exclude name="bin/servertool.exe"/>
<exclude name="bin/java.exe"/>
<exclude name="bin/javaws.exe"/>
<exclude name="bin/javacpl.exe"/>
<exclude name="bin/jucheck.exe"/>
<exclude name="bin/jusched.exe"/>
<exclude name="bin/wsdetect.dll"/>
<exclude name="bin/npjava*.dll"/>
<exclude name="bin/npjpi*.dll"/>
<exclude name="bin/npoji610.dll"/>
<exclude name="bin/regutils.dll"/>
<exclude name="bin/axbridge.dll"/>
<exclude name="bin/deploy.dll"/>
<exclude name="bin/jpicom.dll"/>
<exclude name="bin/javacpl.cpl"/>
<exclude name="bin/jpiexp.dll"/>
<exclude name="bin/jpinscp.dll"/>
<exclude name="bin/jpioji.dll"/>
<exclude name="bin/jpishare.dll"/>
<exclude name="lib/deploy.jar"/>
<exclude name="lib/plugin.jar"/>
<exclude name="lib/deploy/messages*.properties"/>
<exclude name="lib/deploy/splash.jpg"/>
</fileset>
</copy>
<!-- Create SweetHome3D.exe with launch4j -->
<exec executable="C:\Program Files\Launch4j\launch4jc.exe">
<arg value="${basedir}\install\windows\installerLaunch4j.xml"/>
</exec>
</target>
<!-- Builds install/SweetHome3D-version-windows.exe installer able to install SweetHome3D.exe
with a Windows JRE and Sweet Home 3D libraries.
CAUTION : May be run only under Windows and requires a Windows 32 bits JRE, launch4j and Inno Setup
installed in their default location -->
<target name="windowsInstaller" depends="windowsLauncher"
description="Builds install/SweetHome3D-version-windows.exe installer">
<!-- Create SweetHome3D-version-windows.exe with Inno Setup -->
<exec executable="C:\Program Files\Inno Setup 5\ISCC.exe">
<arg value="${basedir}\install\windows\installerInnoSetup.iss"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/windows/build"/>
<echo message="install/SweetHome3D-${version}-windows.exe ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-windows.exe signed installer able to install SweetHome3D.exe
with a Windows JRE and Sweet Home 3D libraries.
CAUTION : May be run only under Windows and requires a Windows 32 bits JRE, launch4j, Inno Setup
and SignTool included in Windows platform SDK installed in their default location -->
<target name="windowsSignedInstaller" depends="windowsLauncher"
description="Builds install/SweetHome3D-version-windows.exe installer">
<input message="Enter signature password:"
addproperty="password"/>
<!-- Sign Sweet Home 3D launcher -->
<exec executable="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe">
<arg value="sign"/>
<arg value="/f"/>
<arg value="${basedir}\install\windows\keys.pfx"/>
<arg value="/p"/>
<arg value="${password}"/>
<arg value="${basedir}\install\windows\build\SweetHome3D.exe"/>
</exec>
<!-- Create signed SweetHome3D-version-windows.exe with Inno Setup -->
<exec executable="C:\Program Files\Inno Setup 5\ISCC.exe">
<arg value="/sSignToolPgm=$$qC:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe$$q sign /f $$q${basedir}\install\windows\keys.pfx$$q /p ${password} $p"/>
<arg value="${basedir}\install\windows\signedInstallerInnoSetup.iss"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/windows/build"/>
<echo message="signed install/SweetHome3D-${version}-windows.exe ready for ftp"/>
</target>
<!-- Builds Sweet Home 3D Mac OS X application bundle in install/macosx/SweetHome3D-version directory. -->
<target name="macosxBundle" depends="application,furniture,textures,help"
description="Builds Sweet Home 3D Mac OS X application bundle">
<!-- Copy Sweet Home 3D files to install/macosx/SweetHome3D-version/Sweet Home 3D.app -->
<mkdir dir="install/macosx/SweetHome3D-${version}/"/>
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app">
<fileset dir="install/macosx/Sweet Home 3D"/>
</copy>
<!-- Change executable permission of SweetHome3D lost during copy task -->
<chmod perm="+x" file="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/MacOS/SweetHome3D"/>
<!-- Copy SweetHome3D JARs and its direct libs
to install/macosx/SweetHome3D-version/Sweet Home 3D.app/Contents/Resources/Java -->
<mkdir dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext"/>
<move file="build/SweetHome3D.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Furniture.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Textures.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Help.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" >
<fileset dir="lib">
<include name="*.jar"/>
<exclude name="jmf.jar"/>
<exclude name="j3dcore.jar"/>
<exclude name="j3dutils.jar"/>
<exclude name="vecmath.jar"/>
<!-- Print to PDF menu item isn't available under Mac OS X as it's already in standard print dialog -->
<exclude name="iText-2.1.7.jar"/>
</fileset>
</copy>
<!-- Copy jnlp.jar, JMF and Mac OS X Java 3D 1.5 DLLs and JARs for Java 3D
to install/macosx/SweetHome3D-version/Sweet Home 3D.app/Contents/Resources/Java/ext -->
<copy file="libtest/jnlp.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext"/>
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext" >
<fileset dir="lib">
<include name="jmf.jar"/>
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib/macosx">
<include name="*.jar"/>
<include name="*.jnilib"/>
</fileset>
</copy>
<!-- Copy COPYING.TXT and licenses texts to install/macosx/SweetHome3D-version/ -->
<copy file="COPYING.TXT" todir="install/macosx/SweetHome3D-${version}"/>
<copy file="LICENSE.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-LOADER3DS.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/macosx/SweetHome3D-${version}"/>
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-TANGO.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/macosx/SweetHome3D-${version}" />
</target>
<!-- Builds install/SweetHome3D-version-macosx.dmg archive that contains SweetHome3D.app
and Sweet Home 3D libraries.
CAUTION : May be run only under Mac OS X and requires Disk Utility -->
<target name="macosxInstaller" depends="macosxBundle"
description="Builds install/SweetHome3D-version-macosx.dmg archive">
<!-- Create install/SweetHome3D-version-macosx.dmg with Disk Utility -->
<delete file="install/SweetHome3D-${version}-macosx.dmg"/>
<exec executable="hdiutil">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="install/macosx/SweetHome3D-${version}"/>
<arg value="install/SweetHome3D-${version}-macosx.dmg"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/macosx/SweetHome3D-${version}"/>
<echo message="install/SweetHome3D-${version}-macosx.dmg ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-macosx.dmg signed archive that contains SweetHome3D.app
and Sweet Home 3D libraries.
CAUTION : May be run only under Mac OS X and requires hdutil, codesign
and a certificate imported in Keychain Access -->
<target name="macosxSignedInstaller" depends="macosxBundle"
description="Builds install/SweetHome3D-version-macosx.dmg archive">
<input message="Enter certificate name:" addproperty="certificateName"/>
<!-- Sign Sweet Home 3D application bundle -->
<exec executable="codesign">
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app"/>
</exec>
<!-- Create install/SweetHome3D-version-macosx.dmg with Disk Utility -->
<delete file="install/SweetHome3D-${version}-macosx.dmg"/>
<exec executable="hdiutil">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="install/macosx/SweetHome3D-${version}"/>
<arg value="install/SweetHome3D-${version}-macosx.dmg"/>
</exec>
<!-- Sign Sweet Home 3D DMG image -->
<exec executable="codesign">
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="install/SweetHome3D-${version}-macosx.dmg"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/macosx/SweetHome3D-${version}"/>
<echo message="signed install/SweetHome3D-${version}-macosx.dmg ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-linux-x86.tgz archive that contains SweetHome3D command
with a Linux JRE and Sweet Home 3D libraries.
CAUTION : Requires a Linux 32 bits JRE installed in jre1.6.0_45 -->
<target name="linux32Installer" depends="application,furniture,textures,help"
description="Builds install/SweetHome3D-version-linux-x86.tgz archive">
<!-- Copy SweetHome3D.jar and Linux Java 3D DLLs and JARs for Java 3D
to install/linux/i386/SweetHome3D-version/lib -->
<mkdir dir="install/linux/i386/SweetHome3D-${version}/lib"/>
<!-- Copy SweetHome3D command -->
<copy todir="install/linux/i386/SweetHome3D-${version}/"
file="install/linux/SweetHome3D"/>
<!-- Copy SweetHome3D JARs and its direct libs
to install/linux/i386/SweetHome3D-version/lib -->
<move file="build/SweetHome3D.jar" todir="install/linux/i386/SweetHome3D-${version}/lib" />
<move file="build/Furniture.jar" todir="install/linux/i386/SweetHome3D-${version}/lib" />
<move file="build/Textures.jar" todir="install/linux/i386/SweetHome3D-${version}/lib" />
<move file="build/Help.jar" todir="install/linux/i386/SweetHome3D-${version}/lib" />
<copy todir="install/linux/i386/SweetHome3D-${version}/lib" >
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/linux/i386">
<include name="*.so"/>
</fileset>
</copy>
<copy file="COPYING.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="LICENSE.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-LOADER3DS.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/linux/i386/SweetHome3D-${version}"/>
<copy file="THIRDPARTY-LICENSE-ITEXT.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-TANGO.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/linux/i386/SweetHome3D-${version}" />
<!-- Copy JRE to install/linux/i386/SweetHome3D-version/jre... excluding files mentioned
in JRE README.TXT file (JRE bin/java command excepted) -->
<copy todir="install/linux/i386/SweetHome3D-${version}/jre1.6.0_45">
<fileset dir="jre1.6.0_45">
<include name="**"/>
<exclude name="lib/ext/sunjce_provider.jar"/>
<exclude name="bin/rmid"/>
<exclude name="bin/rmiregistry"/>
<exclude name="bin/tnameserv"/>
<exclude name="bin/keytool"/>
<exclude name="bin/policytool"/>
<exclude name="bin/orbd"/>
<exclude name="bin/servertool"/>
</fileset>
</copy>
<!-- Create SweetHome3D-version-linux-x86.tgz archive -->
<tar destfile="install/SweetHome3D-${version}-linux-x86.tgz"
compression="gzip">
<tarfileset dir="install/linux/i386"
includes="SweetHome3D-${version}/**">
<exclude name="SweetHome3D-${version}/SweetHome3D"/>
<exclude name="SweetHome3D-${version}/jre1.6.0_45/bin/java"/>
</tarfileset>
<!-- Change executable permission of SweetHome3D and java commands -->
<tarfileset dir="install/linux/i386" mode="755">
<include name="SweetHome3D-${version}/SweetHome3D"/>
<include name="SweetHome3D-${version}/jre1.6.0_45/bin/java"/>
</tarfileset>
</tar>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/linux/i386"/>
<echo message="install/SweetHome3D-${version}-linux-x86.tgz ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-linux-x64.tgz archive that contains SweetHome3D command
with a Linux JRE and Sweet Home 3D libraries.
CAUTION : Requires a Linux 64 bits JRE installed in jre1.6.0_45 -->
<target name="linux64Installer" depends="application,furniture,textures,help"
description="Builds install/SweetHome3D-version-linux-x64.tgz archive">
<!-- Copy SweetHome3D.jar and Linux Java 3D DLLs and JARs for Java 3D
to install/linux/x64/SweetHome3D-version/lib -->
<mkdir dir="install/linux/x64/SweetHome3D-${version}/lib"/>
<!-- Copy SweetHome3D command -->
<copy todir="install/linux/x64/SweetHome3D-${version}/"
file="install/linux/SweetHome3D"/>
<!-- Copy SweetHome3D JARs and its direct libs
to install/linux/x64/SweetHome3D-version/lib -->
<move file="build/SweetHome3D.jar" todir="install/linux/x64/SweetHome3D-${version}/lib" />
<move file="build/Furniture.jar" todir="install/linux/x64/SweetHome3D-${version}/lib" />
<move file="build/Textures.jar" todir="install/linux/x64/SweetHome3D-${version}/lib" />
<move file="build/Help.jar" todir="install/linux/x64/SweetHome3D-${version}/lib" />
<copy todir="install/linux/x64/SweetHome3D-${version}/lib" >
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="lib/linux/x64">
<include name="*.so"/>
</fileset>
</copy>
<copy file="COPYING.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="LICENSE.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-LOADER3DS.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/linux/x64/SweetHome3D-${version}"/>
<copy file="THIRDPARTY-LICENSE-ITEXT.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-TANGO.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<!-- Copy JRE to install/linux/x64/SweetHome3D-version/jre... excluding files mentioned
in JRE README.TXT file (JRE bin/java command excepted) -->
<copy todir="install/linux/x64/SweetHome3D-${version}/jre1.6.0_45">
<fileset dir="jre1.6.0_45">
<include name="**"/>
<exclude name="lib/ext/sunjce_provider.jar"/>
<exclude name="bin/rmid"/>
<exclude name="bin/rmiregistry"/>
<exclude name="bin/tnameserv"/>
<exclude name="bin/keytool"/>
<exclude name="bin/policytool"/>
<exclude name="bin/orbd"/>
<exclude name="bin/servertool"/>
</fileset>
</copy>
<!-- Create SweetHome3D-version-linux-x64.tgz archive -->
<tar destfile="install/SweetHome3D-${version}-linux-x64.tgz"
compression="gzip">
<tarfileset dir="install/linux/x64"
includes="SweetHome3D-${version}/**">
<exclude name="SweetHome3D-${version}/SweetHome3D"/>
<exclude name="SweetHome3D-${version}/jre1.6.0_45/bin/java"/>
</tarfileset>
<!-- Change executable permission of SweetHome3D and java commands -->
<tarfileset dir="install/linux/x64" mode="755">
<include name="SweetHome3D-${version}/SweetHome3D"/>
<include name="SweetHome3D-${version}/jre1.6.0_45/bin/java"/>
</tarfileset>
</tar>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/linux/x64"/>
<echo message="install/SweetHome3D-${version}-linux-x64.tgz ready for ftp"/>
</target>
<!-- Builds Sweet Home 3D Windows signed portable launchers in install/portable/SweetHome3D-version-portable directory.
CAUTION : May be run only under Windows and requires launch4j and SignTool
included in Windows platform SDK installed in their default location -->
<target name="windowsSignedPortableLaunchers"
description="Builds Sweet Home 3D Windows portable launchers">
<!-- Create portable executable files with launch4j -->
<exec executable="C:\Program Files\Launch4j\launch4jc.exe">
<arg value="${basedir}\install\portable\SweetHome3D-windows-x86.xml"/>
</exec>
<exec executable="C:\Program Files\Launch4j\launch4jc.exe">
<arg value="${basedir}\install\portable\SweetHome3D-windows-x64.xml"/>
</exec>
<input message="Enter signature password:"
addproperty="password"/>
<!-- Sign launchers -->
<exec executable="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe">
<arg value="sign"/>
<arg value="/f"/>
<arg value="${basedir}\install\windows\keys.pfx"/>
<arg value="/p"/>
<arg value="${password}"/>
<arg value="${basedir}\install\portable\SweetHome3D-windows-x86.exe"/>
<arg value="${basedir}\install\portable\SweetHome3D-windows-x64.exe"/>
</exec>
<mkdir dir="install/portable/SweetHome3D-${version}-portable"/>
<move file="install/portable/SweetHome3D-windows-x86.exe" todir="install/portable/SweetHome3D-${version}-portable" />
<move file="install/portable/SweetHome3D-windows-x64.exe" todir="install/portable/SweetHome3D-${version}-portable" />
</target>
<!-- Builds install/portable/SweetHome3D-version-portable files required for SweetHome3D portable version -->
<target name="portableArchive" depends="application,furniture,textures,help"
description="Builds install/portable/SweetHome3D-version-portable files">
<!-- Copy SweetHome3D JARs and its libs
to install/portable/SweetHome3D-${version}/lib -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/lib/ext"/>
<move file="build/SweetHome3D.jar" todir="install/portable/SweetHome3D-${version}-portable/lib" />
<move file="build/Furniture.jar" todir="install/portable/SweetHome3D-${version}-portable/lib" />
<move file="build/Textures.jar" todir="install/portable/SweetHome3D-${version}-portable/lib" />
<move file="build/Help.jar" todir="install/portable/SweetHome3D-${version}-portable/lib" />
<copy todir="install/portable/SweetHome3D-${version}-portable/lib" >
<fileset dir="lib">
<include name="*.jar"/>
<exclude name="jmf.jar"/>
<exclude name="j3dcore.jar"/>
<exclude name="j3dutils.jar"/>
<exclude name="vecmath.jar"/>
</fileset>
</copy>
<!-- Copy jnlp.jar, JMF and DLLs and JARs for Java 3D
to install/portable/SweetHome3D-${version}-portable/lib/ext -->
<copy file="libtest/jnlp.jar" todir="install/portable/SweetHome3D-${version}-portable/lib/ext"/>
<copy todir="install/portable/SweetHome3D-${version}-portable/lib/ext">
<fileset dir="lib">
<include name="jmf.jar"/>
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
<include name="windows/**"/>
<include name="linux/**"/>
<include name="macosx/*"/>
</fileset>
</copy>
<!-- Copy README.TXT and licenses texts to install/macosx/SweetHome3D-version/ -->
<copy file="install/portable/README.TXT" todir="install/portable/SweetHome3D-${version}-portable"/>
<copy file="COPYING.TXT" todir="install/portable/SweetHome3D-${version}-portable"/>
<copy file="LICENSE.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JAVA.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-LOADER3DS.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/portable/SweetHome3D-${version}-portable"/>
<copy file="THIRDPARTY-LICENSE-ITEXT.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-LAUNCH4J.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-TANGO.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<!-- Copy Mac OS X application bundle using a different Info.plist file -->
<copy todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app">
<fileset dir="install/macosx/Sweet Home 3D"/>
</copy>
<copy file="install/portable/Info.plist" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents" overwrite="true"/>
<!-- Change executable permission of SweetHome3D lost during copy task -->
<chmod perm="+x" file="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/MacOS/SweetHome3D"/>
<!-- Copy Linux command files -->
<copy file="install/portable/SweetHome3D-linux-x86" todir="install/portable/SweetHome3D-${version}-portable"/>
<copy file="install/portable/SweetHome3D-linux-x64" todir="install/portable/SweetHome3D-${version}-portable"/>
<!-- Change executable permission of command files lost during copy task -->
<chmod perm="+x" file="install/portable/SweetHome3D-${version}-portable/SweetHome3D-linux-*"/>
<!-- Prepare bundle jre directories -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/jre/windows/i586"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/jre/windows/x64"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/jre/linux/i586"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/jre/linux/x64"/>