root / trunk / web / dojo / dojox / mobile / build / build.sh @ 12
History | View | Annotate | Download (1.77 KB)
1 | 9 | andrej.cim | #!/bin/sh |
---|---|---|---|
2 | |||
3 | # Build script for dojox.mobile |
||
4 | # |
||
5 | # Note: |
||
6 | # You may need to manually apply the following patch to your build script |
||
7 | # in order to completely remove all the unused modules from your build. |
||
8 | # The patch disables finding the dojo base modules being used from the |
||
9 | # dependent modules with a simple pattern matching, which sometimes |
||
10 | # unexpectedly picks up unused modules. |
||
11 | # For example, if you see query.js and NodeList.js baked into your build, |
||
12 | # while you are not using them, then it is worth trying the patch. |
||
13 | # The file to be patched is util/buildscripts/jslib/buildUtil.js. |
||
14 | # |
||
15 | # --- buildUtil.js-orig |
||
16 | # +++ buildUtil.js |
||
17 | # @@ -1506,7 +1506,7 @@ |
||
18 | # var addedResources = {}; |
||
19 | # - while((matches = buildUtil.baseMappingRegExp.exec(tempContents))){ |
||
20 | # + while(false&&(matches = buildUtil.baseMappingRegExp.exec(tempContents))){ |
||
21 | # var baseResource = buildUtil.baseMappings[matches[1]]; |
||
22 | # //Make sure we do not add the dependency to its source resource. |
||
23 | |||
24 | if [ $# -eq 0 ]; then |
||
25 | echo 'Usage: build separate|single [webkit]' |
||
26 | echo ' separate Create mobile.js that includes only dojox.mobile' |
||
27 | echo ' single Create a single dojo.js layer that includes dojox.mobile' |
||
28 | echo ' webkit Enable webkitMobile=true option (Loses PC browser support)' |
||
29 | exit 1 |
||
30 | fi |
||
31 | |||
32 | optimize=shrinksafe |
||
33 | profile=mobile.profile.js |
||
34 | dir=release-mobile-separate |
||
35 | webkit= |
||
36 | if [ "$1" == "single" ]; then |
||
37 | profile=mobile-all.profile.js |
||
38 | fi |
||
39 | if [ "$1" == "single" ]; then |
||
40 | dir=release-mobile-single |
||
41 | fi |
||
42 | if [ "$2" == "webkit" ]; then |
||
43 | webkit=webkitMobile=true |
||
44 | fi |
||
45 | |||
46 | cd ../../../util/buildscripts |
||
47 | |||
48 | ./build.sh profileFile=../../dojox/mobile/build/profiles/$profile action=release customDijitBase=true optimize=$optimize layerOptimize=$optimize cssOptimize=comments releaseDir=../../$dir/ $webkit |
||
49 | |||
50 | cd ../../dojox/mobile/build |