tis-virtualbox
6.1.28-17
Oracle VM VirtualBox (formerly VirtualBox) is a free virtualization software published by Oracle.
94090 downloads

Description
- package : tis-virtualbox
- version : 6.1.28-17
- architecture : x64
- categories : System and network
- maintainer : WAPT Team,Jimmy PELÉ,Simon Fonteneau,Alexis PAJOT
- description : Oracle VM VirtualBox (formerly VirtualBox) is a free virtualization software published by Oracle.
- locale : all
- target_os : windows
- min_wapt_version : 1.8.2
- sources : https://www.virtualbox.org/wiki/Downloads
- installed_size : 506540032
- impacted_process : VirtualBox,VBoxWebSrv,VBoxSVC,VBoxAutostartSvc,VBoxBalloonCtrl,VBoxBugReport,VBoxDTrace,VBoxManage,VBoxSDS,VBoxExtPackHelperApp,VBoxTestOGL,VBoxNetDHCP,VBoxNetNAT,VirtualBoxVM,VBoxHeadless,VBoxSDL,vbox-img
- description_fr : Oracle VM VirtualBox (anciennement VirtualBox) est un logiciel libre de virtualisation publié par Oracle.
- description_pl : Oracle VM VirtualBox (dawniej VirtualBox) to darmowe oprogramowanie do wirtualizacji opublikowane przez Oracle.
- description_de : Oracle VM VirtualBox (ehemals VirtualBox) ist eine von Oracle veröffentlichte kostenlose Virtualisierungssoftware.
- description_es : Oracle VM VirtualBox (antes VirtualBox) es un software de virtualización libre publicado por Oracle.
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor : Oracle Corporation
- licence : GPLv2
- signature_date : 2021-10-22T12:13:25.866213
- Homepage : https://www.virtualbox.org/
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import json
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = 'VirtualBox-'
ext_bin_contains = '.vbox-extpack'
silent_args = '--silent --msiparams REBOOT=ReallySuppress ALLUSERS=2 VBOX_INSTALLDESKTOPSHORTCUT=0 VBOX_START=0 VBOX_INSTALLQUICKLAUNCHSHORTCUT=0'
#app_uninstallkey = '{4FA0A6EA-79EF-40D4-AD48-08D9A6A163AA}'
app_install_path = makepath(programfiles, 'Oracle', 'VirtualBox')
app_vbm = makepath(app_install_path, 'VBoxManage.exe')
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob('*%s*.exe' % bin_contains)[0]
# Avoid VMs to be shutted unexpectedly
if isrunning('virtualbox.exe') and not force:
error("ERROR: VirtualBox is running")
# Installing the package
print("Installing: %s" % bin_name)
install_exe_if_needed(bin_name,
silentflags=silent_args,
name='Oracle VM VirtualBox ' + package_version,
min_version=package_version,
)
# Remove all file extpack
for file in glob.glob(makepath(app_install_path, '*%s*' % ext_bin_contains)):
print("Removing: %s" % file)
remove_file(file)
# Copy new extpack
for ext in glob.glob('*%s*' % ext_bin_contains):
print("Copying: %s to: %s" % (ext, app_install_path))
filecopyto(ext,app_install_path)
# Install new extpack
try:
print(run('echo y | "%s" extpack install --replace "%s" --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c' % (app_vbm,ext)))
except:
print(run('"%s" extpack cleanup' % (app_vbm)))
print(run('echo y | "%s" extpack install --replace "%s" --accept-license=33d7284dc4a0ece381196fda3cfe2ed0e1e8e7ed7f27b9a9ebc4ee22e24bd23c' % (app_vbm,ext)))
# Disable update check
print(run('"%s" setextradata global GUI/UpdateDate never' % app_vbm))
def uninstall():
if not installed_softwares('Oracle VM VirtualBox'):
if isdir(app_install_path):
remove_tree(app_install_path)
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = 'https://www.virtualbox.org/wiki/Downloads'
bin_name_sub = 'VirtualBox-%s-Win.exe'
# Downloading latest binaries
print('URL used is: %s' % url)
for bs_search in bs_find_all(url, 'a', 'class', 'ext-link', proxies=proxies):
if bs_search['href'].split('/')[-1].endswith('-Win.exe'):
url_dl = bs_search['href']
version = url_dl.split('/')[-2]
latest_bin = url_dl.split('/')[-1]
if bs_search['href'].split('/')[-1].endswith('.vbox-extpack'):
url_dl_ext = bs_search['href']
latest_bin_ext = url_dl_ext.split('/')[-1]
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % url_dl)
print("Download Extension Pack URL is: %s" % url_dl_ext)
# Downloading latest binaries
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(url_dl, latest_bin, proxies=proxies)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
if not version_from_file.startswith(version) and version_from_file != '':
print("Changing version to the version number of the binary")
os.rename(latest_bin,bin_name_sub % version_from_file)
version = version_from_file
else:
print("Binary file version corresponds to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
result = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.version = '%s-%s' % (Version(version), control.version.split('-', 1)[-1])
#control.set_software_version(version)
control.save_control_to_wapt()
# Downloading extension
if not isfile(latest_bin_ext):
print("Downloading: %s" % latest_bin_ext)
wget(url_dl_ext, latest_bin_ext, proxies=proxies)
# Deleting outdated binaries
remove_outdated_binaries(version, list_extensions=['exe', 'vbox-extpack'])
# Validating update-package-sources
return result
def get_proxies():
r"""Return system proxy with the urllib python library
>>> get_proxies()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
if platform.python_version_tuple()[0] == '3':
from urllib.request import getproxies
else:
from urllib import getproxies
return getproxies()
def get_proxies_from_wapt_console():
r"""Return proxy information from the current user WAPT console
>>> get_proxies_from_wapt_console()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
proxies = {}
if platform.system() == 'Windows':
waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
else:
waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
if isfile(waptconsole_ini_path):
proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
if proxy_wapt:
proxies = {'http': proxy_wapt, 'https': proxy_wapt}
return proxies
def get_version_from_binary(filename, property_name='ProductVersion'):
r""" Get installer version from file informations, for now, only exe and msi files are compatibles
Args:
filename (str): path to the file
property_name (str): selected property
Returns:
str: version number
"""
if filename.endswith('.msi'):
return get_msi_properties(filename)[property_name]
else:
return get_file_properties(filename)[property_name]
def remove_outdated_binaries(version, filename_contains=None, list_extensions=['exe','msi','deb','rpm','dmg','pkg']):
r"""Remove files based on the version contained in his filename
Args:
version (str): version number of keeped files
filename_contains (str or list of str): Part of the filename that must be contained (useful for distinguishing architecture and os)
list_extensions (str or list of str): file extensions of verified files
Returns:
None
.. versionadded:: 2.0
"""
if type(list_extensions) != list:
list_extensions = [list_extensions]
if filename_contains:
if type(filename_contains) != list:
filename_contains = [filename_contains]
list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
for file_ext in list_extensions:
for bin_in_dir in glob.glob('*%s' % file_ext):
if not version in bin_in_dir:
remove_file(bin_in_dir)
if filename_contains:
for filename_contain in filename_contains:
if not filename_contain in bin_in_dir:
remove_file(bin_in_dir)
Changelog
Changelog software url : https://www.virtualbox.org/wiki/Changelog
No changelog.txt.