mirror of https://github.com/docker/docs.git
Fix annoying VBox popup
This commit is contained in:
parent
1de2d83b96
commit
1f9ff60bf3
|
|
@ -182,7 +182,7 @@ RUN sed -i \
|
|||
-e "s/%DOCKERMACHINE_VERSION%/$DOCKER_MACHINE_VERSION/g" \
|
||||
-e "s/%DOCKERCOMPOSE_VERSION%/$DOCKER_COMPOSE_VERSION/g" \
|
||||
-e "s/%BOOT2DOCKER_ISO_VERSION%/$BOOT2DOCKER_ISO_VERSION/g" \
|
||||
-e "s/%DOCKERCLIAPP_VERSION%/$INSTALLER_VERSION/g" \
|
||||
-e "s/%DOCKERQUICKSTARTTERMINALAPP_VERSION%/$INSTALLER_VERSION/g" \
|
||||
-e "s/%KITEMATICAPP_VERSION%/$KITEMATIC_VERSION/g" \
|
||||
mpkg/Resources/en.lproj/Localizable.strings
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ dockerbuild: clean
|
|||
docker run --name "$(DOCKER_CONTAINER)" "$(DOCKER_IMAGE)"
|
||||
docker cp "$(DOCKER_CONTAINER)":/DockerToolbox.pkg .
|
||||
docker rm "$(DOCKER_CONTAINER)" 2>/dev/null || true
|
||||
productsign --sign "3rd Party Mac Developer Installer: Docker Inc" DockerToolbox.pkg DockerToolboxSigned.pkg || true
|
||||
mv DockerToolboxSigned.pkg DockerToolbox.pkg || true
|
||||
|
||||
clean:
|
||||
rm -f DockerToolbox.pkg
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<line choice="choiceDockerMachineCLI"/>
|
||||
<line choice="choiceDockerComposeCLI"/>
|
||||
<line choice="choiceBoot2DockerISO"/>
|
||||
<line choice="choiceDockerCLIAPP"/>
|
||||
<line choice="choiceDockerQuickstartTerminalAPP"/>
|
||||
<line choice="choiceKitematicAPP"/>
|
||||
<line choice="choiceVBox"/>
|
||||
</choices-outline>
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
<choice id="choiceBoot2DockerISO" title="choiceBoot2DockerISO_title" description="choiceBoot2DockerISO_msg" start_selected="true" start_enabled="true" start_visible="false">
|
||||
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso"/>
|
||||
</choice>
|
||||
<choice id="choiceDockerCLIAPP" title="choiceDockerCLIAPP_title" description="choiceDockerCLIAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
|
||||
<pkg-ref id="io.docker.pkg.dockercliapp"/>
|
||||
<choice id="choiceDockerQuickstartTerminalAPP" title="choiceDockerQuickstartTerminalAPP_title" description="choiceDockerQuickstartTerminalAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
|
||||
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"/>
|
||||
</choice>
|
||||
<choice id="choiceKitematicAPP" title="choiceKitematicAPP_title" description="choiceKitematicAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
|
||||
<pkg-ref id="io.docker.pkg.kitematicapp"/>
|
||||
|
|
@ -49,8 +49,8 @@
|
|||
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso">
|
||||
<bundle-version/>
|
||||
</pkg-ref>
|
||||
<pkg-ref id="io.docker.pkg.dockercliapp" auth="Root" version="%DOCKERCLIAPP_VERSION%" installKBytes="%DOCKERCLIAPP_INSTALL_KBYTES%">#dockercliapp.pkg</pkg-ref>
|
||||
<pkg-ref id="io.docker.pkg.dockercliapp">
|
||||
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp" auth="Root" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%">#dockerquickstartterminalapp.pkg</pkg-ref>
|
||||
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp">
|
||||
<bundle-version/>
|
||||
</pkg-ref>
|
||||
<pkg-ref id="io.docker.pkg.kitematicapp" auth="Root" version="%KITEMATICAPP_VERSION%" installKBytes="%KITEMATICAPP_INSTALL_KBYTES%">#kitematicapp.pkg</pkg-ref>
|
||||
|
|
@ -98,11 +98,14 @@
|
|||
try
|
||||
{
|
||||
/* Embedded scripts are not available here. So, just do a command
|
||||
line checking for running VMs instead. */
|
||||
rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC" | /usr/bin/grep -qv grep');
|
||||
result = (rcScript != 0);
|
||||
system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
|
||||
} catch (e) { system.log(e); result = false; }
|
||||
line checking for running VMs instead. */
|
||||
if (vboxNeedsUpgrade()) {
|
||||
system.log(vboxplist.CFBundleVersion);
|
||||
rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC" | /usr/bin/grep -qv grep');
|
||||
result = (rcScript != 0);
|
||||
system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
|
||||
}
|
||||
} catch (e) { system.log(e); }
|
||||
|
||||
if (!result)
|
||||
{
|
||||
|
|
@ -114,10 +117,22 @@
|
|||
|
||||
system.log("result:" + result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
function vboxNeedsUpgrade ()
|
||||
{
|
||||
try {
|
||||
vboxplist = system.files.plistAtPath('/Applications/VirtualBox.app/Contents/Info.plist');
|
||||
if (!vboxplist || !vboxplist.CFBundleVersion || system.compareVersions(vboxplist.CFBundleVersion, '%VBOX_VERSION') === -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (e){ system.log(e); return false; }
|
||||
}
|
||||
/* js:pkmk:end */
|
||||
</script>
|
||||
<choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="true" start_enabled="true" start_visible="true">
|
||||
<choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="vboxNeedsUpgrade()" start_enabled="vboxNeedsUpgrade()" start_visible="vboxNeedsUpgrade()">
|
||||
<pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="%VBOX_VERSION%" installKBytes="935">#VBoxKEXTs.pkg</pkg-ref>
|
||||
<pkg-ref id="org.virtualbox.pkg.virtualbox" auth="Root" version="%VBOX_VERSION%" installKBytes="247220">#VirtualBox.pkg</pkg-ref>
|
||||
<pkg-ref id="org.virtualbox.pkg.virtualboxcli" auth="Root" version="%VBOX_VERSION%" installKBytes="4">#VirtualBoxCLI.pkg</pkg-ref>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIconFile</key>
|
||||
<string>applet</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.ScriptEditor.id.dockercliapp</string>
|
||||
<string>com.apple.ScriptEditor.id.dockerquickstartterminalapp</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<pkg-info overwrite-permissions="true" relocatable="false" identifier="io.docker.pkg.dockercliapp" postinstall-action="none" version="%DOCKERCLIAPP_VERSION%" format-version="2" generator-version="steeve's strong hands" install-location="/Applications/" auth="root">
|
||||
<payload numberOfFiles="%DOCKERCLIAPP_NUMBER_OF_FILES%" installKBytes="%DOCKERCLIAPP_INSTALL_KBYTES%"/>
|
||||
<bundle-version/>
|
||||
<upgrade-bundle/>
|
||||
<update-bundle/>
|
||||
<atomic-update-bundle/>
|
||||
<strict-identifier/>
|
||||
<relocate/>
|
||||
</pkg-info>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<pkg-info overwrite-permissions="true" relocatable="false" identifier="io.docker.pkg.dockerquickstartterminalapp" postinstall-action="none" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" format-version="2" generator-version="steeve's strong hands" install-location="/Applications/" auth="root">
|
||||
<payload numberOfFiles="%DOCKERQUICKSTARTTERMINALAPP_NUMBER_OF_FILES%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%"/>
|
||||
<bundle-version/>
|
||||
<upgrade-bundle/>
|
||||
<update-bundle/>
|
||||
<atomic-update-bundle/>
|
||||
<strict-identifier/>
|
||||
<relocate/>
|
||||
</pkg-info>
|
||||
Loading…
Reference in New Issue