Changeset 7279

Show
Ignore:
Timestamp:
02/09/07 21:29:09 (22 months ago)
Author:
jburke
Message:

(merge from branch) References #2366. Fixed issue with some modules not getting in the list, fixed issue when asking for a build with no modules in it, and now printing out modules/files that are in the build.

Location:
trunk/buildscripts
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/buildscripts/webbuild.php

    r7275 r7279  
    22        $buildScriptsDir = "/Users/jrbsilver/svn/dojo/branches/0.4/buildscripts"; 
    33        $depList = isset($_POST['depList']) ? $_POST['depList'] : null; 
    4         $provideList = isset($_POST['provideList']) ? $_POST['provideList'] : ''; 
     4        $provideList = isset($_POST['provideList']) ? $_POST['provideList'] : 'null'; 
    55        $version = isset($_POST['version']) ? $_POST['version'] : '0.0.0dev'; 
    66        $xdDojoUrl = isset($_POST['xdDojoUrl']) ? $_POST['xdDojoUrl'] : ''; 
  • trunk/buildscripts/webbuild/index.html

    r7273 r7279  
    4545                        depListForm.action = "../webbuild.php"; 
    4646                        depListForm.depList.value = dependencyResult.depList.join(","); 
    47                         depListForm.provideList.value = dependencyResult.provideList.join(","); 
     47                        depListForm.provideList.value = dependencyResult.provideList && dependencyResult.provideList.length > 0 ? dependencyResult.provideList.join(",") : "null"; 
    4848                        depListForm.version.value = version; 
    4949                        depListForm.xdDojoUrl.value = xdDojoUrl; 
     
    5454                        }, 1000); 
    5555 
     56 
     57                        //Print out the list of modules included. 
     58                        dojo.debug("Files included in the build:"); 
     59                        for(var i = 0; i < dependencyResult.depList.length; i++){ 
     60                                output(dependencyResult.depList[i]); 
     61                        } 
     62                        dojo.debug("Modules included in the build:"); 
     63                        if(!dependencyResult.provideList || dependencyResult.provideList.length == 0){ 
     64                                dojo.debug("[no modules included in the build]"); 
     65                        }else{ 
     66                                var provideList = dependencyResult.provideList.sort(); 
     67                                for(var i = 0; i < provideList.length; i++){ 
     68                                        output(provideList[i]); 
     69                                } 
     70                        } 
     71 
     72                        //Submit form to generate custom dojo.js file. 
    5673                        depListForm.submit(); 
    5774                } 
  • trunk/buildscripts/webbuild/webbuild.js

    r7262 r7279  
     1//************************************************************************ 
     2//DO NOT dojo.require() any modules in this file or the page that uses this 
     3//file. It means those modules will be excluded from the build if you do so. 
     4//************************************************************************ 
     5 
     6 
    17//Define some methods that are defined in Rhino, but we need web equivalents 
    28//in order for the build scripts to work. 
     
    2632} 
    2733 
    28 dojo.require("dojo.string.extras"); 
    29  
    3034//Define the webbuild object. 
    3135webbuild = { 
    3236        build: function(/*String*/depString, /*String*/version, /*String*/xdDojoPath){ 
    33                 depString = dojo.string.trim(depString); 
     37                depString = depString.replace(/^\s*/, "").replace(/\s*$/, ""); 
    3438                if(!depString){ 
    3539                        alert("Please enter some dependencies"); 
     
    4448                 
    4549                if(location.toString().indexOf("file:") == 0){ 
    46                         var dojoResult = buildUtil.makeDojoJs(dependencyResult, version); 
    47          
    48                         //Intern strings, and add license 
    49                         dojoResult.dojoContents = new String(readFile("copyright.txt")) + buildUtil.interningRegexpMagic("xdomain", dojoResult.dojoContents, djConfig.baseRelativePath, [["dojo", "src"]], []); 
    50          
    51                         //Print out the file list. 
    52                         dojo.debug("files in the profile:"); 
    53                         for(var i = 0; i < dojoResult.resourceDependencies.length; i++){ 
    54                                 print(dojoResult.resourceDependencies[i]); 
    55                         } 
    56                          
    5750                        //Return the dojo contents 
    58                         webbuild.dojoContents = dojoResult.dojoContents; 
    59          
    60                         //See if we should add in xd dojo module path. 
    61                         xdDojoPath = dojo.string.trim(xdDojoPath); 
    62                         if(xdDojoPath){ 
    63                                 webbuild.dojoContents = buildUtilXd.setXdDojoConfig(webbuild.dojoContents, xdDojoPath); 
    64                         } 
     51                        webbuild.dojoContents = "Just a test. Run the build with a web server that runs PHP to get a real build file."; 
    6552 
    6653                        var outputWindow = window.open("webbuild/dojo.js.html", "dojoOutput"); 
    6754                        outputWindow.focus(); 
    68          
    69                         //FAILED attempts: 
    70                         //Using a javascript: url, FF 2.0 wraps the content in some HTML, so not really 
    71                         //good for file save operations (get HTML in the saved file). 
    72                         //var outputWindow = window.open("javascript:opener.webbuild.getDojoContents()", "dojoOutput"); 
    73          
    74                         //using data: urls seem to add funky text to the beginning of the file, at least in OSX FF 2.0 
    75                         //Same issue if application/octet-stream is used instead of text/javascript. 
    76                         //var outputWindow = window.open("data:text/javascript;" + webbuild.dojoContents, "dojoOutput"); 
    7755                }else{ 
    7856                        parent.sendDependencyResultToServer(dependencyResult); 
     
    8260        getDojoContents: function(){ 
    8361                return webbuild.dojoContents; 
    84                         //return "200 OK HTTP/1.0\nContent-type: text/javascript\n" 
    85                         //      + "Content-Disposition: attachment\n\n" 
    86                         //      + webbuild.dojoContents; 
    8762        } 
    8863} 
  • trunk/buildscripts/webbuild/webbuild.sh

    r7264 r7279  
    22 
    33# Define variables used for rest of the script 
    4 version=0.4.2ALPHA 
     4version=0.4.2ALPHA2 
    55xdDojoUrl=http://dojotoolkit.org/~jburke/webbuild/$version 
    66versionSuffix=xdomain 
     
    4242 
    4343#Generate the list of modules for the web build process. 
    44 cd buildscripts/webbuild 
    4544java -jar ../lib/custom_rhino.jar makeWebBuildModuleList.js ../../src treeData.js 
    4645cd ../../.. 
    4746 
    4847#Now in release folder. Bundle it all up. 
    49 zip -r dojo-$version.zip $version/* web/* 
     48mv web/ $version/ 
     49zip -r dojo-$version.zip $version/* 
    5050mv dojo-$version.zip ../.. 
    5151