File: build.xml

package info (click to toggle)
simile-timeline 2.3.0+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 5,712 kB
  • sloc: xml: 7,108; makefile: 9; sh: 1
file content (149 lines) | stat: -rw-r--r-- 5,711 bytes parent folder | download | duplicates (3)
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
<!--+
    |
    |           +===========================+
    |           |   Timeline Build System   |
    |           +===========================+
    |
    | This is just for bundling and minifying javascript and CSS files.
    |
    +-->

<project default="all" basedir="." name="Timeline">

  <property name="version" value="2.3.0" />
  
  <target name="all" depends="timeline_source.zip, timeline_libraries.zip" />

  <target name="bundle">
    <!-- SimileAjax -->
    <concat destfile="src/ajax/api/simile-ajax-bundle.uncompressed.js">
        <fileset dir="src/ajax/api/scripts">
            <include name="jquery*.js" />
            <include name="platform.js" />
        </fileset>
        <fileset dir="src/ajax/api/scripts">
            <include name="**/*.js" />
            <exclude name="signal.js" />
            <exclude name="jquery*.js" />
            <exclude name="platform.js" />
        </fileset>
    </concat>
  	
    <exec executable="yui-compressor">
      <arg value="-o"/>
      <arg value="src/ajax/api/simile-ajax-bundle.js"/>
      <arg line="src/ajax/api/simile-ajax-bundle.uncompressed.js"/>
    </exec>

  	<!-- Timeline -->
    <concat destfile="src/webapp/api/timeline-bundle.uncompressed.js">
        <fileset dir="src/webapp/api/scripts">
        	<include name="*.js" />
        </fileset>
    </concat>
  	
    <exec executable="yui-compressor">
      <arg value="-o"/>
      <arg value="src/webapp/api/timeline-bundle.js"/>
      <arg value="src/webapp/api/timeline-bundle.uncompressed.js"/>
    </exec>

    <delete file="src/webapp/api/timeline-bundle.uncompressed.js"/>

    <concat destfile="src/webapp/api/timeline-bundle.css">
        <fileset dir="src/webapp/api/styles">
        	<include name="**/*.css" />
        </fileset>
    </concat>
  </target>
  
  <target name="create_output1" depends="bundle">
    <!-- Create versioned timeline dir with lib, src, examples, jetty -->
    <delete dir="timeline_${version}"/>
    <copy todir="timeline_${version}/lib">
      <fileset dir="lib" excludes="**/.svn/**, **/*.bak" />
    </copy>
    <copy todir="timeline_${version}/src">
      <fileset dir="src" excludes="**/.svn/**, **/*.bak" />
    </copy>
    <copy todir="timeline_${version}/tools">
      <fileset dir="tools" excludes="**/.svn/**, **/*.bak" />
    </copy>
    
    <copy file=".project" todir="timeline_${version}" />
    <copy file="build.xml" todir="timeline_${version}" />
    <copy file="CHANGES.txt" todir="timeline_${version}" />
    <copy file="jetty.xml" todir="timeline_${version}" />
    <copy file="LICENSE.txt" todir="timeline_${version}" />
    <copy file="README.txt" todir="timeline_${version}" />
    <copy file="run" todir="timeline_${version}" />
    <copy file="run.bat" todir="timeline_${version}" />
  </target>
  
  <target name="timeline_source.zip" depends="create_output1">
    <!-- Create timeline_source.zip - entire source tree: tools, lib, src -->
    <delete file="timeline_source.zip" />
    <zip destfile="timeline_source.zip"
         basedir="."
         update="yes"
         duplicate="fail"
         includes="timeline_${version}/**"
    />  
    <delete dir="timeline_${version}"/>
  </target>

  <target name="create_output2" depends="bundle">
    <!-- Create versioned timeline dir with just bundled libraries and support files -->

    <!-- timeline files -->
    <property name="webapp_api" value="src/webapp/api/" />

    <delete dir="timeline_${version}"/>
    <copy file="${webapp_api}timeline-api.js"     todir="timeline_${version}/timeline_js" />
    <copy file="${webapp_api}timeline-bundle.js"  todir="timeline_${version}/timeline_js" />
    <copy file="${webapp_api}timeline-bundle.css" todir="timeline_${version}/timeline_js" />
    <copy file="LICENSE.txt"                      todir="timeline_${version}" />

    <copy todir="timeline_${version}/timeline_js/images">
      <fileset dir="${webapp_api}images" excludes="**/.svn/**, **/*.bak" />
    </copy>
    
    <copy todir="timeline_${version}/timeline_js/scripts/l10n">
      <fileset dir="${webapp_api}scripts/l10n" excludes="**/.svn/**, **/*.bak" />
    </copy>
    
    <!-- ajax files -->
    <property name="ajax_api" value="src/ajax/api/"   />
    <copy file="${ajax_api}simile-ajax-api.js"    todir="timeline_${version}/timeline_ajax" />
    <copy file="${ajax_api}simile-ajax-bundle.js" todir="timeline_${version}/timeline_ajax" />
    
    <copy todir="timeline_${version}/timeline_ajax/images">
      <fileset dir="${ajax_api}images" excludes="**/.svn/**, **/*.bak" />
    </copy>
    <copy todir="timeline_${version}/timeline_ajax/styles">
      <fileset dir="${ajax_api}styles" excludes="**/.svn/**, **/*.bak" />
    </copy>
    <copy todir="timeline_${version}/timeline_ajax/content">
      <fileset dir="${ajax_api}content" excludes="**/.svn/**, **/*.bak" />
    </copy>

    <copy file="${ajax_api}scripts/signal.js" todir="timeline_${version}/timeline_ajax/scripts" />
    
    <!-- release files -->
    <copy file="CHANGES.txt" todir="timeline_${version}" />
    <copy file="LICENSE.txt" todir="timeline_${version}" />
    <copy file="README.txt" todir="timeline_${version}" />
  </target>
  
  <target name="timeline_libraries.zip" depends="create_output2">
    <!-- Create timeline_libraries.zip - entire source tree: tools, lib, src -->
    <delete file="timeline_libraries.zip" />
    <zip destfile="timeline_libraries.zip"
         basedir="."
         update="yes"
         duplicate="fail"
         includes="timeline_${version}/**"
    />  
  </target>

</project>