tis-virtualbox 5.2.18-2

  • package : tis-virtualbox
  • version : 5.2.18-2
  • architecture : all
  • locale :
  • description : Logiciel libre de virtualisation publiĆ© par Oracle
  • maintainer : Simon Fonteneau blog.lesfourmisduweb.org
  • date : 2018-08-16 09:49:59
  • min_os_version :
  • max_os_version :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *
import glob

uninstallkey = []

def install():
   print('installing virtualbox')

   version_exe = control['version'].split('-',1)[0]

   for exe in glob.glob('*.exe'):
        silentflags='--silent --msiparams REBOOT=ReallySuppress'

        force = WAPT and WAPT.options.force

        if not installed_softwares('Oracle VM VirtualBox ' + version_exe) or force:
            if isrunning('virtualbox.exe') and not force:
                error('VirtualBOX is running !')
            run(r'"%s" %s' % (exe,silentflags),accept_returncodes=[0,3010],timeout=300)
        else:
            print('Exe setup %s already installed. Skipping' % exe)

        if not installed_softwares('Oracle VM VirtualBox ' + version_exe):
            error('Setup %s has been and uninstall but %s not found' % (exe,'Oracle VM VirtualBox ' + version_exe))


#Remove all file extpack
   for file in glob.glob(makepath(programfiles64,'Oracle','VirtualBox','*.vbox-extpack')) :
        remove_file(file)

#Copy new extpack


#Install new extpack
   for ext in glob.glob('*.vbox-extpack'):
       filecopyto(ext,makepath(programfiles64,'Oracle','VirtualBox',ext))
       try:
            run('echo y | "%s" extpack install --replace "%s"' %(makepath(programfiles64,'Oracle','VirtualBox','VBoxManage.exe'),ext) )
       except:
            run('"%s" extpack cleanup ' %(makepath(programfiles64,'Oracle','VirtualBox','VBoxManage.exe')) )
            run('echo y | "%s" extpack install --replace "%s"' %(makepath(programfiles64,'Oracle','VirtualBox','VBoxManage.exe'),ext) )

#Remove shortcut
   remove_desktop_shortcut('Oracle VM VirtualBox')



def uninstall():
    killalltasks('virtualbox.exe')
    for soft in installed_softwares('Oracle VM VirtualBox'):
        run(uninstall_cmd(soft['key']))

    for file in glob.glob(makepath(programfiles64,'Oracle','VirtualBox','*.vbox-extpack')) :
        remove_file(file)


def update_package():
    for line in  wgets("https://www.virtualbox.org/wiki/Downloads").splitlines() :
        if ".exe" in line :
            linkinstalleur = line[line.find('href="') +6 : line.find('"><span')]
            fileinstalleur = linkinstalleur.rsplit('/',1)[1]
        if "vbox-extpack" in line and not 'Old' in line :
            linkext = line[line.find('href="') + 6 : line.find('"><span')]
            fileext = linkext.rsplit('/',1)[1]
    if not isfile(fileinstalleur):
        wget(linkinstalleur,fileinstalleur)
    else:
        print('File %s already exist' % fileinstalleur)
    if not isfile(fileext):
        wget(linkext,fileext)
    else:
        print('File %s already exist' % fileext)

    for exe in glob.glob('*.exe'):
        if exe != fileinstalleur:
            remove_file(exe)

    for ext in glob.glob('*.vbox-extpack'):
        if ext != fileext:
            remove_file(ext)


    vers = get_file_properties(fileinstalleur)['ProductVersion'].rsplit('.',1)[0]
    print('Latest version is : '+ vers)

    os.chdir(os.path.dirname(__file__))

    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())

    pe.version = vers + '-0'
    pe.save_control_to_wapt(os.getcwd())


if __name__ == '__main__':
    update_package()
    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png caf92a1846229dc6b49fca1c96ba29e4be8e1ab0d4f83d05711c338a8f398879
WAPT/certificate.crt 13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779
WAPT/wapt.psproj e306ae088b4ffc91364d6f53a3933bffa75f4bc4f8a3d6ff422209e90760feb0
VirtualBox-5.2.18-124319-Win.exe 2607f510bcb5dca11a189ca769bbd28e0ff3ff1d082762c03f062b406c8763f3
Oracle_VM_VirtualBox_Extension_Pack-5.2.18.vbox-extpack 3ecb43c71502741f4eb790576c608eb65cd424bcf3dfdb56471e4a2cac806f68
setup.py 0c97d9ac6584fc5aa861184a5c66a97d05299f94b048367560c64e68de7a931b
WAPT/control 56edd5ff5a002d2e49d77744b756b3faa6c11ee4fb4c8bac809b6f81b1591bde