~yudi-xue/gephi/gephi-preview

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
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="0.8" basedir=".">
    <description>Builds the module suite 0.8.</description>
    <import file="nbproject/build-impl.xml"/>

    <condition property="isWindows">
        <os family="windows" />
    </condition>

    <target name="build-launchers" depends="suite.build-launchers">
        <!-- Replace the icon for the Windows launcher exe. -->
        <antcall target="replaceWindowsLauncherIcon"/>
    </target>

    <!-- Windows-only target that replaces the icon for the launcher exe with our own icon. -->
    <target name="replaceWindowsLauncherIcon" if="isWindows" description="Replace the icon for the Windows launcher exe">
        <echo message="Replacing icon of Windows launcher executable."/>
        <exec executable="ReplaceVistaIcon.exe" resolveexecutable="true">
            <arg line="build/launcher/bin/${app.name}.exe ${app.name}.ico 0"/>
        </exec>
        <exec executable="ReplaceVistaIcon.exe" resolveexecutable="true">
            <arg line="build/launcher/bin/${app.name}.exe gephifile.ico 1"/>
        </exec>
    </target>

    <!-- Override to change Mac application icon. -->
    <target name="build-mac" depends="suite.build-mac" description="Build Mac OS X Application">
        <property name="nbdist-contents.dir" value="${dist.dir}/${app.name}.app/Contents"/>
        <property name="nbdist-resources.dir" value="${nbdist-contents.dir}/Resources"/>

        <!-- Replace the icns file. -->
        <delete file="${nbdist-resources.dir}/${app.name}.icns"/>
        <copy tofile="${nbdist-resources.dir}/${app.name}.icns" file="${app.name}.icns" />

        <!-- Unzip Netbeans Platform Localization JARs -->
        <antcall target="merge-l10n-mac"/>

        <delete file="${nbdist-contents.dir}/Info.plist"/>
        <copy tofile="${nbdist-contents.dir}/Info.plist" file="nbproject/Info.plist" />
    </target>

    <!-- Override to add localization JARs. -->
    <target name="build-zip" depends="suite.build-zip" description="Replace ZIP target">
        <!-- Unzip Netbeans Platform Localization JARs -->
        <antcall target="merge-l10n-zip"/>
    </target>

    <target name="javadoc">
        <javadoc destdir="dist/apiindex" windowtitle="Gephi API Index" encoding="UTF-8" charset="UTF-8" stylesheetfile="stylesheet.css"  packagenames="org.gephi.**.api,org.gephi.**.spi,org.gephi.data.*,org.gephi.utils.progress" overview="overview.html"  classpath="build/public-package-jars/org-openide-util-lookup.jar">
            <sourcepath>
                <pathelement path="AttributesAPI/src"/>
                <pathelement path="ClusteringAPI/src"/>
                <pathelement path="DataLaboratoryAPI/src"/>
                <pathelement path="DynamicAPI/src"/>
                <pathelement path="ExportAPI/src"/>
                <pathelement path="FiltersAPI/src"/>
                <pathelement path="GeneratorAPI/src"/>
                <pathelement path="GraphAPI/src"/>
                <pathelement path="ImportAPI/src"/>
                <pathelement path="LayoutAPI/src"/>
                <pathelement path="LongTaskAPI/src"/>
                <pathelement path="PartitionAPI/src"/>
                <pathelement path="PreviewAPI/src"/>
                <pathelement path="ProjectAPI/src"/>
                <pathelement path="RankingAPI/src"/>
                <pathelement path="StatisticsAPI/src"/>
                <pathelement path="ToolsAPI/src"/>
            </sourcepath>
            <doctitle>Gephi 0.8alpha API Index</doctitle>
            <header>Gephi 0.8alpha Javadoc</header>
        </javadoc>
    </target>

    <target name="download-l10n-jars" description="Download Netbeans Platform Localization JARs on the website">
        <property name="l10n.url" value="http://netbeans.org/project_downloads/nblocalization/7.0/"/>
        <property name="l10n.file" value="nb70_platform_l10n.zip"/>
        <property name="l10n.dir" value="l10n"/>
        <get src="${l10n.url}${l10n.file}" dest="${dist.dir}" verbose="true" skipexisting="true" ignoreerrors="true"/>      
    </target>

    <target name="unzip-l10n" depends="download-l10n-jars" description="Unzip Netbeans Platform Localization JARs">
        <unzip src="${dist.dir}/${l10n.file}" dest="${dist.dir}/${l10n.dir}/${app.name}"/>
    </target>
    
    <target name="merge-l10n-zip" depends="unzip-l10n" description="Merge Localization JARs on ZIP distribution" >
        <zip destfile="${dist.dir}/${app.name}.zip" basedir="${dist.dir}/${l10n.dir}" update="true"/>
        <antcall target="clean-l10n"/>
    </target>

    <target name="merge-l10n-mac" depends="unzip-l10n" description="Merge Localization JARs on MAC distribution" >
        <copy todir="${dist.dir}/${app.name}.app/Contents/Resources">
            <fileset dir="${dist.dir}/${l10n.dir}"/>
        </copy>
        <antcall target="clean-l10n"/>
    </target>

    <target name="clean-l10n" description="Clean l10n targets files and directories">
        <delete dir="${dist.dir}/${l10n.dir}" />
        <delete file="${dist.dir}/${l10n.file}"/>
    </target>

    <target name="clean-toolkit" description="Clean Toolkit dir">
        <delete failonerror="false" includeemptydirs="true">
            <fileset dir="toolkit"/>
        </delete>
    </target>

    <target name="toolkit" depends="clean-toolkit,build,build-launchers" description="Build Gephi Toolkit JAR">

        <property name="build.dir" value="${basedir}/build/cluster/modules"/>
        <property name="libs.dir" value="${basedir}/build/cluster/modules/ext"/>
        <property name="toolkit.jar.name" value="gephi-toolkit"/>
        <property name="toolkit.dir" value="${basedir}/toolkit"/>
        <property name="toolkit.jar" value="${toolkit.dir}/${toolkit.jar.name}.jar"/>
        <property name="platform.dir" value="${toolkit.dir}/platform"/>
        <mkdir dir="${toolkit.dir}"/>

        <echo message="Packaging ${app.name} into a single JAR at ${toolkit.jar}"/>

        <subant genericantfile="${harness.dir}/suite.xml" target="copy-cluster" inheritrefs="true">
            <property name="dest.dir" value="${toolkit.dir}"/>
            <property name="nbexec.dir" value="${toolkit.dir}"/>
            <property name="build.dir" value="${toolkit.dir}"/>
            <resources refid="zip.platform.clusters"/>
        </subant>

        <property name="toolkit.tempdir" value="${toolkit.dir}/${toolkit.jar.name}"/>
        <mkdir dir="${toolkit.tempdir}"/>
        <property name="toolkit.platformdir" value="${platform.dir}"/>
        <copy file="${toolkit.platformdir}/core/org-openide-filesystems.jar" todir="${toolkit.tempdir}"/>
        <copy file="${toolkit.platformdir}/lib/org-openide-util.jar" todir="${toolkit.tempdir}"/>
        <copy file="${toolkit.platformdir}/lib/org-openide-util-lookup.jar" todir="${toolkit.tempdir}"/>
        <copy todir="${toolkit.tempdir}">
            <fileset dir="${toolkit.platformdir}/modules">
                <include name="org-openide-nodes.jar"/>
                <include name="org-netbeans-modules-masterfs.jar"/>
                <include name="org-openide-dialogs.jar"/>
            </fileset>
        </copy>
        <copy todir="${toolkit.tempdir}">
            <fileset dir="${build.dir}">
                <include name="org-gephi-algorithms.jar"/>
                <include name="org-gephi-data-attributes.jar"/>
                <include name="org-gephi-data-attributes-api.jar"/>
                <include name="org-gephi-io-exporter-preview.jar"/>
                <include name="org-gephi-filters.jar"/>
                <include name="org-gephi-filters-api.jar"/>
                <include name="org-gephi-filters-plugin.jar"/>
                <include name="org-gephi-graph-api.jar"/>
                <include name="org-gephi-graph-dhns.jar"/>
                <include name="org-gephi-io-database-drivers.jar"/>
                <include name="org-gephi-utils-collection.jar"/>
                <include name="org-gephi-io-exporter-api.jar"/>
                <include name="org-gephi-io-exporter-plugin.jar"/>
                <include name="org-gephi-io-importer-api.jar"/>
                <include name="org-gephi-io-importer-plugin.jar"/>
                <include name="org-gephi-io-processor-plugin.jar"/>
                <include name="org-gephi-layout-api.jar"/>
                <include name="org-gephi-layout-plugin.jar"/>
                <include name="org-gephi-preview-api.jar"/>
                <include name="org-gephi-preview.jar"/>
                <include name="org-gephi-project-api.jar"/>
                <include name="org-gephi-statistics-api.jar"/>
                <include name="org-gephi-statistics-plugin.jar"/>
                <include name="org-gephi-timeline.jar"/>
                <include name="org-gephi-dynamic-api.jar"/>
                <include name="org-gephi-dynamic.jar"/>
                <include name="org-gephi-utils.jar"/>
                <include name="org-gephi-utils-longtask.jar" />
                <include name="org-gephi-ranking-api.jar"/>
                <include name="org-gephi-partition-api.jar"/>
                <include name="org-gephi-partition-plugin.jar"/>
                <include name="org-gephi-io-generator-api.jar"/>
                <include name="org-gephi-io-generator-plugin.jar"/>
                <include name="org-gephi-datalab-api.jar"/>
                <include name="org-gephi-visualization-api.jar"/>
            </fileset>
        </copy>
        <copy todir="${toolkit.tempdir}">
            <fileset dir="${libs.dir}">
                <include name="batik*.jar"/>
                <include name="bzip2*.jar"/>
                <include name="core.jar"/><!-- Processing -->
                <include name="iText*.jar"/>
                <include name="jcommon*.jar"/>
                <include name="commons*.jar"/>
                <include name="jfreechart*.jar"/>
                <include name="joda-time*.jar"/>
                <include name="mysql-connector*.jar"/>
                <include name="postgresql*.jar"/>
                <include name="sqljdbc*.jar"/>
                <include name="google-collect*.jar"/>
                <include name="stax-utils.jar"/>
                <include name="trove*.jar"/>
                <include name="xml-apis-ext*.jar"/>
                <include name="javacsv*.jar"/>
            </fileset>
        </copy>

        <jar destfile="${toolkit.dir}/temp_final.jar" filesetmanifest="merge" duplicate="preserve">
            <zipgroupfileset dir="${toolkit.tempdir}" includes="*.jar"/>
            
            <!-- Next service declarations fix problem of having service providers in different modules (duplicated files) -->
            <service type="org.openide.filesystems.URLMapper">
                <provider classname="org.netbeans.modules.masterfs.MasterURLMapper"/>
                <provider classname="org.netbeans.modules.openide.filesystems.DefaultURLMapperProxy"/>
                <provider classname="org.openide.filesystems.MemoryFileSystem$Mapper"/>
            </service>
            
            <service type="javax.annotation.processing.Processor">
                <provider classname="org.netbeans.modules.openide.filesystems.CleaningAnnotationProcessor"/>
                <provider classname="org.netbeans.modules.openide.util.NbBundleProcessor"/>
                <provider classname="org.netbeans.modules.openide.util.URLStreamHandlerRegistrationProcessor"/>
                <provider classname="org.netbeans.modules.openide.util.ServiceProviderProcessor"/>
            </service>
            
            <service type="java.sql.Driver">
                <provider classname="com.mysql.jdbc.Driver"/>
                <provider classname="org.postgresql.Driver"/>
                <provider classname="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
            </service>
            
            <service type="org.gephi.project.spi.WorkspacePersistenceProvider">
                <provider classname="org.gephi.data.attributes.serialization.AttributeModelPersistenceProvider"/>
                <provider classname="org.gephi.graph.dhns.DhnsPersistenceProvider"/>
                <provider classname="org.gephi.graph.dhns.DataPersistenceProvider"/>
                <provider classname="org.gephi.data.attributes.serialization.AttributeRowPersistenceProvider"/>
                <provider classname="org.gephi.dynamic.DynamicModelPersistenceProvider"/>
                <provider classname="org.gephi.filters.FilterModelPersistenceProvider"/>
                <provider classname="org.gephi.layout.LayoutModelPersistenceProvider"/>
                <provider classname="org.gephi.partition.impl.PartitionModelPersistenceProvider"/>
            </service>
            
            <service type="org.gephi.project.spi.WorkspaceDuplicateProvider">
                <provider classname="org.gephi.data.attributes.AttributeModelDuplicateProvider"/>
                <provider classname="org.gephi.graph.dhns.DhnsDuplicateProvider"/>
            </service>
                
            <manifest>
            </manifest>
        </jar>

        <zip destfile="${toolkit.jar}">
            <zipfileset src="${toolkit.dir}/temp_final.jar"
            excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
        </zip>

        <delete file="${toolkit.dir}/temp_final.jar"/>
        <delete dir="${platform.dir}"/>

    </target>

    <target name="toolkit-javadoc">
        <javadoc destdir="${basedir}/toolkit/doc" windowtitle="Gephi Toolkit API Index" encoding="UTF-8" charset="UTF-8" stylesheetfile="stylesheet.css"  packagenames="org.gephi.*" overview="overview.html" classpath="build/public-package-jars/org-openide-util-lookup.jar">
            <sourcepath>
                <pathelement path="Algorithms/src"/>
                <pathelement path="AttributesAPI/src"/>
                <pathelement path="PreviewExport/src"/>
                <pathelement path="FiltersAPI/src"/>
                <pathelement path="FiltersPlugin/src"/>
                <pathelement path="GraphAPI/src"/>
                <pathelement path="DBDrivers/src"/>
                <pathelement path="ExportAPI/src"/>
                <pathelement path="ExportPlugin/src"/>
                <pathelement path="ImportAPI/src"/>
                <pathelement path="ImportPlugin/src"/>
                <pathelement path="ProcessorPlugin/src"/>
                <pathelement path="LayoutAPI/src"/>
                <pathelement path="LayoutPlugin/src"/>
                <pathelement path="PreviewAPI/src"/>
                <pathelement path="ProjectAPI/src"/>
                <pathelement path="StatisticsAPI/src"/>
                <pathelement path="StatisticsPlugin/src"/>
                <pathelement path="DynamicAPI/src"/>
                <pathelement path="Utils/src"/>
                <pathelement path="LongTaskAPI/src"/>
                <pathelement path="RankingAPI/src"/>
                <pathelement path="PartitionAPI/src"/>
                <pathelement path="PartitionPlugin/src"/>
                <pathelement path="GeneratorAPI/src"/>
                <pathelement path="GeneratorPlugin/src"/>
                <pathelement path="DataLaboratoryAPI/src"/>
            </sourcepath>
            <doctitle>Gephi Toolkit Javadoc</doctitle>
            <header>Gephi Toolkit Javadoc</header>
        </javadoc>
        <zip destfile="${basedir}/toolkit/toolkit-javadoc.zip" basedir="${basedir}/toolkit/doc">
        </zip>
    </target>
</project>