Handle installation abort gracefully
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/59fbf7a7 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/59fbf7a7 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/59fbf7a7 Branch: refs/heads/develop Commit: 59fbf7a7a87381e7a56093ff6e1a7be302b21627 Parents: e696300 Author: OmPrakash Muppirala <[email protected]> Authored: Wed Apr 6 17:54:03 2016 -0700 Committer: OmPrakash Muppirala <[email protected]> Committed: Thu Apr 7 00:21:04 2016 -0700 ---------------------------------------------------------------------- npm-flexjs/dependencies/download_dependencies.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/59fbf7a7/npm-flexjs/dependencies/download_dependencies.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js index 09b9858..e8fa370 100644 --- a/npm-flexjs/dependencies/download_dependencies.js +++ b/npm-flexjs/dependencies/download_dependencies.js @@ -27,9 +27,11 @@ var flashplayerglobal = require('./FlashPlayerGlobal'); var apacheFlexJS = require('./ApacheFlexJS'); var apacheFalcon = require('./ApacheFalcon'); var swfObject = require('./SWFObject'); +var flatUI = require('./FlatUI'); var installSteps = [ createDownloadsDirectory, + installFlatUI, installFlashPlayerGlobal, installAdobeAIR, installSWFObject, @@ -76,12 +78,14 @@ function handleInstallStepComplete(event) function installFlashPlayerGlobal() { flashplayerglobal.once('complete', handleInstallStepComplete); + flashplayerglobal.once('abort', handleAbort); flashplayerglobal.install(); } function installAdobeAIR(event) { adobeair.once('complete', handleInstallStepComplete); + adobeair.once('abort', handleAbort); adobeair.install(); } @@ -103,9 +107,20 @@ function installSWFObject(event) swfObject.install(); } +function installFlatUI(event) +{ + flatUI.once('complete', handleInstallStepComplete); + flatUI.install(); +} + function allDownloadsComplete() { - console.log('Finished all downloads'); + console.log('Installation complete!'); +} + +function handleAbort() +{ + process.exit(1); } start(); \ No newline at end of file
