Changeset 7279
- Timestamp:
- 02/09/07 21:29:09 (22 months ago)
- Location:
- trunk/buildscripts
- Files:
-
- 4 modified
-
webbuild.php (modified) (1 diff)
-
webbuild/index.html (modified) (2 diffs)
-
webbuild/webbuild.js (modified) (4 diffs)
-
webbuild/webbuild.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/buildscripts/webbuild.php
r7275 r7279 2 2 $buildScriptsDir = "/Users/jrbsilver/svn/dojo/branches/0.4/buildscripts"; 3 3 $depList = isset($_POST['depList']) ? $_POST['depList'] : null; 4 $provideList = isset($_POST['provideList']) ? $_POST['provideList'] : ' ';4 $provideList = isset($_POST['provideList']) ? $_POST['provideList'] : 'null'; 5 5 $version = isset($_POST['version']) ? $_POST['version'] : '0.0.0dev'; 6 6 $xdDojoUrl = isset($_POST['xdDojoUrl']) ? $_POST['xdDojoUrl'] : ''; -
trunk/buildscripts/webbuild/index.html
r7273 r7279 45 45 depListForm.action = "../webbuild.php"; 46 46 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"; 48 48 depListForm.version.value = version; 49 49 depListForm.xdDojoUrl.value = xdDojoUrl; … … 54 54 }, 1000); 55 55 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. 56 73 depListForm.submit(); 57 74 } -
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 1 7 //Define some methods that are defined in Rhino, but we need web equivalents 2 8 //in order for the build scripts to work. … … 26 32 } 27 33 28 dojo.require("dojo.string.extras");29 30 34 //Define the webbuild object. 31 35 webbuild = { 32 36 build: function(/*String*/depString, /*String*/version, /*String*/xdDojoPath){ 33 depString = d ojo.string.trim(depString);37 depString = depString.replace(/^\s*/, "").replace(/\s*$/, ""); 34 38 if(!depString){ 35 39 alert("Please enter some dependencies"); … … 44 48 45 49 if(location.toString().indexOf("file:") == 0){ 46 var dojoResult = buildUtil.makeDojoJs(dependencyResult, version);47 48 //Intern strings, and add license49 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 57 50 //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."; 65 52 66 53 var outputWindow = window.open("webbuild/dojo.js.html", "dojoOutput"); 67 54 outputWindow.focus(); 68 69 //FAILED attempts:70 //Using a javascript: url, FF 2.0 wraps the content in some HTML, so not really71 //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.075 //Same issue if application/octet-stream is used instead of text/javascript.76 //var outputWindow = window.open("data:text/javascript;" + webbuild.dojoContents, "dojoOutput");77 55 }else{ 78 56 parent.sendDependencyResultToServer(dependencyResult); … … 82 60 getDojoContents: function(){ 83 61 return webbuild.dojoContents; 84 //return "200 OK HTTP/1.0\nContent-type: text/javascript\n"85 // + "Content-Disposition: attachment\n\n"86 // + webbuild.dojoContents;87 62 } 88 63 } -
trunk/buildscripts/webbuild/webbuild.sh
r7264 r7279 2 2 3 3 # Define variables used for rest of the script 4 version=0.4.2ALPHA 4 version=0.4.2ALPHA2 5 5 xdDojoUrl=http://dojotoolkit.org/~jburke/webbuild/$version 6 6 versionSuffix=xdomain … … 42 42 43 43 #Generate the list of modules for the web build process. 44 cd buildscripts/webbuild45 44 java -jar ../lib/custom_rhino.jar makeWebBuildModuleList.js ../../src treeData.js 46 45 cd ../../.. 47 46 48 47 #Now in release folder. Bundle it all up. 49 zip -r dojo-$version.zip $version/* web/* 48 mv web/ $version/ 49 zip -r dojo-$version.zip $version/* 50 50 mv dojo-$version.zip ../.. 51 51