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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778
|
<?xml version="1.0"?>
<!-- build.xml
Sweet Home 3D, Copyright (c) 2007-2022 Emmanuel PUYBARET / eTeks <info@eteks.com>.
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
- examples : Builds Examples.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
- macosx10.4Installer : Builds SweetHome3D-version-macosx-10.4-10.9.dmg file in install directory
- macosx10.4SignedInstaller : Builds signed SweetHome3D-version-macosx-10.4-10.9.dmg 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">
<!-- Current version of Sweet Home 3D -->
<property name="version" value="7.0.2"/>
<!-- Java source and target compatiblity (Java 9 and higher doesn't support 1.5) -->
<condition property="appletClassSource" value="1.2" else="1.7">
<matches string="${ant.java.version}" pattern="1\.5|1\.6|1\7|1\.8"/>
</condition>
<condition property="appletClassTarget" value="1.1" else="1.7">
<matches string="${ant.java.version}" pattern="1\.5|1\.6|1\7|1\.8"/>
</condition>
<condition property="classSource" value="1.5" else="1.7">
<matches string="${ant.java.version}" pattern="1\.5|1\.6|1\7|1\.8"/>
</condition>
<condition property="classTarget" value="1.5" else="1.7">
<matches string="${ant.java.version}" pattern="1\.5|1\.6|1\7|1\.8"/>
</condition>
<!-- JRE or OpenJDK home for Windows, Mac OS X and Linux -->
<property name="javaHome_windows_x86" value="C:\Program Files (x86)\Java\jre1.8.0_202"/>
<property name="javaHome_windows_x64" value="C:\Program Files\OpenJDK\zulu11.45.27-ca-jdk11.0.10-win_x64"/>
<property name="javaHome_macosx_x86_64" value="/Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_x86_64.jdk/Contents/Home"/>
<property name="javaHome_macosx_arm64" value="/Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_aarch64.jdk/Contents/Home"/>
<property name="javaHome_linux_x86" value="jre1.8.0_202"/>
<property name="javaHome_linux_x64" value="jre1.8.0_202"/>
<target name="build"
description="Builds build/SweetHome3D.jar with all its classes">
<echo message="compiling Sweet Home 3D for Java ${classTarget} minimum version"/>
<!-- 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="${appletClassTarget}" source="${appletClassSource}"
debug="false" debuglevel="lines,vars,source"/>
<!-- Compile other classes -->
<javac srcdir="src" destdir="build/classes"
encoding="ISO-8859-1" target="${classTarget}" source="${classSource}"
debug="false" debuglevel="lines,vars,source">
<!-- Use lib as an extension directory to override default Java 3D libraries -->
<extdirs>
<pathelement location="/usr/share/java"/>
<pathelement location="/usr/share/icedtea-web"/>
</extdirs>
<classpath>
<pathelement location="libtest/AppleJavaExtensions.jar"/>
<pathelement location="libtest/javaAwtDesktop.jar"/>
<pathelement location="libtest/jnlp.jar"/>
</classpath>
<exclude name="com/eteks/sweethome3d/swing/VideoPanel.java"/>
<exclude name="com/eteks/sweethome3d/viewcontroller/VideoController.java"/>
<exclude name="com/eteks/sweethome3d/MacOSXConfiguration.java"/>
</javac>
<!-- Copy resources excepted furniture, textures and help files -->
<copy todir="build/classes">
<fileset dir="src">
<include name="**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.cpp"/>
<exclude name="**/*.h"/>
<exclude name="**/package.html"/>
<exclude name="com/eteks/sweethome3d/io/*Catalog*.properties"/>
<exclude name="com/eteks/sweethome3d/io/resources/**"/>
<exclude name="**/help/**"/>
<exclude name="**/*.svg"/>
</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/*ContributedFurnitureCatalog*.properties"/>
<exclude name="com/eteks/sweethome3d/io/resources/textures/**"/>
<exclude name="com/eteks/sweethome3d/io/resources/patterns/**"/>
<exclude name="com/eteks/sweethome3d/io/resources/examples/**"/>
</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="examples"
description="Builds build/Examples.jar that contains the examples files">
<mkdir dir="build"/>
<zip destfile="build/Examples.jar" basedir="src">
<include name="com/eteks/sweethome3d/io/resources/examples/**"/>
</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/java3d-1.6/jogl-java3d.jar">
<zipfileset src="lib/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/java3d-1.6/jogl-all.jar"
includes="com/jogamp/opengl/util/GLBuffers.class"/>
</zip>
</target>
<target name="manifest"
description="Builds build/META-INF/MANIFEST.MF with security attributes">
<mkdir dir="build/META-INF"/>
<manifest file="build/META-INF/MANIFEST.MF">
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</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 bit 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="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="java3d-1.6/windows/i586/*.dll"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Windows 64 bit 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="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="java3d-1.6/windows/amd64/*.dll"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Linux 32 bit 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="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="java3d-1.6/linux/i586/*.so"/>
</fileset>
</jar>
<!-- Create java3d.jar containing Linux 64 bit 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="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="java3d-1.6/linux/amd64/*.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"/>
<include name="macosx/*.jar"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="macosx/*.jnilib"/>
<include name="java3d-1.6/macosx/*.dylib"/>
</fileset>
</jar>
</target>
<target name="java3dAllSystemsLibrary" depends="jogl-java3d"
description="Builds applet Java 3D library suitable for all systems in deploy/lib subdirectory">
<mkdir dir="deploy/lib"/>
<!-- 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) -->
<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"/>
<include name="macosx/*.jar"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="java3d-1.6/windows/**/*.dll"/>
<include name="java3d-1.6/linux/**/*.so"/>
<include name="macosx/*.jnilib"/>
<include name="java3d-1.6/macosx/*.dylib"/>
</fileset>
</jar>
</target>
<target name="viewerLibraries"
description="Copies to deploy/lib the base libraries used by Sweet Home 3D Viewer">
<mkdir dir="deploy/lib"/>
<!-- Copy jar files adding to their manifest security attributes
(these attributes are necessary to be able to call applet methods from JavaScript) -->
<jar destfile="deploy/lib/batik-svgpathparser-1.7.jar">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/batik-svgpathparser-1.7.jar"/>
</jar>
<!-- No Print to PDF, Export to SVG, Export to PNG and Create video in viewer -->
</target>
<target name="otherLibraries" depends="viewerLibraries"
description="Copies to deploy/lib the libraries used by Sweet Home 3D">
<mkdir dir="deploy/lib"/>
<!-- Copy jar files adding to their manifest attributes necessary
to be able to call applet methods from JavaScript -->
<jar destfile="deploy/lib/jeksparser-calculator.jar" filesetmanifest="merge">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/jeksparser-calculator.jar"/>
</jar>
<jar destfile="deploy/lib/freehep-vectorgraphics-svg-2.1.1c.jar" filesetmanifest="merge">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/freehep-vectorgraphics-svg-2.1.1c.jar"/>
</jar>
<jar destfile="deploy/lib/sunflow-0.07.3i.jar" filesetmanifest="merge">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/sunflow-0.07.3i.jar"/>
</jar>
<jar destfile="deploy/lib/iText-2.1.7.jar" filesetmanifest="merge">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/iText-2.1.7.jar"/>
</jar>
<jar destfile="deploy/lib/jmf.jar">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<attribute name="Caller-Allowable-Codebase" value="*"/>
</manifest>
<zipfileset src="lib/jmf.jar"/>
</jar>
</target>
<target name="javaWebStart" depends="application,furniture,textures,examples,help,java3dLibraries,otherLibraries,manifest"
description="Builds deploy/lib/SweetHome3D.jar and signs jars required by Sweet Home 3D with Java Web Start">
<!-- Build SweetHome3DJavaWebStart.jar file containing signed JNLP file -->
<mkdir dir="build/JNLP-INF"/>
<copy file="deploy/SweetHome3D.jnlp" tofile="build/JNLP-INF/APPLICATION.JNLP"/>
<mkdir dir="deploy/lib"/>
<jar destfile="deploy/lib/SweetHome3DJavaWebStart.jar" manifest="build/META-INF/MANIFEST.MF" filesetmanifest="merge">
<manifest>
<attribute name="Application-Name" value="Sweet Home 3D"/>
</manifest>
<fileset dir="build" includes="JNLP-INF/APPLICATION.JNLP"/>
</jar>
<!-- Build SweetHome3D.jar file from the content of built jars -->
<jar destfile="deploy/lib/SweetHome3D.jar" manifest="build/META-INF/MANIFEST.MF" filesetmanifest="merge">
<manifest>
<attribute name="Application-Name" value="Sweet Home 3D"/>
</manifest>
<zipfileset src="build/SweetHome3D.jar"/>
<zipfileset src="build/Furniture.jar"/>
<zipfileset src="build/Textures.jar"/>
<zipfileset src="build/Examples.jar"/>
<zipfileset src="build/Help.jar"/>
</jar>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:" addproperty="password"/>
<input message="Enter URL of timestamp authority:" addproperty="timestampAuthorityURL" defaultvalue="http://time.certum.pl/"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.p12" alias="SweetHome3D" storepass="${password}" tsaurl="${timestampAuthorityURL}" storetype="pkcs12">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="applet" depends="build,java3dLibraries,java3dAllSystemsLibrary,otherLibraries"
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"/>
<copy file="deploy/SweetHome3DApplet.jnlp" tofile="build/JNLP-INF/APPLICATION.JNLP"/>
<input message="Enter domain name where applet will be hosted:" addproperty="domain"/>
<jar destfile="deploy/lib/SweetHome3DApplet.jar">
<manifest>
<attribute name="Application-Name" value="Sweet Home 3D Online"/>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Codebase" value="*"/>
<!-- From Java 7u55, specifying domain is mandatory to call applet methods from JavaScript
without security warning -->
<attribute name="Caller-Allowable-Codebase" value="${domain}"/>
</manifest>
<fileset dir="build" includes="JNLP-INF/APPLICATION.JNLP"/>
<zipfileset src="build/SweetHome3D.jar"
excludes="com/eteks/sweethome3d/*.*, com/eteks/sweethome3d/resources/**, com/eteks/sweethome3d/applet/*Viewer*.*"/>
</jar>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:" addproperty="password"/>
<input message="Enter URL of timestamp authority:" addproperty="timestampAuthorityURL" defaultvalue="http://time.certum.pl/"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.p12" alias="SweetHome3D" storepass="${password}" tsaurl="${timestampAuthorityURL}" storetype="pkcs12">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="viewer" depends="java3dLibraries,java3dAllSystemsLibrary,viewerLibraries,manifest"
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="${appletClassTarget}" source="${appletClassSource}"
debug="false" debuglevel="lines,vars,source"/>
<!-- Compile only classes depending on ViewerHelper to reduce Jar size -->
<javac srcdir="src" destdir="build/classes"
encoding="ISO-8859-1" target="${classTarget}" source="${classSource}"
debug="false" debuglevel="lines,vars,source">
<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/AppleJavaExtensions.jar"/>
<pathelement location="libtest/javaAwtDesktop.jar"/>
<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"/>
<copy file="deploy/SweetHome3DViewer.jnlp" tofile="build/JNLP-INF/APPLICATION.JNLP"/>
<jar destfile="deploy/lib/SweetHome3DViewer.jar"
basedir="build/classes" manifest="build/META-INF/MANIFEST.MF" filesetmanifest="merge">
<manifest>
<attribute name="Application-Name" value="Sweet Home 3D Viewer"/>
</manifest>
<fileset dir="build" includes="JNLP-INF/APPLICATION.JNLP"/>
<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*"/>
</jar>
<!-- Clean build directory -->
<delete dir="build"/>
<input message="Enter Passphrase for keystore:" addproperty="password"/>
<input message="Enter URL of timestamp authority:" addproperty="timestampAuthorityURL" defaultvalue="http://time.certum.pl/"/>
<!-- Sign jar files in deploy/lib dir -->
<signjar keystore="keys.p12" alias="SweetHome3D" storepass="${password}" tsaurl="${timestampAuthorityURL}" storetype="pkcs12">
<fileset dir="deploy/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
<echo message="deploy dir ready for ftp"/>
</target>
<target name="jarExecutable" depends="application,furniture,textures,examples,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"/>
<attribute name="Class-Path" value="/usr/share/java/j3dcore.jar /usr/share/java/j3dutils.jar /usr/share/java/vecmath.jar /usr/share/java/sunflow.jar /usr/share/java/itext.jar /usr/share/java/janino.jar /usr/share/java/freehep-graphics2d.jar /usr/share/java/freehep-graphicsio.jar /usr/share/java/freehep-graphicsio-svg.jar /usr/share/icedtea-web/netx.jar /usr/lib/jvm/java-6-sun/jre/lib/javaws.jar"/>
</manifest>
<zipfileset src="build/SweetHome3D.jar"/>
<zipfileset src="build/Furniture.jar"/>
<zipfileset src="build/Textures.jar"/>
<zipfileset src="build/Examples.jar"/>
<zipfileset src="build/Help.jar"/>
<fileset dir="lib">
<include name="*.jar"/>
<include name="macosx/*.jar"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="windows/**/*.dll"/>
<include name="java3d-1.6/windows/**/*.dll"/>
<include name="yafaray/windows/**/*.dll"/>
<include name="linux/**/*.so"/>
<include name="java3d-1.6/linux/**/*.so"/>
<include name="yafaray/linux/**/*.so"/>
<include name="macosx/*.jnilib"/>
<include name="java3d-1.6/macosx/*.dylib"/>
<include name="yafaray/macosx/**/*.dylib"/>
</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-JOGL.TXT"/>
<include name="THIRDPARTY-LICENSE-BATIK.TXT"/>
<include name="THIRDPARTY-LICENSE-JEKSPARSER.TXT"/>
<include name="THIRDPARTY-LICENSE-ITEXT.TXT"/>
<include name="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT"/>
<include name="THIRDPARTY-LICENSE-SUNFLOW.TXT"/>
<include name="THIRDPARTY-LICENSE-YAFARAY.TXT"/>
<include name="THIRDPARTY-LICENSE-JMF.HTML"/>
</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 64 bit and requires Windows 32 bit JRE 1.8.0_202,
64 bit OpenJDK and launch4j installed in their default location -->
<target name="windowsLauncher" depends="application,furniture,textures,examples,help,jogl-java3d"
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/java3d-1.6/x86"/>
<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/Examples.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"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
</copy>
<copy file="libtest/jnlp.jar" todir="install/windows/build/lib"/>
<copy todir="install/windows/build/lib/x86" >
<fileset dir="lib/windows/i386">
<include name="*.dll"/>
</fileset>
</copy>
<mkdir dir="install/windows/build/lib/yafaray/i386"/>
<copy todir="install/windows/build/lib/yafaray/i386" >
<fileset dir="lib/yafaray/windows/i386">
<include name="**/*.dll"/>
</fileset>
</copy>
<mkdir dir="install/windows/build/lib/x64"/>
<copy todir="install/windows/build/lib/x64" >
<fileset dir="lib/windows/x64">
<include name="*.dll"/>
</fileset>
</copy>
<copy todir="install/windows/build/lib/java3d-1.6/x86" >
<fileset dir="lib/java3d-1.6/windows/i586">
<include name="*.dll"/>
</fileset>
</copy>
<mkdir dir="install/windows/build/lib/java3d-1.6/x64"/>
<copy todir="install/windows/build/lib/java3d-1.6/x64" >
<fileset dir="lib/java3d-1.6/windows/amd64">
<include name="*.dll"/>
</fileset>
</copy>
<mkdir dir="install/windows/build/lib/yafaray/x64"/>
<copy todir="install/windows/build/lib/yafaray/x64" >
<fileset dir="lib/yafaray/windows/x64">
<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-OPENJDK.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-JOGL.TXT" todir="install/windows/build" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/windows/build"/>
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.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-YAFARAY.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 32 bit JRE to install/windows/build/runtime/x86... excluding files mentioned
in JRE README.TXT file (JRE bin/javaw.exe command excepted) -->
<copy todir="install/windows/build/runtime/x86">
<fileset dir="${javaHome_windows_x86}">
<include name="*"/>
<include name="bin/**"/>
<include name="lib/**"/>
<exclude name="lib/ext/sunec.jar"/>
<exclude name="lib/ext/sunpkcs11.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="lib/jfr/**"/>
<exclude name="lib/jfr.jar"/>
<exclude name="bin/java.exe"/>
<exclude name="bin/javaws.exe"/>
<exclude name="bin/javacpl.exe"/>
<exclude name="bin/jucheck.exe"/>
<exclude name="bin/dtplugin/**"/>
<exclude name="bin/jabswitch.exe"/>
<exclude name="bin/java_crw_demo.dll"/>
<exclude name="bin/wsdetect.dll"/>
<exclude name="bin/plugin2/**"/>
<exclude name="bin/deploy.dll"/>
<exclude name="bin/jfr.dll"/>
<exclude name="bin/javacpl.dll"/>
<exclude name="lib/deploy.jar"/>
<exclude name="lib/plugin.jar"/>
<exclude name="lib/deploy/**"/>
<exclude name="lib/cmm/PYCC.pf"/>
<!-- No need of JavaFX support -->
<exclude name="THIRDPARTYLICENSEREADME-JAVAFX.txt"/>
<exclude name="lib/javafx.properties"/>
<exclude name="lib/jfxswt.jar"/>
<exclude name="bin/decora_sse.dll"/>
<exclude name="bin/fxplugins.dll"/>
<exclude name="bin/glass.dll"/>
<exclude name="bin/glib-lite.dll"/>
<exclude name="bin/gstreamer-lite.dll"/>
<exclude name="bin/javafx_font.dll"/>
<exclude name="bin/javafx_font_t2k.dll"/>
<exclude name="bin/javafx_iio.dll"/>
<exclude name="bin/jfxmedia.dll"/>
<exclude name="bin/jfxwebkit.dll"/>
<exclude name="bin/prism_common.dll"/>
<exclude name="bin/prism_d3d.dll"/>
<exclude name="bin/prism_es2.dll"/>
<exclude name="bin/prism_sw.dll"/>
<exclude name="lib/ext/jfxrt.jar"/>
<exclude name="lib/ext/nashorn.jar"/>
</fileset>
</copy>
<!-- Copy 64 bit OpenJDK to install/windows/build/runtime/x64... -->
<copy todir="install/windows/build/runtime/x64">
<fileset dir="${javaHome_windows_x64}">
<include name="release"/>
<include name="readme.txt"/>
<include name="DISCLAIMER"/>
<include name="bin/*.dll"/>
<include name="bin/server/*.dll"/>
<include name="bin/javaw.exe"/>
<include name="conf/**"/>
<include name="lib/**"/>
<include name="legal/**"/>
<exclude name="bin/jabsysinfo.dll"/>
<exclude name="bin/saproc.dll"/>
<exclude name="lib/src.zip"/>
</fileset>
</copy>
<!-- Remove legal files not exported by jpackage -->
<delete dir="install/windows/build/runtime/x64/legal/jdk.jcmd"/>
<delete dir="install/windows/build/runtime/x64/legal/jdk.hotspot.agent"/>
<delete dir="install/windows/build/runtime/x64/legal/java.se"/>
<!-- Create SweetHome3D-x86.exe and SweetHome3D-x64.exe with launch4j -->
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerLaunch4j-java3d-1.5.2-x86.xml"/>
</exec>
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerLaunch4j-java3d-1.5.2-x86-d3d.xml"/>
</exec>
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerLaunch4j-java3d-1.5.2-x64.xml"/>
</exec>
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerLaunch4j-x86.xml"/>
</exec>
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerLaunch4j-x64.xml"/>
</exec>
<!-- Pack 32 bit JRE rt.jar -->
<exec executable="${javaHome_windows_x86}\bin\pack200.exe" failonerror="yes">
<arg value="-J-Xmx512m"/>
<arg value="${basedir}\install\windows\build\runtime\x86\lib\rt.pack.gz"/>
<arg value="${basedir}\install\windows\build\runtime\x86\lib\rt.jar"/>
</exec>
<delete file="${basedir}\install\windows\build\runtime\x86\lib\rt.jar"/>
</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 64 bit and requires Windows 32 bit JRE 1.8.0_202,
64 bit JRE 1.8.0_202, launch4j and Inno Setup 5 Unicode 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 5 Unicode -->
<exec executable="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" failonerror="yes">
<arg value="${basedir}\install\windows\installerInnoSetup.iss"/>
</exec>
<move todir="${basedir}\install">
<fileset dir="${basedir}\install\windows">
<include name="SweetHome3D*.exe"/>
</fileset>
</move>
<!-- 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 64 bit and requires Windows 32 bit JRE 1.8.0_202,
64 bit JRE 1.8.0_202, launch4j, Inno Setup 5 Unicode 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"/>
<input message="Enter URL of timestamp authority:" addproperty="timestampAuthorityURL" defaultvalue="http://time.certum.pl/"/>
<!-- Sign Sweet Home 3D launchers -->
<exec executable="C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool.exe" failonerror="yes">
<arg value="sign"/>
<arg value="/f"/>
<arg value="${basedir}\keys.p12"/>
<arg value="/p"/>
<arg value="${password}"/>
<arg value="/t"/>
<arg value="${timestampAuthorityURL}"/>
<arg value="${basedir}\install\windows\build\SweetHome3D-java3d-1.5.2-x86-d3d.exe"/>
<arg value="${basedir}\install\windows\build\SweetHome3D-java3d-1.5.2-x86.exe"/>
<arg value="${basedir}\install\windows\build\SweetHome3D-java3d-1.5.2-x64.exe"/>
<arg value="${basedir}\install\windows\build\SweetHome3D-x86.exe"/>
<arg value="${basedir}\install\windows\build\SweetHome3D-x64.exe"/>
</exec>
<!-- Create signed SweetHome3D-version-windows.exe with Inno Setup 5 Unicode -->
<exec executable="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" failonerror="yes">
<arg value="/sSignToolPgm=$$qC:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool.exe$$q sign /f $$q${basedir}\keys.p12$$q /p ${password} /t ${timestampAuthorityURL} $p"/>
<arg value="${basedir}\install\windows\signedInstallerInnoSetup.iss"/>
</exec>
<move todir="${basedir}\install">
<fileset dir="${basedir}\install\windows">
<include name="SweetHome3D*.exe"/>
</fileset>
</move>
<!-- 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/10.4/SweetHome3D-version directory. -->
<target name="macosx10.4Bundle" depends="application,furniture,textures,examples,help"
description="Builds Sweet Home 3D Mac OS X application bundle">
<!-- Build Sweet Home 3D version for Mac OS X 10.4 to 10.9 based on Apple Java and Java 3D 1.5.2-->
<mkdir dir="install/macosx/10.4/SweetHome3D-${version}"/>
<copy todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app">
<fileset dir="install/macosx/10.4/Sweet Home 3D"/>
</copy>
<!-- Copy ICNS files of Mac OS X standard version -->
<copy todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources">
<fileset dir="install/macosx/Sweet Home 3D/Contents/Resources"/>
</copy>
<!-- Change executable permission of SweetHome3D lost during copy task -->
<chmod perm="+x" file="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/MacOS/SweetHome3D"/>
<!-- Copy SweetHome3D JARs and its direct libs
to install/macosx/10.4/SweetHome3D-version/Sweet Home 3D.app/Contents/Resources/Java -->
<mkdir dir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext"/>
<move file="build/SweetHome3D.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Furniture.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Textures.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Examples.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<move file="build/Help.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java" />
<copy todir="install/macosx/10.4/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.2 DLLs and JARs for Java 3D
to install/macosx/10.4/SweetHome3D-version/Sweet Home 3D.app/Contents/Resources/Java/ext -->
<copy file="libtest/jnlp.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext"/>
<copy file="lib/jmf.jar" todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext"/>
<copy todir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext" >
<fileset dir="lib">
<include name="j3dcore.jar"/>
<include name="j3dutils.jar"/>
<include name="vecmath.jar"/>
</fileset>
<fileset dir="lib/macosx">
<include name="*.jar"/>
<include name="*.jnilib"/>
</fileset>
<fileset dir="lib/yafaray/macosx">
<include name="**/*.dylib"/>
</fileset>
</copy>
<!-- Keep only x86_64 arch in YafaRay .dylib files of Java/ext folder with lipo -->
<exec executable="find" dir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext" failonerror="yes">
<arg value="."/>
<arg value="-type"/>
<arg value="f"/>
<arg value="-name"/>
<arg value="libyafaray*.dylib"/>
<arg value="-exec"/>
<arg value="lipo"/>
<arg value="{}"/>
<arg value="-thin"/>
<arg value="x86_64"/>
<arg value="-output"/>
<arg value="{}"/>
<arg value=";"/>
</exec>
<exec executable="find" dir="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app/Contents/Resources/Java/ext/yafaray-plugins" failonerror="yes">
<arg value="."/>
<arg value="-type"/>
<arg value="f"/>
<arg value="-name"/>
<arg value="*.dylib"/>
<arg value="-exec"/>
<arg value="lipo"/>
<arg value="{}"/>
<arg value="-thin"/>
<arg value="x86_64"/>
<arg value="-output"/>
<arg value="{}"/>
<arg value=";"/>
</exec>
<!-- Copy COPYING.TXT and licenses texts to install/macosx/10.4/SweetHome3D-version/ -->
<copy file="COPYING.TXT" todir="install/macosx/10.4/SweetHome3D-${version}"/>
<copy file="LICENSE.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-YAFARAY.TXT" todir="install/macosx/10.4/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/macosx/10.4/SweetHome3D-${version}" />
</target>
<!-- Builds install/SweetHome3D-version-macosx-10.4-10.9.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="macosx10.4Installer" depends="macosx10.4Bundle"
description="Builds install/SweetHome3D-version-macosx-10.4-10.9.dmg archive">
<!-- Create install/SweetHome3D-version-macosx-10.4-10.9.dmg with Disk Utility -->
<delete file="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg"/>
<exec executable="hdiutil" failonerror="yes">
<arg value="create"/>
<arg value="-fs"/>
<arg value="HFS+"/>
<arg value="-srcfolder"/>
<arg value="install/macosx/10.4/SweetHome3D-${version}"/>
<arg value="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/macosx/10.4/SweetHome3D-${version}"/>
<echo message="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-macosx-10.4-10.9.dmg signed archive that contains SweetHome3D.app
and Sweet Home 3D libraries.
CAUTION : May be run only under Mac OS X and requires hdiutil, codesign
and a certificate imported in Keychain Access -->
<target name="macosx10.4SignedInstaller" depends="macosx10.4Bundle"
description="Builds install/SweetHome3D-version-macosx-10.4-10.9.dmg archive">
<input message="Enter Developer ID Application certificate name:" addproperty="certificateName"/>
<!-- Sign Sweet Home 3D application bundle -->
<exec executable="codesign" failonerror="yes">
<arg value="-f"/>
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="install/macosx/10.4/SweetHome3D-${version}/Sweet Home 3D.app"/>
</exec>
<!-- Create install/SweetHome3D-version-macosx-10.4-10.9.dmg with Disk Utility -->
<delete file="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg"/>
<exec executable="hdiutil" failonerror="yes">
<arg value="create"/>
<arg value="-fs"/>
<arg value="HFS+"/>
<arg value="-format"/>
<arg value="UDBZ"/>
<arg value="-srcfolder"/>
<arg value="install/macosx/10.4/SweetHome3D-${version}"/>
<arg value="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg"/>
</exec>
<!-- Sign Sweet Home 3D DMG image -->
<exec executable="codesign" failonerror="yes">
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="install/SweetHome3D-${version}-macosx-10.4-10.9.dmg"/>
</exec>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/macosx/10.4/SweetHome3D-${version}"/>
<echo message="signed install/SweetHome3D-${version}-macosx-10.4-10.9.dmg ready for ftp"/>
</target>
<!-- Builds Sweet Home 3D Mac OS X application bundle in install/macosx/SweetHome3D-version directory.
CAUTION : May be run only under Mac OS X and requires
OpenJDK 15.0.2 for x86_64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_x86_64.jdk and
OpenJDK 15.0.2 for arm64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_aarch64.jdk -->
<target name="macosxBundle" depends="application,furniture,textures,examples,help,jogl-java3d"
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/Java -->
<move file="build/SweetHome3D.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" />
<move file="build/Furniture.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" />
<move file="build/Textures.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" />
<move file="build/Examples.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" />
<move file="build/Help.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" />
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" >
<fileset dir="lib">
<include name="*.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 and Mac OS X Java 3D 1.6 DLLs and JARs for Java 3D
to install/macosx/SweetHome3D-version/Sweet Home 3D.app/Contents/Java/ext -->
<copy file="libtest/jnlp.jar" todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app"/>
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/app" >
<fileset dir="lib/java3d-1.6">
<include name="*.jar"/>
<exclude name="jogl-all.jar"/>
</fileset>
<fileset dir="build/java3d-1.6">
<include name="jogl-java3d.jar"/>
</fileset>
<fileset dir="lib/java3d-1.6/macosx">
<include name="*.dylib"/>
</fileset>
<fileset dir="lib/yafaray/macosx">
<include name="**/*.dylib"/>
</fileset>
</copy>
<!-- Create directories required by OpenJDK AppBundler -->
<mkdir dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home" />
<mkdir dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/MacOS" />
<!-- Copy OpenJDK files generated by jpackage to install/macosx/SweetHome3D-version/Contents/runtime/Contents/Home -->
<copy file="${javaHome_macosx_arm64}/../MacOS/libjli.dylib"
todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/MacOS"/>
<copy todir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home">
<fileset dir="${javaHome_macosx_arm64}">
<include name="readme.txt"/>
<include name="DISCLAIMER"/>
<include name="conf/**"/>
<include name="lib/**"/>
<exclude name="lib/libsaproc.dylib"/>
<exclude name="lib/src.zip"/>
</fileset>
</copy>
<!-- Copy legal files with their symlinks -->
<exec executable="cp" failonerror="yes">
<arg value="-R"/>
<arg value="${javaHome_macosx_arm64}/legal"/>
<arg value="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home"/>
</exec>
<!-- Remove legal files not exported by jpackage -->
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/jdk.jcmd"/>
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/jdk.internal.vm.compiler"/>
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/jdk.internal.vm.ci"/>
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/jdk.hotspot.agent"/>
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/jdk.aot"/>
<delete dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/legal/java.se"/>
<!-- Build Universal OpenJDK with lipo -->
<exec executable="find" dir="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents" failonerror="yes">
<arg value="."/>
<arg value="-type"/>
<arg value="f"/>
<arg value="("/>
<arg value="-name"/>
<arg value="*.dylib"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="jspawnhelper"/>
<arg value=")"/>
<arg value="-exec"/>
<arg value="lipo"/>
<arg value="${javaHome_macosx_arm64}/../{}"/>
<arg value="${javaHome_macosx_x86_64}/../{}"/>
<arg value="-output"/>
<arg value="{}"/>
<arg value="-create"/>
<arg value=";"/>
</exec>
<!-- Change executable permission of jspawnhelper lost during copy task -->
<chmod perm="+x" file="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents/runtime/Contents/Home/lib/jspawnhelper"/>
<!-- 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-OPENJDK.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JOGL.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.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-YAFARAY.TXT" todir="install/macosx/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" 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,
OpenJDK 15.0.2 for x86_64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_x86_64.jdk and
OpenJDK 15.0.2 for arm64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_aarch64.jdk -->
<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" failonerror="yes">
<arg value="create"/>
<arg value="-fs"/>
<arg value="HFS+"/>
<arg value="-format"/>
<arg value="UDBZ"/>
<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
OpenJDK 15.0.2 for x86_64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_x86_64.jdk,
OpenJDK 15.0.2 for arm64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_aarch64.jdk,
lipo, hdiutil, codesign and a certificate imported in Keychain Access -->
<target name="macosxSignedInstaller" depends="macosxBundle"
description="Builds install/SweetHome3D-version-macosx.dmg archive">
<input message="Enter Developer ID Application certificate name:" addproperty="certificateName"/>
<!-- Sign libraries, executables then Sweet Home 3D application bundle for notarization -->
<exec executable="find" failonerror="yes">
<arg value="install/macosx/SweetHome3D-${version}/Sweet Home 3D.app/Contents"/>
<arg value="-type"/>
<arg value="f"/>
<arg value="("/>
<arg value="-name"/>
<arg value="*.dylib"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="SweetHome3D"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="JavaNativeFoundation"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="jspawnhelper"/>
<arg value=")"/>
<arg value="-exec"/>
<arg value="codesign"/>
<arg value="-v"/>
<arg value="-f"/>
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="--options=runtime"/>
<arg value="--entitlements"/>
<arg value="install/macosx/SweetHome3D.entitlements"/>
<arg value="{}"/>
<arg value=";"/>
</exec>
<!-- Sign Sweet Home 3D application bundle -->
<exec executable="codesign" failonerror="yes">
<arg value="-f"/>
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="--options=runtime"/>
<arg value="--entitlements"/>
<arg value="install/macosx/SweetHome3D.entitlements"/>
<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" failonerror="yes">
<arg value="create"/>
<arg value="-fs"/>
<arg value="HFS+"/>
<arg value="-format"/>
<arg value="UDBZ"/>
<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" failonerror="yes">
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="--options=runtime"/>
<arg value="--entitlements"/>
<arg value="install/macosx/SweetHome3D.entitlements"/>
<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 bit JRE installed in jre1.8.0_202 -->
<target name="linux32Installer" depends="application,furniture,textures,examples,help,jogl-java3d"
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/x86/SweetHome3D-version/lib -->
<mkdir dir="install/linux/x86/SweetHome3D-${version}/lib"/>
<!-- Copy SweetHome3D commands -->
<copy todir="install/linux/x86/SweetHome3D-${version}" file="install/linux/SweetHome3D"/>
<copy todir="install/linux/x86/SweetHome3D-${version}" file="install/linux/SweetHome3D-Java3D-1_5_2"/>
<!-- Copy SweetHome3D JARs and its direct libs
to install/linux/x86/SweetHome3D-version/lib -->
<move file="build/SweetHome3D.jar" todir="install/linux/x86/SweetHome3D-${version}/lib" />
<move file="build/Furniture.jar" todir="install/linux/x86/SweetHome3D-${version}/lib" />
<move file="build/Textures.jar" todir="install/linux/x86/SweetHome3D-${version}/lib" />
<move file="build/Examples.jar" todir="install/linux/x86/SweetHome3D-${version}/lib" />
<move file="build/Help.jar" todir="install/linux/x86/SweetHome3D-${version}/lib" />
<copy todir="install/linux/x86/SweetHome3D-${version}/lib" >
<fileset dir="lib">
<include name="*.jar"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
</copy>
<copy file="libtest/jnlp.jar" todir="install/linux/x86/SweetHome3D-${version}/lib"/>
<copy todir="install/linux/x86/SweetHome3D-${version}/lib" >
<fileset dir="lib/linux/i386">
<include name="*.so"/>
</fileset>
</copy>
<copy todir="install/linux/x86/SweetHome3D-${version}/lib/java3d-1.6" >
<fileset dir="lib/java3d-1.6/linux/i586">
<include name="*.so"/>
</fileset>
</copy>
<copy todir="install/linux/x86/SweetHome3D-${version}/lib/yafaray" >
<fileset dir="lib/yafaray/linux/i386">
<include name="**/*.so"/>
</fileset>
</copy>
<copy file="COPYING.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="LICENSE.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JOGL.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-ITEXT.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-VECTORGRAPHICS.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-SUNFLOW.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-YAFARAY.TXT" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/linux/x86/SweetHome3D-${version}" />
<copy file="src/com/eteks/sweethome3d/swing/resources/aboutIcon.png"
tofile="install/linux/x86/SweetHome3D-${version}/SweetHome3DIcon.png"/>
<!-- Copy JRE to install/linux/x86/SweetHome3D-version/runtime... excluding files mentioned
in JRE README.TXT file (JRE bin/java command excepted) -->
<copy todir="install/linux/x86/SweetHome3D-${version}/runtime">
<fileset dir="${javaHome_linux_x86}">
<include name="**"/>
<exclude name="lib/ext/sunec.jar"/>
<exclude name="lib/ext/sunpkcs11.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"/>
<exclude name="lib/cmm/PYCC.pf"/>
<exclude name="lib/jfr"/>
<exclude name="lib/jfr.jar"/>
<!-- No need of JavaFX support -->
<exclude name="THIRDPARTYLICENSEREADME-JAVAFX.txt"/>
<exclude name="lib/javafx.properties"/>
<exclude name="lib/i386/libdecora_sse.so"/>
<exclude name="lib/i386/libfxplugins.so"/>
<exclude name="lib/i386/libglass.so"/>
<exclude name="lib/i386/libgstreamer-lite.so"/>
<exclude name="lib/i386/libjavafx_font_freetype.so"/>
<exclude name="lib/i386/libjavafx_font_pango.so"/>
<exclude name="lib/i386/libjavafx_font_t2k.so"/>
<exclude name="lib/i386/libjavafx_font.so"/>
<exclude name="lib/i386/libjavafx_iio.so"/>
<exclude name="lib/i386/libjfxmedia.so"/>
<exclude name="lib/i386/libjfxwebkit.so"/>
<exclude name="lib/i386/libprism_common.so"/>
<exclude name="lib/i386/libprism_es2.so"/>
<exclude name="lib/i386/libprism_sw.so"/>
<exclude name="lib/ext/jfxrt.jar"/>
<exclude name="lib/ext/nashorn.jar"/>
</fileset>
</copy>
<!-- Create SweetHome3D-version-linux-x86.tgz archive -->
<tar destfile="install/SweetHome3D-${version}-linux-x86.tgz"
compression="gzip">
<tarfileset dir="install/linux/x86"
includes="SweetHome3D-${version}/**">
<exclude name="SweetHome3D-${version}/SweetHome3D"/>
<exclude name="SweetHome3D-${version}/SweetHome3D-Java3D-1_5_2"/>
<exclude name="SweetHome3D-${version}/runtime/bin/java"/>
</tarfileset>
<!-- Change executable permission of SweetHome3D and java commands -->
<tarfileset dir="install/linux/x86" mode="755">
<include name="SweetHome3D-${version}/SweetHome3D"/>
<include name="SweetHome3D-${version}/SweetHome3D-Java3D-1_5_2"/>
<include name="SweetHome3D-${version}/runtime/bin/java"/>
</tarfileset>
</tar>
<!-- Clean build directories -->
<delete dir="build"/>
<delete dir="install/linux/x86"/>
<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 bit JRE installed in jre1.8.0_202 -->
<target name="linux64Installer" depends="application,furniture,textures,examples,help,jogl-java3d"
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 commands -->
<copy todir="install/linux/x64/SweetHome3D-${version}" file="install/linux/SweetHome3D" />
<copy todir="install/linux/x64/SweetHome3D-${version}" file="install/linux/SweetHome3D-Java3D-1_5_2"/>
<!-- Change max memory Java parameter -->
<replace dir="install/linux/x64" token=" -Xmx1024m " value=" -Xmx2g "/>
<!-- 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/Examples.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"/>
<include name="java3d-1.6/*.jar"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
</copy>
<copy file="libtest/jnlp.jar" todir="install/linux/x64/SweetHome3D-${version}/lib"/>
<copy todir="install/linux/x64/SweetHome3D-${version}/lib" >
<fileset dir="lib/linux/x64">
<include name="*.so"/>
</fileset>
</copy>
<copy todir="install/linux/x64/SweetHome3D-${version}/lib/java3d-1.6" >
<fileset dir="lib/java3d-1.6/linux/amd64">
<include name="*.so"/>
</fileset>
</copy>
<copy todir="install/linux/x64/SweetHome3D-${version}/lib/yafaray" >
<fileset dir="lib/yafaray/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-JOGL.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.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-YAFARAY.TXT" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="THIRDPARTY-LICENSE-JMF.HTML" todir="install/linux/x64/SweetHome3D-${version}" />
<copy file="src/com/eteks/sweethome3d/swing/resources/aboutIcon.png"
tofile="install/linux/x64/SweetHome3D-${version}/SweetHome3DIcon.png"/>
<!-- Copy JRE to install/linux/x64/SweetHome3D-version/runtime... excluding files mentioned
in JRE README.TXT file (JRE bin/java command excepted) -->
<copy todir="install/linux/x64/SweetHome3D-${version}/runtime">
<fileset dir="${javaHome_linux_x64}">
<include name="**"/>
<exclude name="lib/ext/sunec.jar"/>
<exclude name="lib/ext/sunpkcs11.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"/>
<exclude name="lib/cmm/PYCC.pf"/>
<exclude name="lib/jfr"/>
<exclude name="lib/jfr.jar"/>
<!-- No need of JavaFX support -->
<exclude name="THIRDPARTYLICENSEREADME-JAVAFX.txt"/>
<exclude name="lib/javafx.properties"/>
<exclude name="lib/amd64/libdecora_sse.so"/>
<exclude name="lib/amd64/libprism_common.so"/>
<exclude name="lib/amd64/libprism_es2.so"/>
<exclude name="lib/amd64/libprism_sw.so"/>
<exclude name="lib/amd64/libfxplugins.so"/>
<exclude name="lib/amd64/libglass.so"/>
<exclude name="lib/amd64/libgstreamer-lite.so"/>
<exclude name="lib/amd64/libjavafx_font_freetype.so"/>
<exclude name="lib/amd64/libjavafx_font_pango.so"/>
<exclude name="lib/amd64/libjavafx_font_t2k.so"/>
<exclude name="lib/amd64/libjavafx_font.so"/>
<exclude name="lib/amd64/libjavafx_iio.so"/>
<exclude name="lib/amd64/libjfxmedia.so"/>
<exclude name="lib/amd64/libjfxwebkit.so"/>
<exclude name="lib/ext/jfxrt.jar"/>
<exclude name="lib/ext/nashorn.jar"/>
</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}/SweetHome3D-Java3D-1_5_2"/>
<exclude name="SweetHome3D-${version}/runtime/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}/SweetHome3D-Java3D-1_5_2"/>
<include name="SweetHome3D-${version}/runtime/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 (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\portable\SweetHome3D-windows-x86.xml"/>
</exec>
<exec executable="C:\Program Files (x86)\Launch4j\launch4jc.exe" failonerror="yes">
<arg value="${basedir}\install\portable\SweetHome3D-windows-x64.xml"/>
</exec>
<input message="Enter signature password:" addproperty="password"/>
<input message="Enter URL of timestamp authority:" addproperty="timestampAuthorityURL" defaultvalue="http://time.certum.pl/"/>
<!-- Sign launchers -->
<exec executable="C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool.exe" failonerror="yes">
<arg value="sign"/>
<arg value="/f"/>
<arg value="${basedir}\keys.p12"/>
<arg value="/p"/>
<arg value="${password}"/>
<arg value="/t"/>
<arg value="${timestampAuthorityURL}"/>
<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
CAUTION : May be run only under Mac OS X and requires
OpenJDK 15.0.2 for x86_64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_x86_64.jdk,
OpenJDK 15.0.2 for arm64 installed in /Library/Java/JavaVirtualMachines/zulu-15.0.2-macosx_aarch64.jdk,
lipo, codesign and a certificate imported in Keychain Access -->
<target name="portableArchive" depends="application,furniture,textures,examples,help,jogl-java3d"
description="Builds install/portable/SweetHome3D-version-portable files">
<!-- Copy Mac OS X application bundle using a different configuration file -->
<copy todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app">
<fileset dir="install/macosx/Sweet Home 3D"/>
</copy>
<copy file="install/portable/SweetHome3D.cfg" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" 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"/>
<!-- Create directories required by OpenJDK AppBundler -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home" />
<mkdir dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/MacOS" />
<!-- Copy OpenJDK files generated by jpackage to install/macosx/SweetHome3D-version/Contents/runtime/Contents/Home -->
<copy file="${javaHome_macosx_arm64}/../MacOS/libjli.dylib"
todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/MacOS"/>
<copy todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home">
<fileset dir="${javaHome_macosx_arm64}">
<include name="readme.txt"/>
<include name="DISCLAIMER"/>
<include name="conf/**"/>
<include name="lib/**"/>
<exclude name="lib/libsaproc.dylib"/>
<exclude name="lib/src.zip"/>
</fileset>
</copy>
<!-- Copy legal files with their symlinks -->
<exec executable="cp" failonerror="yes">
<arg value="-R"/>
<arg value="${javaHome_macosx_arm64}/legal"/>
<arg value="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home"/>
</exec>
<!-- Remove legal files not exported by jpackage -->
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/jdk.jcmd"/>
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/jdk.internal.vm.compiler"/>
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/jdk.internal.vm.ci"/>
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/jdk.hotspot.agent"/>
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/jdk.aot"/>
<delete dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents/Home/legal/java.se"/>
<!-- Build Universal OpenJDK with lipo -->
<exec executable="find" dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/runtime/Contents" failonerror="yes">
<arg value="."/>
<arg value="-name"/>
<arg value="*.dylib"/>
<arg value="-exec"/>
<arg value="lipo"/>
<arg value="${javaHome_macosx_arm64}/../{}"/>
<arg value="${javaHome_macosx_x86_64}/../{}"/>
<arg value="-output"/>
<arg value="{}"/>
<arg value="-create"/>
<arg value=";"/>
</exec>
<!-- Copy SweetHome3D JARs and its libs
to install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app
to ensure the Mac OS X signed version can be launched -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app/ext"/>
<move file="build/SweetHome3D.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" />
<move file="build/Furniture.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" />
<move file="build/Textures.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" />
<move file="build/Examples.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" />
<move file="build/Help.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" />
<copy todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app" >
<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/SweetHome3D-macosx.app/Contents/app/ext -->
<copy file="libtest/jnlp.jar" todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app/ext"/>
<copy todir="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app/Contents/app/ext">
<fileset dir="lib">
<include name="jmf.jar"/>
<include name="java3d-1.6/*.jar"/>
<include name="java3d-1.6/windows/**"/>
<include name="java3d-1.6/linux/**"/>
<include name="java3d-1.6/macosx/**"/>
<exclude name="java3d-1.6/jogl-all.jar"/>
</fileset>
<fileset dir="build">
<include name="java3d-1.6/jogl-java3d.jar"/>
</fileset>
<fileset dir="lib">
<include name="yafaray/**"/>
</fileset>
</copy>
<!-- Copy README.TXT and licenses texts to install/portable/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-OPENJDK.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JAVA3D.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JOGL.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-BATIK.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-JEKSPARSER.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-YAFARAY.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-BLENDSWAP.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-KATORLEGAZ.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-REALLUSION.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<copy file="THIRDPARTY-LICENSE-SCOPIA.TXT" todir="install/portable/SweetHome3D-${version}-portable" />
<!-- 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 Java runtime directories -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/runtime/windows/i586"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/runtime/windows/x64"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/runtime/linux/i586"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/runtime/linux/x64"/>
<!-- Prepare data directories for SH3F, SH3T, SH3L and SH3P files -->
<mkdir dir="install/portable/SweetHome3D-${version}-portable/data/furniture"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/data/textures"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/data/languages"/>
<mkdir dir="install/portable/SweetHome3D-${version}-portable/data/plugins"/>
<!-- Sign Sweet Home 3D application bundle -->
<input message="Enter Developer ID Application certificate name:" addproperty="certificateName"/>
<exec executable="find" failonerror="yes">
<arg value="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app"/>
<arg value="-type"/>
<arg value="f"/>
<arg value="("/>
<arg value="-name"/>
<arg value="*.dylib"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="SweetHome3D"/>
<arg value="-or"/>
<arg value="-name"/>
<arg value="JavaNativeFoundation"/>
<arg value=")"/>
<arg value="-exec"/>
<arg value="codesign"/>
<arg value="-v"/>
<arg value="-f"/>
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="--options=runtime"/>
<arg value="--entitlements"/>
<arg value="install/macosx/SweetHome3D.entitlements"/>
<arg value="{}"/>
<arg value=";"/>
</exec>
<exec executable="codesign" failonerror="yes">
<arg value="-f"/>
<arg value="-s"/>
<arg value="${certificateName}"/>
<arg value="--options=runtime"/>
<arg value="--entitlements"/>
<arg value="install/macosx/SweetHome3D.entitlements"/>
<arg value="install/portable/SweetHome3D-${version}-portable/SweetHome3D-macosx.app"/>
</exec>
<echo message="copy Windows portable launchers, JREs for Windows and Linux, SH3F, SH3T, SH3L and SH3P files
to install/portable/SweetHome3D-${version}-portable and prepare compressed archive"/>
</target>
<!-- Builds install/SweetHome3DViewer-version.zip archive that contains
the files required for SweetHome3DViewer applet -->
<target name="viewerInstaller" depends="viewer"
description="Builds install/SweetHome3DViewer-version.zip archive">
<zip destfile="install/SweetHome3DViewer-${version}.zip">
<zipfileset dir="deploy"
includes="lib/**, SweetHome3DViewer.html"/>
<zipfileset dir="install/viewer"
includes="README.TXT"/>
<zipfileset dir=".">
<include name="COPYING.TXT"/>
<include name="LICENSE.TXT"/>
<include name="THIRDPARTY-LICENSE-JAVA3D.TXT"/>
<include name="THIRDPARTY-LICENSE-BATIK.TXT"/>
</zipfileset>
</zip>
<echo message="install/SweetHome3DViewer-${version}.zip ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-src.zip archive that contains
SweetHome3D source files in directory named SweetHome3D-version-src -->
<target name="sourceArchive"
description="Builds install/SweetHome3D-version-src.zip archive">
<mkdir dir="install/source/SweetHome3D-${version}-src"/>
<copy todir="install/source/SweetHome3D-${version}-src">
<fileset dir=".">
<include name="build.xml"/>
<include name="*.TXT"/>
<include name="THIRDPARTY-LICENSE-*.HTML"/>
<include name="*-diff.zip"/>
<include name="src/**"/>
<include name="include/**"/>
<include name="test/**"/>
<include name="lib/**"/>
<include name="libtest/**"/>
<!-- Do not include generated files that may belong to
deploy and install directories -->
<include name="deploy/SweetHome3D*.*"/>
<include name="deploy/*.php"/>
<include name="install/linux/*"/>
<include name="install/macosx/**"/>
<include name="install/portable/*"/>
<include name="install/viewer/*"/>
<include name="install/windows/*"/>
<!-- Eclipse project files -->
<include name=".settings/**"/>
<include name=".classpath"/>
<include name=".project"/>
</fileset>
</copy>
<zip destfile="install/SweetHome3D-${version}-src.zip" basedir="install/source"
includes="SweetHome3D-${version}-src/**" />
<!-- Clean build directory -->
<delete dir="install/source"/>
<echo message="install/SweetHome3D-${version}-src.zip ready for ftp"/>
</target>
<!-- Builds install/SweetHome3D-version-javadoc.zip archive that contains
the generated Javadoc of Java files found in SweetHome3D-version-src -->
<target name="javadoc"
description="Builds install/SweetHome3D-version-javadoc.zip archive">
<mkdir dir="install/javadoc/SweetHome3D-${version}-javadoc"/>
<javadoc sourcepath="src" destdir="install/javadoc/SweetHome3D-${version}-javadoc"
encoding="ISO-8859-1" version="true" author="true" use="true"
windowtitle="Sweet Home 3D ${version} API">
<doctitle><![CDATA[<img src='http://www.sweethome3d.com/SweetHome3DIcon.gif' width='48' height='48' alt='Sweet Home 3D' align='absmiddle'> Sweet Home 3D ${version} API]]></doctitle>
<header><![CDATA[<a href='http://www.sweethome3d.com' target='_parent'><font size='+1'>Sweet Home 3D ${version}</font></a>]]></header>
<footer><![CDATA[<a href='http://www.sweethome3d.com' target='_parent'><font size='+1'>Sweet Home 3D ${version}</font></a>]]></footer>
<bottom><![CDATA[<table align='center'><tr>
<td><a href='http://www.eteks.com' target='_parent'><img align='absmiddle' src='http://www.sweethome3d.com/images/eteks.gif' border='0'><a></td>
<td>© Copyrights 2006-2022 Emmanuel PUYBARET / <a href='http://www.eteks.com' target='_parent'>eTeks</a>
<br>Distributed under <a href='http://www.gnu.org/licenses/gpl-2.0.html' target='_parent'>GNU General Public License</a></td></tr></table>]]></bottom>
<link href="http://docs.oracle.com/javase/1.5.1/docs/api/"/>
<link href="http://download.java.net/media/java3d/javadoc/1.5.3/"/>
<group title="Base classes" packages="*"/>
<group title="Application and Applet" packages="com.eteks.sweethome3d:com.eteks.sweethome3d.applet"/>
<classpath>
<fileset dir="lib"/>
<pathelement location="libtest/AppleJavaExtensions.jar"/>
<pathelement location="libtest/jnlp.jar"/>
</classpath>
</javadoc>
<zip destfile="install/SweetHome3D-${version}-javadoc.zip" basedir="install/javadoc"
includes="SweetHome3D-${version}-javadoc/**" />
<!-- Clean build directory -->
<delete dir="install/javadoc"/>
<echo message="install/SweetHome3D-${version}-javadoc.zip ready for ftp"/>
</target>
<!-- Launchs a JDepend graphical UI to help update dependencies in PackageDependenciesTest test -->
<target name="jdepend" depends="build"
description="Launchs a JDepend graphical UI">
<!-- Create jdepend.properties file in build directory that specifies ignored Java packages -->
<concat destfile="build/jdepend.properties">ignore.java=java.*</concat>
<!-- Run JDepend UI -->
<java classname="jdepend.swingui.JDepend" fork="true">
<classpath>
<pathelement location="libtest/jdepend-2.9.jar"/>
<pathelement location="build"/>
</classpath>
<arg value="build"/>
</java>
<!-- Clean build directory -->
<delete dir="build"/>
</target>
</project>
|