diff --git a/osx/installerplugins/installerplugins.xcodeproj/project.pbxproj b/osx/installerplugins/installerplugins.xcodeproj/project.pbxproj index e38a243b43..2a5a1f1f66 100644 --- a/osx/installerplugins/installerplugins.xcodeproj/project.pbxproj +++ b/osx/installerplugins/installerplugins.xcodeproj/project.pbxproj @@ -53,7 +53,7 @@ 1B4C91C31B85198100A06068 /* InstallerSections.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = InstallerSections.plist; sourceTree = ""; }; 1B8417E71B85261F00B1FA4D /* kitematic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = kitematic.png; sourceTree = ""; }; 1B8417E81B85261F00B1FA4D /* quickstart.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = quickstart.png; sourceTree = ""; }; - 1BDCE93A1B914EE2009C3488 /* informationplugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = informationplugin.bundle; path = /Users/jmorgan/workspace/toolbox/osx/installerplugins/build/Debug/informationplugin.bundle; sourceTree = ""; }; + 1BBD8C711B9236E600E2B28A /* informationplugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = informationplugin.bundle; path = /Users/jmorgan/workspace/toolbox/osx/installerplugins/build/Debug/informationplugin.bundle; sourceTree = ""; }; 1BF102BB1B8BDEDA00FCB650 /* overviewplugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = overviewplugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 1BF102BE1B8BDEDA00FCB650 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1BF102C01B8BDEDA00FCB650 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -241,7 +241,7 @@ ); name = informationplugin; productName = informationplugin; - productReference = 1BDCE93A1B914EE2009C3488 /* informationplugin.bundle */; + productReference = 1BBD8C711B9236E600E2B28A /* informationplugin.bundle */; productType = "com.apple.product-type.bundle"; }; 1BF102BA1B8BDEDA00FCB650 /* overviewplugin */ = { diff --git a/osx/installerplugins/managevmplugin/managevmpluginPane.m b/osx/installerplugins/managevmplugin/managevmpluginPane.m index 4fac1f86ec..a2b22b55b8 100644 --- a/osx/installerplugins/managevmplugin/managevmpluginPane.m +++ b/osx/installerplugins/managevmplugin/managevmpluginPane.m @@ -20,7 +20,7 @@ NSString *vBoxManagePath = @"/Applications/VirtualBox.app/Contents/MacOS/VBoxMan NSString *dockerMachinePath = @"/usr/local/bin/docker-machine"; - (BOOL) vmExists:(NSString*)name { - NSTask* task = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:[NSArray arrayWithObjects:@"-u", NSUserName(), vBoxManagePath, @"showvminfo", name, nil]]; + NSTask* task = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:[NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), vBoxManagePath, @"showvminfo", name, nil]]; [task waitUntilExit]; return [task terminationStatus] != 1; } @@ -55,7 +55,7 @@ NSString *dockerMachinePath = @"/usr/local/bin/docker-machine"; self.migrating = YES; // Remove existing vm if it exists (obviously user must have deleted the - NSTask* removeVMTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:[NSArray arrayWithObjects:@"-u", NSUserName(), dockerMachinePath, @"rm", @"-f", @"default", nil]]; + NSTask* removeVMTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:[NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), dockerMachinePath, @"rm", @"-f", @"default", nil]]; [removeVMTask waitUntilExit]; // Remove the VM dir in case there's anything left over @@ -65,16 +65,15 @@ NSString *dockerMachinePath = @"/usr/local/bin/docker-machine"; // Do the migration NSTask* migrateTask = [[NSTask alloc] init]; migrateTask.launchPath = @"/usr/bin/sudo"; - migrateTask.arguments = [NSArray arrayWithObjects:@"-u", NSUserName(), dockerMachinePath, @"-D", @"create", @"-d", @"virtualbox", @"--virtualbox-import-boot2docker-vm", @"boot2docker-vm", @"default", nil]; + migrateTask.arguments = [NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), dockerMachinePath, @"-D", @"create", @"-d", @"virtualbox", @"--virtualbox-memory", @"2048", @"--virtualbox-import-boot2docker-vm", @"boot2docker-vm", @"default", nil]; // Remove certificates, ssh keys from logs NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"BEGIN.*END" options:NSRegularExpressionDotMatchesLineSeparators error:NULL]; NSFont *font = [NSFont fontWithName:@"Menlo" size:10.0]; NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]; - NSMutableData* fullData = [[NSMutableData alloc] init]; - migrateTask.standardOutput = [NSPipe pipe]; - [[migrateTask.standardOutput fileHandleForReading] setReadabilityHandler:^(NSFileHandle *file) { + + void (^appendOutput)(NSFileHandle*) = ^(NSFileHandle *file) { NSData *data = [file availableData]; [fullData appendData:data]; NSMutableString *str = [[NSMutableString alloc] initWithData:fullData encoding:NSUTF8StringEncoding]; @@ -84,7 +83,13 @@ NSString *dockerMachinePath = @"/usr/local/bin/docker-machine"; [self.migrationLogsTextView.textStorage setAttributedString:[[NSAttributedString alloc] initWithString:str attributes:attrsDictionary]]; [self.migrationLogsTextView scrollRangeToVisible:NSMakeRange([[self.migrationLogsTextView string] length], 0)]; }); - }]; + }; + + migrateTask.standardOutput = [NSPipe pipe]; + migrateTask.standardError = [NSPipe pipe]; + + [[migrateTask.standardOutput fileHandleForReading] setReadabilityHandler:appendOutput]; + [[migrateTask.standardError fileHandleForReading] setReadabilityHandler:appendOutput]; migrateTask.terminationHandler = ^(NSTask* task) { dispatch_async(dispatch_get_main_queue(), ^{ diff --git a/osx/installerplugins/overviewplugin/Base.lproj/overviewplugin.xib b/osx/installerplugins/overviewplugin/Base.lproj/overviewplugin.xib index e75f62f894..013230f146 100644 --- a/osx/installerplugins/overviewplugin/Base.lproj/overviewplugin.xib +++ b/osx/installerplugins/overviewplugin/Base.lproj/overviewplugin.xib @@ -31,15 +31,15 @@ - + - - + + - - + + diff --git a/osx/mpkg/Plugins/managevmplugin.bundle/Contents/MacOS/managevmplugin b/osx/mpkg/Plugins/managevmplugin.bundle/Contents/MacOS/managevmplugin index a631a8ab80..8d6f30bfbf 100755 Binary files a/osx/mpkg/Plugins/managevmplugin.bundle/Contents/MacOS/managevmplugin and b/osx/mpkg/Plugins/managevmplugin.bundle/Contents/MacOS/managevmplugin differ diff --git a/osx/mpkg/Plugins/overviewplugin.bundle/Contents/Resources/Base.lproj/overviewplugin.nib b/osx/mpkg/Plugins/overviewplugin.bundle/Contents/Resources/Base.lproj/overviewplugin.nib index 21ebc2a50a..d02ae3ecb5 100644 Binary files a/osx/mpkg/Plugins/overviewplugin.bundle/Contents/Resources/Base.lproj/overviewplugin.nib and b/osx/mpkg/Plugins/overviewplugin.bundle/Contents/Resources/Base.lproj/overviewplugin.nib differ