Commit 70faabf1 authored by iSergio's avatar iSergio
Browse files

Initial commit

parent 5ff89c58
Loading
Loading
Loading
Loading
+1831 −0

File added.

Preview size limit exceeded, changes collapsed.

+973 −0

File added.

Preview size limit exceeded, changes collapsed.

+62 −0
Original line number Diff line number Diff line
<project name="bootstrap-impl">
    <!--
    This macrodef regenerates the bootstrap.js class system metadata, which includes
    relative file paths, class names, alternate class names, and class alias data
    -->
    <macrodef name="x-bootstrap">
        <attribute name="file"/>
        <attribute name="basedir"/>
        <attribute name="coreFilesFile" default="@{file}"/>
        <attribute name="classMetadataFile" default="@{file}"/>
        <attribute name="overridesFile" default="@{file}"/>
        <attribute name="includeBoot" default="true"/>
        <attribute name="includeManifest" default="false"/>
        <attribute name="includeCoreFiles" default="false"/>
        <attribute name="includeMetadata" default="true"/>
        <attribute name="includeOverrides" default="true"/>
        <attribute name="appendCoreFiles" default="true"/>
        <attribute name="appendClassMetadata" default="true"/>
        <attribute name="appendOverrides" default="true"/>
        <attribute name="manifestTpl" default="var Ext = Ext || '{' '}'; Ext.manifest = {0};"/>
        <attribute name="coreFilesJsonpTpl" default="Ext.Boot.loadSync"/>
        <attribute name="loaderConfigJsonpTpl" default="Ext.Loader.addClassPathMappings"/>
        <attribute name="overrideTpl" default='Ext.Loader.loadScriptsSync'/>
        <attribute name="overrideTplType" default="jsonp"/>
        <attribute name="overrideExcludeTags" default="package-core,package-sencha-core,package-${framework.name},package-${toolkit.name}"/>
        <text name="launchcode" optional="true"/>
        <sequential>
            <local name="temp.file"/>
            <tempfile property="temp.file"
                      deleteonexit="true"
                      createfile="true"/>
            <echo file="${temp.file}">@{launchcode}</echo>
            <x-compile refid="${compiler.ref.id}">
                <![CDATA[
                    bootstrap
                        -baseDir=@{basedir}
                        -file=@{file}
                        -coreFilesFile=@{coreFilesFile}
                        -classMetadataFile=@{classMetadataFile}
                        -overridesFile=@{overridesFile}
                        -includeBoot=@{includeBoot}
                        -includeManifest=@{includeManifest}
                        -includeCoreFiles=@{includeCoreFiles}
                        -includeMetadata=@{includeMetadata}
                        -includeOverrides=@{includeOverrides}
                        -appendCoreFiles=@{appendCoreFiles}
                        -appendClassMetadata=@{appendClassMetadata}
                        -appendOverrides=@{appendOverrides}
                        -manifestTpl=@{manifestTpl}
                        -coreFilesJsonpTpl=@{coreFilesJsonpTpl}
                        -loaderConfigJsonpTpl=@{loaderConfigJsonpTpl}
                        -overrideTpl=@{overrideTpl}
                        -overrideType=@{overrideTplType}
                        -overrideExcludeTags=@{overrideExcludeTags}
                        -launchContentFile=${temp.file}
                ]]>
            </x-compile>
            <delete file="${temp.file}"/>
        </sequential>
    </macrodef>

</project>
 No newline at end of file
+389 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
********************************** DO NOT EDIT **********************************

This file will be replaced during upgrades so DO NOT EDIT this file. If you need to
adjust the process, reading and understanding this file is the first step.

In most cases, the adjustments can be achieved by setting properties or providing one
of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look
for one of these solutions.

