Remove VirtualBox install & requirement

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2015-10-05 20:08:05 -04:00
parent a44f20168d
commit 473ccf0249
2 changed files with 5 additions and 48 deletions

View File

@ -25,11 +25,6 @@
"docker-version": "1.8.2", "docker-version": "1.8.2",
"docker-machine-version": "0.4.1", "docker-machine-version": "0.4.1",
"electron-version": "0.27.2", "electron-version": "0.27.2",
"virtualbox-version": "5.0.4",
"virtualbox-filename": "VirtualBox-5.0.4.pkg",
"virtualbox-filename-win": "VirtualBox-5.0.4.exe",
"virtualbox-checksum": "4597b2ebdf7a334a3a4028e2285f62cf4cf157477e33fa5f433d944da54737d6",
"virtualbox-checksum-win": "17fe9943eae33d1d23d37160fd862b7c5db0eef8cb48225cf143244d0e934f94",
"dependencies": { "dependencies": {
"alt": "^0.16.2", "alt": "^0.16.2",
"ansi-to-html": "0.3.0", "ansi-to-html": "0.3.0",

View File

@ -19,41 +19,6 @@ var _retryPromise = null;
var _requiredSteps = []; var _requiredSteps = [];
var _steps = [{ var _steps = [{
name: 'download',
title: 'Downloading VirtualBox',
message: 'VirtualBox is being downloaded. Kitematic requires VirtualBox to run containers.',
totalPercent: 35,
percent: 0,
run: function (progressCallback) {
return setupUtil.download(virtualBox.url(), path.join(util.supportDir(), virtualBox.filename()), virtualBox.checksum(), percent => {
progressCallback(percent);
});
}
}, {
name: 'install',
title: 'Installing VirtualBox & Docker',
message: 'VirtualBox & Docker are being installed or upgraded in the background. We may need you to type in your password to continue.',
totalPercent: 5,
percent: 0,
seconds: 5,
run: Promise.coroutine(function* (progressCallback) {
if (!virtualBox.installed()) {
yield virtualBox.killall();
progressCallback(50); // TODO: detect when the installation has started so we can simulate progress
try {
if (util.isWindows()) {
yield util.exec([path.join(util.supportDir(), virtualBox.filename()), '-msiparams', 'REBOOT=ReallySuppress', 'LIMITUI=INSTALLUILEVEL_PROGRESSONLY']);
} else {
yield util.exec(setupUtil.macSudoCmd(setupUtil.installVirtualBoxCmd()));
}
} catch (err) {
throw null;
}
} else if (!util.isWindows() && !virtualBox.active()) {
yield util.exec(setupUtil.macSudoCmd(util.escapePath('/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh') + ' restart'));
}
})
}, {
name: 'init', name: 'init',
title: 'Starting Docker VM', title: 'Starting Docker VM',
message: 'To run Docker containers on your computer, Kitematic is starting a Linux virtual machine. This may take a minute...', message: 'To run Docker containers on your computer, Kitematic is starting a Linux virtual machine. This may take a minute...',
@ -146,12 +111,8 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
var packagejson = util.packagejson(); var packagejson = util.packagejson();
var isoversion = machine.isoversion(); var isoversion = machine.isoversion();
var required = {}; var required = {};
var vboxfile = path.join(util.supportDir(), virtualBox.filename());
var vboxNeedsInstall = !virtualBox.installed();
required.download = vboxNeedsInstall && (!fs.existsSync(vboxfile) || setupUtil.checksum(vboxfile) !== virtualBox.checksum()); required.init = !(yield machine.exists()) || (yield machine.state()) !== 'Running' || !isoversion || util.compareVersions(isoversion, packagejson['docker-version']) < 0;
required.install = vboxNeedsInstall || (!util.isWindows() && !virtualBox.active());
required.init = required.install || !(yield machine.exists()) || (yield machine.state()) !== 'Running' || !isoversion || util.compareVersions(isoversion, packagejson['docker-version']) < 0;
var exists = yield machine.exists(); var exists = yield machine.exists();
if (isoversion && util.compareVersions(isoversion, packagejson['docker-version']) < 0) { if (isoversion && util.compareVersions(isoversion, packagejson['docker-version']) < 0) {
@ -168,9 +129,7 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
return Promise.resolve(_requiredSteps); return Promise.resolve(_requiredSteps);
}), }),
run: Promise.coroutine(function* () { run: Promise.coroutine(function* () {
metrics.track('Started Setup', { metrics.track('Started Setup');
virtualbox: virtualBox.installed() ? yield virtualBox.version() : 'Not Installed'
});
var steps = yield this.requiredSteps(); var steps = yield this.requiredSteps();
for (let step of steps) { for (let step of steps) {
_currentStep = step; _currentStep = step;
@ -207,6 +166,9 @@ var SetupStore = assign(Object.create(EventEmitter.prototype), {
setup: Promise.coroutine(function * () { setup: Promise.coroutine(function * () {
while (true) { while (true) {
try { try {
if (!virtualBox.installed()) {
throw {message: 'VirtualBox is not installed, please install it and try again. VirtualBox is included in the Docker Toolbox.'}
}
var ip = yield this.run(); var ip = yield this.run();
if (!ip || !ip.length) { if (!ip || !ip.length) {
throw { throw {