Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 125 lines (106 sloc) 5.554 kb
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
<?xml version="1.0" ?>

<project name="PIE" default="build" basedir=".">

    <property name="version" value="1.0beta5" />
    <property name="build_dir" value="./build" />
    <property name="src_dir" value="./sources" />

    <target name="clean">
        <delete dir="${build_dir}" />
    </target>

    <target name="build-uncompressed">
        <mkdir dir="${build_dir}" />
        <concat destfile="${build_dir}/script_uncompressed.js">
            <fileset file="${src_dir}/PIE_open.js" />
            <fileset file="${src_dir}/Util.js" />
            <fileset file="${src_dir}/GradientUtil.js" />
            <fileset file="${src_dir}/Observable.js" />
            <fileset file="${src_dir}/Heartbeat.js" />
            <fileset file="${src_dir}/OnUnload.js" />
            <fileset file="${src_dir}/OnResize.js" />
            <fileset file="${src_dir}/OnScroll.js" />
            <fileset file="${src_dir}/OnPrint.js" />
            <fileset file="${src_dir}/OnMouseup.js" />
            <fileset file="${src_dir}/Length.js" />
            <fileset file="${src_dir}/BgPosition.js" />
            <fileset file="${src_dir}/BgSize.js" />
            <fileset file="${src_dir}/Angle.js" />
            <fileset file="${src_dir}/Color.js" />
            <fileset file="${src_dir}/Tokenizer.js" />
            <fileset file="${src_dir}/BoundsInfo.js" />
            <fileset file="${src_dir}/StyleInfoBase.js" />
            <fileset file="${src_dir}/BackgroundStyleInfo.js" />
            <fileset file="${src_dir}/BorderStyleInfo.js" />
            <fileset file="${src_dir}/BorderRadiusStyleInfo.js" />
            <fileset file="${src_dir}/BorderImageStyleInfo.js" />
            <fileset file="${src_dir}/BoxShadowStyleInfo.js" />
            <fileset file="${src_dir}/VisibilityStyleInfo.js" />
            <fileset file="${src_dir}/RendererBase.js" />
            <fileset file="${src_dir}/RootRenderer.js" />
            <fileset file="${src_dir}/BackgroundRenderer.js" />
            <fileset file="${src_dir}/BorderRenderer.js" />
            <fileset file="${src_dir}/BorderImageRenderer.js" />
            <fileset file="${src_dir}/BoxShadowOutsetRenderer.js" />
            <!--<fileset file="${src_dir}/BoxShadowInsetRenderer.js" />-->
            <fileset file="${src_dir}/ImgRenderer.js" />
            <fileset file="${src_dir}/IE9RootRenderer.js" />
            <fileset file="${src_dir}/IE9BackgroundRenderer.js" />
            <fileset file="${src_dir}/IE9BorderImageRenderer.js" />
            <fileset file="${src_dir}/Element.js" />
            <fileset file="${src_dir}/PIE_API.js" />
            <fileset file="${src_dir}/PIE_close.js" />
        </concat>

        <concat destfile="${build_dir}/PIE_uncompressed.htc">
            <fileset file="${src_dir}/htc_open.txt" />
            <fileset file="${build_dir}/script_uncompressed.js" />
            <fileset file="${src_dir}/htc_init.js" />
            <fileset file="${src_dir}/htc_close.txt" />
        </concat>

        <concat destfile="${build_dir}/PIE_uncompressed.js">
            <fileset file="${src_dir}/js_open.js" />
            <fileset file="${build_dir}/script_uncompressed.js" />
            <fileset file="${src_dir}/js_close.js" />
        </concat>

        <replace file="${build_dir}/PIE_uncompressed.htc" token="$Version$" value="${version}"/>
        <replace file="${build_dir}/PIE_uncompressed.js" token="$Version$" value="${version}"/>
    </target>

    <target name="build-compressed" depends="build-uncompressed">
        <exec executable="java">
            <arg line='-jar tools/compiler.jar
--js ${build_dir}/script_uncompressed.js
--js ${src_dir}/htc_init.js
--js ${src_dir}/closure_preservefunctions.js
--module "script_compressed:1"
--module "htc_init_compressed:1"
--module "temp:1"
--module_output_path_prefix ${build_dir}/
--compilation_level ADVANCED_OPTIMIZATIONS
--externs ${src_dir}/closure_externs.js' />
        </exec>

        <concat destfile="${build_dir}/PIE.htc">
            <fileset file="${src_dir}/htc_open.txt" />
            <fileset file="${build_dir}/script_compressed.js" />
            <fileset file="${build_dir}/htc_init_compressed.js" />
            <fileset file="${src_dir}/htc_close.txt" />
        </concat>

        <concat destfile="${build_dir}/PIE.js">
            <fileset file="${src_dir}/js_open.js" />
            <fileset file="${build_dir}/script_compressed.js" />
            <fileset file="${src_dir}/js_close.js" />
        </concat>

        <replace file="${build_dir}/PIE.htc" token="$Version$" value="${version}"/>
        <replace file="${build_dir}/PIE.js" token="$Version$" value="${version}"/>

        <delete file="${build_dir}/temp.js" />
        <delete file="${build_dir}/htc_init_compressed.js" />
        <delete file="${build_dir}/script_uncompressed.js" />
        <delete file="${build_dir}/script_compressed.js" />
    </target>


    <target name="copy-wrappers">
        <copy todir="${build_dir}">
            <fileset dir="${src_dir}/wrappers" />
        </copy>
    </target>


    <target name="build" depends="build-uncompressed,build-compressed" />

    <target name="package" depends="clean,build,copy-wrappers">
        <!-- Create distribution bundle -->
        <zip destfile="${build_dir}/PIE.zip" basedir="${build_dir}"/>
    </target>

</project>
Something went wrong with that request. Please try again.