Failing that, you can copy whole targets to your build.xml file and it will overrride
the target provided here. Doing that can create problems for upgrading to newer
versions of Cmd so it is not recommended but it will be easier to manage than editing
this file in most cases.
-->
<project name="x-pkg-build-impl">
    
    <!--
    ===============================================================
    Find Cmd
    uses targets from find-cmd-impl.xml to detect the current 
    install of Sencha Cmd
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/find-cmd-impl.xml"/>
    <target name="init-cmd" 
            depends="find-cmd-in-path,
                     find-cmd-in-environment,
                     find-cmd-in-shell">
        <echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}</echo>

        <!--
        load the sencha.jar ant task definitions.
        
        NOTE: the 'loaderref' attribute stores this task def's class loader
        on the project by that name, so it will be sharable across sub-projects.
        This fixes out-of-memory issues, as well as increases performance.
        
        To supoprt this, it is recommended that any customizations that use
        'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order
        to propagate the senchaloader reference to those subprojects.  
        
        The sencha 'x-ant-call' task, which extends 'antcall' and defaults 
        'inheritrefs' to true, may be used in place of antcall in 
        build process customizations.
        -->
        <taskdef resource="com/sencha/ant/antlib.xml" 
                 classpath="${cmd.dir}/sencha.jar"
                 loaderref="senchaloader"/>
        
        <!-- 
        Some operations require sencha.jar in the current java classpath, 
        so this will extend the java.lang.Thread#contextClassLoader with the 
        specified java classpath entries
        -->
        <x-extend-classpath>
            <jar path="${cmd.dir}/sencha.jar"/>
        </x-extend-classpath>
    </target>

    <!--
    ===============================================================
    Init
    uses targets from init-impl.xml to load Sencha Cmd config
    system properties and ant task definitions
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/refresh-impl.xml"/>
    <import file="${basedir}/.sencha/package/init-impl.xml"/>
    <target name="init"
            depends="init-local,
                     init-cmd,
                     -before-init,
                     -init,
                     -after-init,
                     -before-init-defaults,
                     -init-defaults,
                     -after-init-defaults,
                     -init-compiler"/>

    <!--
    ===============================================================
    Build
    this is the starting point for the build process. The 'depends'
    attribute on the -build target controls the ordering of the 
    different build phases
    ===============================================================
    -->
    <target name="-before-build"/>
    <target name="-build"
            depends="js,
                     inherit-resources,
                     copy-resources,
                     slice,
                     sass,
                     subpkgs,
                     examples,
                     pkg"/>
    <target name="-after-build"/>
    <target name="build"
            depends="init,-before-build,-build,-after-build"
            description="Builds the package"/>

    <!--
    ===============================================================
    Clean
    removes all artifacts from the output build directories
    ===============================================================
    -->
    <target name="-before-clean"/>
    <target name="-after-clean"/>
    <target name="-clean">
        <delete dir="${package.output.base}"/>
        <delete dir="${build.temp.dir}"/>
    </target>
    <target name="clean" 
            depends="init"
            description="Removes all build output produced by the 'build' target">
        <x-ant-call>
            <target name="-before-clean"/>
            <target name="-clean"/>
            <target name="clean-subpkgs"/>
            <target name="clean-examples"/>
            <target name="-after-clean"/>
        </x-ant-call>
    </target>
    
    <!--
    ===============================================================
    JS
    uses targets from js-impl.xml to produce the output js files
    containing package js classes
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/js-impl.xml"/>
    <target name="js" 
            depends="init"
            description="Builds the JS files">
        <x-ant-call unless="skip.js">
            <target name="-before-js"/>
            <target name="-js"/>
            <target name="-after-js"/>
        </x-ant-call>
    </target>

    <!--
    ===============================================================
    Resources
    uses targets from resources-impl.xml the package's resources 
    to the output directory
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/resources-impl.xml"/>

    <target name="inherit-resources" 
            depends="init" 
            description="Performs the resource folder inheritance from base theme(s)">
        <x-ant-call unless="skip.inherit">
            <target name="-before-inherit-resources"/>
            <target name="-inherit-resources"/>
            <target name="-after-inherit-resources"/>
        </x-ant-call>
    </target>
    
    <target name="copy-resources" 
            depends="init" 
            description="Copy theme resources to folder">
        <x-ant-call unless="skip.resources">
            <target name="-before-copy-resources"/>
            <target name="-copy-resources"/>
            <target name="-after-copy-resources"/>
        </x-ant-call>
    </target>
    
    <!--
    ===============================================================
    Sass
    uses targets from sass-impl.xml to produce the output css
    files for the package's styling
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/sass-impl.xml"/>
    <target name="sass" 
            depends="init"
            description="Builds the SASS files using Compass">
        <x-ant-call unless="skip.sass">
            <target name="-before-sass"/>
            <target name="-sass"/>
            <target name="-after-sass"/>
        </x-ant-call>
    </target>
    
    <!--
    ===============================================================
    Slice
    uses targets from slice-impl.xml to extract theme images from
    the package's styling for use with older browsers that don't 
    support modern css features
    ===============================================================
    -->
    <import file="${basedir}/.sencha/package/slice-impl.xml"/>
    <target name="slice" 
            depends="init" 
            description="Slices CSS3 theme to produce non-CSS3 images and sprites">
        <x-ant-call unless="skip.slice">
            <target name="-before-slice"/>
            <target name="-slice"/>
            <target name="-after-slice"/>
        </x-ant-call>
    </target>


    <!--
    ===============================================================
    Sub Builds
    uses targets from sub-builds.xml to process other packages
    and example applications contained within this package.
    Only the "subpkgs" and "examples" targets are part of the 
    main build sequence.
    ===============================================================
    -->
    <import file="sub-builds.xml"/>
    
    <!--
    sub packages
    -->
    <target name="subpkgs" 
            depends="init"
            description="Builds all sub-packages">
        <x-ant-call unless="skip.subpkgs">
            <target name="-before-subpkgs"/>
            <target name="-subpkgs"/>
            <target name="-after-subpkgs"/>
        </x-ant-call>
    </target>

    <target name="clean-subpkgs" 
            depends="init"
            description="Cleans all sub-packages">
        <x-ant-call unless="skip.clean.subpkgs">
            <target name="-before-clean-subpkgs"/>
            <target name="-clean-subpkgs"/>
            <target name="-after-clean-subpkgs"/>
        </x-ant-call>
    </target>

    <target name="upgrade-subpkgs" 
            depends="init"
            description="Upgrades all sub-packages">
        <x-ant-call unless="skip.upgrade.subpkgs">
            <target name="-before-upgrade-subpkgs"/>
            <target name="-upgrade-subpkgs"/>
            <target name="-after-upgrade-subpkgs"/>
        </x-ant-call>
    </target>
                
    <!--
    example applications
    -->
    <target name="examples" 
            depends="init"
            description="Builds all examples">
        <x-ant-call unless="skip.examples">
            <target name="-before-examples"/>
            <target name="-examples"/>
            <target name="-after-examples"/>
        </x-ant-call>
    </target>

    <target name="clean-examples" 
            depends="init"
            description="Upgrades all examples">
        <x-ant-call unless="skip.clean.examples">
            <target name="-before-clean-examples"/>
            <target name="-clean-examples"/>
            <target name="-after-clean-examples"/>
        </x-ant-call>
    </target>

    <target name="upgrade-examples" 
            depends="init"
            description="Upgrades all examples">
        <x-ant-call unless="skip.upgrade.examples">
            <target name="-before-upgrade-examples"/>
            <target name="-upgrade-examples"/>
            <target name="-after-upgrade-examples"/>
        </x-ant-call>
    </target>

    <!--
    Build PKG
    -->
    <target name="-before-pkg"/>
    <target name="-after-pkg"/>
    <target name="-pkg">
        <x-make-pkg dir="${package.dir}"
                    files="${build.pkg.manifest}"
                    pkg="${pkg.build.dir}/${pkg.file.name}"
                    temp="${build.temp.dir}"/>
    </target>
    <target name="pkg" 
            depends="init"
            description="Builds the PKG file">
        <x-ant-call  unless="skip.pkg">
            <target name="-before-pkg"/>
            <target name="-pkg"/>
            <target name="-after-pkg"/>
        </x-ant-call>
    </target>

    <!--
    ===============================================================
    Build Dependencies
    uses the compiler to build metadata files for all detected
    file-to-file dependencies
    ===============================================================
    -->
    <target name="build-dependencies" depends="init,-init-compile-js">
        <x-compile refid="${compiler.ref.id}">
            <![CDATA[
            include
                -all
            and
            meta
                -infoType=Dependencies
                -basePath=${build.dir}
                -tpl={0}
                -out=${build.dir}/dependencies.json
            and
            meta
                -infoType=AppManifest
                -basePath=${build.dir}
                -tpl={0}
                -out=${build.dir}/bootsequence.json
            ]]>
        </x-compile>
    </target>

    <!--
    ===============================================================
    Help - properties
    displays all current ant properties
    ===============================================================
    -->
    <target name=".props" depends="init"
            description="Lists all properties defined for the build">
        <echoproperties/>
    </target>

    <!--
    ===============================================================
    Help - docs
    displays the help message
    ===============================================================
    -->
    <target name=".help" depends="init"
            description="Provides help on the build script">

        <x-get-project-targets property="help.message"/>

        <echo><![CDATA[${help.message}
This is the main build script for your package.

The following properties can be used to disable certain steps in the build
process.

 * skip.pkg         Do not build the PKG file
 * skip.sass        Do not build the SASS.
 * skip.js          Do not build the JS files.

For details about how these options affect your build, see

    ${basedir}/.sencha/package/build-impl.xml

These options can be stored in a local.properties file in this folder or in the
local.properties file in the workspace.

Alternatively, these can be supplied on the command line. For example:

    sencha ant -Dskip.sass=1 build

To see all currently defined properties, do this:

    sencha ant .props
        ]]></echo>
    </target>

</project>
+9 −0
Original line number Diff line number Diff line
# =============================================================================
# This file provides an override point for default variables defined in 
# defaults.properties.
#
# IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades.
# To avoid potential merge conflicts avoid making large, sweeping changes to
# this file.
# =============================================================================
Loading