From 65f9eb0c2f6911576a9f0a03133f45c1f438cd4d Mon Sep 17 00:00:00 2001 From: Ruben Daniels Date: Sat, 28 Mar 2015 00:00:46 +0000 Subject: [PATCH] Automate and installer plugin for the installer. --- configs/client-default.js | 11 +++++++++-- package.json | 3 ++- plugins/c9.vfs.client/vfs_client.js | 28 +--------------------------- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/configs/client-default.js b/configs/client-default.js index ea4f66e0..c17cbb38 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -92,7 +92,6 @@ module.exports = function(options) { "plugins/c9.vfs.client/vfs.ping", { packagePath: "plugins/c9.vfs.client/vfs_client", - withInstall: false, debug: debug, installPath: options.installPath, dashboardUrl: options.dashboardUrl, @@ -495,7 +494,15 @@ module.exports = function(options) { }, "plugins/c9.ide.panels/panel", "plugins/c9.ide.panels/area", - "plugins/c9.ide.installer/installer_mock", + + // Installer + "plugins/c9.ide.installer/automate", + "plugins/c9.ide.installer/ui", + { + packagePath: "plugins/c9.ide.installer/installer", + homeDir: options.homeDir, + installSelfCheck: true + }, // Previewer { diff --git a/package.json b/package.json index 18807e8b..fc9fcc6e 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "c9.ide.find.infiles": "#1b83cf12f1", "c9.ide.find.replace": "#e4daf722b8", "c9.ide.run.debug": "#638e6b00b3", + "c9.automate": "#86bf1ee1ca", "c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.gotoline": "#4d1a93172c", "c9.ide.ace.keymaps": "#6c4bb65b1f", @@ -82,7 +83,7 @@ "c9.ide.help.support": "#60e88f5680", "c9.ide.imgeditor": "#08bbc53578", "c9.ide.immediate": "#6845a93705", - "c9.ide.installer": "#24e7d6f399", + "c9.ide.installer": "#875687d14c", "c9.ide.mount": "#32e79866ee", "c9.ide.navigate": "#64156c7f4a", "c9.ide.newresource": "#9a7464cc47", diff --git a/plugins/c9.vfs.client/vfs_client.js b/plugins/c9.vfs.client/vfs_client.js index 0398223f..a873bce5 100644 --- a/plugins/c9.vfs.client/vfs_client.js +++ b/plugins/c9.vfs.client/vfs_client.js @@ -1,9 +1,3 @@ -/** - * Smith.io client - * - * @copyright 2013, Ajax.org B.V. - */ - define(function(require, exports, module) { "use strict"; @@ -58,7 +52,6 @@ define(function(require, exports, module) { errorDialog.vfs = plugin; var buffer = []; - var installChecked = false; var withInstall = options.withInstall; var dashboardUrl = options.dashboardUrl; var region, vfsBaseUrl, homeUrl, projectUrl, pingUrl, serviceUrl; @@ -287,13 +280,8 @@ define(function(require, exports, module) { return; } - if (!installChecked) { - checkInstall(_vfs, callback); - installChecked = true; - } - else { + if (emit("beforeConnect", { done: callback, vfs: _vfs }) !== false) callback(); - } function callback(shouldReconnect) { if (shouldReconnect) { @@ -320,19 +308,6 @@ define(function(require, exports, module) { }); } - function checkInstall(vfs, callback) { - if (!withInstall) - return callback(false); - - vfs.stat(options.installPath + "/installed", {}, function(err, stat) { - if (err && err.code == "ENOENT") { - emit.sticky("install", { callback: callback, vfs: vfs }); - } - else - callback(); - }); - } - var bufferedVfsCalls = []; function vfsCall(method, path, options, callback) { if (Array.isArray(method)) @@ -354,7 +329,6 @@ define(function(require, exports, module) { id = null; buffer = []; - installChecked = false; region = null; vfsBaseUrl = null; homeUrl = null;