Skip to content

Commit

Permalink
Adding customProfileName param.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Arps committed Dec 21, 2010
1 parent 526d1da commit 9191145
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
9 changes: 7 additions & 2 deletions js/build.js
Expand Up @@ -47,12 +47,17 @@ var allValidPlatforms = platform.getAllValid(config.platformsDirectory, cmdLine.
// create the uncompressed files, using some simple java stuff, if configured so.
//
var uncompressed = typeof cmdLine.parameters.uncompressed=="undefined" ? config.rawData.build.generateUncompressedFiles : cmdLine.getBoolean(cmdLine.parameters.uncompressed);

// check what profile name to use for filename.
var customProfileName = cmdLine.parameters.customProfileName || config.profile;

for (var i=0, l=allValidPlatforms.length, p; i<l; i++){
p = allValidPlatforms[i];
config.setValue("platform", p);
var files = new FileList().get(config.platformFile, config.features, config.sourceDirectory);
var filesWithFullPath = files.map(function(f){ return config.sourceDirectory + f });
var buildFileNamePrefix = config.getBuildFilenamePrefix(config.profile, p);
var filesWithFullPath = files.map(function(f){ return config.sourceDirectory + f });

var buildFileNamePrefix = config.getBuildFilenamePrefix(customProfileName, p);


var uncompressedFileName;
Expand Down
2 changes: 1 addition & 1 deletion ui/build.php
@@ -1,7 +1,7 @@
<?php

$params = array(
'path', 'name', 'features', 'platforms', 'keepLines', 'stripConsole', 'uncompressed', 'verbose'
'path', 'name', 'features', 'platforms', 'keepLines', 'stripConsole', 'uncompressed', 'verbose', 'customProfileName'
);

echo "<pre>Invoking script:\n";
Expand Down
3 changes: 2 additions & 1 deletion ui/build_from_web.sh
Expand Up @@ -9,6 +9,7 @@ KEEPLINES=$5
STRIPCONSOLE=$6
UNCOMPRESSED=$7
VERBOSE=$8
CUSTOMPROFILENAME=$9

# go to tools directory
cd ..
Expand All @@ -24,4 +25,4 @@ cd $CONFIGPATH
echo "Invoking builder."
echo ""
# start the builder
$TOOLS_DIR/build.sh profile=$BUILDNAME features=$FEATURES platforms=$PLATFORMS keepLines=$KEEPLINES stripConsole=$STRIPCONSOLE uncompressed=$UNCOMPRESSED isVerbose=$VERBOSE
$TOOLS_DIR/build.sh profile=$BUILDNAME features=$FEATURES platforms=$PLATFORMS keepLines=$KEEPLINES stripConsole=$STRIPCONSOLE uncompressed=$UNCOMPRESSED isVerbose=$VERBOSE customProfileName=$CUSTOMPROFILENAME
2 changes: 1 addition & 1 deletion ui/index.html
Expand Up @@ -38,7 +38,7 @@
<div id="head" dojotype="dijit.layout.TabContainer" region="top">
<div id="profileSettings" dojoType="dijit.layout.ContentPane" selected="true" title="Profiles">
<div>
Current profile name: <span id="currentProfileName">&mdash;</span>
Current profile name: <span id="currentProfileName">&mdash;</span> &mdash; Name used for build operations: <input id="customProfileName" />
</div>
<div>
Current profile's feature list: <input type="text" id="currentProfile" value="" readOnly="true" />
Expand Down
6 changes: 4 additions & 2 deletions ui/ui.js
Expand Up @@ -368,9 +368,9 @@ var ebti = {
}
--this._dependencyFilesToLoad && this.onDependendcyFilesLoaded();
}),
error: function(){
error: dojo.hitch(this, function(){
--this._dependencyFilesToLoad && this.onDependendcyFilesLoaded();
}
})
});
},

Expand All @@ -385,6 +385,7 @@ var ebti = {
this.buildDetails = {};
this.buildOrder = {};
dojo.byId('currentProfileName').innerHTML = this.currentProfileName;
dojo.byId('customProfileName').value = this.currentProfileName;
dojo.byId('currentProfile').value = '"' + this.currentProfile.join('", "') + '"';
dojo.map(this.currentProfile, dojo.hitch(this, 'addFeature'));
this.renderBuildDetails();
Expand Down Expand Up @@ -523,6 +524,7 @@ var ebti = {
}
var query = dojo.objectToQuery({
name: this.currentProfileName,
customProfileName: dojo.byId('customProfileName').value,
features: this.currentProfile.join(','),
path: this.pathToConfig,
platforms: this.platformNames.join(','),
Expand Down

0 comments on commit 9191145

Please sign in to comment.