diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 03:01:46 +0000 |
commit | f8fe689a81f906d1b91bb3220acde2a4ecb14c5b (patch) | |
tree | 26484e9d7e2c67806c2d1760196ff01aaa858e8c /src/VBox/Installer/common | |
parent | Initial commit. (diff) | |
download | virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.tar.xz virtualbox-f8fe689a81f906d1b91bb3220acde2a4ecb14c5b.zip |
Adding upstream version 6.0.4-dfsg.upstream/6.0.4-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Installer/common')
-rw-r--r-- | src/VBox/Installer/common/Makefile.kmk | 38 | ||||
-rwxr-xr-x | src/VBox/Installer/common/vboxapisetup.py | 89 | ||||
-rw-r--r-- | src/VBox/Installer/common/virtualbox.desktop.in | 31 | ||||
-rw-r--r-- | src/VBox/Installer/common/virtualbox.xml | 58 |
4 files changed, 216 insertions, 0 deletions
diff --git a/src/VBox/Installer/common/Makefile.kmk b/src/VBox/Installer/common/Makefile.kmk new file mode 100644 index 00000000..01ef8bce --- /dev/null +++ b/src/VBox/Installer/common/Makefile.kmk @@ -0,0 +1,38 @@ +# $Id: Makefile.kmk $ +## @file +# Common installer stuff. +# + +# +# Copyright (C) 2006-2019 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + +# Include Sub-Makefiles. +ifndef VBOX_OSE + include $(PATH_SUB_CURRENT)/keygen/Makefile.kmk +endif + +# Python glue installer +ifdef VBOX_WITH_PYTHON + +INSTALLS += VBox-python-glue-installer + +VBox-python-glue-installer_INST = $(INST_SDK)installer/ +VBox-python-glue-installer_MODE = a+r,u+w +VBox-python-glue-installer_SOURCES = vboxapisetup.py + +endif # VBOX_WITH_PYTHON + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/common/vboxapisetup.py b/src/VBox/Installer/common/vboxapisetup.py new file mode 100755 index 00000000..d5d90491 --- /dev/null +++ b/src/VBox/Installer/common/vboxapisetup.py @@ -0,0 +1,89 @@ +""" +Copyright (C) 2009-2019 Oracle Corporation + +This file is part of VirtualBox Open Source Edition (OSE), as +available from http://www.virtualbox.org. This file is free software; +you can redistribute it and/or modify it under the terms of the GNU +General Public License (GPL) as published by the Free Software +Foundation, in version 2 as it comes in the "COPYING" file of the +VirtualBox OSE distribution. VirtualBox OSE is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. + +The contents of this file may alternatively be used under the terms +of the Common Development and Distribution License Version 1.0 +(CDDL) only, as it comes in the "COPYING.CDDL" file of the +VirtualBox OSE distribution, in which case the provisions of the +CDDL are applicable instead of those of the GPL. + +You may elect to license modified versions of this file under the +terms and conditions of either the GPL or the CDDL or both. +""" + +import os,sys +from distutils.core import setup + +def cleanupComCache(): + import shutil + from distutils.sysconfig import get_python_lib + comCache1 = os.path.join(get_python_lib(), 'win32com', 'gen_py') + comCache2 = os.path.join(os.environ.get("TEMP", "c:\\tmp"), 'gen_py') + print("Cleaning COM cache at",comCache1,"and",comCache2) + shutil.rmtree(comCache1, True) + shutil.rmtree(comCache2, True) + +def patchWith(file,install,sdk): + newFile=file + ".new" + install=install.replace("\\", "\\\\") + try: + os.remove(newFile) + except: + pass + oldF = open(file, 'r') + newF = open(newFile, 'w') + for line in oldF: + line = line.replace("%VBOX_INSTALL_PATH%", install) + line = line.replace("%VBOX_SDK_PATH%", sdk) + newF.write(line) + newF.close() + oldF.close() + try: + os.remove(file) + except: + pass + os.rename(newFile, file) + +# See http://docs.python.org/distutils/index.html +def main(argv): + vboxDest = os.environ.get("VBOX_MSI_INSTALL_PATH", None) + if vboxDest is None: + vboxDest = os.environ.get('VBOX_INSTALL_PATH', None) + if vboxDest is None: + raise Exception("No VBOX_INSTALL_PATH defined, exiting") + + vboxVersion = os.environ.get("VBOX_VERSION", None) + if vboxVersion is None: + # Should we use VBox version for binding module versioning? + vboxVersion = "1.0" + + import platform + + if platform.system() == 'Windows': + cleanupComCache() + + # Darwin: Patched before installation. Modifying bundle is not allowed, breaks signing and upsets gatekeeper. + if platform.system() != 'Darwin': + vboxSdkDest = os.path.join(vboxDest, "sdk") + patchWith(os.path.join(os.path.dirname(sys.argv[0]), 'vboxapi', '__init__.py'), vboxDest, vboxSdkDest) + + setup(name='vboxapi', + version=vboxVersion, + description='Python interface to VirtualBox', + author='Oracle Corp.', + author_email='vbox-dev@virtualbox.org', + url='http://www.virtualbox.org', + packages=['vboxapi'] + ) + +if __name__ == '__main__': + main(sys.argv) + diff --git a/src/VBox/Installer/common/virtualbox.desktop.in b/src/VBox/Installer/common/virtualbox.desktop.in new file mode 100644 index 00000000..3fca2b61 --- /dev/null +++ b/src/VBox/Installer/common/virtualbox.desktop.in @@ -0,0 +1,31 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=@VBOX_PRODUCT@ +GenericName=Virtual Machine +GenericName[de]=Virtuelle Maschine +GenericName[ru]=Виртуальная машина +Type=Application +Exec=VirtualBox %U +TryExec=VirtualBox +Keywords=virtualization; +Keywords[de]=Virtualisierung; +Keywords[ru]=виртуализация; +MimeType=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova; +DocPath=file://@VBOX_DOC_PATH@/UserManual.pdf +Icon=virtualbox +Categories=Emulator;System; +Actions=Manager; +StartupWMClass=VirtualBox Manager +Comment=Run several virtual systems on a single host computer +Comment[de]=Mehrere virtuelle Maschinen auf einem einzigen Rechner ausführen +Comment[it]=Esegui più macchine virtuali su un singolo computer +Comment[ko]=가상 머신 +Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza +Comment[ru]=Запуск нескольких виртуальных машин на одном компьютере +Comment[sv]=Kör flera virtuella system på en enda värddator + +[Desktop Action Manager] +Exec=VirtualBox +Name=Open VM Manager +Name[de]=VM Manager öffnen diff --git a/src/VBox/Installer/common/virtualbox.xml b/src/VBox/Installer/common/virtualbox.xml new file mode 100644 index 00000000..caec9165 --- /dev/null +++ b/src/VBox/Installer/common/virtualbox.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-virtualbox-vbox"> + <comment>VirtualBox Machine Definition</comment> + <comment xml:lang="en">VirtualBox Machine Definition</comment> + <glob pattern="*.vbox"/> + <icon name="virtualbox-vbox"/> + </mime-type> + + <mime-type type="application/x-virtualbox-vbox-extpack"> + <comment>VirtualBox Extension Pack</comment> + <comment xml:lang="en">VirtualBox Extension Pack</comment> + <glob pattern="*.vbox-extpack"/> + <icon name="virtualbox-vbox-extpack"/> + </mime-type> + + <mime-type type="application/x-virtualbox-ovf"> + <comment>Open Virtualization Format</comment> + <comment xml:lang="en">Open Virtualization Format</comment> + <glob pattern="*.ovf"/> + <icon name="virtualbox-ovf"/> + </mime-type> + + <mime-type type="application/x-virtualbox-ova"> + <comment>Open Virtualization Format Archive</comment> + <comment xml:lang="en">Open Virtualization Format Archive</comment> + <glob pattern="*.ova"/> + <icon name="virtualbox-ova"/> + </mime-type> + + <mime-type type="application/x-virtualbox-vdi"> + <comment>Virtual Disk Image</comment> + <comment xml:lang="en">Virtual Disk Image</comment> + <glob pattern="*.vdi"/> + <icon name="virtualbox-vdi"/> + </mime-type> + + <mime-type type="application/x-virtualbox-vmdk"> + <comment>Virtual Machine Disk Format</comment> + <comment xml:lang="en">Virtual Machine Disk Format</comment> + <glob pattern="*.vmdk"/> + <icon name="virtualbox-vmdk"/> + </mime-type> + + <mime-type type="application/x-virtualbox-vhd"> + <comment>Virtual Hard Disk</comment> + <comment xml:lang="en">Virtual Hard Disk</comment> + <glob pattern="*.vhd"/> + <icon name="virtualbox-vhd"/> + </mime-type> + + <mime-type type="application/x-virtualbox-hdd"> + <comment>Virtual Hard Disk</comment> + <comment xml:lang="en">Virtual Hard Disk</comment> + <glob pattern="*.hdd"/> + <icon name="virtualbox-hdd"/> + </mime-type> +</mime-info> |