Détails du package

smp-virtualbox

retour Revenir à la liste des packages

smp-virtualbox


Version officielle sur le site de l'editeur : 6.1.32-149290


Fichier control :

package           : smp-virtualbox
version           : 6.1.14-1
architecture      : all
section           : base
priority          : optional
name              : 
categories        : 
maintainer        : Simon Fonteneau blog.lesfourmisduweb.org
description       : Logiciel libre de virtualisation publié par Oracle
depends           : 
conflicts         : 
maturity          : 
locale            : 
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : VirtualBox.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 4cdc4ac8-2f72-45f0-a0e5-5a32bcb0b875
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 1e54425be03a2a3ea1a264b40d984c31f17a6a489a3b722acb993cbf6561e903
signature         : w9ZJBxRBSz9Y+6/XPhRia9ObfKawVX0DL/zmDu1kLK5o+Ke0zxwpendwVzkrs43Eq4A6hUz9FaDHiVSVyTUCx7TeYWBNkcVYVBAEn+zvpfpKtcSjdPxPz3IZR8mPNM2CObULSMEGv9Bv1PnSPV43ZGFiN9e5BuRdSujwD4riFIBe9kiFJ9u7ydt73yzbX5GbRGU4a0pmxGhvbFkIvPKJ37Nb26wGj4Uq4i8OFl8nH6kt9u2jkammSkf4hZotVFJdSGx06ozdt56+7xLY/OkCFCXnSWnNJ1qSizmuFhoJFEkkTpxOM+D1/QvQmyP2Zhoh3TOCnqhXwFtJdEXHlzFBXA==
signature_date    : 2020-09-07T22:35:25.188600
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,signer,signer_fingerprint,signature_date,signed_attributes



Fichier 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  ensure_unicode(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()