Simple upgrades via postinstall script

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2016-02-24 22:39:06 -08:00
parent 13bf5f5a47
commit e389b00642
22 changed files with 15 additions and 730 deletions

View File

@ -7,14 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
1B4C91481B8500A700A06068 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91461B8500A700A06068 /* InfoPlist.strings */; };
1B4C914B1B8500A700A06068 /* managevmpluginPane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C914A1B8500A700A06068 /* managevmpluginPane.m */; };
1B4C914E1B8500A700A06068 /* managevmplugin.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C914C1B8500A700A06068 /* managevmplugin.xib */; };
1B4C91511B8500A700A06068 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C914F1B8500A700A06068 /* Localizable.strings */; };
1B4C91531B8500A700A06068 /* InstallerSections.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91521B8500A700A06068 /* InstallerSections.plist */; };
1B4C915A1B8500BB00A06068 /* toolboxcheck.png in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91571B8500BB00A06068 /* toolboxcheck.png */; };
1B4C915B1B8500BB00A06068 /* boot2docker.png in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91581B8500BB00A06068 /* boot2docker.png */; };
1B4C915C1B8500BB00A06068 /* toolbox.png in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91591B8500BB00A06068 /* toolbox.png */; };
1B4C91B91B85198100A06068 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91B71B85198100A06068 /* InfoPlist.strings */; };
1B4C91BC1B85198100A06068 /* quickstartpluginPane.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B4C91BB1B85198100A06068 /* quickstartpluginPane.m */; };
1B4C91BF1B85198100A06068 /* quickstartplugin.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1B4C91BD1B85198100A06068 /* quickstartplugin.xib */; };
@ -31,17 +23,6 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
1B4C91421B8500A700A06068 /* managevmplugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = managevmplugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
1B4C91451B8500A700A06068 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1B4C91471B8500A700A06068 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1B4C91491B8500A700A06068 /* managevmpluginPane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = managevmpluginPane.h; sourceTree = "<group>"; };
1B4C914A1B8500A700A06068 /* managevmpluginPane.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = managevmpluginPane.m; sourceTree = "<group>"; };
1B4C914D1B8500A700A06068 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/managevmplugin.xib; sourceTree = "<group>"; };
1B4C91501B8500A700A06068 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
1B4C91521B8500A700A06068 /* InstallerSections.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = InstallerSections.plist; sourceTree = "<group>"; };
1B4C91571B8500BB00A06068 /* toolboxcheck.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = toolboxcheck.png; sourceTree = "<group>"; };
1B4C91581B8500BB00A06068 /* boot2docker.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = boot2docker.png; sourceTree = "<group>"; };
1B4C91591B8500BB00A06068 /* toolbox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = toolbox.png; sourceTree = "<group>"; };
1B4C915E1B85023200A06068 /* mixpanel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mixpanel.h; path = common/mixpanel.h; sourceTree = "<group>"; };
1B4C91B31B85198100A06068 /* quickstartplugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = quickstartplugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
1B4C91B61B85198100A06068 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -65,13 +46,6 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
1B4C913F1B8500A700A06068 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
1B4C91B01B85198100A06068 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@ -93,40 +67,13 @@
isa = PBXGroup;
children = (
1BF102BB1B8BDEDA00FCB650 /* overviewplugin.bundle */,
1B4C91421B8500A700A06068 /* managevmplugin.bundle */,
1B4C91B31B85198100A06068 /* quickstartplugin.bundle */,
1BF102BC1B8BDEDA00FCB650 /* overviewplugin */,
1B4C91431B8500A700A06068 /* managevmplugin */,
1B4C91B41B85198100A06068 /* quickstartplugin */,
1B4C915D1B85021200A06068 /* common */,
);
sourceTree = "<group>";
};
1B4C91431B8500A700A06068 /* managevmplugin */ = {
isa = PBXGroup;
children = (
1B4C91571B8500BB00A06068 /* toolboxcheck.png */,
1B4C91581B8500BB00A06068 /* boot2docker.png */,
1B4C91591B8500BB00A06068 /* toolbox.png */,
1B4C91491B8500A700A06068 /* managevmpluginPane.h */,
1B4C914A1B8500A700A06068 /* managevmpluginPane.m */,
1B4C914C1B8500A700A06068 /* managevmplugin.xib */,
1B4C914F1B8500A700A06068 /* Localizable.strings */,
1B4C91521B8500A700A06068 /* InstallerSections.plist */,
1B4C91441B8500A700A06068 /* Supporting Files */,
);
path = managevmplugin;
sourceTree = "<group>";
};
1B4C91441B8500A700A06068 /* Supporting Files */ = {
isa = PBXGroup;
children = (
1B4C91451B8500A700A06068 /* Info.plist */,
1B4C91461B8500A700A06068 /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
1B4C915D1B85021200A06068 /* common */ = {
isa = PBXGroup;
children = (
@ -185,23 +132,6 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
1B4C91411B8500A700A06068 /* managevmplugin */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1B4C91541B8500A700A06068 /* Build configuration list for PBXNativeTarget "managevmplugin" */;
buildPhases = (
1B4C913E1B8500A700A06068 /* Sources */,
1B4C913F1B8500A700A06068 /* Frameworks */,
1B4C91401B8500A700A06068 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = managevmplugin;
productName = managevmplugin;
productReference = 1B4C91421B8500A700A06068 /* managevmplugin.bundle */;
productType = "com.apple.product-type.bundle";
};
1B4C91B21B85198100A06068 /* quickstartplugin */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1B4C91C51B85198100A06068 /* Build configuration list for PBXNativeTarget "quickstartplugin" */;
@ -245,9 +175,6 @@
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Docker Inc";
TargetAttributes = {
1B4C91411B8500A700A06068 = {
CreatedOnToolsVersion = 6.4;
};
1B4C91B21B85198100A06068 = {
CreatedOnToolsVersion = 6.4;
};
@ -269,7 +196,6 @@
projectDirPath = "";
projectRoot = "";
targets = (
1B4C91411B8500A700A06068 /* managevmplugin */,
1B4C91B21B85198100A06068 /* quickstartplugin */,
1BF102BA1B8BDEDA00FCB650 /* overviewplugin */,
);
@ -277,20 +203,6 @@
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
1B4C91401B8500A700A06068 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1B4C915C1B8500BB00A06068 /* toolbox.png in Resources */,
1B4C914E1B8500A700A06068 /* managevmplugin.xib in Resources */,
1B4C91511B8500A700A06068 /* Localizable.strings in Resources */,
1B4C915B1B8500BB00A06068 /* boot2docker.png in Resources */,
1B4C91481B8500A700A06068 /* InfoPlist.strings in Resources */,
1B4C915A1B8500BB00A06068 /* toolboxcheck.png in Resources */,
1B4C91531B8500A700A06068 /* InstallerSections.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1B4C91B11B85198100A06068 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@ -319,14 +231,6 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
1B4C913E1B8500A700A06068 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1B4C914B1B8500A700A06068 /* managevmpluginPane.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1B4C91AF1B85198100A06068 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@ -346,30 +250,6 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
1B4C91461B8500A700A06068 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
1B4C91471B8500A700A06068 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
1B4C914C1B8500A700A06068 /* managevmplugin.xib */ = {
isa = PBXVariantGroup;
children = (
1B4C914D1B8500A700A06068 /* Base */,
);
name = managevmplugin.xib;
sourceTree = "<group>";
};
1B4C914F1B8500A700A06068 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
1B4C91501B8500A700A06068 /* en */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
1B4C91B71B85198100A06068 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
@ -501,38 +381,6 @@
};
name = Release;
};
1B4C91551B8500A700A06068 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../mpkg/Plugins";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = managevmplugin/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_BUNDLE_IDENTIFIER = "com.docker.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
1B4C91561B8500A700A06068 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../mpkg/Plugins";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = managevmplugin/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_BUNDLE_IDENTIFIER = "com.docker.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
1B4C91C61B85198100A06068 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@ -607,15 +455,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1B4C91541B8500A700A06068 /* Build configuration list for PBXNativeTarget "managevmplugin" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1B4C91551B8500A700A06068 /* Debug */,
1B4C91561B8500A700A06068 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1B4C91C51B85198100A06068 /* Build configuration list for PBXNativeTarget "quickstartplugin" */ = {
isa = XCConfigurationList;
buildConfigurations = (

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9059" systemVersion="15C27e" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9059"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="InstallerSection">
<connections>
<outlet property="firstPane" destination="Qsn-FY-4qK" id="Dhh-1H-QYh"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="Qsn-FY-4qK" customClass="managevmpluginPane">
<connections>
<outlet property="contentView" destination="wZl-Zt-3Ul" id="pOK-JC-MAY"/>
<outlet property="migrateCheckbox" destination="1jI-qj-TPj" id="Jez-nP-voL"/>
<outlet property="migrateExtraLabel" destination="KQO-mX-hcI" id="Rg7-4S-ty5"/>
<outlet property="migrationLogsScrollView" destination="UwA-bh-SQw" id="Zw0-AU-QPA"/>
<outlet property="migrationLogsTextView" destination="ehz-gh-aXR" id="VW6-Zi-v52"/>
<outlet property="migrationProgress" destination="uCY-2T-BB0" id="B4L-67-y5K"/>
<outlet property="migrationStatusLabel" destination="PYI-QA-XWa" id="0I6-Jo-SZi"/>
<outlet property="parentSection" destination="-2" id="FB7-UV-e8k"/>
<outlet property="statusImage" destination="FO2-AK-Ue7" id="rYH-29-NhC"/>
<outlet property="submitButton" destination="a96-1q-EBq" id="O1z-29-pYi"/>
<outlet property="toolboxImage" destination="FO2-AK-Ue7" id="5iF-Bg-BdV"/>
</connections>
</customObject>
<customView id="wZl-Zt-3Ul" userLabel="View">
<rect key="frame" x="0.0" y="0.0" width="418" height="330"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KQO-mX-hcI">
<rect key="frame" x="38" y="45" width="362" height="43"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Your existing Boot2Docker VM will not be affected. This should take about a minute." id="Mj5-pe-Eh6">
<font key="font" metaFont="system"/>
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button hidden="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1jI-qj-TPj">
<rect key="frame" x="19" y="100" width="391" height="18"/>
<animations/>
<buttonCell key="cell" type="check" title="Migrate your Boot2Docker VM to work with Docker Toolbox" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="mC0-7J-fb2">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<scrollView hidden="YES" fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UwA-bh-SQw">
<rect key="frame" x="0.0" y="-1" width="418" height="126"/>
<clipView key="contentView" ambiguous="YES" id="g1K-p4-gs1">
<rect key="frame" x="1" y="1" width="416" height="124"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView ambiguous="YES" editable="NO" importsGraphics="NO" richText="NO" findStyle="panel" continuousSpellChecking="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="ehz-gh-aXR">
<rect key="frame" x="0.0" y="0.0" width="416" height="124"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="416" height="124"/>
<size key="maxSize" width="463" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="416" height="124"/>
<size key="maxSize" width="463" height="10000000"/>
</textView>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</clipView>
<animations/>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="jKW-gn-JLe">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="Pv6-xu-8lS">
<rect key="frame" x="401" y="1" width="16" height="124"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
</scrollView>
<button hidden="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="a96-1q-EBq">
<rect key="frame" x="124" y="126" width="170" height="32"/>
<animations/>
<buttonCell key="cell" type="push" title="Open GitHub Issue" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="bna-Yz-WXL">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="submitButtonClicked:" target="Qsn-FY-4qK" id="b4l-JE-Ssw"/>
</connections>
</button>
<imageView hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FO2-AK-Ue7">
<rect key="frame" x="161" y="202" width="96" height="96"/>
<animations/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="KTv-gW-FBX"/>
</imageView>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="uCY-2T-BB0">
<rect key="frame" x="193" y="133" width="32" height="32"/>
<animations/>
</progressIndicator>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PYI-QA-XWa">
<rect key="frame" x="18" y="156" width="382" height="40"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Migration Status" id="D4J-ip-bu8">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<animations/>
</customView>
</objects>
</document>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Installer Version</key>
<string>%INSTALLER_VERSION%</string>
<key>InstallerSectionTitle</key>
<string>VM Migration</string>
<key>Mixpanel Token</key>
<string>%MIXPANEL_TOKEN%</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Docker Inc. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>managevmplugin</string>
<key>NSPrincipalClass</key>
<string>InstallerSection</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SectionOrder</key>
<array>
<string>Introduction</string>
<string>ReadMe</string>
<string>License</string>
<string>managevmplugin.bundle</string>
<string>Target</string>
<string>PackageSelection</string>
<string>Install</string>
</array>
</dict>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View File

@ -1,2 +0,0 @@
InstallerSectionTitle = "VM Migration";

View File

@ -1,3 +0,0 @@
/* Localized versions of Info.plist keys */
"PaneTitle" = "VM Migration";

View File

@ -1,24 +0,0 @@
//
// managevmpluginPane.h
// managevmplugin
//
// Created by Jeffrey Dean Morgan on 8/19/15.
// Copyright (c) 2015 Docker Inc. All rights reserved.
//
#import <InstallerPlugins/InstallerPlugins.h>
@interface managevmpluginPane : InstallerPane
@property (weak) IBOutlet NSImageView *statusImage;
@property (weak) IBOutlet NSButton *migrateCheckbox;
@property (weak) IBOutlet NSTextField *migrateExtraLabel;
@property (weak) IBOutlet NSProgressIndicator *migrationProgress;
@property (weak) IBOutlet NSTextField *migrationStatusLabel;
@property (unsafe_unretained) IBOutlet NSTextView *migrationLogsTextView;
@property (weak) IBOutlet NSScrollView *migrationLogsScrollView;
@property (weak) IBOutlet NSButton *submitButton;
- (IBAction)submitButtonClicked:(id)sender;
@end

View File

@ -1,293 +0,0 @@
//
// managevmpluginPane.m
// managevmplugin
//
// Created by Jeffrey Dean Morgan on 8/19/15.
// Copyright (c) 2015 Docker Inc. All rights reserved.
//
#import "managevmpluginPane.h"
#import "mixpanel.h"
@interface managevmpluginPane()
@property BOOL upgrading;
@property BOOL locked;
@property BOOL successful;
@end
@implementation managevmpluginPane
NSString *vBoxManagePath = @"/Applications/VirtualBox.app/Contents/MacOS/VBoxManage";
NSString *dockerMachinePath = @"/usr/local/bin/docker-machine";
- (BOOL) vmExists:(NSString*)name {
NSTask* task = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:[NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), vBoxManagePath, @"showvminfo", name, nil]];
[task waitUntilExit];
return [task terminationStatus] != 1;
}
- (NSString *) boot2dockerISOVersionAtPath:(NSString*)path {
NSTask* task = [[NSTask alloc] init];
task.arguments = [NSArray arrayWithObjects:path, nil];
task.launchPath = @"/usr/bin/file";
NSPipe * out = [NSPipe pipe];
[task setStandardOutput:out];
[task launch];
[task waitUntilExit];
if (task.terminationStatus != 0) {
return nil;
}
NSFileHandle * read = [out fileHandleForReading];
NSData * dataRead = [read readDataToEndOfFile];
NSString * stringRead = [[NSString alloc] initWithData:dataRead encoding:NSUTF8StringEncoding];
NSCharacterSet *delimiters = [NSCharacterSet characterSetWithCharactersInString:@"v'"];
NSArray *splitString = [stringRead componentsSeparatedByCharactersInSet:delimiters];
if (splitString.count < 3) {
return nil;
}
NSString *version = [[splitString objectAtIndex:2] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
return version;
}
- (BOOL) canMigrateBoot2DockerVM {
// VirtualBox and Docker Machine exist
if (![[NSFileManager defaultManager] fileExistsAtPath:vBoxManagePath] || ![[NSFileManager defaultManager] fileExistsAtPath:dockerMachinePath]) {
return NO;
}
// Boot2Docker certs exist
if (![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.boot2docker/certs/boot2docker-vm/ca.pem", NSHomeDirectory()]] ||
![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.boot2docker/certs/boot2docker-vm/cert.pem", NSHomeDirectory()]] ||
![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.boot2docker/certs/boot2docker-vm/key.pem", NSHomeDirectory()]]) {
return NO;
}
// Boot2Docker ssh keys exist
if (![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.ssh/id_boot2docker", NSHomeDirectory()]] ||
![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.ssh/id_boot2docker.pub", NSHomeDirectory()]]) {
return NO;
}
if (![self vmExists:@"boot2docker-vm"] || [self vmExists:@"default"]) {
return NO;
}
return YES;
}
- (BOOL) canUpgradeBoot2DockerVM {
// VirtualBox and Docker Machine exist
if (![[NSFileManager defaultManager] fileExistsAtPath:vBoxManagePath] || ![[NSFileManager defaultManager] fileExistsAtPath:dockerMachinePath]) {
return NO;
}
// docker-machine path and VirtualBox VM exist
if (![self vmExists:@"default"] ||
![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.docker/machine/machines/default", NSHomeDirectory()]] ||
![[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/.docker/machine/machines/default/boot2docker.iso", NSHomeDirectory()]]) {
return NO;
}
NSString *incomingVersion = [self boot2dockerISOVersionAtPath:[NSString stringWithFormat:@"%@/.docker/machine/cache/boot2docker.iso", NSHomeDirectory()]];
NSString *existingVersion = [self boot2dockerISOVersionAtPath:[NSString stringWithFormat:@"%@/.docker/machine/machines/default/boot2docker.iso", NSHomeDirectory()]];
return incomingVersion != existingVersion && [incomingVersion compare:existingVersion options:NSNumericSearch] != NSOrderedAscending;
}
- (void) migrateBoot2DockerVM {
self.locked = YES;
// Remove existing vm if it exists
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
NSTask* removeDirTask = [NSTask launchedTaskWithLaunchPath:@"/bin/rm" arguments:[NSArray arrayWithObjects:@"-rf", [NSString stringWithFormat:@"%@/.docker/machine/machines/default", NSHomeDirectory()], nil]];
[removeDirTask waitUntilExit];
// Do the migration
NSTask* migrateTask = [[NSTask alloc] init];
migrateTask.launchPath = @"/usr/bin/sudo";
migrateTask.arguments = [NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), dockerMachinePath, @"-D", @"create", @"-d", @"virtualbox", @"--virtualbox-memory", @"2048", @"--virtualbox-import-boot2docker-vm", @"boot2docker-vm", @"default", nil];
[self runTask:migrateTask onFinish:^void (int status) {
self.nextEnabled = YES;
self.statusImage.hidden = YES;
[self.migrationProgress stopAnimation:self];
self.migrationProgress.hidden = YES;
self.migrationStatusLabel.hidden = NO;
self.statusImage.hidden = NO;
if (status == 0) {
self.successful = YES;
self.migrationStatusLabel.stringValue = @"Your Boot2Docker VM was successfully migrated to a Docker Machine VM named \"default\".";
self.statusImage.image = [[NSImage alloc]initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"toolboxcheck" ofType:@"png"]];
[Mixpanel trackEvent:@"Boot2Docker Migration Succeeded" forPane:self];
[self gotoNextPane];
} else {
self.migrationLogsScrollView.hidden = NO;
self.submitButton.hidden = NO;
[Mixpanel trackEvent:@"Boot2Docker Migration Failed" forPane:self];
self.migrationStatusLabel.hidden = NO;
self.migrationStatusLabel.stringValue = @"Creating the VM failed. Following the install, try creating a vm manually via docker-machine.";
}
}];
}
- (void) upgradeBoot2DockerVM {
self.locked = YES;
// Do the migration
NSTask* task = [[NSTask alloc] init];
task.launchPath = @"/usr/bin/sudo";
task.arguments = [NSArray arrayWithObjects:@"-i", @"-u", NSUserName(), [NSString stringWithFormat:@"%@ -D stop default; cp %@/.docker/machine/cache/boot2docker.iso %@/.docker/machine/machines/default/boot2docker.iso", dockerMachinePath, NSHomeDirectory(), NSHomeDirectory()], nil];
[self runTask:task onFinish:^void (int status) {
self.nextEnabled = YES;
self.statusImage.hidden = YES;
[self.migrationProgress stopAnimation:self];
self.migrationProgress.hidden = YES;
self.migrationStatusLabel.hidden = NO;
self.statusImage.hidden = NO;
if (status == 0) {
self.successful = YES;
self.migrationStatusLabel.stringValue = @"Your VirtualBox Docker VM named \"default\" was successfully upgraded.";
self.statusImage.image = [[NSImage alloc]initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"toolboxcheck" ofType:@"png"]];
[Mixpanel trackEvent:@"VM Upgrade Succeeded" forPane:self];
[self gotoNextPane];
} else {
self.migrationLogsScrollView.hidden = NO;
self.submitButton.hidden = NO;
[Mixpanel trackEvent:@"VM Upgrade Failed" forPane:self];
self.migrationStatusLabel.hidden = NO;
self.migrationStatusLabel.stringValue = @"Upgrading your VirtualBox Docker VM Failed. Try upgrading again manually via the docker-machine command.";
}
}];
}
- (void) runTask:(NSTask *)task onFinish:(void (^)(int))finish {
// 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];
void (^appendOutput)(NSFileHandle*) = ^(NSFileHandle *file) {
NSData *data = [file availableData];
[fullData appendData:data];
NSMutableString *str = [[NSMutableString alloc] initWithData:fullData encoding:NSUTF8StringEncoding];
[regex replaceMatchesInString:str options:0 range:NSMakeRange(0, [str length]) withTemplate:@""];
dispatch_async(dispatch_get_main_queue(), ^{
[self.migrationLogsTextView.textStorage setAttributedString:[[NSAttributedString alloc] initWithString:str attributes:attrsDictionary]];
[self.migrationLogsTextView scrollRangeToVisible:NSMakeRange([[self.migrationLogsTextView string] length], 0)];
});
};
task.standardOutput = [NSPipe pipe];
task.standardError = [NSPipe pipe];
[[task.standardOutput fileHandleForReading] setReadabilityHandler:appendOutput];
[[task.standardError fileHandleForReading] setReadabilityHandler:appendOutput];
task.terminationHandler = ^(NSTask* task) {
dispatch_async(dispatch_get_main_queue(), ^{
[task.standardOutput fileHandleForReading].readabilityHandler = nil;
finish(task.terminationStatus);
});
};
[task launch];
}
- (id) init {
self.upgrading = NO;
self.successful = NO;
self = [super init];
return self;
}
- (NSString *)title {
return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" value:nil table:nil];
}
- (void) didEnterPane:(InstallerSectionDirection)dir {
[Mixpanel trackEvent:@"Installing Files Succeeded" forPane:self];
self.previousEnabled = NO;
NSImage *toolboxImage = [[NSImage alloc]initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"toolbox" ofType:@"png"]];
NSImage *boot2dockerImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"boot2docker" ofType:@"png"]];
[self.migrationProgress startAnimation:self];
if ([self canUpgradeBoot2DockerVM]) {
self.migrateCheckbox.title = [NSString stringWithFormat:@"Upgrade your Docker Toolbox VM to Docker %@", [self boot2dockerISOVersionAtPath:[NSString stringWithFormat:@"%@/.docker/machine/cache/boot2docker.iso", NSHomeDirectory()]]] ;
self.migrateExtraLabel.stringValue = @"Your existing Docker Toolbox VM will not be affected. This should take about a minute.";
self.statusImage.image = toolboxImage;
self.upgrading = YES;
} /*else if ([self canMigrateBoot2DockerVM]) {
self.statusImage.image = boot2dockerImage;
}*/ else {
[self gotoNextPane];
}
self.statusImage.hidden = NO;
self.migrateCheckbox.hidden = NO;
self.migrateCheckbox.enabled = YES;
self.migrateExtraLabel.hidden = NO;
self.migrationProgress.hidden = YES;
[self.migrationProgress stopAnimation:self];
}
- (BOOL) shouldExitPane:(InstallerSectionDirection)dir {
if (dir != InstallerDirectionForward) {
return YES;
}
if (self.migrateCheckbox.enabled && self.migrateCheckbox.state == NSOnState) {
self.nextEnabled = false;
self.migrationProgress.hidden = NO;
self.migrationStatusLabel.hidden = NO;
self.migrateCheckbox.enabled = NO;
[self.migrationProgress startAnimation:self];
if (self.upgrading) {
[Mixpanel trackEvent:@"VM Upgrade Started" forPane:self];
self.migrationStatusLabel.stringValue = @"Upgrading...";
[self upgradeBoot2DockerVM];
} else {
[Mixpanel trackEvent:@"Boot2Docker Migration Started" forPane:self];
self.migrationStatusLabel.stringValue = @"Migrating...";
[self migrateBoot2DockerVM];
}
return NO;
} else if (self.migrateCheckbox.state == NSOffState) {
if (self.upgrading) {
[Mixpanel trackEvent:@"VM Upgrade Skipped" forPane:self];
} else {
[Mixpanel trackEvent:@"Boot2Docker Migration Skipped" forPane:self];
}
}
return YES;
}
- (IBAction)submitButtonClicked:(id)sender {
NSURL *url = [[NSURL alloc] initWithString: @"https://github.com/docker/toolbox/issues"];
[[NSWorkspace sharedWorkspace] openURL:url];
}
@end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -17,6 +17,7 @@
- (void) didEnterPane:(InstallerSectionDirection)dir {
self.previousEnabled = NO;
[Mixpanel trackEvent:@"Installing Files Succeeded" forPane:self];
}
- (void) willEnterPane:(InstallerSectionDirection)dir {

View File

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>15C50</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>managevmplugin</string>
<key>CFBundleIdentifier</key>
<string>com.docker.managevmplugin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>managevmplugin</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7C68</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15C43</string>
<key>DTSDKName</key>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0720</string>
<key>DTXcodeBuild</key>
<string>7C68</string>
<key>Installer Version</key>
<string>%INSTALLER_VERSION%</string>
<key>InstallerSectionTitle</key>
<string>VM Migration</string>
<key>Mixpanel Token</key>
<string>%MIXPANEL_TOKEN%</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Docker Inc. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>managevmplugin</string>
<key>NSPrincipalClass</key>
<string>InstallerSection</string>
</dict>
</plist>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SectionOrder</key>
<array>
<string>Introduction</string>
<string>ReadMe</string>
<string>License</string>
<string>managevmplugin.bundle</string>
<string>Target</string>
<string>PackageSelection</string>
<string>Install</string>
</array>
</dict>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -2,13 +2,21 @@
CONSOLE_USER=$(stat -f '%Su' /dev/console)
CONSOLE_USER_HOME=$(su $CONSOLE_USER -c 'echo $HOME')
# Place boot2docker ISO in cache
mkdir -p $CONSOLE_USER_HOME/.docker/machine/cache
cp /usr/local/share/boot2docker/boot2docker.iso $CONSOLE_USER_HOME/.docker/machine/cache/boot2docker.iso
chown -R $CONSOLE_USER:staff $CONSOLE_USER_HOME/.docker
VM=default
# Fix permissions on binaries
chown -R $CONSOLE_USER:admin /usr/local/bin/docker || true
chown -R $CONSOLE_USER:admin /usr/local/bin/docker-machine* || true
chown -R $CONSOLE_USER:admin /usr/local/bin/docker-machine || true
chown -R $CONSOLE_USER:admin /usr/local/bin/docker-compose || true
# Place boot2docker ISO in cache & upgrade the boot2docker VM
mkdir -p $CONSOLE_USER_HOME/.docker/machine/cache
cp /usr/local/share/boot2docker/boot2docker.iso $CONSOLE_USER_HOME/.docker/machine/cache/boot2docker.iso
if [ -d "$CONSOLE_USER_HOME/.docker/machine/machines/$VM" ] && [ -f /usr/local/bin/docker-machine ]; then
sudo -i -u "$CONSOLE_USER" "/usr/local/bin/docker-machine stop $VM || true"
cp /usr/local/share/boot2docker/boot2docker.iso $CONSOLE_USER_HOME/.docker/machine/machines/$VM/boot2docker.iso
fi
chown -R $CONSOLE_USER:staff $CONSOLE_USER_HOME/.docker