13693261870
2022-09-16 354b3dbfbffb3df45212a2a44dbbf48b4acc2594
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
<?xml version="1.0" encoding="utf-8"?>
<project name="KitchenSink" default=".help">
    <!--
    The build-impl.xml file imported here contains the guts of the build process. It is
    a great idea to read that file to understand how the process works, but it is best to
    limit your changes to this file.
    -->
    <import file="${basedir}/.sencha/app/build-impl.xml"/>
 
    <!--
    The following targets can be provided to inject logic before and/or after key steps
    of the build process:
 
        The "init-local" target is used to initialize properties that may be personalized
        for the local machine.
 
            <target name="-before-init-local"/>
            <target name="-after-init-local"/>
 
        The "clean" target is used to clean build output from the build.dir.
 
            <target name="-before-clean"/>
            <target name="-after-clean"/>
 
        The general "init" target is used to initialize all other properties, including
        those provided by Sencha Cmd.
 
            <target name="-before-init"/>
            <target name="-after-init"/>
        
        The "page" target performs the call to Sencha Cmd to build the 'all-classes.js' file.
 
            <target name="-before-page"/>
            <target name="-after-page"/>
 
        The "build" target performs the call to Sencha Cmd to build the application.
 
            <target name="-before-build"/>
            <target name="-after-build"/>
    -->
 
    <!-- Generate the KitchenSink.data.BigData class -->
    <target name="generate-data" depends="init">
        <x-script-def name="generate-dummy-data" src="generate-dummy-data.js">
            <script src="${cmd.dir}/ant/JSON.js"/>
            <script src="${cmd.dir}/ant/ant-util.js"/>
        </x-script-def>
        <generate-dummy-data/>
    </target>
 
    <target name="-after-build" depends="init">
        <copy todir="${build.dir}/lib/" overwrite="true">
            <fileset dir="${app.dir}/lib/" includes="**/*"/>
        </copy>
        <copy file="${build.dir}/index.html" tofile="${build.dir}/index-quirks.html">
            <filterchain>
                <headfilter lines="-1" skip="1"/>
            </filterchain>
        </copy>
    </target>
 
    <!--regenerate the example page to pick up changes to relative path to packages-->
    <target name="-before-capture">
        <local name="pkg.rel.path"/>
        <local name="fwk.rel.path"/>
        <local name="fwk.rel.path.actual"/>
        <x-get-relative-path
            from="${app.dir}"
            to="${workspace.packages.dir}"
            property="pkg.rel.path"
            />
        <x-get-relative-path
            from="${app.dir}"
            to="${framework.dir}"
            property="fwk.rel.path"
            />
            <if>
                <isset property="sencha.is.sdk.repo"/>
                <then>
                    <property name="fwk.rel.path.actual" value="${fwk.rel.path}/extjs"/>
                </then>
                <else>
                    <property name="fwk.rel.path.actual" value="${fwk.rel.path}"/>
                </else>
            </if>
        
        <x-generate file="${framework.config.dir}/templates/App/sass/example/theme.html.tpl.merge"
                    tofile="${app.example.dir}/theme.html" 
                    store="${app.config.dir}/codegen"
                    basedir="${app.dir}">
            <param name="appName" value="${app.name}"/>
            <param name="frameworkPath" value="${fwk.rel.path.actual}"/>
            <param name="packagesRelPath" value="${pkg.rel.path}"/>
        </x-generate>
    </target>
 
    <!--
    ***************************************************************************
    Custom tagets
    ***************************************************************************
    -->
 
    <macrodef name="x-run-build">
        <attribute name="themeName"/>
        <attribute name="target"/>
        <sequential>
            <ant dir="${basedir}" inheritall="false" inheritrefs="true" target="@{target}">
                <property name="app.theme" value="ext-theme-@{themeName}"/>
                <property name="cmd.dir" value="${cmd.dir}"/>
            </ant>
        </sequential>
    </macrodef>
 
    <!-- Neptune is last to restore the proper content of bootstrap.css -->
    <target name="build-all"
            depends="build-access,build-classic,build-gray,build-neptune"/>
 
    <target name="build-access" depends="init">
        <echo>Build Kitchen Sink - Accessibility Theme</echo>
        <x-run-build themeName="access" target="build"/>
    </target>
 
    <target name="build-classic" depends="init">
        <echo>Build Kitchen Sink - Classic Theme</echo>
        <x-run-build themeName="classic" target="build"/>
    </target>
 
    <target name="build-gray" depends="init">
        <echo>Build Kitchen Sink - Gray Theme</echo>
        <x-run-build themeName="gray" target="build"/>
    </target>
 
    <target name="build-neptune" depends="init">
        <echo>Build Kitchen Sink - Neptune Theme</echo>
        <x-run-build themeName="neptune" target="build"/>
    </target>
 
    <target name="clean-all"
            depends="clean-access,clean-classic,clean-gray,clean-neptune"/>
 
    <target name="clean-access" depends="init">
        <echo>Clean Kitchen Sink - Accessibility Theme</echo>
        <x-run-build themeName="access" target="clean"/>
    </target>
 
    <target name="clean-classic" depends="init">
        <echo>Clean Kitchen Sink - Classic Theme</echo>
        <x-run-build themeName="classic" target="clean"/>
    </target>
 
    <target name="clean-gray" depends="init">
        <echo>Clean Kitchen Sink - Gray Theme</echo>
        <x-run-build themeName="gray" target="clean"/>
    </target>
 
    <target name="clean-neptune" depends="init">
        <echo>Clean Kitchen Sink - Neptune Theme</echo>
        <x-run-build themeName="neptune" target="clean"/>
    </target>
 
</project>