Extras icon indicating copy to clipboard operation
Extras copied to clipboard

[Request] Add virtualbox app

Open omar-selo opened this issue 8 years ago • 13 comments

I was wondering how difficult would it be to add a virtualbox manifest. If it is an easy task that a beginner can do then I am read to help with this if needed.

omar-selo avatar Oct 08 '17 12:10 omar-selo

It may be possible but I'm not sure you'd want to. VirtualBox needs several drivers to work correctly, add unless they're already installed I imagine elevated privileges or UAC prompts would be required. The installation wouldn't be self contained in this scenario.

There is a few portable solutions out there, but they're not without bugs and have the same driver limitations.

brandon93s avatar Oct 17 '17 23:10 brandon93s

I see. I prefer to install it manually then.

omar-selo avatar Oct 18 '17 12:10 omar-selo

This was already attempted: https://github.com/lukesampson/scoop/issues/229

You might create your own bucket for it. We could add it to the extras bucket because there are already a couple of other programs which need elevated privileges. If I recall correctly.

Here is a way I tried it:

{
    "homepage": "https://www.virtualbox.org/",
    "version": "5.1.28",
    "url": "http://download.virtualbox.org/virtualbox/5.1.28/VirtualBox-5.1.28-117968-Win.exe#/VirtualBoxSetup.7z",
    "hash": "5415db62fae9332cc06bc6c445d5f1338c7d0efa0842175658b272dff1e49c03",
    "pre_install": "
        move-item \"$dir\\BIN_00\" \"$dir\\VirtualBox_x86.msi\"
        move-item \"$dir\\BIN_01\" \"$dir\\VirtualBox_amd64.msi\"
        move-item \"$dir\\BIN_02\" \"$dir\\common.cab\"
        remove-item \"$dir\\HDR_*\"
        remove-item \"$dir\\MANIFEST\"
    ",
    "extract_dir": ".rsrc\\RCDATA",
    "architecture": {
        "64bit": {
            "installer": {
                "file": "VirtualBox_amd64.msi"
            }
        },
        "32bit": {
 
        }
    },
    "checkver": {
        "url": "https://update.virtualbox.org/query.php?platform=WINDOWS_64BITS_GENERIC&version=0.0.0",
        "re": "VirtualBox-(?<version>[\\d.]+)-(?<revision>[\\d]+)-Win.exe"
    },
    "autoupdate": {
        "url": "http://download.virtualbox.org/virtualbox/$version/VirtualBox-$version-$matchRevision-Win.exe#/VirtualBoxSetup.7z",
        "hash": {
            "url": "https://www.virtualbox.org/download/hashes/$version/SHA256SUMS"
        }
    }
}

r15ch13 avatar Oct 19 '17 19:10 r15ch13

This manifest looks good. But I have two questions:

  1. Why does "https://update.virtualbox.org/query.php?platform=WINDOWS_64BITS_GENERIC&version=0.0.0" show 5.1.30 when the current version is 5.2.0
  2. How can we make scoop uninstall virtualbox actually call the uninstaller of virtualbox

omar-selo avatar Oct 20 '17 12:10 omar-selo

  1. Version 5.2.0 was released two days ago, maybe there is a delay so not everyone updates directly (more time for emergency bugfixes?)
  2. Didn't try the uninstaller yet. This was a quick hack 😄

r15ch13 avatar Oct 20 '17 16:10 r15ch13

I updated the installer so that it only asks for privilege escalation.

"installer": {
    "file": "VirtualBox_amd64.msi",
    "args": ["/qb", "ADDLOCAL=VBoxApplication,VBoxUSB,VBoxNetwork,VBoxNetworkFlt,VBoxNetworkAdp,VBoxPython", "VBOX_INSTALLDESKTOPSHORTCUT=1", "VBOX_INSTALLQUICKLAUNCHSHORTCUT=0", "VBOX_START=0", "VBOX_REGISTERFILEEXTENSIONS=1"],
    "keep": "true"
}

I could uninstall using msiexec /x VirtualBox_amd64.msi /qb but I am not sure how can I go about adding this command to the manifest because it starts with msiexec.

omar-selo avatar Oct 21 '17 07:10 omar-selo

Does one of these work?

"uninstaller": {
    "file": "msiexec",
    "args": ["/x", "VirtualBox_amd64.msi", "/qb"]
}
"uninstaller": {
    "script": "& msiexec /x \"$dir\\VirtualBox_amd64.msi\" /qb"
}

r15ch13 avatar Oct 21 '17 12:10 r15ch13

The first one tries to call $dir\\msiexec and so it fails.

The second one deletes the virtualbox app folder including VirtualBox_amd64.msi then tries to run msiexec /x VirtualBox_amd64.msi /qb but that file no longer exists.

omar-selo avatar Oct 21 '17 13:10 omar-selo

Check this out. virtualbox.json

pakonda avatar Aug 16 '18 15:08 pakonda

@pakonda submit a PR?

rasa avatar Aug 18 '18 00:08 rasa

@rasa I submitted a PR on nonportable bucket. https://github.com/oltolm/scoop-nonportable/pull/3 Which bucket should I submit?

pakonda avatar Aug 18 '18 02:08 pakonda

Running wmic product where "name like 'Oracle VM VirtualBox%'" call uninstall from an elevated powershell/cmd requires even fewer steps 😁

r15ch13 avatar Aug 19 '18 09:08 r15ch13

Should we promote to add scoop-nonportable as a workaround?

scoop bucket add nonportable

Will it ever happen in here since the software installation requires UAC?

silverkorn avatar Aug 28 '19 15:08 silverkorn