-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] VMware Workstation Pro #315
Comments
Homebrew handles getting the version via a different XML file that is a manifest of all releases: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/v/vmware-fusion.rb#L10 The Workstation Windows equivalent is here: https://softwareupdate.vmware.com/cds/vmw-desktop/ws-windows.xml Annoyingly it does require multiple versions, a primary semver style version and a another number. I'm unsure if scoop supports this style of versioning required, there isn't often another release under the same exact version number. Can maybe fudge this as "17.6.0-24238078" if it's supported? Full URL for the latest release as an example: https://softwareupdate.vmware.com/cds/vmw-desktop/ws/17.6.0/24238078/windows/core/VMware-workstation-17.6.0-24238078.exe.tar Looking at existing scoop packages I've found this one seems to line up with what might need to be done: https://github.com/ScoopInstaller/Nonportable/blob/master/bucket/hp-support-assistant-np.json#L25-L37 |
I've made a brief attempt at this. One issue I'm facing is with how checkver functions. VMware publishes an XML file with all the versions, but they're unfortunately not sorted in any particular order. checkver doesn't actually bother sorting the versions found by the regex check, it simply has a forward or backwards look up option, so finding the latest version isn't easily possible. |
pull requests #308 seems to have a solution (but why it's not merged?) I also found a $userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'
$XML_CONTENT = (Invoke-WebRequest 'https://softwareupdate.vmware.com/cds/vmw-desktop/ws-windows.xml' -UserAgent $userAgent).Content
$re = New-Object System.Text.RegularExpressions.Regex("(\d+)?\.(\d+)?\.(\d+)")
$ver = $re.Matches($XML_CONTENT).Value | %{ new-object System.Version ($_) } | sort | select -last 1
$ver.ToString() ref |
$xmlData = Invoke-RestMethod -Uri "https://softwareupdate.vmware.com/cds/vmw-desktop/ws-windows.xml"
$latest = $xmlData.metaList.metadata | Sort-Object { [version]$_."version" } -Descending | Select-Object -First 1
# Extract version and build
$ver = $latest | Select-Object -ExpandProperty version
$build = $latest | Select-Object -ExpandProperty url | Where-Object { $_ -match '/(\d+)/windows' } | ForEach-Object { $matches[1] }
# Final download url
$url = "https://softwareupdate.vmware.com/cds/vmw-desktop/ws/$ver/$build/windows/core/VMware-workstation-$ver-$build.exe.tar" |
I do have (and had for a long time) the manifest on my own personal bucket, if it doesn't get merged, you can just use it by adding the bucket. |
Package Request
Criteria
For a package to be acceptable in the Nonportable bucket, it should be:
Information
Name: VMware Workstation Pro
Description: VMware Workstation Pro is a popular virtualization software for Windows x64 system. This Nonportable Scoop bucket contains it's free version named VMware Workstation Player. Starting in May 2024, VMware Workstation Pro begin free for personal use and VMware Workstation Player is discontinued.
Homepage: [a URL/link]
Download link(s): https://support.broadcom.com/group/ecx/downloads (requires login) or vmware's update repository https://softwareupdate.vmware.com/cds/vmw-desktop/ws/
Some indication of popularity/repute: Emmm... You must have heard it.
The text was updated successfully, but these errors were encountered: