File: build.xml

package info (click to toggle)
sweethome3d-furniture-editor 1.24-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 928 kB
  • sloc: java: 7,282; xml: 137; makefile: 33; sh: 9
file content (216 lines) | stat: -rw-r--r-- 10,332 bytes parent folder | download
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
<?xml version="1.0"?>
<!-- build.xml

     Furniture Library Editor, Copyright (c) 2010-2015 Emmanuel PUYBARET / eTeks <info@eteks.com>
     
     Ant build file. Available targets :
     - furnitureLibraryEditor              : Builds FurnitureLibraryEditor.jar file in build directory
     - furnitureLibraryEditorJarExecutable : Builds FurnitureLibraryEditor-version.jar file 
     - sourceArchive                       : Builds FurnitureLibraryEditor-version-src.zip file
-->
<project basedir="." default="furnitureLibraryEditorJarExecutable" name="FurnitureLibraryEditor">
  <!-- The current version of the Furniture Library Editor -->
  <property name="version" value="1.24"/>

  <target name="furnitureLibraryEditor" 
          description="Builds build/FurnitureLibraryEditor.jar with all its classes">
    <!-- Compile Sweet Home 3D -->
    <mkdir dir="build/classes"/>
    <!--
    <javac srcdir="../SweetHome3D/src" destdir="build/classes"
           encoding="ISO-8859-1" target="1.5">
     --> <!-- Use lib as an extension directory to override default Java 3D libraries -->
     <!--
      <extdirs>
        <pathelement location="../SweetHome3D/lib"/>
      </extdirs>
      <classpath>
        <pathelement location="../SweetHome3D/libtest/AppleJavaExtensions.jar"/>
        <pathelement location="../SweetHome3D/libtest/jnlp.jar"/>
      </classpath>
  </javac>-->
    <!-- Compile Furniture Library Editor -->
    <javac srcdir="src" destdir="build/classes"
           encoding="ISO-8859-1" target="1.5">
      <extdirs>
        <pathelement location="../SweetHome3D/lib"/>
      </extdirs>
      <classpath>
        <pathelement location="build/classes"/>
        <pathelement location="/usr/share/sweethome3d/sweethome3d.jar"/>
        <pathelement location="/usr/share/java/j3dcore.jar"/>
        <pathelement location="/usr/share/java/vecmath.jar"/>
        <pathelement location="/usr/share/java/batik-all.jar"/>
        <pathelement location="../SweetHome3D/libtest/AppleJavaExtensions.jar"/>
      </classpath>
    </javac>
    
    <!-- Copy resources files of supported languages -->
    <copy todir="build/classes">
      <fileset dir="src">
        <exclude name="**/*.java"/>
        <exclude name="**/package.html"/> 
      </fileset>
    </copy>
    <copy todir="build/classes">
      <fileset dir="build/classes-sh3d">
        <include name="**"/>
        <exclude name="**/*.java"/>
        <exclude name="**/package.html"/> 
        <exclude name="**/*_*.properties"/>
        <!--<exclude name="com/eteks/sweethome3d/io/DefaultFurniture*.*"/>-->
        <exclude name="com/eteks/sweethome3d/io/Contributed*.*"/>
        <exclude name="com/eteks/sweethome3d/io/DefaultTextures*.*"/>
        <exclude name="com/eteks/sweethome3d/io/resources/**"/>
        <exclude name="com/eteks/sweethome3d/swing/resources/icons/jfc/*.*"/>
        <exclude name="**/help/**"/>
      </fileset>
    </copy>
    <copy todir="build/classes">
      <fileset dir="build/classes-sh3d">
        <include name="**/*_fr.properties"/>
        <include name="com/eteks/sweethome3d/io/resources/patterns/**"/>
        <!--<exclude name="com/eteks/sweethome3d/io/DefaultFurniture*.*"/>-->
        <exclude name="com/eteks/sweethome3d/io/Contributed*.*"/>
        <exclude name="com/eteks/sweethome3d/io/DefaultTextures*.*"/>
      </fileset>
    </copy>
    
    <!-- Create FurnitureLibraryEditor.jar with only required parts of Sweet Home 3D -->
    <zip destfile="build/FurnitureLibraryEditor.jar">
      <fileset dir="build/classes">
        <exclude name="com/eteks/sweethome3d/*.*"/>
        <exclude name="com/eteks/sweethome3d/resources/**"/>
        <exclude name="com/eteks/sweethome3d/applet/**"/>
        <exclude name="com/eteks/sweethome3d/io/AutoRecovery**"/>
        <exclude name="com/eteks/sweethome3d/plugin/**"/>
        <exclude name="com/eteks/sweethome3d/swing/Furniture*"/>
        <exclude name="com/eteks/sweethome3d/swing/Home*"/>
        <exclude name="com/eteks/sweethome3d/swing/Import*"/>
        <exclude name="com/eteks/sweethome3d/swing/BackgroundImageWizard*"/>
        <exclude name="com/eteks/sweethome3d/swing/Compass*"/>
        <exclude name="com/eteks/sweethome3d/swing/Plan*"/>
        <exclude name="com/eteks/sweethome3d/swing/MultipleLevelsPlan*"/>
        <exclude name="com/eteks/sweethome3d/swing/Label*"/>
        <exclude name="com/eteks/sweethome3d/swing/Level*"/>
        <exclude name="com/eteks/sweethome3d/swing/Room*"/>
        <exclude name="com/eteks/sweethome3d/swing/Wall*"/>
        <exclude name="com/eteks/sweethome3d/swing/ObserverCamera*"/>
        <exclude name="com/eteks/sweethome3d/swing/PageSetup*"/>
        <exclude name="com/eteks/sweethome3d/swing/PrintPreview*"/>
        <exclude name="com/eteks/sweethome3d/swing/Photo*"/>
        <exclude name="com/eteks/sweethome3d/swing/*Video*"/>
        <exclude name="com/eteks/sweethome3d/swing/resources/**"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Furniture*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Home*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Import*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/BackgroundImageWizardController*"/>
        <exclude name="com/eteks/sweethome3d/iewcontroller/Compass*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/PlanController*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Label*Controller*"/>
        <exclude name="com/eteks/sweethome3d/iewcontroller/ObserverCamera*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Room*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Wall*Controller*"/>
        <exclude name="com/eteks/sweethome3d/iewcontroller/ObserverCamera*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/PageSetup*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/PrintPreview*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Photo*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/Video*Controller*"/>
        <exclude name="com/eteks/sweethome3d/viewcontroller/resources/*Wizard*"/>
      </fileset>
      <fileset dir="build/classes">
        <include name="com/eteks/sweethome3d/swing/resources/icons/tango/image-*.png"/>
        <include name="com/eteks/sweethome3d/swing/FurnitureToolTip*"/>
      </fileset>
    </zip>
    <delete dir="build/classes"/>
  </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="../SweetHome3D/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="../SweetHome3D/lib/java3d-1.6/jogl-all.jar"  
        includes="com/jogamp/opengl/util/GLBuffers.class"/>
    </zip>
  </target>

  <target name="furnitureLibraryEditorJarExecutable" depends="furnitureLibraryEditor"
          description="Builds FurnitureLibraryEditor-version.jar executable Jar">
    <!-- Create FurnitureLibraryEditor-version.jar containing Furniture Library Editor classes and resources,
         and other DLLs and jars -->
    <jar destfile="FurnitureLibraryEditor-${version}.jar">
      <manifest>
        <attribute name="Class-Path" value="/usr/share/java/j3dcore.jar /usr/share/java/j3dutils.jar /usr/share/java/vecmath.jar /usr/share/java/batik-all.jar /usr/share/icedtea-web/netx.jar"/>
      </manifest>
      <zipfileset src="build/FurnitureLibraryEditor.jar"/>
      <!--
      <fileset dir="../SweetHome3D/lib">
        <include name="*.jar"/>
        <include name="macosx/*.jar"/>
        <include name="java3d-1.6/*.jar"/>
        <exclude name="java3d-1.6/jogl-all.jar"/>
        <exclude name="freehep-vectorgraphics-svg-*.jar"/>
        <exclude name="iText-*.jar"/>
        <exclude name="sunflow-*.jar"/>
        <exclude name="jmf.jar"/>
      </fileset>
      <fileset dir="build">
        <include name="java3d-1.6/jogl-java3d.jar"/>
      </fileset>
      <fileset dir="../SweetHome3D/lib">
        <include name="windows/**/*.dll"/>
        <include name="java3d-1.6/windows/**/*.dll"/>
        <include name="linux/**/*.so"/>
        <include name="java3d-1.6/linux/**/*.so"/>
        <include name="macosx/*.jnilib"/>
        <include name="java3d-1.6/macosx/*.jnilib"/>
      </fileset>
      <fileset dir="../SweetHome3D/libtest">
        <include name="jnlp.jar"/>
      </fileset>
      <fileset dir="../SweetHome3D">
        <include name="LICENSE.TXT"/>
        <include name="COPYING.TXT"/>
        <include name="THIRDPARTY-LICENSE-JAVA3D.TXT"/>
        <include name="THIRDPARTY-LICENSE-TANGO.TXT"/>
        <include name="THIRDPARTY-LICENSE-CONTRIBUTIONS.TXT"/>
      </fileset>-->
    </jar>
 
    <!-- Clean build directory -->
    <delete dir="build"/>

    <echo message="FurnitureLibraryEditor-${version}.jar ready for ftp"/>
  </target>

  <!-- Builds FurnitureLibraryEditor-version-src.zip archive that contains 
       FurnitureLibraryEditor source files in directory named FurnitureLibraryEditor-version-src -->
  <target name="sourceArchive"
          description="Builds FurnitureLibraryEditor-version-src.zip archive">
    <mkdir dir="build/source/FurnitureLibraryEditor-${version}-src"/>
    <copy todir="build/source/FurnitureLibraryEditor-${version}-src">
      <fileset dir=".">
        <include name="build.xml"/>
        <include name="*.TXT"/>
        <include name="src/**"/>
        <!-- Eclipse project files -->
        <include name=".settings/**"/>
        <include name=".classpath"/>
        <include name=".project"/>
      </fileset>
    </copy>

    <zip destfile="FurnitureLibraryEditor-${version}-src.zip" basedir="build/source"
         includes="FurnitureLibraryEditor-${version}-src/**" />

    <!-- Clean build directory -->
    <delete dir="build"/>

    <echo message="FurnitureLibraryEditor-${version}-src.zip ready for ftp"/>
  </target>
</project>