-
Notifications
You must be signed in to change notification settings - Fork 19
/
build-mac.xml
125 lines (115 loc) · 5.8 KB
/
build-mac.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
<?xml version="1.0"?>
<!-- build.xml
Sweet Home 3D, Copyright (c) 2007-2016 Emmanuel PUYBARET / eTeks <info@eteks.com>.
Ant build file that contains mac specific build targets helpers.
-->
<project basedir=".">
<target name="java3dLibraries-mac" description="Linux helper task for java3dLibraries">
<!-- 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 refid="libs.j3d" />
<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>
<!-- Builds Sweet Home 3D Mac OS X application bundle in install/macosx/SweetHome3D-version directory. -->
<target name="macosxBundle-impl" 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 todir="install/macosx/SweetHome3D-${version}">
<fileset refid="files.licenses" />
</copy>
</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-impl" 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="-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}" />
</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-impl" description="Builds install/SweetHome3D-version-macosx.dmg archive">
<input message="Enter certificate name:" addproperty="certificateName" />
<!-- Sign Sweet Home 3D application bundle -->
<exec executable="codesign" failonerror="yes">
<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" failonerror="yes">
<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" failonerror="yes">
<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}" />
</target>
</project>