Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / mobile / build / build.bat @ 9

History | View | Annotate | Download (1.81 KB)

1
@echo off
2

    
3
rem Build script for dojox.mobile
4
rem 
5
rem Note:
6
rem You may need to manually apply the following patch to your build script
7
rem in order to completely remove all the unused modules from your build.
8
rem The patch disables finding the dojo base modules being used from the
9
rem dependent modules with a simple pattern matching, which sometimes
10
rem unexpectedly picks up unused modules.
11
rem For example, if you see query.js and NodeList.js baked into your build,
12
rem while you are not using them, then it is worth trying the patch.
13
rem The file to be patched is util/buildscripts/jslib/buildUtil.js.
14
rem 
15
rem --- buildUtil.js-orig
16
rem +++ buildUtil.js
17
rem @@ -1506,7 +1506,7 @@
18
rem    var addedResources = {};
19
rem -  while((matches = buildUtil.baseMappingRegExp.exec(tempContents))){
20
rem +  while(false&&(matches = buildUtil.baseMappingRegExp.exec(tempContents))){
21
rem        var baseResource = buildUtil.baseMappings[matches[1]];
22
rem        //Make sure we do not add the dependency to its source resource.
23

    
24
if "%1"=="separate" goto ok
25
if "%1"=="single" goto ok
26
echo Usage: build separate^|single [webkit]
27
echo   separate  Create mobile.js that includes only dojox.mobile
28
echo   single    Create a single dojo.js layer that includes dojox.mobile
29
echo   webkit    Enable webkitMobile=true option (Loses PC browser support)
30
goto end
31
:ok
32

    
33
set optimize=shrinksafe
34
set profile=mobile.profile.js
35
set dir=release-mobile-separate
36
set webkit=
37
if "%1"=="single" set profile=mobile-all.profile.js
38
if "%1"=="single" set dir=release-mobile-single
39
if "%2"=="webkit" set webkit=webkitMobile=true
40

    
41
cd ..\..\..\util\buildscripts
42

    
43
call build profileFile=../../dojox/mobile/build/profiles/%profile% action=release customDijitBase=true optimize=%optimize% layerOptimize=%optimize% cssOptimize=comments releaseDir=../../%dir%/ %webkit%
44

    
45
cd ..\..\dojox\mobile\build
46

    
47
:end