From 16f504a9dca3fe3b70568f67b7d41241ae485288 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:49:04 +0200 Subject: Adding upstream version 7.0.6-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/Installer/.scm-settings | 103 + src/VBox/Installer/Config.kmk | 146 ++ src/VBox/Installer/Makefile.kmk | 80 + src/VBox/Installer/common/Makefile.kmk | 48 + src/VBox/Installer/common/vboxapisetup.py | 99 + src/VBox/Installer/common/virtualbox.desktop.in | 29 + src/VBox/Installer/common/virtualbox.xml | 58 + src/VBox/Installer/common/virtualboxvm.desktop.in | 29 + src/VBox/Installer/darwin/DiskImage/DS_Store | Bin 0 -> 12292 bytes .../darwin/DiskImage/VirtualBox_Uninstall.tool | 291 +++ .../Installer/darwin/DiskImage/vbox_folder.tiff | Bin 0 -> 469410 bytes .../Installer/darwin/DiskImage/vbox_folder.xcf | Bin 0 -> 177592 bytes src/VBox/Installer/darwin/Makefile.kmk | 1065 ++++++++++ .../darwin/VBoxKEXTs/PkgBuildComponent.plist | 29 + .../darwin/VBoxKEXTs/VirtualBoxStartup.sh | 277 +++ .../darwin/VBoxKEXTs/org.virtualbox.startup.plist | 17 + src/VBox/Installer/darwin/VBoxKEXTs/postflight | 117 ++ .../darwin/VirtualBox/PkgBuildComponent.plist | 17 + .../darwin/VirtualBox/VBoxAutostartDarwin.sh | 71 + .../VirtualBox/org.virtualbox.vboxautostart.plist | 19 + .../org.virtualbox.vboxballoonctrl.plist | 14 + .../VirtualBox/org.virtualbox.vboxwebsrv.plist | 26 + src/VBox/Installer/darwin/VirtualBox/postflight | 117 ++ src/VBox/Installer/darwin/VirtualBox/preflight | 41 + .../darwin/VirtualBox_mpkg/Conclusion.html | 7 + .../darwin/VirtualBox_mpkg/Conclusion.rtf | 9 + .../darwin/VirtualBox_mpkg/Localizable.strings | 23 + .../Installer/darwin/VirtualBox_mpkg/Welcome.html | 12 + .../Installer/darwin/VirtualBox_mpkg/Welcome.rtf | 13 + .../darwin/VirtualBox_mpkg/background.tif | Bin 0 -> 206064 bytes .../VirtualBox_mpkg/distribution-driverless.dist | 107 + .../darwin/VirtualBox_mpkg/distribution.dist | 117 ++ src/VBox/Installer/freebsd/Makefile.kmk | 328 +++ src/VBox/Installer/freebsd/pkg-comment | 1 + src/VBox/Installer/freebsd/pkg-descr | 3 + src/VBox/Installer/freebsd/pkg_plist | 92 + src/VBox/Installer/freebsd/postdeinstall.sh | 42 + src/VBox/Installer/freebsd/postinstall.sh | 86 + src/VBox/Installer/linux/Makefile-footer.gmk | 145 ++ src/VBox/Installer/linux/Makefile-header.gmk | 301 +++ src/VBox/Installer/linux/Makefile.kmk | 595 ++++++ src/VBox/Installer/linux/README.testing | 35 + src/VBox/Installer/linux/VBox.sh | 158 ++ src/VBox/Installer/linux/VBoxCreateUSBNode.sh | 61 + src/VBox/Installer/linux/VBoxSysInfo.sh | 142 ++ .../Installer/linux/check_module_dependencies.sh | 227 +++ src/VBox/Installer/linux/deffiles | 615 ++++++ src/VBox/Installer/linux/distributions_deb | 16 + src/VBox/Installer/linux/distributions_rpm | 37 + src/VBox/Installer/linux/install.sh | 448 +++++ src/VBox/Installer/linux/postinst-common.sh | 125 ++ src/VBox/Installer/linux/prerm-common.sh | 81 + src/VBox/Installer/linux/routines.sh | 473 +++++ src/VBox/Installer/linux/rpm/LocalConfig.kmk | 44 + src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec | 371 ++++ src/VBox/Installer/linux/rpm/rules | 282 +++ src/VBox/Installer/linux/runasroot.sh | 188 ++ .../Installer/linux/scripts/VBoxHeadlessXOrg.sh | 369 ++++ src/VBox/Installer/linux/testcase/Makefile.kmk | 37 + .../Installer/linux/testcase/tstHeadlessXOrg.sh | 315 +++ src/VBox/Installer/linux/uninstall.sh | 166 ++ src/VBox/Installer/linux/vboxautostart-service.sh | 184 ++ .../Installer/linux/vboxballoonctrl-service.sh | 218 ++ src/VBox/Installer/linux/vboxdrv.sh | 856 ++++++++ src/VBox/Installer/linux/vboxweb-service.sh | 234 +++ src/VBox/Installer/solaris/Makefile.kmk | 771 +++++++ src/VBox/Installer/solaris/VBox.sh | 82 + src/VBox/Installer/solaris/VBoxISAExec.c | 53 + src/VBox/Installer/solaris/VBoxZoneAccess.c | 100 + src/VBox/Installer/solaris/checkinstall.sh | 273 +++ src/VBox/Installer/solaris/makepackage.sh | 307 +++ src/VBox/Installer/solaris/pkginstall.sh | 70 + src/VBox/Installer/solaris/postinstall.sh | 42 + src/VBox/Installer/solaris/preremove.sh | 42 + src/VBox/Installer/solaris/smf-vboxautostart.sh | 128 ++ src/VBox/Installer/solaris/smf-vboxballoonctrl.sh | 121 ++ src/VBox/Installer/solaris/smf-vboxwebsrv.sh | 146 ++ src/VBox/Installer/solaris/vbox-ips.mog | 71 + src/VBox/Installer/solaris/vbox.pkginfo | 16 + src/VBox/Installer/solaris/vbox.pkgresponse | 12 + src/VBox/Installer/solaris/vbox.space | 5 + src/VBox/Installer/solaris/vboxconfig.sh | 1480 ++++++++++++++ .../Installer/solaris/virtualbox-autostart.xml | 124 ++ .../Installer/solaris/virtualbox-balloonctrl.xml | 124 ++ .../Installer/solaris/virtualbox-webservice.xml | 125 ++ .../Installer/solaris/virtualbox-zoneaccess.xml | 86 + .../Installer/solaris/virtualbox.applications.in | 8 + src/VBox/Installer/solaris/virtualbox.keys | 79 + src/VBox/Installer/solaris/virtualbox.mime | 23 + src/VBox/Installer/win/Binary/Banner.jpg | Bin 0 -> 1946 bytes src/VBox/Installer/win/Binary/Dialog.jpg | Bin 0 -> 10742 bytes src/VBox/Installer/win/Binary/Exclamation.ico | Bin 0 -> 766 bytes src/VBox/Installer/win/Binary/New.ico | Bin 0 -> 318 bytes src/VBox/Installer/win/Binary/Remove.ico | Bin 0 -> 2998 bytes src/VBox/Installer/win/Binary/Repair.ico | Bin 0 -> 2998 bytes src/VBox/Installer/win/Binary/Up.ico | Bin 0 -> 318 bytes src/VBox/Installer/win/Binary/info.ico | Bin 0 -> 1078 bytes src/VBox/Installer/win/CommonProperties.wxi | 31 + src/VBox/Installer/win/Defines.wxi | 71 + src/VBox/Installer/win/InstallHelper/Makefile.kmk | 65 + .../Installer/win/InstallHelper/VBoxCommon.cpp | 103 + src/VBox/Installer/win/InstallHelper/VBoxCommon.h | 44 + .../win/InstallHelper/VBoxInstallHelper.cpp | 2097 ++++++++++++++++++++ .../win/InstallHelper/VBoxInstallHelper.def | 51 + .../win/InstallHelper/VBoxInstallHelper.rc | 61 + src/VBox/Installer/win/Makefile.kmk | 1337 +++++++++++++ src/VBox/Installer/win/MsiHack/Makefile.kmk | 52 + src/VBox/Installer/win/MsiHack/MsiHack.cpp | 1013 ++++++++++ src/VBox/Installer/win/MsiHack/MsiHackExtension.cs | 84 + src/VBox/Installer/win/NLS/de_DE.wxl | 619 ++++++ src/VBox/Installer/win/NLS/el_GR.wxl | 624 ++++++ src/VBox/Installer/win/NLS/en_US.wxl | 620 ++++++ src/VBox/Installer/win/NLS/fa_IR.wxl | 548 +++++ src/VBox/Installer/win/NLS/fr_FR.wxl | 618 ++++++ src/VBox/Installer/win/NLS/it_IT.wxl | 548 +++++ src/VBox/Installer/win/NLS/ru_RU.wxl | 620 ++++++ src/VBox/Installer/win/NLS/tr_TR.wxl | 620 ++++++ src/VBox/Installer/win/NLS/zh_CN.wxl | 620 ++++++ src/VBox/Installer/win/NLS/zh_TW.wxl | 620 ++++++ src/VBox/Installer/win/Permissions.wxi | 34 + src/VBox/Installer/win/PublicProperties.wxi | 52 + src/VBox/Installer/win/Resources/Makefile.kmk | 96 + src/VBox/Installer/win/Resources/VBoxRes.rc | 64 + src/VBox/Installer/win/Resources/dummy.cpp | 36 + src/VBox/Installer/win/Resources/resource.h | 46 + .../Installer/win/Scripts/Combined-1-Prepare.cmd | 314 +++ .../Installer/win/Scripts/Combined-3-Repack.cmd | 338 ++++ .../win/Scripts/Combined-3-RepackAdditions.cmd | 370 ++++ src/VBox/Installer/win/Scripts/Makefile.kup | 0 .../win/Scripts/PackDriversForSubmission.cmd | 338 ++++ src/VBox/Installer/win/Scripts/RepackExtPack.cmd | 240 +++ .../Installer/win/Scripts/Single-1-Prepare.cmd | 248 +++ src/VBox/Installer/win/Scripts/Single-3-Repack.cmd | 282 +++ .../Installer/win/Scripts/UnpackBlessedDrivers.cmd | 185 ++ src/VBox/Installer/win/Scripts/VBoxExtPackPuel.inf | 68 + src/VBox/Installer/win/Scripts/VMMR0.inf | 64 + src/VBox/Installer/win/Stub/Makefile.kmk | 173 ++ src/VBox/Installer/win/Stub/VBoxStub.cpp | 1522 ++++++++++++++ src/VBox/Installer/win/Stub/VBoxStub.h | 40 + src/VBox/Installer/win/Stub/VBoxStub.manifest | 28 + src/VBox/Installer/win/Stub/VBoxStub.rc | 66 + src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp | 152 ++ src/VBox/Installer/win/Stub/VBoxStubCertUtil.h | 37 + src/VBox/Installer/win/Stub/crypt32.def | 35 + src/VBox/Installer/win/Stub/msi.def | 33 + src/VBox/Installer/win/Stub/resource.h | 42 + src/VBox/Installer/win/Stub/shell32.def | 32 + src/VBox/Installer/win/Stub/user32.def | 33 + src/VBox/Installer/win/Stub/ws2_32.def | 32 + src/VBox/Installer/win/StubBld/Makefile.kmk | 38 + src/VBox/Installer/win/StubBld/VBoxStubBld.cpp | 331 +++ src/VBox/Installer/win/StubBld/VBoxStubBld.h | 88 + src/VBox/Installer/win/UserInterface.wxi | 1247 ++++++++++++ src/VBox/Installer/win/VBoxKey.wxi | 5 + src/VBox/Installer/win/VBoxMergeApp.wxi | 491 +++++ src/VBox/Installer/win/VBoxMergeApp.wxs | 89 + src/VBox/Installer/win/VBoxMergeAppCA.wxi | 39 + src/VBox/Installer/win/VBoxMergeAppSeq.wxi | 37 + src/VBox/Installer/win/VBoxMergeCOM32On64.wxi | 67 + src/VBox/Installer/win/VBoxMergeCOM32On64.wxs | 60 + src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi | 30 + src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi | 30 + src/VBox/Installer/win/VBoxMergeNetAdp.wxi | 48 + src/VBox/Installer/win/VBoxMergeNetAdp.wxs | 82 + src/VBox/Installer/win/VBoxMergeNetAdp6.wxi | 63 + src/VBox/Installer/win/VBoxMergeNetAdp6.wxs | 82 + src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi | 42 + src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi | 75 + src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi | 39 + src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi | 75 + src/VBox/Installer/win/VBoxMergeNetFlt.wxi | 55 + src/VBox/Installer/win/VBoxMergeNetFlt.wxs | 82 + src/VBox/Installer/win/VBoxMergeNetFltCA.wxi | 44 + src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi | 90 + src/VBox/Installer/win/VBoxMergeNetLwf.wxi | 66 + src/VBox/Installer/win/VBoxMergeNetLwf.wxs | 82 + src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi | 44 + src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi | 90 + src/VBox/Installer/win/VBoxMergePython.wxi | 60 + src/VBox/Installer/win/VBoxMergePython.wxs | 68 + src/VBox/Installer/win/VBoxMergePythonCA.wxi | 35 + src/VBox/Installer/win/VBoxMergePythonSeq.wxi | 52 + src/VBox/Installer/win/VBoxMergeUSB.wxi | 72 + src/VBox/Installer/win/VBoxMergeUSB.wxs | 60 + src/VBox/Installer/win/VBoxMergeUSBCA.wxi | 30 + src/VBox/Installer/win/VBoxMergeUSBSeq.wxi | 30 + src/VBox/Installer/win/VirtualBox.wxs | 690 +++++++ src/VBox/Installer/win/VirtualBox_TypeLib.xsl | 195 ++ .../win/VirtualBox_TypeLibWithInterfaces.xsl | 318 +++ src/VBox/Installer/win/dep.xsl | 79 + src/VBox/Installer/win/dep2.xsl | 93 + 191 files changed, 36003 insertions(+) create mode 100644 src/VBox/Installer/.scm-settings create mode 100644 src/VBox/Installer/Config.kmk create mode 100644 src/VBox/Installer/Makefile.kmk create mode 100644 src/VBox/Installer/common/Makefile.kmk create mode 100755 src/VBox/Installer/common/vboxapisetup.py create mode 100644 src/VBox/Installer/common/virtualbox.desktop.in create mode 100644 src/VBox/Installer/common/virtualbox.xml create mode 100644 src/VBox/Installer/common/virtualboxvm.desktop.in create mode 100644 src/VBox/Installer/darwin/DiskImage/DS_Store create mode 100755 src/VBox/Installer/darwin/DiskImage/VirtualBox_Uninstall.tool create mode 100644 src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff create mode 100644 src/VBox/Installer/darwin/DiskImage/vbox_folder.xcf create mode 100644 src/VBox/Installer/darwin/Makefile.kmk create mode 100644 src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist create mode 100755 src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh create mode 100644 src/VBox/Installer/darwin/VBoxKEXTs/org.virtualbox.startup.plist create mode 100755 src/VBox/Installer/darwin/VBoxKEXTs/postflight create mode 100644 src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist create mode 100755 src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh create mode 100644 src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist create mode 100644 src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist create mode 100644 src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist create mode 100755 src/VBox/Installer/darwin/VirtualBox/postflight create mode 100755 src/VBox/Installer/darwin/VirtualBox/preflight create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/distribution-driverless.dist create mode 100644 src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist create mode 100644 src/VBox/Installer/freebsd/Makefile.kmk create mode 100644 src/VBox/Installer/freebsd/pkg-comment create mode 100644 src/VBox/Installer/freebsd/pkg-descr create mode 100644 src/VBox/Installer/freebsd/pkg_plist create mode 100755 src/VBox/Installer/freebsd/postdeinstall.sh create mode 100755 src/VBox/Installer/freebsd/postinstall.sh create mode 100644 src/VBox/Installer/linux/Makefile-footer.gmk create mode 100644 src/VBox/Installer/linux/Makefile-header.gmk create mode 100644 src/VBox/Installer/linux/Makefile.kmk create mode 100644 src/VBox/Installer/linux/README.testing create mode 100755 src/VBox/Installer/linux/VBox.sh create mode 100755 src/VBox/Installer/linux/VBoxCreateUSBNode.sh create mode 100755 src/VBox/Installer/linux/VBoxSysInfo.sh create mode 100755 src/VBox/Installer/linux/check_module_dependencies.sh create mode 100755 src/VBox/Installer/linux/deffiles create mode 100644 src/VBox/Installer/linux/distributions_deb create mode 100644 src/VBox/Installer/linux/distributions_rpm create mode 100755 src/VBox/Installer/linux/install.sh create mode 100755 src/VBox/Installer/linux/postinst-common.sh create mode 100755 src/VBox/Installer/linux/prerm-common.sh create mode 100644 src/VBox/Installer/linux/routines.sh create mode 100644 src/VBox/Installer/linux/rpm/LocalConfig.kmk create mode 100644 src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec create mode 100755 src/VBox/Installer/linux/rpm/rules create mode 100755 src/VBox/Installer/linux/runasroot.sh create mode 100755 src/VBox/Installer/linux/scripts/VBoxHeadlessXOrg.sh create mode 100644 src/VBox/Installer/linux/testcase/Makefile.kmk create mode 100755 src/VBox/Installer/linux/testcase/tstHeadlessXOrg.sh create mode 100755 src/VBox/Installer/linux/uninstall.sh create mode 100755 src/VBox/Installer/linux/vboxautostart-service.sh create mode 100755 src/VBox/Installer/linux/vboxballoonctrl-service.sh create mode 100755 src/VBox/Installer/linux/vboxdrv.sh create mode 100755 src/VBox/Installer/linux/vboxweb-service.sh create mode 100644 src/VBox/Installer/solaris/Makefile.kmk create mode 100755 src/VBox/Installer/solaris/VBox.sh create mode 100644 src/VBox/Installer/solaris/VBoxISAExec.c create mode 100644 src/VBox/Installer/solaris/VBoxZoneAccess.c create mode 100755 src/VBox/Installer/solaris/checkinstall.sh create mode 100755 src/VBox/Installer/solaris/makepackage.sh create mode 100755 src/VBox/Installer/solaris/pkginstall.sh create mode 100755 src/VBox/Installer/solaris/postinstall.sh create mode 100755 src/VBox/Installer/solaris/preremove.sh create mode 100755 src/VBox/Installer/solaris/smf-vboxautostart.sh create mode 100755 src/VBox/Installer/solaris/smf-vboxballoonctrl.sh create mode 100755 src/VBox/Installer/solaris/smf-vboxwebsrv.sh create mode 100644 src/VBox/Installer/solaris/vbox-ips.mog create mode 100644 src/VBox/Installer/solaris/vbox.pkginfo create mode 100644 src/VBox/Installer/solaris/vbox.pkgresponse create mode 100644 src/VBox/Installer/solaris/vbox.space create mode 100755 src/VBox/Installer/solaris/vboxconfig.sh create mode 100644 src/VBox/Installer/solaris/virtualbox-autostart.xml create mode 100644 src/VBox/Installer/solaris/virtualbox-balloonctrl.xml create mode 100644 src/VBox/Installer/solaris/virtualbox-webservice.xml create mode 100644 src/VBox/Installer/solaris/virtualbox-zoneaccess.xml create mode 100644 src/VBox/Installer/solaris/virtualbox.applications.in create mode 100644 src/VBox/Installer/solaris/virtualbox.keys create mode 100644 src/VBox/Installer/solaris/virtualbox.mime create mode 100644 src/VBox/Installer/win/Binary/Banner.jpg create mode 100644 src/VBox/Installer/win/Binary/Dialog.jpg create mode 100644 src/VBox/Installer/win/Binary/Exclamation.ico create mode 100644 src/VBox/Installer/win/Binary/New.ico create mode 100644 src/VBox/Installer/win/Binary/Remove.ico create mode 100644 src/VBox/Installer/win/Binary/Repair.ico create mode 100644 src/VBox/Installer/win/Binary/Up.ico create mode 100644 src/VBox/Installer/win/Binary/info.ico create mode 100644 src/VBox/Installer/win/CommonProperties.wxi create mode 100644 src/VBox/Installer/win/Defines.wxi create mode 100644 src/VBox/Installer/win/InstallHelper/Makefile.kmk create mode 100644 src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp create mode 100644 src/VBox/Installer/win/InstallHelper/VBoxCommon.h create mode 100644 src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp create mode 100644 src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def create mode 100644 src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc create mode 100644 src/VBox/Installer/win/Makefile.kmk create mode 100644 src/VBox/Installer/win/MsiHack/Makefile.kmk create mode 100644 src/VBox/Installer/win/MsiHack/MsiHack.cpp create mode 100644 src/VBox/Installer/win/MsiHack/MsiHackExtension.cs create mode 100644 src/VBox/Installer/win/NLS/de_DE.wxl create mode 100644 src/VBox/Installer/win/NLS/el_GR.wxl create mode 100644 src/VBox/Installer/win/NLS/en_US.wxl create mode 100644 src/VBox/Installer/win/NLS/fa_IR.wxl create mode 100644 src/VBox/Installer/win/NLS/fr_FR.wxl create mode 100644 src/VBox/Installer/win/NLS/it_IT.wxl create mode 100644 src/VBox/Installer/win/NLS/ru_RU.wxl create mode 100644 src/VBox/Installer/win/NLS/tr_TR.wxl create mode 100644 src/VBox/Installer/win/NLS/zh_CN.wxl create mode 100644 src/VBox/Installer/win/NLS/zh_TW.wxl create mode 100644 src/VBox/Installer/win/Permissions.wxi create mode 100644 src/VBox/Installer/win/PublicProperties.wxi create mode 100644 src/VBox/Installer/win/Resources/Makefile.kmk create mode 100644 src/VBox/Installer/win/Resources/VBoxRes.rc create mode 100644 src/VBox/Installer/win/Resources/dummy.cpp create mode 100644 src/VBox/Installer/win/Resources/resource.h create mode 100644 src/VBox/Installer/win/Scripts/Combined-1-Prepare.cmd create mode 100644 src/VBox/Installer/win/Scripts/Combined-3-Repack.cmd create mode 100644 src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd create mode 100644 src/VBox/Installer/win/Scripts/Makefile.kup create mode 100644 src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd create mode 100644 src/VBox/Installer/win/Scripts/RepackExtPack.cmd create mode 100644 src/VBox/Installer/win/Scripts/Single-1-Prepare.cmd create mode 100644 src/VBox/Installer/win/Scripts/Single-3-Repack.cmd create mode 100644 src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd create mode 100644 src/VBox/Installer/win/Scripts/VBoxExtPackPuel.inf create mode 100644 src/VBox/Installer/win/Scripts/VMMR0.inf create mode 100644 src/VBox/Installer/win/Stub/Makefile.kmk create mode 100644 src/VBox/Installer/win/Stub/VBoxStub.cpp create mode 100644 src/VBox/Installer/win/Stub/VBoxStub.h create mode 100644 src/VBox/Installer/win/Stub/VBoxStub.manifest create mode 100644 src/VBox/Installer/win/Stub/VBoxStub.rc create mode 100644 src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp create mode 100644 src/VBox/Installer/win/Stub/VBoxStubCertUtil.h create mode 100644 src/VBox/Installer/win/Stub/crypt32.def create mode 100644 src/VBox/Installer/win/Stub/msi.def create mode 100644 src/VBox/Installer/win/Stub/resource.h create mode 100644 src/VBox/Installer/win/Stub/shell32.def create mode 100644 src/VBox/Installer/win/Stub/user32.def create mode 100644 src/VBox/Installer/win/Stub/ws2_32.def create mode 100644 src/VBox/Installer/win/StubBld/Makefile.kmk create mode 100644 src/VBox/Installer/win/StubBld/VBoxStubBld.cpp create mode 100644 src/VBox/Installer/win/StubBld/VBoxStubBld.h create mode 100644 src/VBox/Installer/win/UserInterface.wxi create mode 100644 src/VBox/Installer/win/VBoxKey.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeApp.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeApp.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeAppCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeAppSeq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeCOM32On64.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeCOM32On64.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp6.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp6.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetFlt.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetFlt.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeNetFltCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetLwf.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetLwf.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergePython.wxi create mode 100644 src/VBox/Installer/win/VBoxMergePython.wxs create mode 100644 src/VBox/Installer/win/VBoxMergePythonCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergePythonSeq.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeUSB.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeUSB.wxs create mode 100644 src/VBox/Installer/win/VBoxMergeUSBCA.wxi create mode 100644 src/VBox/Installer/win/VBoxMergeUSBSeq.wxi create mode 100644 src/VBox/Installer/win/VirtualBox.wxs create mode 100644 src/VBox/Installer/win/VirtualBox_TypeLib.xsl create mode 100644 src/VBox/Installer/win/VirtualBox_TypeLibWithInterfaces.xsl create mode 100644 src/VBox/Installer/win/dep.xsl create mode 100644 src/VBox/Installer/win/dep2.xsl (limited to 'src/VBox/Installer') diff --git a/src/VBox/Installer/.scm-settings b/src/VBox/Installer/.scm-settings new file mode 100644 index 00000000..2f68b289 --- /dev/null +++ b/src/VBox/Installer/.scm-settings @@ -0,0 +1,103 @@ +# $Id: .scm-settings $ +## @file +# Source code massager settings for the host installers. +# + +# +# Copyright (C) 2010-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# External stuff. +/linux/rpm-kmod-VBoxGuest/kmodtool-VBoxGuest-el6.sh: --external-copyright +/common/virtualbox.xml: --external-copyright + +# Dual licensed code. +/common/vboxapisetup.py: --license-ose-dual + +# ignore desktop files. +--filter-out-files *.desktop.in|*.desktop + +# Darwin stuff. +--filter-out-files */DS_Store +--filter-out-files /darwin/*.rtf +--filter-out-files /darwin/*.strings +--filter-out-files /darwin/*.html +/darwin/DiskImage/VirtualBox_Uninstall.tool: --treat-as .sh +/darwin/VBoxKEXTs/postflight: --treat-as .sh +/darwin/VirtualBox/postflight: --treat-as .sh +/darwin/VirtualBox/preflight: --treat-as .sh +/darwin/*/distribution.dist: --treat-as .xml --no-convert-eol + +# FreeBSD stuff. +--filter-out-files /freebsd/pkg-comment +--filter-out-files /freebsd/pkg-descr +--filter-out-files /freebsd/pkg_plist + +# Linux stuff. +--filter-out-files /linux/debian/changelog.in +--filter-out-files /linux/debian/compat +--filter-out-files /linux/debian/control +--filter-out-files /linux/debian/copyright +--filter-out-files /linux/debian/dirs +--filter-out-files /linux/debian/lintian-override.in +/linux/debian/postinst: --treat-as .sh +/linux/debian/postrm: --treat-as .sh +/linux/debian/preinst: --treat-as .sh +/linux/debian/prerm: --treat-as .sh +/linux/debian/rules: --treat-as Makefile --no-convert-eol --dont-set-svn-executable +--filter-out-files /linux/debian/templates +/linux/deffiles: --treat-as .sh +--filter-out-files /linux/distributions_deb +--filter-out-files /linux/distributions_rpm +/linux/Makefile-footer.gmk: --treat-as Makefile --no-convert-eol +/linux/Makefile-header.gmk: --treat-as Makefile --no-convert-eol +/linux/rpm/rules: --treat-as Makefile --no-convert-eol --dont-set-svn-executable +/linux/rpm/VirtualBox.tmpl.spec: --treat-as .sh +/linux/rpm-kmod/build-kmod.in: --treat-as .sh +/linux/rpm-kmod/kmodtool: --treat-as .sh --external-copyright --no-strip-trailing-blanks +/linux/rpm-kmod/rules: --treat-as Makefile --no-convert-eol --dont-set-svn-executable +--filter-out-files /linux/rpm-kmod/vboxdrv.spec.in +--filter-out-files /linux/rpm-kmod/VirtualBox-kmod.spec.in +--filter-out-files /linux/rpm-kmod-VBoxGuest/README +--filter-out-files /linux/rpm-kmod-VBoxGuest/VBoxGuest-kmod.spec +--filter-out-files /linux/README.testing + +# Caveat: If we export /linux/rpm-VBoxGuestAdditions/, the --no-update-license hack must go. +/linux/rpm-VBoxGuestAdditions/rules: --no-update-license --treat-as Makefile --no-convert-eol --dont-set-svn-executable +/linux/rpm-VBoxGuestAdditions/VBoxGuestAdditions.tmpl.spec: --no-update-license --treat-as .sh + +# Solaris stuff. +/solaris/vboxconfig.sh: --no-convert-tabs +/solaris/*.xml: --no-convert-eol + +--filter-out-files /solaris/ips/vbox.mog +--filter-out-files /solaris/vbox.pkginfo +--filter-out-files /solaris/vbox.pkgresponse +--filter-out-files /solaris/vbox.space +--filter-out-files /solaris/virtualbox.applications.in +--filter-out-files /solaris/virtualbox.keys +--filter-out-files /solaris/virtualbox.mime + +# Windows +/win/MsiHack/MsiHackExtension.cs: --treat-as .c +--filter-out-files /win/Stub/VBoxStub.manifest +/win/NLS/*.wxl: --no-convert-tabs +/win/VBoxKey.wxi: --external-copyright diff --git a/src/VBox/Installer/Config.kmk b/src/VBox/Installer/Config.kmk new file mode 100644 index 00000000..9bd32682 --- /dev/null +++ b/src/VBox/Installer/Config.kmk @@ -0,0 +1,146 @@ +# $Id: Config.kmk $ +## @file +# kBuild Configuration file for the installers +# + +# +# Copyright (C) 2015-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +VBOX_INSTALLER_CONFIG_KMK_INCLUDED = 1 + +# Include the top-level configure file. +ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED + include $(PATH_ROOT)/Config.kmk +endif + +# +# Generic stuff. +# +VBOX_PATH_INST_COMMON_SRC := $(PATH_ROOT)/src/VBox/Installer/common + + +ifdef VBOX_WITH_PYTHON + VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES = \ + sdk/bindings/xpcom/python/xpcom/__init__.py \ + sdk/bindings/xpcom/python/xpcom/primitives.py \ + sdk/bindings/xpcom/python/xpcom/file.py \ + sdk/bindings/xpcom/python/xpcom/xpcom_consts.py \ + sdk/bindings/xpcom/python/xpcom/nsError.py \ + sdk/bindings/xpcom/python/xpcom/xpt.py \ + sdk/bindings/xpcom/python/xpcom/components.py \ + sdk/bindings/xpcom/python/xpcom/vboxxpcom.py \ + sdk/bindings/xpcom/python/xpcom/client/__init__.py \ + sdk/bindings/xpcom/python/xpcom/server/__init__.py \ + sdk/bindings/xpcom/python/xpcom/server/enumerator.py \ + sdk/bindings/xpcom/python/xpcom/server/factory.py \ + sdk/bindings/xpcom/python/xpcom/server/loader.py \ + sdk/bindings/xpcom/python/xpcom/server/module.py \ + sdk/bindings/xpcom/python/xpcom/server/policy.py + VBOXINST_SDK_INSTALLER_PYTHON_FILES = \ + sdk/installer/vboxapisetup.py \ + sdk/installer/vboxapi/__init__.py \ + sdk/installer/vboxapi/VirtualBox_constants.py +endif + + +# +# List of unattended installation script templates (lives in +# src/VBox/Main/UnattendedTemplates). +# +ifdef VBOX_WITH_UNATTENDED + VBOX_UNATTENDED_TEMPLATES := \ + debian_preseed.cfg \ + ubuntu_preseed.cfg \ + fedora_ks.cfg \ + ol_ks.cfg \ + rhel3_ks.cfg \ + rhel4_ks.cfg \ + rhel5_ks.cfg \ + redhat67_ks.cfg \ + os2_response_files.rsp \ + win_nt5_unattended.sif \ + win_nt6_unattended.xml \ + \ + debian_postinstall.sh \ + redhat_postinstall.sh \ + ol_postinstall.sh \ + os2_cid_install.cmd \ + win_postinstall.cmd \ + \ + os2_util.exe + ifndef VBOX_OSE + VBOX_UNATTENDED_TEMPLATES += \ + lgw_ks.cfg \ + lgw_postinstall.sh + endif +else + VBOX_UNATTENDED_TEMPLATES := +endif + + +# +# DTrace globals. +# +ifdef VBOX_WITH_DTRACE + ## List of files in the per arch DTrace library directory. + VBOXINST_DTRACE_LIB_ARCH_FILES := \ + vbox-types.d \ + vbox-arch-types.d \ + vm.d \ + cpumctx.d \ + CPUMInternal.d \ + x86.d + ## List of files in the per arch DTrace testcase directory. + VBOXINST_DTRACE_TESTCASE_ARCH_FILES := \ + vbox-vm-struct-test.d + ## List of file in the DTrace scripts directory. + VBOXINST_DTRACE_SCRIPTS_FILES := +else + VBOXINST_DTRACE_LIB_ARCH_FILES := + VBOXINST_DTRACE_TESTCASE_ARCH_FILES := + VBOXINST_DTRACE_SCRIPTS_FILES := +endif + + +# +# Some combined package (CP) globals. +# +ifeq ($(KBUILD_TARGET_ARCH),x86) + VBOX_CP_THIS_BITS := 32 + ifdef VBOX_WITH_COMBINED_PACKAGE + VBOX_CP_OTHER_ARCH := amd64 + VBOX_CP_OTHER_BITS := 64 + else + VBOX_CP_OTHER_ARCH = $(error VBOX_CP_OTHER_ARCH used in without VBOX_WITH_COMBINED_PACKAGE set) + VBOX_CP_OTHER_BITS = $(error VBOX_CP_OTHER_ARCH used in without VBOX_CP_OTHER_BITS set) + endif +else + VBOX_CP_THIS_BITS := 64 + ifdef VBOX_WITH_COMBINED_PACKAGE + VBOX_CP_OTHER_ARCH := x86 + VBOX_CP_OTHER_BITS := 32 + else + VBOX_CP_OTHER_ARCH = $(error VBOX_CP_OTHER_ARCH used in without VBOX_WITH_COMBINED_PACKAGE set) + VBOX_CP_OTHER_BITS = $(error VBOX_CP_OTHER_ARCH used in without VBOX_CP_OTHER_BITS set) + endif +endif + diff --git a/src/VBox/Installer/Makefile.kmk b/src/VBox/Installer/Makefile.kmk new file mode 100644 index 00000000..89d3e089 --- /dev/null +++ b/src/VBox/Installer/Makefile.kmk @@ -0,0 +1,80 @@ +# $Id: Makefile.kmk $ +## @file +# Install misc stuff and create dist packages. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../.. +include $(KBUILD_PATH)/subheader.kmk + +# +# Make sure our Config.kmk is included. +# +ifndef VBOX_INSTALLER_CONFIG_KMK_INCLUDED + include $(PATH_SUB_CURRENT)/Config.kmk +endif + +# +# Include Sub-Makefiles. +# +ifndef VBOX_ONLY_SDK + if "$(KBUILD_TARGET)" == "darwin" && "$(KBUILD_HOST)" == "darwin" + include $(PATH_SUB_CURRENT)/darwin/Makefile.kmk + endif + if "$(KBUILD_TARGET)" == "linux" && "$(KBUILD_HOST)" == "linux" + include $(PATH_SUB_CURRENT)/linux/Makefile.kmk + endif + if "$(KBUILD_TARGET)" == "solaris" && "$(KBUILD_HOST)" == "solaris" + include $(PATH_SUB_CURRENT)/solaris/Makefile.kmk + endif + if "$(KBUILD_TARGET)" == "win" && "$(KBUILD_HOST)" == "win" + include $(PATH_SUB_CURRENT)/win/Makefile.kmk + endif + if "$(KBUILD_TARGET)" == "freebsd" && "$(KBUILD_HOST)" == "freebsd" + include $(PATH_SUB_CURRENT)/freebsd/Makefile.kmk + endif +endif + +include $(PATH_SUB_CURRENT)/common/Makefile.kmk + +if defined(VBOX_ONLY_SDK) ## @todo || defined(VBOX_WITH_SDK) + # + # Package the VirtualBox SDK. + # + VBOX_SDK_ZIP = $(PATH_STAGE_BIN)/VirtualBoxSDK-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).zip + PACKING += $(VBOX_SDK_ZIP) + OTHER_CLEANS += $(VBOX_SDK_ZIP) \ + $(wildcard $(PATH_STAGE_BIN)/VirtualBoxSDK-*-r*.zip) + +# @todo: wrong, it must depend on everything included in SDK +$(VBOX_SDK_ZIP): \ + $(PATH_STAGE_BIN)/sdk \ + $(VBOX_VERSION_STAMP) + $(call MSG_L1,Making SDK delivery $@) + $(QUIET)$(REDIRECT) $(if $(QUIET),-wo /dev/null,) -C $(PATH_STAGE_BIN) -- $(VBOX_ZIP) -r9 $@ sdk +endif + + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/common/Makefile.kmk b/src/VBox/Installer/common/Makefile.kmk new file mode 100644 index 00000000..6adb582b --- /dev/null +++ b/src/VBox/Installer/common/Makefile.kmk @@ -0,0 +1,48 @@ +# $Id: Makefile.kmk $ +## @file +# Common installer stuff. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +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..4c2af6f6 --- /dev/null +++ b/src/VBox/Installer/common/vboxapisetup.py @@ -0,0 +1,99 @@ +""" +Copyright (C) 2009-2022 Oracle and/or its affiliates. + +This file is part of VirtualBox base platform packages, as +available from https://www.virtualbox.org. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, in version 3 of the +License. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . + +The contents of this file may alternatively be used under the terms +of the Common Development and Distribution License Version 1.0 +(CDDL), a copy of it is provided in the "COPYING.CDDL" file included +in the VirtualBox 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. + +SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0 +""" + +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..dca93dde --- /dev/null +++ b/src/VBox/Installer/common/virtualbox.desktop.in @@ -0,0 +1,29 @@ +[Desktop Entry] +Version=1.0 +Name=@VBOX_PRODUCT@ +GenericName=Virtualization Software +GenericName[de]=Virtualisierung Software +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; +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 @@ + + + + VirtualBox Machine Definition + VirtualBox Machine Definition + + + + + + VirtualBox Extension Pack + VirtualBox Extension Pack + + + + + + Open Virtualization Format + Open Virtualization Format + + + + + + Open Virtualization Format Archive + Open Virtualization Format Archive + + + + + + Virtual Disk Image + Virtual Disk Image + + + + + + Virtual Machine Disk Format + Virtual Machine Disk Format + + + + + + Virtual Hard Disk + Virtual Hard Disk + + + + + + Virtual Hard Disk + Virtual Hard Disk + + + + diff --git a/src/VBox/Installer/common/virtualboxvm.desktop.in b/src/VBox/Installer/common/virtualboxvm.desktop.in new file mode 100644 index 00000000..0317ca7b --- /dev/null +++ b/src/VBox/Installer/common/virtualboxvm.desktop.in @@ -0,0 +1,29 @@ +[Desktop Entry] +Version=1.0 +Name=@VBOX_PRODUCT@ +GenericName=Virtual Machine +GenericName[de]=Virtuelle Maschine +GenericName[ru]=Виртуальная машина +Type=Application +Exec=VirtualBoxVM %U +TryExec=VirtualBoxVM +Keywords=virtualization; +Keywords[de]=Virtualisierung; +Keywords[ru]=виртуализация; +Icon=virtualbox +Categories=Emulator;System; +Actions=Manager; +StartupWMClass=VirtualBox Machine +Comment=Run the virtual machine +Comment[de]= +Comment[it]= +Comment[ko]= +Comment[pl]= +Comment[ru]= +Comment[sv]= +NoDisplay=true + +[Desktop Action Manager] +Exec=VirtualBoxVM +Name=Run the Virtual Machine +Name[de]= diff --git a/src/VBox/Installer/darwin/DiskImage/DS_Store b/src/VBox/Installer/darwin/DiskImage/DS_Store new file mode 100644 index 00000000..ede41476 Binary files /dev/null and b/src/VBox/Installer/darwin/DiskImage/DS_Store differ diff --git a/src/VBox/Installer/darwin/DiskImage/VirtualBox_Uninstall.tool b/src/VBox/Installer/darwin/DiskImage/VirtualBox_Uninstall.tool new file mode 100755 index 00000000..9e1229ef --- /dev/null +++ b/src/VBox/Installer/darwin/DiskImage/VirtualBox_Uninstall.tool @@ -0,0 +1,291 @@ +#!/bin/bash +# $Id: VirtualBox_Uninstall.tool $ +## @file +# VirtualBox Uninstaller Script. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Override any funny stuff from the user. +export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH" + +# +# Display a simple welcome message first. +# +echo "" +echo "Welcome to the VirtualBox uninstaller script." +echo "" + +# +# Check for arguments and display +# +my_default_prompt=0 +if test "$#" != "0"; then + if test "$#" != "1" -o "$1" != "--unattended"; then + echo "Error: Unknown argument(s): $*" + echo "" + echo "Usage: uninstall.sh [--unattended]" + echo "" + echo "If the '--unattended' option is not given, you will be prompted" + echo "for a Yes/No before doing the actual uninstallation." + echo "" + exit 4; + fi + my_default_prompt="Yes" +fi + +# +# Collect directories and files to remove. +# Note: Do NOT attempt adding directories or filenames with spaces! +# +declare -a my_directories +declare -a my_files + +# Users files first +test -f "${HOME}/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist" && my_files+=("${HOME}/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist") + +test -d /Library/StartupItems/VirtualBox/ && my_directories+=("/Library/StartupItems/VirtualBox/") +test -d /Library/Receipts/VBoxStartupItems.pkg/ && my_directories+=("/Library/Receipts/VBoxStartupItems.pkg/") + +test -d "/Library/Application Support/VirtualBox/LaunchDaemons/" && my_directories+=("/Library/Application Support/VirtualBox/LaunchDaemons/") +test -d "/Library/Application Support/VirtualBox/VBoxDrv.kext/" && my_directories+=("/Library/Application Support/VirtualBox/VBoxDrv.kext/") +test -d "/Library/Application Support/VirtualBox/VBoxUSB.kext/" && my_directories+=("/Library/Application Support/VirtualBox/VBoxUSB.kext/") +test -d "/Library/Application Support/VirtualBox/VBoxNetFlt.kext/" && my_directories+=("/Library/Application Support/VirtualBox/VBoxNetFlt.kext/") +test -d "/Library/Application Support/VirtualBox/VBoxNetAdp.kext/" && my_directories+=("/Library/Application Support/VirtualBox/VBoxNetAdp.kext/") +# Pre 4.3.0rc1 locations: +test -d /Library/Extensions/VBoxDrv.kext/ && my_directories+=("/Library/Extensions/VBoxDrv.kext/") +test -d /Library/Extensions/VBoxUSB.kext/ && my_directories+=("/Library/Extensions/VBoxUSB.kext/") +test -d /Library/Extensions/VBoxNetFlt.kext/ && my_directories+=("/Library/Extensions/VBoxNetFlt.kext/") +test -d /Library/Extensions/VBoxNetAdp.kext/ && my_directories+=("/Library/Extensions/VBoxNetAdp.kext/") +# Tiger support is obsolete, but we leave it here for a clean removing of older +# VirtualBox versions +test -d /Library/Extensions/VBoxDrvTiger.kext/ && my_directories+=("/Library/Extensions/VBoxDrvTiger.kext/") +test -d /Library/Extensions/VBoxUSBTiger.kext/ && my_directories+=("/Library/Extensions/VBoxUSBTiger.kext/") +test -d /Library/Receipts/VBoxKEXTs.pkg/ && my_directories+=("/Library/Receipts/VBoxKEXTs.pkg/") + +test -f /usr/bin/VirtualBox && my_files+=("/usr/bin/VirtualBox") +test -f /usr/bin/VirtualBoxVM && my_files+=("/usr/bin/VirtualBoxVM") +test -f /usr/bin/VBoxManage && my_files+=("/usr/bin/VBoxManage") +test -f /usr/bin/VBoxVRDP && my_files+=("/usr/bin/VBoxVRDP") +test -f /usr/bin/VBoxHeadless && my_files+=("/usr/bin/VBoxHeadless") +test -f /usr/bin/vboxwebsrv && my_files+=("/usr/bin/vboxwebsrv") +test -f /usr/bin/VBoxBugReport && my_files+=("/usr/bin/VBoxBugReport") +test -f /usr/bin/VBoxBalloonCtrl && my_files+=("/usr/bin/VBoxBalloonCtrl") +test -f /usr/bin/VBoxAutostart && my_files+=("/usr/bin/VBoxAutostart") +test -f /usr/bin/VBoxDTrace && my_files+=("/usr/bin/VBoxDTrace") +test -f /usr/bin/VBoxAudioTest && my_files+=("/usr/bin/VBoxAudioTest") +test -f /usr/bin/vbox-img && my_files+=("/usr/bin/vbox-img") +test -f /usr/local/bin/VirtualBox && my_files+=("/usr/local/bin/VirtualBox") +test -f /usr/local/bin/VirtualBoxVM && my_files+=("/usr/local/bin/VirtualBoxVM") +test -f /usr/local/bin/VBoxManage && my_files+=("/usr/local/bin/VBoxManage") +test -f /usr/local/bin/VBoxVRDP && my_files+=("/usr/local/bin/VBoxVRDP") +test -f /usr/local/bin/VBoxHeadless && my_files+=("/usr/local/bin/VBoxHeadless") +test -f /usr/local/bin/vboxwebsrv && my_files+=("/usr/local/bin/vboxwebsrv") +test -f /usr/local/bin/VBoxBugReport && my_files+=("/usr/local/bin/VBoxBugReport") +test -f /usr/local/bin/VBoxBalloonCtrl && my_files+=("/usr/local/bin/VBoxBalloonCtrl") +test -f /usr/local/bin/VBoxAutostart && my_files+=("/usr/local/bin/VBoxAutostart") +test -f /usr/local/bin/VBoxDTrace && my_files+=("/usr/local/bin/VBoxDTrace") +test -f /usr/local/bin/VBoxAudioTest && my_files+=("/usr/local/bin/VBoxAudioTest") +test -f /usr/local/bin/vbox-img && my_files+=("/usr/local/bin/vbox-img") +test -d /Library/Receipts/VirtualBoxCLI.pkg/ && my_directories+=("/Library/Receipts/VirtualBoxCLI.pkg/") +test -f /Library/LaunchDaemons/org.virtualbox.startup.plist && my_files+=("/Library/LaunchDaemons/org.virtualbox.startup.plist") + +test -d /Applications/VirtualBox.app/ && my_directories+=("/Applications/VirtualBox.app/") +test -d /Library/Receipts/VirtualBox.pkg/ && my_directories+=("/Library/Receipts/VirtualBox.pkg/") + +# legacy +test -d /Library/Receipts/VBoxDrv.pkg/ && my_directories+=("/Library/Receipts/VBoxDrv.pkg/") +test -d /Library/Receipts/VBoxUSB.pkg/ && my_directories+=("/Library/Receipts/VBoxUSB.pkg/") + +# python stuff +python_versions="2.3 2.5 2.6 2.7" +for p in $python_versions; do + test -f /Library/Python/$p/site-packages/vboxapi/VirtualBox_constants.py && my_files+=("/Library/Python/$p/site-packages/vboxapi/VirtualBox_constants.py") + test -f /Library/Python/$p/site-packages/vboxapi/VirtualBox_constants.pyc && my_files+=("/Library/Python/$p/site-packages/vboxapi/VirtualBox_constants.pyc") + test -f /Library/Python/$p/site-packages/vboxapi/__init__.py && my_files+=("/Library/Python/$p/site-packages/vboxapi/__init__.py") + test -f /Library/Python/$p/site-packages/vboxapi/__init__.pyc && my_files+=("/Library/Python/$p/site-packages/vboxapi/__init__.pyc") + test -f /Library/Python/$p/site-packages/vboxapi-1.0-py$p.egg-info && my_files+=("/Library/Python/$p/site-packages/vboxapi-1.0-py$p.egg-info") + test -d /Library/Python/$p/site-packages/vboxapi/ && my_directories+=("/Library/Python/$p/site-packages/vboxapi/") +done + +# +# Collect KEXTs to remove. +# Note that the unload order is significant. +# +declare -a my_kexts +for kext in org.virtualbox.kext.VBoxUSB org.virtualbox.kext.VBoxNetFlt org.virtualbox.kext.VBoxNetAdp org.virtualbox.kext.VBoxDrv; do + if /usr/sbin/kextstat -b $kext -l | grep -q $kext; then + my_kexts+=("$kext") + fi +done + +# +# Collect packages to forget +# +my_pb='org\.virtualbox\.pkg\.' +my_pkgs=`/usr/sbin/pkgutil --pkgs="${my_pb}vboxkexts|${my_pb}vboxstartupitems|${my_pb}virtualbox|${my_pb}virtualboxcli"` + +# +# Did we find anything to uninstall? +# +if test -z "${my_directories[*]}" -a -z "${my_files[*]}" -a -z "${my_kexts[*]}" -a -z "$my_pkgs"; then + echo "No VirtualBox files, directories, KEXTs or packages to uninstall." + echo "Done." + exit 0; +fi + +# +# Look for running VirtualBox processes and warn the user +# if something is running. Since deleting the files of +# running processes isn't fatal as such, we will leave it +# to the user to choose whether to continue or not. +# +# Note! comm isn't supported on Tiger, so we make -c to do the stripping. +# +my_processes="`ps -axco 'pid uid command' | grep -wEe '(VirtualBox|VirtualBoxVM|VBoxManage|VBoxHeadless|vboxwebsrv|VBoxXPCOMIPCD|VBoxSVC|VBoxNetDHCP|VBoxNetNAT)' | grep -vw grep | grep -vw VirtualBox_Uninstall.tool | tr '\n' '\a'`"; +if test -n "$my_processes"; then + echo 'Warning! Found the following active VirtualBox processes:' + echo "$my_processes" | tr '\a' '\n' + echo "" + echo "We recommend that you quit all VirtualBox processes before" + echo "uninstalling the product." + echo "" + if test "$my_default_prompt" != "Yes"; then + echo "Do you wish to continue none the less (Yes/No)?" + read my_answer + if test "$my_answer" != "Yes" -a "$my_answer" != "YES" -a "$my_answer" != "yes"; then + echo "Aborting uninstall. (answer: '$my_answer')". + exit 2; + fi + echo "" + my_answer="" + fi +fi + +# +# Display the files and directories that will be removed +# and get the user's consent before continuing. +# +if test -n "${my_files[*]}" -o -n "${my_directories[*]}"; then + echo "The following files and directories (bundles) will be removed:" + for file in "${my_files[@]}"; do echo " $file"; done + for dir in "${my_directories[@]}"; do echo " $dir"; done + echo "" +fi +if test -n "${my_kexts[*]}"; then + echo "And the following KEXTs will be unloaded:" + for kext in "${my_kexts[@]}"; do echo " $kext"; done + echo "" +fi +if test -n "$my_pkgs"; then + echo "And the traces of following packages will be removed:" + for kext in $my_pkgs; do echo " $kext"; done + echo "" +fi + +if test "$my_default_prompt" != "Yes"; then + echo "Do you wish to uninstall VirtualBox (Yes/No)?" + read my_answer + if test "$my_answer" != "Yes" -a "$my_answer" != "YES" -a "$my_answer" != "yes"; then + echo "Aborting uninstall. (answer: '$my_answer')". + exit 2; + fi + echo "" +fi + +my_fuse_macos_core_uninstall=0 +if test "$my_default_prompt" != "Yes" -a -f "/Library/Filesystems/osxfuse.fs/Contents/Resources/uninstall_osxfuse.app/Contents/Resources/Scripts/uninstall_osxfuse.sh"; then + echo "VirtualBox detected the FUSE for macOS core package which might've been installed" + echo "by VirtualBox itself for the vboximg-mount utility. Do you wish to uninstall" + echo "the FUSE for macOS core package (Yes/No)?" + read my_answer + if test "$my_answer" == "Yes" -o "$my_answer" == "YES" -o "$my_answer" == "yes"; then + my_fuse_macos_core_uninstall=1; + fi + echo "" +fi + +# +# Unregister has to be done before the files are removed. +# +LSREGISTER=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister +if [ -e ${LSREGISTER} ]; then + ${LSREGISTER} -u /Applications/VirtualBox.app > /dev/null + ${LSREGISTER} -u /Applications/VirtualBox.app/Contents/Resources/vmstarter.app > /dev/null +fi + +# +# Display the sudo usage instructions and execute the command. +# +echo "The uninstallation processes requires administrative privileges" +echo "because some of the installed files cannot be removed by a normal" +echo "user. You may be prompted for your password now..." +echo "" + +if test -n "${my_files[*]}" -o -n "${my_directories[*]}"; then + /usr/bin/sudo -p "Please enter %u's password:" /bin/rm -Rf "${my_files[@]}" "${my_directories[@]}" + my_rc=$? + if test "$my_rc" -ne 0; then + echo "An error occurred durning 'sudo rm', there should be a message above. (rc=$my_rc)" + test -x /usr/bin/sudo || echo "warning: Cannot find /usr/bin/sudo or it's not an executable." + test -x /bin/rm || echo "warning: Cannot find /bin/rm or it's not an executable" + echo "" + echo "The uninstall failed. Please retry." + test "$my_default_prompt" != "Yes" && read -p "Press to exit" + exit 1; + fi +fi + +if test "$my_fuse_macos_core_uninstall" != 0; then + echo "Uninstalling the FUSE for macOS core package" + /usr/bin/sudo -p "Please enter %u's password:" /Library/Filesystems/osxfuse.fs/Contents/Resources/uninstall_osxfuse.app/Contents/Resources/Scripts/uninstall_osxfuse.sh +fi + +my_rc=0 +for kext in "${my_kexts[@]}"; do + echo unloading $kext + /usr/bin/sudo -p "Please enter %u's password (unloading $kext):" /sbin/kextunload -m $kext + my_rc2=$? + if test "$my_rc2" -ne 0; then + echo "An error occurred durning 'sudo /sbin/kextunload -m $kext', there should be a message above. (rc=$my_rc2)" + test -x /usr/bin/sudo || echo "warning: Cannot find /usr/bin/sudo or it's not an executable." + test -x /sbin/kextunload || echo "warning: Cannot find /sbin/kextunload or it's not an executable" + my_rc=$my_rc2 + fi +done +if test "$my_rc" -eq 0; then + echo "Successfully unloaded VirtualBox kernel extensions." +else + echo "Failed to unload one or more KEXTs, please reboot the machine to complete the uninstall." + test "$my_default_prompt" != "Yes" && read -p "Press to exit" + exit 1; +fi + +# Cleaning up pkgutil database +for my_pkg in $my_pkgs; do + /usr/bin/sudo -p "Please enter %u's password (removing $my_pkg):" /usr/sbin/pkgutil --forget "$my_pkg" +done + +echo "Done." +exit 0; + diff --git a/src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff b/src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff new file mode 100644 index 00000000..8b273e47 Binary files /dev/null and b/src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff differ diff --git a/src/VBox/Installer/darwin/DiskImage/vbox_folder.xcf b/src/VBox/Installer/darwin/DiskImage/vbox_folder.xcf new file mode 100644 index 00000000..2497e15e Binary files /dev/null and b/src/VBox/Installer/darwin/DiskImage/vbox_folder.xcf differ diff --git a/src/VBox/Installer/darwin/Makefile.kmk b/src/VBox/Installer/darwin/Makefile.kmk new file mode 100644 index 00000000..c9522d57 --- /dev/null +++ b/src/VBox/Installer/darwin/Makefile.kmk @@ -0,0 +1,1065 @@ +# $Id: Makefile.kmk $ +## @file +# Install misc stuff and create dist packages for Mac OS X. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + + +# +# Globals +# +VBOX_PATH_DI_SRC := $(PATH_SUB_CURRENT) +VBOX_DI_OUT_DIR := $(PATH_TARGET)/Installer/darwin +BLDDIRS += $(VBOX_DI_OUT_DIR) + +VBOX_DI_FN_DEP_BOTH = $(VBOX_PATH_DIST)/$1 +ifeq ($(KBUILD_TARGET_ARCH),x86) + VBOX_DI_FN_DEP_32 = $(VBOX_PATH_DIST)/$1 + VBOX_DI_FN_DEP_64 = +else + VBOX_DI_FN_DEP_64 = $(VBOX_PATH_DIST)/$1 + VBOX_DI_FN_DEP_32 = +endif +VBOX_PATH_DIST_OTHER = $(error VBOX_PATH_DIST_OTHER used in a non-combined package deal) + +ifdef VBOX_WITH_QT6 + VBOX_QT_VERSION_MAJOR = A +else + VBOX_QT_VERSION_MAJOR = 5 +endif + +ifeq ($(KBUILD_TARGET_ARCH),arm64) + VBOX_DI_TARGET_ARCH = arm64 + VBOX_DI_ARCH_LIST = arm64 +else # Assume amd64 for now + VBOX_DI_TARGET_ARCH = x86_64 + VBOX_DI_ARCH_LIST = i386,arm64 +endif + +# Unset this to speed up things during makefile hacking. +VBOX_DARWIN_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) + +# The location of the pkgbuild program. +ifndef VBOX_PKGBUILD + VBOX_PKGBUILD := pkgbuild +endif + +# The location of the productbuild program. +ifndef VBOX_PRODUCTBUILD + VBOX_PRODUCTBUILD := productbuild +endif + +# Where we do the packing (override this in LocalConfig.kmk if building on smbfs). +ifndef VBOX_PATH_PACK_TMP + VBOX_PATH_PACK_TMP := $(VBOX_DI_OUT_DIR) +endif + +# Shorthand for $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app +VBOX_PATH_VBOX_APP_TMP := $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/VirtualBox.app + + +# +# Install the darwin docs/license. +# +INSTALLS += darwin-docs +darwin-docs_INST = $(INST_DIST) +darwin-docs_MODE = a+r,u+w +darwin-docs_SOURCES = \ + $(VBOX_BRAND_LICENSE_TXT)=>LICENSE + + +# +# The packing. +# +PACKING += $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg +#OTHER_CLEAN = TODO + + +include $(FILE_KBUILD_SUB_FOOTER) + + +# +# We're running commands as root here, take some care and assertion +# a sane environment. +# +ifeq ($(strip $(VBOX_PATH_DIST)),) + $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST)) +endif +ifeq ($(strip $(VBOX_PATH_DIST)),/) + $(error VBOX_PATH_DIST=$(VBOX_PATH_DIST)) +endif +ifeq ($(strip $(VBOX_PATH_PACK_TMP)),) + $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP)) +endif +ifeq ($(strip $(VBOX_PATH_PACK_TMP)),/) + $(error VBOX_PATH_PACK_TMP=$(VBOX_PATH_PACK_TMP)) +endif + + +# Check for additional manuals +VBOX_ADD_MANUALS := $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_$(f).pdf) + +VBOX_ADD_MANUAL_de_DE := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_de_DE.pdf,$(VBOX_ADD_MANUALS)) +VBOX_ADD_MANUAL_fr_FR := $(filter $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual_fr_FR.pdf,$(VBOX_ADD_MANUALS)) + +# +# The disk image. +# +$(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg: \ + $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg \ + $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) \ + $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) \ + $$(wildcard $(VBOX_PATH_DI_SRC)/DiskImage/*) \ + $(if $(VBOX_WITH_DOCS_PACKING), \ + $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf \ + $(VBOX_ADD_MANUALS)) \ + $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) + $(call MSG_TOOL,hdiutil,,,$@) + @# Cleanup any previously failed attempts and various trash. + sudo rm -Rf $(VBOX_PATH_PACK_TMP)/DiskImage.tmp + $(MKDIR) -p $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/ + sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg $(VBOX_PATH_PACK_TMP)/DiskImage.tmp/ + sudo rm -Rf \ + $@ \ + $(VBOX_PATH_PACK_TMP)/DiskImage/ + sudo mv $(VBOX_PATH_PACK_TMP)/DiskImage.tmp $(VBOX_PATH_PACK_TMP)/DiskImage + @# Remove .dmg packages from old depend builds + $(QUIET)$(RM) -f $(wildcard $(VBOX_PATH_DIST)/VirtualBox-*-r*.dmg) + @# Populate the image with uninstaller, readme, picture, and .VolumeIcon.icns. (TODO) + $(INSTALL) $(VBOX_PATH_DI_SRC)/DiskImage/VirtualBox_Uninstall.tool $(VBOX_PATH_PACK_TMP)/DiskImage/ +ifdef VBOX_SIGNING_MODE + $(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool,org.virtualbox.dmg.uninstaller) + @# Code signing (the non-local one) seems to be losing the execute permission. + chmod 0755 $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox_Uninstall.tool +endif +ifeq (1,1) + @# Pedantic mode... + $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE) $(VBOX_PATH_PACK_TMP)/DiskImage/.DS_Store + $(MKDIR) $(VBOX_PATH_PACK_TMP)/DiskImage/.background + $(INSTALL) -m 644 $(VBOX_BRAND_DARWIN_DISKIMAGE_BG) $(VBOX_PATH_PACK_TMP)/DiskImage/.background/vbox_folder.tiff + ifdef VBOX_WITH_BUNDLED_INSTALLER + $(if $(VBOX_WITH_DOCS_PACKING), \ + $(INSTALL) -m 644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/User\ Manual.pdf$(NLTAB) \ + $(if $(VBOX_ADD_MANUAL_de_DE),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_de_DE) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_de_DE_MANUAL_NAME).pdf"$(NLTAB)) \ + $(if $(VBOX_ADD_MANUAL_fr_FR),$(INSTALL) -m 644 $(VBOX_ADD_MANUAL_fr_FR) "$(VBOX_PATH_PACK_TMP)/DiskImage/$(VBOX_BRAND_fr_FR_MANUAL_NAME).pdf"$(NLTAB))) + # Rename the main package + else + $(if $(VBOX_WITH_DOCS_PACKING), $(INSTALL) $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UserManual.pdf $(VBOX_PATH_PACK_TMP)/DiskImage/) + $(LN) -s /Applications/ $(VBOX_PATH_PACK_TMP)/DiskImage/Applications + endif +endif + @# hdiutil of OS X 10.10 adds a .Trashes directory and some suggest this may upset the image size calculations (-5341). + $(MKDIR) -m 1333 $(VBOX_PATH_PACK_TMP)/DiskImage/.Trashes + @# Change the owners. + sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/DiskImage + @# Create the image. We calculate the size our selves, adding 32MB (was 16MB) for fudging (min 13MB fudge needed on high sierra). + sudo hdiutil create -format UDBZ -volname "VirtualBox" -srcfolder "$(VBOX_PATH_PACK_TMP)/DiskImage" \ + -size $(DOLLAR)((`sudo /usr/bin/du -sk "$(VBOX_PATH_PACK_TMP)/DiskImage/" | /usr/bin/cut -f1` + 32768))k \ + "$@" + @# Change (back) the owner so it can be deleted by the user. + sudo chown "$(shell whoami)" "$@" + sudo chown -R "$(shell whoami)" $(VBOX_PATH_PACK_TMP)/DiskImage +ifdef VBOX_SIGNING_MODE + ifndef VBOX_WITHOUT_SIGNED_DMG + @# Sign the created dmg. + $(call VBOX_SIGN_DMG_FN,$@,org.virtualbox.dmg) + if $(intersects darwin darwin_notarize all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) + @# Notarize the signed dmg (includes stapling). + $(call VBOX_NOTARIZE_FILE_FN,$@,org.virtualbox.VirtualBox.$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD).$(VBOX_SVN_REV)) + endif + endif +endif + +# +# The meta-package. +# +$(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg: \ + $(if $(VBOX_WITH_VBOXDRV), $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg) \ + $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg \ + $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg \ + $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/* \ + $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/*.lproj/*) \ + $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)) \ + $(if $(VBOX_WITH_FUSE_PACKING), $(VBOX_PATH_PACK_TMP)/Packages/OSXFuseCore.pkg) \ + $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) + $(call MSG_TOOL,productbuild,,,$@) + @# Cleanup any previously failed attempts. + sudo rm -Rf \ + $@ \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res + @# Correct directory permissions are important. + $(MKDIR) -p \ + $(@D) \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj + @# Do keyword replacement in the package info and description files. + $(SED) \ + -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \ + -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \ + -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \ + -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \ + -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Welcome.rtf \ + $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Welcome.rtf + @# Do keyword replacement in the distribution script. + $(SED) \ + -e 's+@VBOX_TARGET_ARCH@+$(VBOX_DI_TARGET_ARCH)+g' \ + -e 's+@VBOX_ARCH_LIST@+$(VBOX_DI_ARCH_LIST)+g' \ + --output $(VBOX_PATH_PACK_TMP)/distribution.dist \ + $(if $(VBOX_WITH_VBOXDRV), $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution.dist, $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/distribution-driverless.dist) + @# Copy the resources. + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Conclusion.rtf $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Conclusion.rtf + $(SED) \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \ + -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/English.lproj/Localizable.strings \ + $(VBOX_PATH_DI_SRC)/VirtualBox_mpkg/Localizable.strings + $(INSTALL) -m 0644 $(VBOX_BRAND_DARWIN_INSTALLER_BG) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/background.tif + $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \ + $(MKDIR) -p \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj$(NLTAB) \ + $(SED) \ + -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \ + -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \ + -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \ + -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Welcome.rtf \ + $(VBOX_BRAND_$(f)_VIRTUALBOX_WELCOME_RTF)$(NLTAB) \ + $(INSTALL) -m 0644 $(VBOX_BRAND_$(f)_VIRTUALBOX_CONCLUSION_RTF) $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Conclusion.rtf$(NLTAB) \ + $(SED) \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \ + -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res/$(VBOX_INSTALLER_$(f)_DARWIN_TARGET).lproj/Localizable.strings \ + $(VBOX_BRAND_$(f)_VIRTUALBOX_LOCALIZABLE_STRINGS)$(NLTAB) \ + ) + @# Build the package. + $(VBOX_PRODUCTBUILD) \ + --distribution $(VBOX_PATH_PACK_TMP)/distribution.dist \ + --package-path $(VBOX_PATH_PACK_TMP)/Packages \ + --resources $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res \ + --identifier org.VirtualBox.mpkg.virtualbox \ + --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ + $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \ + $@ +ifdef VBOX_SIGNING_MODE + if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) + @# Sign the created pkg. + $(call VBOX_SIGN_PKG_FN,$@,org.VirtualBox.mpkg.virtualbox) + endif +endif + @# Cleanup. + sudo rm -Rf \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.dist.res + + +ifdef VBOX_WITH_VBOXDRV +# +# The VirtualBox Kernel extensions. +# +VBOX_DI_KEXTS_UNIVERSAL = VBoxDrv VBoxNetFlt VBoxNetAdp +VBOX_DI_KEXTS = $(VBOX_DI_KEXTS_UNIVERSAL) + +$(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg: \ + $(foreach kext,$(VBOX_DI_KEXTS_UNIVERSAL), $(call VBOX_DI_FN_DEP_BOTH,$(kext).kext/Contents/MacOS/$(kext))) \ + $(foreach kext,$(VBOX_DI_KEXTS), $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist) \ + $$(wildcard $(VBOX_PATH_DI_SRC)/VBoxKEXTs/* \ + $(VBOX_PATH_DI_SRC)/VBoxKEXTs/*.lproj/*) \ + $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \ + $(VBOX_BRAND_$(f)_VBOXKEXTS_DESCRIPTION_PLIST) \ + $(VBOX_BRAND_$(f)_VBOXKEXTS_README_HTML) \ + $(VBOX_BRAND_$(f)_VBOXKEXTS_INSTALLATIONCHECK_STRINGS)) \ + $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) + $(call MSG_TOOL,pkgbuild,,,$@) + @# Cleanup any previously failed attempts. + sudo rm -Rf \ + $@ \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res + @# Correct directory permissions are important. + $(MKDIR) -p \ + $(@D) \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/English.lproj + $(MKDIR) -p -m 0755 \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons \ + $(foreach kext,$(VBOX_DI_KEXTS), \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS ) + @# Copy the launch daemon bits. + $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/VirtualBoxStartup.sh $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/ + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/org.virtualbox.startup.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/LaunchDaemons/ + @# Copy the common files (Info.plist). + $(foreach kext,$(VBOX_DI_KEXTS), \ + $(NLTAB)$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(kext).kext/Contents/Info.plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/) + @# Copy the binaries and invoking lipo. + $(foreach kext,$(VBOX_DI_KEXTS), \ + $(NLTAB)$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/$(kext).kext/Contents/MacOS/$(kext) $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/) + @# Sign the kext bundles. +ifdef VBOX_SIGNING_MODE + $(foreach kext,$(VBOX_DI_KEXTS) \ + ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext/Contents/MacOS/$(kext),org.virtualbox.app.kext.$(kext)) ) + $(foreach kext,$(VBOX_DI_KEXTS), \ + $(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext,org.virtualbox.app.kext.$(kext)) ) +## @TODO check why this fails on the build box: $(foreach kext,$(VBOX_DI_KEXTS), $(NLTAB)codesign --verify --verbose=1 $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/$(kext).kext ) +endif + @# Set the correct owners. + sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/ + @# Do keyword replacement in the package info and description files. + $(SED) \ + -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \ + -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \ + -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \ + -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \ + -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \ + $(VBOX_PATH_DI_SRC)/VBoxKEXTs/PkgBuildComponent.plist + @# Copy the resources. + $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VBoxKEXTs/postflight $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res/ + @# Build the package. + $(VBOX_PKGBUILD) \ + --root $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root/ \ + --component-plist $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc/PkgBuildComponent.plist \ + --script $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res \ + --identifier org.virtualbox.pkg.vboxkexts \ + --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ + --install-location "/Library/Application Support/VirtualBox" \ + --ownership preserve \ + $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \ + $@ +ifdef VBOX_SIGNING_MODE + if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) + @# Sign the created pkg. + $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.vboxkexts) + endif +endif + @# Cleanup + sudo chown -R "$(shell whoami)" \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root + sudo rm -Rf \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VBoxKEXTs.pkg.res +endif # !VBOX_WITH_VBOXDRV + + +# +# Figure out which languages that we support and construct +# .qm and .lproj lists for these. +# +include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk +ifdef VBOX_WITH_QTGUI + VBOX_INSTALL_LANG_FILES := $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES), VirtualBox_$(f).qm qt_$(f).qm) +else + VBOX_INSTALL_LANG_FILES := +endif +VBOX_INSTALL_LANG_LPROJ := $(addsuffix .lproj,$(VBOX_APPROVED_GUI_LANGUAGES)) + + +# +# The VirtualBox Application. +# + +VBOX_DI_VBAPP_PROGS_HARDENED = \ + MacOS/VBoxHeadless \ + MacOS/VBoxNetDHCP \ + MacOS/VBoxNetNAT \ + MacOS/VBoxVMMPreload +ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_PROGS_HARDENED += \ + Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM +endif + +VBOX_DI_VBAPP_PROGS = \ + MacOS/VBoxManage \ + MacOS/VBoxSVC \ + MacOS/VBoxXPCOMIPCD \ + MacOS/VBoxNetAdpCtl \ + MacOS/VBoxExtPackHelperApp \ + MacOS/VBoxBugReport \ + MacOS/VBoxBalloonCtrl \ + MacOS/VBoxAutostart \ + $(if $(VBOX_WITH_WEBSERVICES),MacOS/vboxwebsrv) \ + $(if $(VBOX_WITH_DTRACE),MacOS/VBoxDTrace,) \ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),MacOS/VBoxAudioTest,) +ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_PROGS += \ + MacOS/VirtualBox +endif + +VBOX_DI_VBAPP_DYLIBS = \ + MacOS/VBoxDD.dylib \ + MacOS/VBoxDD2.dylib \ + MacOS/VBoxDDU.dylib \ + MacOS/VBoxRT.dylib \ + $(if $(VBOX_WITH_LIBSSH),MacOS/VBoxLibSsh.dylib,) \ + $(if $(VBOX_WITH_SHARED_FOLDERS),MacOS/VBoxSharedFolders.dylib,) \ + $(if $(VBOX_WITH_SHARED_CLIPBOARD),MacOS/VBoxSharedClipboard.dylib,) \ + $(if $(VBOX_WITH_DRAG_AND_DROP),MacOS/VBoxDragAndDropSvc.dylib,) \ + $(if $(VBOX_WITH_GUEST_PROPS),MacOS/VBoxGuestPropSvc.dylib,) \ + MacOS/VBoxHostChannel.dylib \ + MacOS/VBoxVMM.dylib \ + MacOS/VBoxXPCOM.dylib \ + MacOS/VBoxXPCOMC.dylib \ + MacOS/components/VBoxC.dylib \ + MacOS/components/VBoxSVCM.dylib \ + MacOS/components/VBoxXPCOMIPCC.dylib \ + MacOS/VBoxAuth.dylib \ + MacOS/VBoxAuthSimple.dylib \ + $(if $(VBOX_WITH_GUEST_CONTROL),MacOS/VBoxGuestControlSvc.dylib,) +ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/UICommon.dylib + ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/libqtaccessiblewidgets.dylib),) + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/accessible/libqtaccessiblewidgets.dylib + endif +endif +if defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL) + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxVRDP.dylib +endif +ifdef VBOX_WITH_DEBUGGER + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/DbgPlugInDiggers.dylib + if defined(VBOX_WITH_QTGUI) && defined(VBOX_WITH_DEBUGGER_GUI) + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxDbg.dylib + endif +endif +ifdef VBOX_WITH_HARDENING + VBOX_DI_VBAPP_DYLIBS += $(addprefix MacOS/,$(addsuffix .dylib,$(notdir $(VBOX_DI_VBAPP_PROGS_HARDENED)))) +endif +ifdef VBOX_WITH_HDDPARALLELS_INSTALL + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxHDDParallels.dylib +endif +if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vlt "10.13" + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxPython2_6.so +endif +if defined(VBOX_WITH_PYTHON) && !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxPython2_7.so +endif +ifdef VBOX_WITH_VMSVGA3D + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/VBoxSVGA3D.dylib \ + MacOS/VBoxSVGA3DObjC.dylib +endif + +ifdef VBOX_WITH_PYTHON + VBOX_DI_VBAPP_DYLIBS.x86 += \ + MacOS/VBoxPython2_5.so \ + $(if-expr defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT),MacOS/VBoxPython2_3.so,) +endif + +VBOX_DI_VBAPP_DYLIBS.amd64 := +if defined(VBOX_WITH_PYTHON) && defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vlt "10.13" + VBOX_DI_VBAPP_DYLIBS.amd64 += \ + MacOS/VBoxPython2_6.so +endif + +if defined(VBOX_WITH_JXPCOM) + VBOX_DI_VBAPP_DYLIBS += \ + MacOS/libvboxjxpcom.jnilib +endif + +if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64), $(VBOX_DI_VBAPP_DYLIBS.x86)) + $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86)) +endif +if1of ($(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_DYLIBS.x86),$(VBOX_DI_VBAPP_DYLIBS)) + $(error Conflict.$(NLTAB)VBOX_DI_VBAPP_DYLIBS.amd64=$(VBOX_DI_VBAPP_DYLIBS.amd64)$(NLTAB)VBOX_DI_VBAPP_DYLIBS.x86 =$(VBOX_DI_VBAPP_DYLIBS.x86)$(NLTAB)VBOX_DI_VBAPP_DYLIBS=$(VBOX_DI_VBAPP_DYLIBS)) +endif + +VBOX_DI_VBAPP_UNIVERSAL_PROGS = \ + $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),MacOS/vbox-img,) \ + $(if $(VBOX_WITH_VBOXIMGMOUNT),MacOS/vboximg-mount,) +ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_UNIVERSAL_PROGS += \ + MacOS/vmstarter +endif + +ifdef VBOX_WITH_R0_MODULES + VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = \ + MacOS/VMMR0.r0 \ + MacOS/VBoxDDR0.r0 +else + VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS = +endif + +ifdef VBOX_WITH_RAW_MODE + VBOX_DI_VBAPP_OTHER_BINS = \ + MacOS/VMMRC.rc \ + MacOS/VBoxDDRC.rc +else + VBOX_DI_VBAPP_OTHER_BINS = +endif + +VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES = \ + Resources/virtualbox.icns \ + Resources/virtualbox.png \ + Resources/virtualbox-vbox.icns \ + Resources/virtualbox-vbox-extpack.icns \ + Resources/virtualbox-ovf.icns \ + Resources/virtualbox-ova.icns \ + Resources/virtualbox-vdi.icns \ + Resources/virtualbox-vmdk.icns \ + Resources/virtualbox-vhd.icns \ + Resources/virtualbox-hdd.icns + +VBOX_DI_VBAPP_MISC_FILES = \ + MacOS/components/VBoxXPCOMBase.xpt \ + MacOS/components/VirtualBox_XPCOM.xpt +ifdef VBOX_WITH_QTGUI # Yeah, the output w/o the qt gui is a bit useless. But we just want it building now. + VBOX_DI_VBAPP_MISC_FILES += \ + Info.plist \ + PkgInfo \ + $(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES) \ + Resources/VirtualBoxVM.app/Contents/Info.plist \ + Resources/VirtualBoxVM.app/Contents/PkgInfo \ + $(addprefix Resources/VirtualBoxVM.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES)) \ + Resources/vmstarter.app/Contents/Info.plist \ + Resources/vmstarter.app/Contents/PkgInfo \ + $(addprefix Resources/vmstarter.app/Contents/,$(VBOX_DI_VBAPP_DUPLICATED_RESOURCE_FILES)) +endif +ifdef VBOX_WITH_DOCS_PACKING + VBOX_DI_VBAPP_MISC_FILES += \ + MacOS/UserManual.pdf + ifdef VBOX_WITH_DOCS_QHELP_PACKING + VBOX_DI_VBAPP_MISC_FILES += \ + MacOS/UserManual.qch \ + MacOS/UserManual.qhc + endif +endif +ifdef VBOX_WITH_ADDITIONS_PACKING + ifneq ($(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso),) + VBOX_DI_VBAPP_MISC_FILES += \ + MacOS/VBoxGuestAdditions.iso + endif +endif +ifdef VBOX_WITH_EFIFW_PACKING + VBOX_DI_VBAPP_MISC_FILES += \ + MacOS/VBoxEFI32.fd \ + MacOS/VBoxEFI64.fd +endif +VBOX_DI_VBAPP_SYMLINKS = +ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_DYLIBS += \ + $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod)) \ + plugins/platforms/libqcocoa$(SUFF_DLL) \ + plugins/platforms/libqminimal$(SUFF_DLL) \ + plugins/platforms/libqoffscreen$(SUFF_DLL) \ + plugins/sqldrivers/libqsqlite$(SUFF_DLL) \ + plugins/styles/libqmacstyle$(SUFF_DLL) + VBOX_DI_VBAPP_MISC_FILES += \ + $(foreach qtmod, $(VBOX_QT_MOD_NAMES), Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/Resources/Info.plist) + VBOX_DI_VBAPP_SYMLINKS += \ + Resources/vmstarter.app/Contents/MacOS=>../../../MacOS/ \ + $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \ + ,Frameworks/$(qtmod).framework/Versions/Current=>$(VBOX_QT_VERSION_MAJOR) ) +endif +ifdef VBOX_WITH_PYTHON + # Python XPCOM glue + VBOX_DI_VBAPP_PYTHON_FILES = \ + $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \ + $(VBOXINST_SDK_INSTALLER_PYTHON_FILES) +endif +ifdef VBOX_WITH_INTNET_SERVICE_IN_R3 + VBOX_DI_VBAPP_PROGS += \ + XPCServices/org.virtualbox.intnet.xpc/Contents/MacOS/VBoxIntNetSwitch + VBOX_DI_VBAPP_MISC_FILES += \ + XPCServices/org.virtualbox.intnet.xpc/Contents/Info.plist + ifdef VBOX_WITH_QTGUI + VBOX_DI_VBAPP_SYMLINKS += \ + Resources/VirtualBoxVM.app/Contents/XPCServices=>../../../XPCServices + endif +endif + +VBOX_VIRTUALBOX_APP_ENTITLEMENTS := $(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlements.plist +VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS := $(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlementsVM.plist + +## +# Add application and team ID into entitlement file +# $(evalcall def_vbox_entitlement_add_app_and_team_id) +# @param 1 Source entitlement file. +# @param 2 Target entitlement file. +# @param 3 Application ID. +# @param 4 Team ID. +define def_vbox_entitlement_add_app_and_team_id = +$(2): $(1) $$(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) | $$$$(dir $$$$@) + $$(QUIET)$$(SED) \ + -e '/^$$$$/a \ com.apple.application-identifier\n $(strip $(4)).$(strip $(3))\n com.apple.developer.team-identifier\n $(strip $(4))' \ + --output $$@ $$< +endef + +if defined(VBOX_WITH_MACOS_HARDENED_RUNTIME) && defined(VBOX_SIGNING_MODE) && defined(VBOX_PROVISIONPROFILE_TEAM_ID) + ifdef VBOX_VIRTUALBOX_APP_ID + VBOX_VIRTUALBOX_APP_ENTITLEMENTS := $(VBOX_PATH_PACK_TMP)/SUPR3HardenedEntitlements.plist +$(evalcall2 def_vbox_entitlement_add_app_and_team_id,$(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlements.plist,$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS),$(VBOX_VIRTUALBOX_APP_ID),$(VBOX_PROVISIONPROFILE_TEAM_ID)) + endif + + ifdef VBOX_VIRTUALBOXVM_APP_ID + VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS := $(VBOX_PATH_PACK_TMP)/SUPR3HardenedEntitlementsVM.plist +$(evalcall2 def_vbox_entitlement_add_app_and_team_id,$(PATH_ROOT)/src/VBox/HostDrivers/Support/darwin/SUPR3HardenedEntitlementsVM.plist,$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS),$(VBOX_VIRTUALBOXVM_APP_ID),$(VBOX_PROVISIONPROFILE_TEAM_ID)) + endif +endif + +# (The dependencies are including way too much here because I'm lazy.) +$(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg: \ + $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES), \ + $(VBOX_BRAND_$(f)_VIRTUALBOX_DESCRIPTION_PLIST)) \ + $(foreach f, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ + $(VBOX_DI_VBAPP_OTHER_BINS) $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_PROGS_HARDENED) $(VBOX_DI_VBAPP_MISC_FILES) \ + ,$(call VBOX_DI_FN_DEP_BOTH,VirtualBox.app/Contents/$(f)) ) \ + $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.x86) $(VBOX_DI_VBAPP_MISC_FILES.x86)\ + ,$(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/$(f)) ) \ + $(foreach f, $(VBOX_DI_VBAPP_DYLIBS.amd64) $(VBOX_DI_VBAPP_MISC_FILES.amd64)\ + ,$(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/$(f)) ) \ + \ + $(if $(VBOX_WITH_DOCS_PACKING),$(VBOX_ADD_MANUALS),) \ + $(VBOX_BRAND_LICENSE_TXT) \ + $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*) \ + $(wildcard $(VBOX_PATH_DI_SRC)/VirtualBox/*.lproj/*) \ + $$(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \ + \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/*) \ + $(filter-out Disabled, $(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/*)) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Resources/*.lproj/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/vmstarter.app/Contents/Resources/*.lproj/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/Resources/*.lproj/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/additions/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/components/*) \ + $$(wildcard $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/accessible/*) \ + $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/, $(VBOX_UNATTENDED_TEMPLATES)) \ + $(if-expr defined(VBOX_WITH_PYTHON), $(addprefix $(VBOX_PATH_DIST)/, $(VBOX_DI_VBAPP_PYTHON_FILES)),) \ + $(if-expr defined(VBOX_WITH_JXPCOM), $(addprefix $(VBOX_PATH_DIST)/, sdk/bindings/xpcom/java/vboxjxpcom.jar),) \ + $(if-expr defined(VBOX_PROVISIONPROFILE_TEAM_ID),$(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile,) \ + $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist,) \ + $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist \ + $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist \ + $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh \ + $(if-expr defined(VBOX_WITH_DTRACE), \ + $(foreach f, $(VBOXINST_DTRACE_LIB_ARCH_FILES), \ + $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/lib/x86/$f) \ + $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/lib/amd64/$f)) \ + $(foreach f, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \ + $(call VBOX_DI_FN_DEP_32,VirtualBox.app/Contents/MacOS/dtrace/testcase/x86/$f) \ + $(call VBOX_DI_FN_DEP_64,VirtualBox.app/Contents/MacOS/dtrace/testcase/amd64/$f)) \ + $(addprefix $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \ + ,) \ + $(if-expr defined(VBOX_WITH_MACOS_HARDENED_RUNTIME) && defined(VBOX_SIGNING_MODE), \ + $(VBOX_VIRTUALBOX_APP_ENTITLEMENTS) $(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS),) \ + $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) + $(call MSG_TOOL,pkgbuild,,,$@) + @# Cleanup any previously failed attempts. + sudo rm -Rf \ + $@ \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res + @# Correct directory permissions are important. + $(MKDIR) -p \ + $(@D) \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/English.lproj + $(MKDIR) -p -m 0775 \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications + $(MKDIR) -p -m 0755 $(sort \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/components \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/accessible \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources \ + $(if-expr defined(VBOX_WITH_QTGUI), \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app/Contents,) \ + $(if-expr defined(VBOX_WITH_PYTHON), \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/installer/vboxapi \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/ \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/client \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/python/xpcom/server,) \ + $(if-expr defined(VBOX_WITH_JXPCOM), \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java,) \ + $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/,$(dir \ + $(VBOX_DI_VBAPP_DYLIBS) \ + $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) \ + $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ + $(VBOX_DI_VBAPP_OTHER_BINS) \ + $(VBOX_DI_VBAPP_PROGS) \ + $(VBOX_DI_VBAPP_PROGS_HARDENED) \ + $(VBOX_DI_VBAPP_MISC_FILES) \ + $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ + $(VBOX_DI_VBAPP_MISC_FILES.$(KBUILD_TARGET_ARCH)) \ + ))\ + ) +# Create the .lproj language directories + $(MKDIR) -p -m 0755 \ + $(addprefix $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/,$(VBOX_INSTALL_LANG_LPROJ)) +# Install all supported language files + $(foreach f, $(VBOX_INSTALL_LANG_FILES) \ + ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/nls/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/nls/$(f)$(NLTAB)) +ifdef VBOX_PROVISIONPROFILE_TEAM_ID + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile $(VBOX_PATH_VBOX_APP_TMP)/Contents/embedded.provisionprofile +endif +ifdef VBOX_WITH_WEBSERVICES + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxwebsrv.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/ +endif + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxballoonctrl.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/ + $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/org.virtualbox.vboxautostart.plist $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/ + $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/VBoxAutostartDarwin.sh $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/ +# Install the python bridge stuff +ifdef VBOX_WITH_PYTHON + $(foreach f,$(VBOX_DI_VBAPP_PYTHON_FILES) \ + ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(f)$(NLTAB) ) + $(INSTALL) -m 0755 $(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS +endif +# Install the java bridge stuff +ifdef VBOX_WITH_JXPCOM + $(INSTALL) -m 0755 $(VBOX_PATH_DIST)/sdk/bindings/xpcom/java/vboxjxpcom.jar $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar +endif +# Copy misc files. + $(foreach f,$(VBOX_DI_VBAPP_MISC_FILES) \ + ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(f)$(NLTAB) ) + $(INSTALL) -m 644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/LICENSE +ifdef VBOX_WITH_DOCS_PACKING + $(foreach f,$(VBOX_ADD_MANUALS) \ + ,$(INSTALL) -m 0644 $(f) $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/$(NLTAB)) +endif + @# Create symlinks. + $(foreach symlink,$(VBOX_DI_VBAPP_SYMLINKS) $(VBOX_DI_VBAPP_SYMLINKS.$(KBUILD_TARGET_ARCH)) \ + ,$(LN) -s $(word 2,$(subst =>, ,$(symlink))) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(word 1,$(subst =>, ,$(symlink)))$(NLTAB)) + @# Copy the dylibs. + $(foreach dylib, $(VBOX_DI_VBAPP_DYLIBS) $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ + ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(dylib) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib)$(NLTAB)) + @# Copy the other binaries. + $(foreach otherbin, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS) \ + ,$(INSTALL) -m 0644 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB)) + @# Create/copy the universal executable binaries. + $(foreach otherbin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ + ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(otherbin) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(otherbin)$(NLTAB)) + @# Copy the binaries. + $(foreach prog, $(VBOX_DI_VBAPP_PROGS) $(VBOX_DI_VBAPP_PROGS_HARDENED) \ + ,$(INSTALL) -m 0755 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/$(prog) $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(prog)$(NLTAB)) +ifdef VBOX_UNATTENDED_TEMPLATES +# Unattended installation template scripts. + $(MKDIR) -p -m 0755 -- $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates + $(foreach file, $(VBOX_UNATTENDED_TEMPLATES) \ + ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/UnattendedTemplates/$(file) \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/UnattendedTemplates/$(file)$(NLTAB)) +endif +ifdef VBOX_WITH_DTRACE +# DTrace library, testcases and scripts. + $(MKDIR) -p -m 0755 -- \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/ \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/ \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/scripts/ + $(foreach file, $(addprefix lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \ + ,$(INSTALL) -m 0655 $(VBOX_PATH_DIST)/VirtualBox.app/Contents/MacOS/dtrace/$(file) \ + $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/dtrace/$(file)$(NLTAB)) +endif +ifndef VBOX_WITH_QTGUI +# Hack alert! Just something to make pkgbuild happy. + $(APPEND) -tn "$(VBOX_PATH_VBOX_APP_TMP)/Contents/PkgInfo" "APPLVBOX" + $(APPEND) -tn "$(VBOX_PATH_VBOX_APP_TMP)/Contents/Info.plist" \ + '' \ + '' \ + '' \ + '' \ + ' CFBundlePackageType APPL' \ + ' CFBundleSignature VBOX' \ + ' CFBundleDevelopmentRegion English' \ + ' CFBundleIdentifier org.virtualbox.app.VBoxManage' \ + ' CFBundleName VirtualBox' \ + ' CFBundleExecutable VBoxManage' \ + ' CFBundleVersion $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)' \ + ' CFBundleShortVersionString $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)' \ + ' CFBundleGetInfoString $(VBOX_PRODUCT) Manager $(VBOX_VERSION_STRING), © 2007-$(VBOX_C_YEAR) $(VBOX_VENDOR)' \ + ' CFBundleInfoDictionaryVersion 6.0' \ + '' \ + '' +endif + @# Sign the binaries and the application bundle. +ifdef VBOX_SIGNING_MODE + ifdef VBOX_WITH_QTGUI + $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \ + ,$(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR)/$(qtmod),org.virtualbox.app.frameworks.$(qtmod)) ) + $(foreach qtmod, $(VBOX_QT_MOD_NAMES) \ + ,$(NLTAB)$(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Frameworks/$(qtmod).framework/Versions/$(VBOX_QT_VERSION_MAJOR),org.virtualbox.app.frameworks.$(qtmod)) ) + endif + $(foreach dylib, \ + $(VBOX_DI_VBAPP_DYLIBS) \ + $(VBOX_DI_VBAPP_DYLIBS.$(KBUILD_TARGET_ARCH)) \ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(dylib),org.virtualbox.app.macos.$(notdir $(dylib))) ) + $(foreach bin, $(VBOX_DI_VBAPP_UNIVERSAL_PROGS) \ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) ) + $(foreach other, $(VBOX_DI_VBAPP_OTHER_UNIVERSAL_BINS) $(VBOX_DI_VBAPP_OTHER_BINS)\ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(other),org.virtualbox.app.macos.$(notdir $(other))) ) + $(foreach bin, $(filter-out MacOS/VirtualBox,$(VBOX_DI_VBAPP_PROGS) $(if-expr !defined(VBOX_WITH_MACOS_HARDENED_RUNTIME),$(VBOX_DI_VBAPP_PROGS_HARDENED),)) \ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin))) ) + $(foreach file, $(if-expr defined(VBOX_WITH_WEBSERVICES),MacOS/org.virtualbox.vboxwebsrv.plist,) \ + MacOS/org.virtualbox.vboxballoonctrl.plist \ + MacOS/org.virtualbox.vboxautostart.plist \ + MacOS/VBoxAutostartDarwin.sh \ + $(if-expr defined(VBOX_WITH_PYTHON),$(addprefix MacOS/, $(VBOX_DI_VBAPP_PYTHON_FILES) vboxshell.py),) \ + $(if-expr defined(VBOX_WITH_JXPCOM),MacOS/sdk/bindings/xpcom/java/vboxjxpcom.jar,) \ + $(filter MacOS/%,$(VBOX_DI_VBAPP_MISC_FILES)) \ + $(if-expr defined(VBOX_WITH_DOCS_PACKING),$(addprefix MacOS/,$(VBOX_ADD_MANUALS)),) \ + $(if-expr defined(VBOX_WITH_DTRACE),\ + $(addprefix MacOS/dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix MacOS/dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix MacOS/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) ,) \ + $(addprefix MacOS/nls/,$(VBOX_INSTALL_LANG_FILES)) \ + , $(NLTAB)$(call VBOX_SIGN_FILE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(file),org.virtualbox.app.$(tolower $(subst $(SP),,$(subst /,.,$(file))))) ) + +ifdef VBOX_PROVISIONPROFILE_TEAM_ID +# $(INSTALL) -m 0644 $(VBOX_PATH_DI_SRC)/VirtualBox/$(VBOX_PROVISIONPROFILE_TEAM_ID).provisionprofile $(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app/Contents/embedded.provisionprofile +endif + $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,$(if-expr defined(VBOX_WITH_MACOS_HARDENED_RUNTIME)\ + ,--entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)",)) + ifdef VBOX_WITH_QTGUI + $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/vmstarter.app,,) + endif + $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,--deep) + ifdef VBOX_WITH_MACOS_HARDENED_RUNTIME # HACK ALERT! --deep fries the entitlements, so redo w/o --deep now. + $(foreach bin, $(filter-out MacOS/VirtualBoxVM MacOS/VBoxHeadless,$(VBOX_DI_VBAPP_PROGS_HARDENED)) \ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin)), \ + --entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)")) + $(foreach bin, $(filter MacOS/VirtualBoxVM MacOS/VBoxHeadless,$(VBOX_DI_VBAPP_PROGS_HARDENED)) \ + , $(NLTAB)$(call VBOX_SIGN_MACHO_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin),org.virtualbox.app.macos.$(notdir $(bin)), \ + --entitlements="$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS)")) + $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP)/Contents/Resources/VirtualBoxVM.app,,\ + --entitlements="$(VBOX_VIRTUALBOXVM_APP_ENTITLEMENTS)",) + $(call VBOX_SIGN_BUNDLE_FN,$(VBOX_PATH_VBOX_APP_TMP),,\ + --entitlements="$(VBOX_VIRTUALBOX_APP_ENTITLEMENTS)",) + $(foreach bin, $(VBOX_DI_VBAPP_PROGS_HARDENED) \ + , $(NLTAB)codesign -d -v -v -v --entitlements :- $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin) ) + $(foreach bin, $(VBOX_DI_VBAPP_PROGS) \ + , $(NLTAB)codesign -d -v -v -v --entitlements :- $(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin) ) + endif +endif + @# Set the correct owner and set the set-user-ID-on-execution bit on the relevant executables. + sudo chown -R root:admin $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root + sudo chmod u+s $(VBOX_PATH_VBOX_APP_TMP)/Contents/MacOS/VBoxNetAdpCtl +ifdef VBOX_WITH_HARDENING + sudo chmod u+s $(foreach bin,$(VBOX_DI_VBAPP_PROGS_HARDENED),$(VBOX_PATH_VBOX_APP_TMP)/Contents/$(bin)) +endif +if 0 # Handy for testing the app bundle w/o having to reinstall all the time (just untar it into -C /Applications/) + $(RM) -f -- "$(PATH_OUT)/VirtualBox.app.tar.gz" + tar -czf "$(PATH_OUT)/VirtualBox.app.tar.gz" -C "$(VBOX_PATH_VBOX_APP_TMP)/.." VirtualBox.app +endif + @# Do keyword replacement in the package info and description files. + $(SED) \ + -e 's+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g' \ + -e 's+@VBOX_VERSION_MAJOR@+$(VBOX_VERSION_MAJOR)+g' \ + -e 's+@VBOX_VERSION_MINOR@+$(VBOX_VERSION_MINOR)+g' \ + -e 's+@VBOX_VERSION_BUILD@+$(VBOX_VERSION_BUILD)+g' \ + -e 's+@VBOX_VENDOR@+$(VBOX_VENDOR)+g' \ + -e 's+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g' \ + -e 's+@VBOX_C_YEAR@+$(VBOX_C_YEAR)+g' \ + --output $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \ + $(VBOX_PATH_DI_SRC)/VirtualBox/PkgBuildComponent.plist + @# Copy the resources. + $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/preflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/ +ifdef VBOX_WITH_HARDENING + $(INSTALL) -m 0755 $(VBOX_PATH_DI_SRC)/VirtualBox/postflight $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/ +else + $(SED) -s '/WITH_HARDENING/d' -o $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight $(VBOX_PATH_DI_SRC)/VirtualBox/postflight + $(CHMOD) 0755 $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res/postflight +endif + ls -lR $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/ + @# Build the package. + $(VBOX_PKGBUILD) \ + --root $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root/Applications/ \ + --component-plist $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc/PkgBuildComponent.plist \ + --script $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res \ + --identifier org.virtualbox.pkg.virtualbox \ + --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ + --install-location /Applications/ \ + --ownership preserve \ + --preserve-xattr \ + $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \ + $@ +ifdef VBOX_SIGNING_MODE + if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) + @# Sign the created pkg. + $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.virtualbox) + endif +endif + @# Cleanup + sudo chown -R "$(shell whoami)" \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root + sudo chmod -R a-s \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root + sudo rm -Rf \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBox.pkg.res + +# +# The VirtualBox CLI wrapper scripts. +# +$(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg: \ + $$(wildcard $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/* \ + $(VBOX_PATH_DI_SRC)/VirtualBoxCLI/*.lproj/*) \ + $(foreach f,$(VBOX_INSTALLER_ADD_LANGUAGES) \ + ,$(VBOX_BRAND_$(f)_VIRTUALBOXCLI_DESCRIPTION_PLIST)) \ + $(VBOX_DARWIN_INST_DEP_ON_MAKEFILE) + $(call MSG_TOOL,pkgbuild,,,$@) + @# Cleanup any previously failed attempts. + sudo rm -Rf \ + $@ \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res + @# Correct directory permissions are important. + $(MKDIR) -p \ + $(@D) \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res/English.lproj + $(MKDIR) -p -m 0755 \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin + @# Generate the wrapper scripts. + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBox \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VirtualBox "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VirtualBoxVM \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxManage \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxManage "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxVRDP \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxHeadless \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless "$$@"' +ifdef VBOX_WITH_WEBSERVICES + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboxwebsrv \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv "$$@"' +endif +if defined(VBOX_WITH_VBOX_IMG) || defined(VBOX_WITH_TESTCASES) + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vbox-img \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vbox-img "$$@"' +endif +if defined(VBOX_WITH_VBOXIMGMOUNT) + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/vboximg-mount \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/vboximg-mount "$$@"' +endif + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBugReport \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBugReport "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxBalloonCtrl \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl "$$@"' + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAutostart \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart "$$@"' +ifdef VBOX_WITH_DTRACE + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxDTrace \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxDTrace "$$@"' +endif +ifdef VBOX_WITH_HOST_SHIPPING_AUDIO_TEST + $(APPEND) -tn $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/VBoxAudioTest \ + '#!/bin/bash' 'exec /Applications/VirtualBox.app/Contents/MacOS/VBoxAudioTest "$$@"' +endif + @# Set the correct owners and file permissions. + sudo chmod 0755 $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin/* + sudo chown root:admin $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root + sudo chown -R root:wheel $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr + @# Build the package. + $(VBOX_PKGBUILD) \ + --root $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root/usr/local/bin \ + --identifier org.virtualbox.pkg.virtualboxcli \ + --version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ + --install-location /usr/local/bin \ + --ownership preserve \ + $(if-expr defined(VBOX_MACOSX_INSTALLER_SIGN) && $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) == "",--sign "$(VBOX_MACOSX_INSTALLER_SIGN)",) \ + $@ +ifdef VBOX_SIGNING_MODE + if $(intersects darwin all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) + @# Sign the created pkg. + $(call VBOX_SIGN_PKG_FN,$@,org.virtualbox.pkg.virtualboxcli) + endif +endif + @# Cleanup + sudo chown -R "$(shell whoami)" \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root + sudo rm -Rf \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.root \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.desc \ + $(VBOX_PATH_PACK_TMP)/VirtualBoxCLI.pkg.res + +ifdef VBOX_WITH_FUSE_PACKING +# +# The FUSE for macOS core package. +# +VBOX_PATH_FUSE_CORE_PKG ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/osxfuse/v*)))/Core.pkg +$(VBOX_PATH_PACK_TMP)/Packages/OSXFuseCore.pkg: \ + $(VBOX_PATH_FUSE_CORE_PKG) + $(call MSG_TOOL,Preparing FUSE for macOS core package,,,$@) + @# Cleanup any previously failed attempts. + sudo rm -Rf $@ + $(MKDIR) -p $(@D) + pkgutil --flatten $(VBOX_PATH_FUSE_CORE_PKG) $@ +endif + + +# +# Aliases. +# +VBoxKEXTs.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VBoxKEXTs.pkg +VirtualBoxCLI.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBoxCLI.pkg +VirtualBox.pkg: $(VBOX_PATH_PACK_TMP)/Packages/VirtualBox.pkg +VirtualBox.mpkg: $(VBOX_PATH_PACK_TMP)/DiskImage/VirtualBox.pkg +VirtualBox.dmg: $(VBOX_PATH_DIST)/VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).dmg diff --git a/src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist b/src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist new file mode 100644 index 00000000..c7569703 --- /dev/null +++ b/src/VBox/Installer/darwin/VBoxKEXTs/PkgBuildComponent.plist @@ -0,0 +1,29 @@ + + + + + + RootRelativeBundlePath VBoxDrv.kext + BundleIsRelocatable + BundleIsVersionChecked + BundleHasStrictIdentifier + BundleOverwriteAction upgrade + + + RootRelativeBundlePath VBoxNetAdp.kext + BundleIsRelocatable + BundleIsVersionChecked + BundleHasStrictIdentifier + BundleOverwriteAction upgrade + + + RootRelativeBundlePath VBoxNetFlt.kext + BundleIsRelocatable + BundleIsVersionChecked + BundleHasStrictIdentifier + BundleOverwriteAction upgrade + BundlePostInstallScriptPath postflight + + + + diff --git a/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh b/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh new file mode 100755 index 00000000..f6a4bdd6 --- /dev/null +++ b/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh @@ -0,0 +1,277 @@ +#!/bin/sh +# $Id: VirtualBoxStartup.sh $ +## @file +# Startup service for loading the kernel extensions and select the set of VBox +# binaries that matches the kernel architecture. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +if false; then + . /etc/rc.common +else + # Fake the startup item functions we're using. + + ConsoleMessage() + { + if [ "$1" != "-f" ]; then + echo "$@" + else + shift + echo "Fatal error: $@" + exit 1; + fi + } + + RunService() + { + case "$1" in + "start") + StartService + exit $?; + ;; + "stop") + StopService + exit $?; + ;; + "restart") + RestartService + exit $?; + ;; + "launchd") + if RestartService; then + while true; + do + sleep 3600 + done + fi + exit $?; + ;; + **) + echo "Error: Unknown action '$1'" + exit 1; + esac + } +fi + + +StartService() +{ + VBOX_RC=0 + VBOXDRV="VBoxDrv" + MACOS_VERSION_MAJOR=$(sw_vers -productVersion | /usr/bin/sed -e 's/^\([0-9]*\).*$/\1/') + + # + # Check that all the directories exist first. + # + if [ ! -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" ]; then + ConsoleMessage "Error: /Library/Application Support/VirtualBox/${VBOXDRV}.kext is missing" + VBOX_RC=1 + fi + if [ ! -d "/Library/Application Support/VirtualBox/VBoxNetFlt.kext" ]; then + ConsoleMessage "Error: /Library/Application Support/VirtualBox/VBoxNetFlt.kext is missing" + VBOX_RC=1 + fi + if [ ! -d "/Library/Application Support/VirtualBox/VBoxNetAdp.kext" ]; then + ConsoleMessage "Error: /Library/Application Support/VirtualBox/VBoxNetAdp.kext is missing" + VBOX_RC=1 + fi + + # + # Check that no drivers are currently running. + # (Try stop the service if this is the case.) + # + if [ $VBOX_RC -eq 0 ]; then + if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then + if kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Error: ${VBOXDRV}.kext is already loaded" + VBOX_RC=1 + fi + if kextstat -lb org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Error: VBoxNetFlt.kext is already loaded" + VBOX_RC=1 + fi + if kextstat -lb org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Error: VBoxNetAdp.kext is already loaded" + VBOX_RC=1 + fi + else + # + # Use kmutil directly on BigSur or grep will erroneously trigger because kextstat dumps the kmutil + # invocation to stdout... + # + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Error: ${VBOXDRV}.kext is already loaded" + VBOX_RC=1 + fi + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Error: VBoxNetFlt.kext is already loaded" + VBOX_RC=1 + fi + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Error: VBoxNetAdp.kext is already loaded" + VBOX_RC=1 + fi + fi + fi + + # + # Load the drivers. + # + if [ $VBOX_RC -eq 0 ]; then + if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then + ConsoleMessage "Loading ${VBOXDRV}.kext" + if ! kextload "/Library/Application Support/VirtualBox/${VBOXDRV}.kext"; then + ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/${VBOXDRV}.kext" + VBOX_RC=1 + fi + + ConsoleMessage "Loading VBoxNetFlt.kext" + if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/VBoxNetFlt.kext"; then + ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext" + VBOX_RC=1 + fi + + ConsoleMessage "Loading VBoxNetAdp.kext" + if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/VBoxNetAdp.kext"; then + ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext" + VBOX_RC=1 + fi + else + # + # On BigSur we can only load by bundle ID because the drivers are baked into a kext collection image + # and the real path is never loaded actually. + # + ConsoleMessage "Loading ${VBOXDRV}.kext" + if ! kmutil load -b org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Error: Failed to load org.virtualbox.kext.VBoxDrv" + VBOX_RC=1 + fi + + ConsoleMessage "Loading VBoxNetFlt.kext" + if ! kmutil load -b org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Error: Failed to load org.virtualbox.kext.VBoxNetFlt" + VBOX_RC=1 + fi + + ConsoleMessage "Loading VBoxNetAdp.kext" + if ! kmutil load -b org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Error: Failed to load org.virtualbox.kext.VBoxNetAdp" + VBOX_RC=1 + fi + fi + + if [ $VBOX_RC -ne 0 ]; then + # unload the drivers (ignoring failures) + kextunload -b org.virtualbox.kext.VBoxNetAdp + kextunload -b org.virtualbox.kext.VBoxNetFlt + kextunload -b org.virtualbox.kext.VBoxDrv + fi + fi + + # + # Set the error on failure. + # + if [ "$VBOX_RC" -ne "0" ]; then + ConsoleMessage -f VirtualBox + exit $VBOX_RC + fi +} + + +StopService() +{ + VBOX_RC=0 + VBOXDRV="VBoxDrv" + VBOXUSB="VBoxUSB" + MACOS_VERSION_MAJOR=$(sw_vers -productVersion | /usr/bin/sed -e 's/^\([0-9]*\).*$/\1/') + + if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then + if kextstat -lb org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Unloading VBoxNetFlt.kext" + if ! kextunload -m org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Error: Failed to unload VBoxNetFlt.kext" + VBOX_RC=1 + fi + fi + + if kextstat -lb org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Unloading VBoxNetAdp.kext" + if ! kextunload -m org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Error: Failed to unload VBoxNetAdp.kext" + VBOX_RC=1 + fi + fi + + # This must come last because of dependencies. + if kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Unloading ${VBOXDRV}.kext" + if ! kextunload -m org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Error: Failed to unload VBoxDrv.kext" + VBOX_RC=1 + fi + fi + else + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Unloading VBoxNetFlt.kext" + if ! kmutil unload -b org.virtualbox.kext.VBoxNetFlt; then + ConsoleMessage "Error: Failed to unload VBoxNetFlt.kext" + VBOX_RC=1 + fi + fi + + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Unloading VBoxNetAdp.kext" + if ! kmutil unload -b org.virtualbox.kext.VBoxNetAdp; then + ConsoleMessage "Error: Failed to unload VBoxNetAdp.kext" + VBOX_RC=1 + fi + fi + + # This must come last because of dependencies. + if kmutil showloaded --list-only -b org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Unloading ${VBOXDRV}.kext" + if ! kmutil unload -b org.virtualbox.kext.VBoxDrv; then + ConsoleMessage "Error: Failed to unload VBoxDrv.kext" + VBOX_RC=1 + fi + fi + fi + + # Set the error on failure. + if [ "$VBOX_RC" -ne "0" ]; then + ConsoleMessage -f VirtualBox + exit $VBOX_RC + fi +} + + +RestartService() +{ + StopService + StartService +} + + +RunService "$1" + diff --git a/src/VBox/Installer/darwin/VBoxKEXTs/org.virtualbox.startup.plist b/src/VBox/Installer/darwin/VBoxKEXTs/org.virtualbox.startup.plist new file mode 100644 index 00000000..490c9ba6 --- /dev/null +++ b/src/VBox/Installer/darwin/VBoxKEXTs/org.virtualbox.startup.plist @@ -0,0 +1,17 @@ + + + + + Label org.virtualbox.startup + Disabled + RunAtLoad + KeepAlive + LaunchOnlyOnce + ProgramArguments + + /Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh + restart + + + + diff --git a/src/VBox/Installer/darwin/VBoxKEXTs/postflight b/src/VBox/Installer/darwin/VBoxKEXTs/postflight new file mode 100755 index 00000000..53cb64e3 --- /dev/null +++ b/src/VBox/Installer/darwin/VBoxKEXTs/postflight @@ -0,0 +1,117 @@ +#!/bin/sh +# $Id$ +## @file +# Reloads the new kernel extension at the end of installation. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# Make sure the old startup items are gone. +# +if [ -d /Library/StartupItems/VirtualBox/ ]; then + rm -vf "/Library/StartupItems/VirtualBox/StartupParameters.plist" + rm -vf "/Library/StartupItems/VirtualBox/VirtualBox" + rm -vf "/Library/StartupItems/VirtualBox/Resources/English.lproj/Localizable.strings" + test -d "/Library/StartupItems/VirtualBox/Resources/English.lproj/" && rmdir "/Library/StartupItems/VirtualBox/Resources/English.lproj/" + test -d "/Library/StartupItems/VirtualBox/Resources/" && rmdir "/Library/StartupItems/VirtualBox/Resources/" + test -d "/Library/StartupItems/VirtualBox/" && rmdir "/Library/StartupItems/VirtualBox/" +fi + +# +# Make sure old kernel extensions are gone (moved to "/Library/Application Support/VirtualBox/" with 4.3). +# +rm -Rfv \ + "/Library/Extensions/VBoxDrv.kext/" \ + "/Library/Extensions/VBoxNetFlt.kext/" \ + "/Library/Extensions/VBoxNetAdp.kext/" \ + "/Library/Extensions/VBoxUSB.kext/" \ + "/Library/Extensions/VBoxDrvTiger.kext/" \ + "/Library/Extensions/VBoxUSBTiger.kext/" + +# +# Install the launchd script. +# +# Make sure "/Library/LaunchDaemons/ exists first as some uninstallers/users +# may be silly enough to remove it. We assume that /Library exists and will +# not try create it because it normally has extra ACLs. +# +if [ ! -e "/Library/LaunchDaemons/" ]; then + set -e + mkdir "/Library/LaunchDaemons" + chmod 755 "/Library/LaunchDaemons" + chown root:wheel "/Library/LaunchDaemons" + set +e +fi +rm -vf "/Library/LaunchDaemons/org.virtualbox.startup.plist" +set -e +ln -s "../Application Support/VirtualBox/LaunchDaemons/org.virtualbox.startup.plist" \ + "/Library/LaunchDaemons/org.virtualbox.startup.plist" +set +e + +# +# Unload any old extension that might be loaded already (ignore failures). +# +sync +if kextstat -lb org.virtualbox.kext.VBoxNetAdp 2>&1 | grep -q org.virtualbox.kext.VBoxNetAdp; then + kextunload -m org.virtualbox.kext.VBoxNetAdp +fi +if kextstat -lb org.virtualbox.kext.VBoxNetFlt 2>&1 | grep -q org.virtualbox.kext.VBoxNetFlt; then + kextunload -m org.virtualbox.kext.VBoxNetFlt +fi +if kextstat -lb org.virtualbox.kext.VBoxUSB 2>&1 | grep -q org.virtualbox.kext.VBoxUSB; then + kextunload -m org.virtualbox.kext.VBoxUSB +fi +if kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then + kextunload -m org.virtualbox.kext.VBoxDrv +fi + +# +# Load the extension, exit on first error except on BigSur onwards as an error +# is expected there and the user has to reboot. +# +MACOS_VERSION_MAJOR=$(sw_vers -productVersion | /usr/bin/sed -e 's/^\([0-9]*\).*$/\1/') +sync +if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then + set -e + kextload '/Library/Application Support/VirtualBox/VBoxDrv.kext' + kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetFlt.kext' + kextload -d '/Library/Application Support/VirtualBox/VBoxDrv.kext' '/Library/Application Support/VirtualBox/VBoxNetAdp.kext' +else + VBOX_RC=0 + if ! kmutil load -p '/Library/Application Support/VirtualBox/VBoxDrv.kext'; then + VBOX_RC=1 + fi + + if ! kmutil load -p '/Library/Application Support/VirtualBox/VBoxNetFlt.kext'; then + VBOX_RC=1 + fi + + if ! kmutil load -p '/Library/Application Support/VirtualBox/VBoxNetAdp.kext'; then + VBOX_RC=1 + fi + + if [ $VBOX_RC -ne 1 ]; then + osascript -e 'display dialog "A reboot is required on macOS BigSur and onwards in order to be able to load the installed kernel extensions" buttons { "Ok" } with icon caution' + fi +fi diff --git a/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist b/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist new file mode 100644 index 00000000..a67ae42c --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/PkgBuildComponent.plist @@ -0,0 +1,17 @@ + + + + + + RootRelativeBundlePath VirtualBox.app + BundleIsRelocatable + BundleIsVersionChecked + BundleHasStrictIdentifier + BundleOverwriteAction upgrade + BundlePreInstallScriptPath preflight + BundlePostInstallScriptPath postflight + + + + + diff --git a/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh b/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh new file mode 100755 index 00000000..d54d62a1 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +# +# Copyright (C) 2012-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# Wrapper for the per user autostart daemon. Gets a list of all users +# and starts the VMs. +# + +function vboxStartStopAllUserVms() +{ + # Go through the list and filter out all users without a shell and a + # non existing home. + for user in `dscl . -list /Users` + do + HOMEDIR=`dscl . -read /Users/"${user}" NFSHomeDirectory | sed 's/NFSHomeDirectory: //g'` + USERSHELL=`dscl . -read /Users/"${user}" UserShell | sed 's/UserShell: //g'` + + # Check for known home directories and shells for daemons + if [[ "${HOMEDIR}" == "/var/empty" || "${HOMEDIR}" == "/dev/null" || "${HOMEDIR}" == "/var/root" + || "${USERSHELL}" == "/usr/bin/false" || "${USERSHELL}" == "/dev/null" || "${USERSHELL}" == "/usr/sbin/uucico" ]] + then + continue + fi + + case "${1}" in + start) + # Start the daemon + su "${user}" -c "/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --quiet --start --background --config ${CONFIG}" + ;; + stop) + # Stop the daemon + su "${user}" -c "/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --quiet --stop --config ${CONFIG}" + ;; + *) + echo "Usage: start|stop" + exit 1 + esac + done +} + +function vboxStopAllUserVms() +{ + vboxStartStopAllUserVms "stop" +} + +CONFIG=${1} +vboxStartStopAllUserVms "start" +trap vboxStopAllUserVms HUP KILL TERM + + diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist new file mode 100644 index 00000000..ca0b770e --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist @@ -0,0 +1,19 @@ + + + + + Disabled + + Label + org.virtualbox.vboxautostart + ProgramArguments + + /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostartDarwin.sh + /etc/vbox/autostart.cfg + + RunAtLoad + + LaunchOnlyOnce + + + diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist new file mode 100644 index 00000000..f70805f0 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxballoonctrl.plist @@ -0,0 +1,14 @@ + + + + + Disabled + + KeepAlive + + Label + org.virtualbox.vboxballoonctrl + Program + /Applications/VirtualBox.app/Contents/MacOS/VBoxBalloonCtrl + + diff --git a/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist new file mode 100644 index 00000000..95cbf994 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxwebsrv.plist @@ -0,0 +1,26 @@ + + + + + Disabled + + KeepAlive + + Label + org.virtualbox.vboxwebsvc + Program + /Applications/VirtualBox.app/Contents/MacOS/vboxwebsrv + Sockets + + Listeners + + SockServiceName + 18083 + SockType + stream + SockFamily + IPv4 + + + + diff --git a/src/VBox/Installer/darwin/VirtualBox/postflight b/src/VBox/Installer/darwin/VirtualBox/postflight new file mode 100755 index 00000000..fc5e653e --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/postflight @@ -0,0 +1,117 @@ +#!/bin/sh +# $Id: postflight $ +## @file +# Post installation script. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +CPDIR="/bin/cp -f -R" +INSTALL=/usr/bin/install + + +# +# Install the Python bindings +# +VBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS +PYTHON="python python2.3 python2.5 python2.6 python2.7" +if [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then + for p in $PYTHON; do + # Install the python bindings if python is in the path + if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then + echo 1>&2 "Python found: ${p}, installing bindings..." + # Pass install path via environment + export VBOX_INSTALL_PATH + /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install" + /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py clean --all" + fi + done +fi + +# +# Install the vboxweb service file for launchd +# +VBOXWEBSRV="${VBOX_INSTALL_PATH}/org.virtualbox.vboxwebsrv.plist" +VBOXWEBSRV_TRG="${HOME}/Library/LaunchAgents" +if [ -e "${VBOXWEBSRV}" -a -e "${VBOXWEBSRV_TRG}" ]; then + echo "Installing vboxwebsrv launchd file to ${VBOXWEBSRV_TRG}" + if [ "x" != "x${USER}" ]; then + ${INSTALL} -S -o "${USER}" -m 0644 "${VBOXWEBSRV}" "${VBOXWEBSRV_TRG}/" + else + ${INSTALL} -S -m 0644 "${VBOXWEBSRV}" "${VBOXWEBSRV_TRG}/" + fi +fi + +# +# Install any custom files +# +DATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.." +if [ -d "${DATAPATH}/.custom" ]; then + echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}..."; + ${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom" +fi + +# +# Register our file extensions +# +LSREGISTER=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister +if [ -e "${LSREGISTER}" -a "x" != "x${USER}" ]; then + echo "Register file extensions for \"${USER}\"" + /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app + /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app/Contents/Resources/vmstarter.app +fi + +# Check environment. +if [ "${INSTALLER_TEMP}x" == "x" ]; then + echo "Required environment variable INSTALLER_TEMP is missing. Aborting installation." + exit 1; +fi + +# Restore previously installed Extension Packs (if any) +if [ -d "${INSTALLER_TEMP}/ExtensionPacks" ]; then + cp -r "${INSTALLER_TEMP}/ExtensionPacks" "${VBOX_INSTALL_PATH}" + rm -rf "${INSTALLER_TEMP}/ExtensionPacks" +fi + +# +# Correct the ownership of the directories in case there +# was an existing installation. +# +chown -R root:admin /Applications/VirtualBox.app + +# +# Workaround for 10.11 beta 6 in which the above chown strips the set-uid-to-root bit. +# +SET_UID_BINARIES="MacOS/VBoxNetAdpCtl" +SET_UID_BINARIES="${SET_UID_BINARIES} MacOS/VBoxHeadless MacOS/VBoxNetDHCP MacOS/VBoxNetNAT Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM" # WITH_HARDENING +for bin in ${SET_UID_BINARIES}; do + chmod u+s "/Applications/VirtualBox.app/Contents/${bin}" +done + +# Install provisioning profile if present, needed by VBoxHeadless. +if [ -f /Applications/VirtualBox.app/Contents/embedded.provisionprofile ]; then + profiles -i -F /Applications/VirtualBox.app/Contents/embedded.provisionprofile +fi + +exit 0; + diff --git a/src/VBox/Installer/darwin/VirtualBox/preflight b/src/VBox/Installer/darwin/VirtualBox/preflight new file mode 100755 index 00000000..d5262eba --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox/preflight @@ -0,0 +1,41 @@ +#!/bin/sh + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +set -e + +# Check environment. +if [ "x${INSTALLER_TEMP}" = "x" ]; then + echo "Required environment variable INSTALLER_TEMP is missing. Aborting installation." + exit 1; +fi + +# Backup previously installed Extension Packs before +# installation process will completely remove previously installed +# VirtualBox distribution. +EXTPACKS_ROOT_PATH="/Applications/VirtualBox.app/Contents/MacOS/ExtensionPacks" +if [ -d "${EXTPACKS_ROOT_PATH}" ]; then + cp -r "${EXTPACKS_ROOT_PATH}" "${INSTALLER_TEMP}" +fi + +exit 0; diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html new file mode 100644 index 00000000..780149a6 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.html @@ -0,0 +1,7 @@ + + +

To start VirtualBox, go to your Applications folder and double click on the +VirtualBox icon.

+ +
+ diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf new file mode 100644 index 00000000..09d3de53 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Conclusion.rtf @@ -0,0 +1,9 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww10800\viewh8400\viewkind0 +\deftab720 +\pard\pardeftab720\sa240 + +\f0\fs24 \cf0 To start VirtualBox, go to your Applications folder and double click on the VirtualBox icon.\ +} \ No newline at end of file diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings new file mode 100644 index 00000000..b3cd4b3e --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings @@ -0,0 +1,23 @@ +'VirtualBox_title' = '@VBOX_PRODUCT@'; + +'choiceVBoxKEXTs_title' = '@VBOX_PRODUCT@ Kernel Extensions'; +'choiceVBoxKEXTs_msg' = 'Installs the @VBOX_PRODUCT@ Kernel Extensions into /Library/Application Support/VirtualBox.'; + +'choiceVBox_title' = '@VBOX_PRODUCT@'; +'choiceVBox_msg' = 'Installs the @VBOX_PRODUCT@ application into /Applications.'; + +'choiceVBoxCLI_title' = '@VBOX_PRODUCT@ Command Line Utilities'; +'choiceVBoxCLI_msg' = 'Installs the @VBOX_PRODUCT@ command line utilities into /usr/bin.'; + +'choiceOSXFuseCore_title' = 'FUSE for macOS core package'; +'choiceOSXFuseCore_msg' = 'Installs the FUSE for macOS core package for the image mounter.'; + +'RUNNING_VMS_TLE' = "Running VirtualBox virtual machines detected!"; +'RUNNING_VMS_MSG' = "The installer has detected running virtual machines. Please shut down all running VirtualBox machines and then restart the installation."; + +'UNSUPPORTED_HW_MACHINE_TLE' = "Unsupported hardware architecture detected!"; +'UNSUPPORTED_HW_MACHINE_MSG' = "The installer has detected an unsupported architecture. VirtualBox only runs on the amd64 architecture."; + +'UNSUPPORTED_OS_TLE' = "Unsupported OS version detected!"; +'UNSUPPORTED_OS_MSG' = "The installer has detected an unsupported operation system. VirtualBox requires Mac OS X 10.9 or later."; + diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html new file mode 100644 index 00000000..956c2504 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.html @@ -0,0 +1,12 @@ + +

@VBOX_PRODUCT@ for macOS

+ +

Welcome to @VBOX_PRODUCT@ +@VBOX_VERSION_MAJOR@.@VBOX_VERSION_MINOR@.@VBOX_VERSION_BUILD@ for macOS! +This installer will guide you through the installation process. In a minute +from now, you will be able to execute virtual machines running different +operating systems on your desktop. You will find that VirtualBox delivers a +great feature set and excellent performance.

+ +
+ diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf new file mode 100644 index 00000000..4a8bbaf3 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Welcome.rtf @@ -0,0 +1,13 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww10800\viewh8400\viewkind0 +\deftab720 +\pard\pardeftab720\sa280 + +\f0\b\fs36 \cf0 @VBOX_PRODUCT@ for macOS +\b0 \ +\pard\pardeftab720\sa240 + +\fs24 \cf0 Welcome to @VBOX_PRODUCT@ @VBOX_VERSION_MAJOR@.@VBOX_VERSION_MINOR@.@VBOX_VERSION_BUILD@ for macOS! This installer will guide you through the installation process. In a minute from now, you will be able to execute virtual machines running different operating systems on your desktop. You will find that VirtualBox delivers a great feature set and excellent performance.\ +} diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif b/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif new file mode 100644 index 00000000..9b99f142 Binary files /dev/null and b/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif differ diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution-driverless.dist b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution-driverless.dist new file mode 100644 index 00000000..f7c3d12c --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution-driverless.dist @@ -0,0 +1,107 @@ + + + + VirtualBox_title + + + + + + + + + + + + + + + + + file:./Contents/Packages/VirtualBox.pkg + file:./Contents/Packages/VirtualBoxCLI.pkg + + diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist new file mode 100644 index 00000000..80abcd18 --- /dev/null +++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist @@ -0,0 +1,117 @@ + + + + VirtualBox_title + + + + + + + + + + + + + + + + + + + + + + + + + file:./Contents/Packages/VBoxKEXTs.pkg + file:./Contents/Packages/VirtualBox.pkg + file:./Contents/Packages/VirtualBoxCLI.pkg + file:./Contents/Packages/OSXFuseCore.pkg + + diff --git a/src/VBox/Installer/freebsd/Makefile.kmk b/src/VBox/Installer/freebsd/Makefile.kmk new file mode 100644 index 00000000..6dbccf96 --- /dev/null +++ b/src/VBox/Installer/freebsd/Makefile.kmk @@ -0,0 +1,328 @@ +# $Id: Makefile.kmk $ +## @file +# Makefile for the FreeBSD installer. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + +ifneq ($(KBUILD_HOST),freebsd) + $(error "The FreeBSD installer can only be built on FreeBSD!") +endif + +# +# Globals and targets. +# +VBOX_PATH_FBSD_INST_SRC := $(PATH_SUB_CURRENT) +VBOX_FBSD_INST_OUT_DIR := $(PATH_TARGET)/Installer/freebsd +VBOX_FBSD_INST_STAGE_DIR := $(PATH_TARGET)/Installer/freebsd/install +VBOX_FBSD_DBG_PATH := usr/lib/debug/opt/VirtualBox +VBOX_FBSD_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).tbz +VBOX_FBSD_INST_LIB_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/lib +VBOX_FBSD_INST_BIN_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/bin +VBOX_FBSD_INST_LIBVBOX_DIR := $(VBOX_FBSD_INST_LIB_DIR)/virtualbox +VBOX_FBSD_INST_SHARE_DIR := $(VBOX_FBSD_INST_STAGE_DIR)/share +VBOX_FBSD_INST_SHAREAPP_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/applications +VBOX_FBSD_INST_SHAREICON_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/pixmaps +VBOX_FBSD_INST_SHAREVBOX_DIR := $(VBOX_FBSD_INST_SHARE_DIR)/virtualbox + +# Unset this to speed up things during makefile hacking. +VBOX_FBSD_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) + +BLDDIRS += $(VBOX_FBSD_INST_OUT_DIR) $(VBOX_FBSD_INST_STAGE_DIR) +PACKING += $(PATH_STAGE_BIN)/$(VBOX_FBSD_PACKAGE_NAME) + +OTHER_CLEAN += \ + $(addprefix $(VBOX_FBSD_INST_STAGE_DIR)/,\ + pkg_plist \ + LICENSE) \ + $(wildcard $(VBOX_FBSD_INST_OUT_DIR)/VirtualBox-*) + +# +# FreeBSD installs. +# +INSTALLS += freebsd-misc +freebsd-misc_INST = bin/ +freebsd-misc_MODE = a+r,u+w +freebsd-misc_SOURCES = \ + $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \ + $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \ + $(if $(VBOX_WITH_QTGUI),$(freebsd-misc_0_OUTDIR)/virtualbox.desktop,) \ + $(if $(VBOX_WITH_QTGUI),$(freebsd-misc_0_OUTDIR)/virtualboxvm.desktop,) +freebsd-misc_CLEAN = $(freebsd-misc_0_OUTDIR)/virtualbox.desktop +freebsd-misc_CLEAN += $(freebsd-misc_0_OUTDIR)/virtualboxvm.desktop + +$$(PATH_freebsd-misc)/virtualbox.desktop: $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $@ $< + +$$(PATH_freebsd-misc)/virtualboxvm.desktop: $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $@ $< +# +# The files residing in bin/ that we'll ship. +# + +# Strip these binaries +VBOX_FBSD_STRIP_BIN = \ + VBoxDD.so \ + VBoxDD2.so \ + VBoxDDU.so \ + VBoxVMM.so \ + VBoxRT.so \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \ + $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \ + $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \ + $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \ + $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \ + VBoxHostChannel.so \ + $(if $(VBOX_WITH_MAIN), \ + VBoxManage \ + VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \ + VBoxNetAdpCtl \ + VBoxSVC \ + VBoxXPCOM.so \ + VBoxXPCOMC.so \ + VBoxXPCOMIPCD \ + components/VBoxXPCOMIPCC.so \ + components/VBoxSVCM.so \ + components/VBoxC.so,) \ + VBoxTestOGL \ + $(if $(VBOX_WITH_PYTHON),VBoxPython.so,) \ + $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) + +# Do not remove relocation information of these binaries +VBOX_FBSD_STRIP_OBJ = \ + VBoxDDRC.rc \ + VBoxDDR0.r0 \ + VMMRC.rc \ + VMMR0.r0 + +# Do not strip anything of these files +VBOX_FBSD_NO_STRIP = \ + $(if $(VBOX_OSE),,LICENSE) \ + $(if $(VBOX_WITH_MAIN), \ + components/VBoxXPCOMBase.xpt \ + components/VirtualBox_XPCOM.xpt) \ + vboxdrv.tar.gz + +# EFI firmware +ifdef VBOX_WITH_EFIFW_PACKING + VBOX_FBSD_NO_STRIP += \ + VBoxEFI32.fd \ + VBoxEFI64.fd +endif + +# Symlinks residing in bin/ +VBOX_FBSD_SYMLINKS = \ + $(if $(VBOX_WITH_MAIN), \ + VBoxManage \ + VBoxSVC) \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \ + $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) + +# Qt GUI +ifdef VBOX_WITH_QTGUI + include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk + VBOX_FBSD_STRIP_BIN += \ + VBoxKeyboard.so \ + VirtualBox \ + $(if $(VBOX_WITH_HARDENING),VirtualBox.so) \ + $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so,) + VBOX_FBSD_SYMLINKS += \ + VirtualBox + VBOX_FBSD_NO_STRIP += \ + $(VBOX_LICENSE_FILES) \ + $(if $(VBOX_WITH_ORACLE_QT),$(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)),) \ + $(if $(VBOX_WITH_ORACLE_QT),accessible/libqtaccessiblewidgets.so,) \ + $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm) + VBOX_FBSD_DESKTOP_FILE = \ + virtualbox.desktop \ + virtualboxvm.desktop + VBOX_FBSD_ICON_FILE = \ + VBox.png +endif + +# Guest Additions +ifdef VBOX_WITH_ADDITIONS_PACKING + VBOX_FBSD_NO_STRIP += \ + additions/VBoxGuestAdditions.iso +endif + +# Documentation +ifdef VBOX_WITH_DOCS_PACKING + VBOX_FBSD_NO_STRIP += \ + VirtualBox.chm UserManual.pdf \ + $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm UserManual_$(f).pdf) +endif + +# VRDP +ifdef VBOX_WITH_VRDP + VBOX_FBSD_STRIP_BIN += \ + VBoxVRDP.so \ + VBoxAuth.so +endif + +# Headless +ifdef VBOX_WITH_HEADLESS + VBOX_FBSD_STRIP_BIN += \ + VBoxHeadless \ + $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so) + VBOX_FBSD_SYMLINKS += \ + VBoxHeadless +endif + +# Webservices +ifdef VBOX_WITH_WEBSERVICES + VBOX_FBSD_STRIP_BIN += \ + vboxwebsrv + VBOX_FBSD_SYMLINKS += \ + vboxwebsrv +endif + +# DTrace library, testcase and scripts (as the rest of this file, this makes bold +# ASSUMPTIONS about VBPX_INST_XXX variable values). +ifdef VBOX_WITH_DTRACE + VBOX_FBSD_NO_STRIP += \ + $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) +endif + +# +# All the bin files that goes into the archives. +# +VBOX_FBSD_ARCH_FILES := $(VBOX_FBSD_STRIP_BIN) $(VBOX_FBSD_STRIP_OBJ) $(VBOX_FBSD_NO_STRIP) + +# Cleanup of the files we copy/symlink from bin. +OTHER_CLEAN += $(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_ARCH_FILES)) + +# +# The module source archive +# +$(PATH_STAGE_BIN)/vboxdrv.tar.gz: \ + src + $(call MSG_TOOL, export_modules.sh,,$@) + $(QUIET)$(PATH_STAGE_BIN)/export_modules.sh $@ + +# +# The generic installer. +## @todo r=aeichner: Create pkg_plist dynamically based on the available features +# +$(PATH_STAGE_BIN)/$(VBOX_FBSD_PACKAGE_NAME): \ + $(VBOX_VERSION_STAMP) \ + $(VBOX_FBSD_INST_OUT_DIR)/pkg_plist \ + $(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_ARCH_FILES)) \ + $(addprefix $(VBOX_FBSD_INST_BIN_DIR)/,$(VBOX_FBSD_SYMLINKS)) \ + $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \ + $(if $(VBOX_WITH_QTGUI),$(addprefix $(VBOX_FBSD_INST_SHAREAPP_DIR)/,$(VBOX_FBSD_DESKTOP_FILE)),) \ + $(if $(VBOX_WITH_QTGUI),$(addprefix $(VBOX_FBSD_INST_SHAREICON_DIR)/,$(VBOX_FBSD_ICON_FILE)),) \ + $(VBOX_PATH_FBSD_INST_SRC)/postinstall.sh \ + $(VBOX_PATH_FBSD_INST_SRC)/postdeinstall.sh + $(call MSG_TOOL,pkg_create,,$@) + $(QUIET)$(RM) -f $@ + $(QUIET)pkg_create \ + -I $(VBOX_PATH_FBSD_INST_SRC)/postinstall.sh \ + -K $(VBOX_PATH_FBSD_INST_SRC)/postdeinstall.sh \ + -c $(VBOX_PATH_FBSD_INST_SRC)/pkg-comment \ + -d $(VBOX_PATH_FBSD_INST_SRC)/pkg-descr \ + -f $(VBOX_FBSD_INST_OUT_DIR)/pkg_plist \ + -p /usr/local \ + -s $(VBOX_FBSD_INST_STAGE_DIR) \ + $@ + $(QUIET)$(RM) -Rf $(VBOX_FBSD_INST_STAGE_DIR) + +$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_STRIP_BIN)): \ + $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ + +# pattern rule for striping and copying the VBOX_FBSD_STRIP_OBJ files to install/lib/virtualbox +$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_STRIP_OBJ)): \ + $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) +ifeq ($(VBOX_DO_STRIP),) + $(QUIET)$(INSTALL) -m 0644 $< $@ +else # strip to temp file because of umask. + $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp + $(QUIET)$(INSTALL) -m 0644 $@.tmp $@ + $(QUIET)$(RM) -f -- $@.tmp +endif + +# pattern rule for linking the VBOX_FBSD_NO_STRIP into lib/virtualbox/ +$(addprefix $(VBOX_FBSD_INST_LIBVBOX_DIR)/,$(VBOX_FBSD_NO_STRIP)): \ + $(VBOX_FBSD_INST_LIBVBOX_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(RM) -f $@ + $(QUIET)$(INSTALL) -m 0644 $< $@ + +# pattern rule for symlinking the VBOX_FBSD_SYMLINKS into bin/ +$(addprefix $(VBOX_FBSD_INST_BIN_DIR)/,$(VBOX_FBSD_SYMLINKS)): \ + $(VBOX_FBSD_INST_BIN_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_SYM,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(RM) -f $@ + $(QUIET)$(LN_SYMLINK) ../lib/virtualbox/$(notdir $@) $@ + +# pattern rule for copying the VBOX_FBSD_DESKTOP_FILE into share/applications/ +$(addprefix $(VBOX_FBSD_INST_SHAREAPP_DIR)/,$(VBOX_FBSD_DESKTOP_FILE)): \ + $(VBOX_FBSD_INST_SHAREAPP_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(RM) -f $@ + $(QUIET)$(INSTALL) -m 0644 $< $@ + +# pattern rule for copying the VBOX_FBSD_ICON_FILE into share/pixmaps/ +$(addprefix $(VBOX_FBSD_INST_SHAREICON_DIR)/,$(VBOX_FBSD_ICON_FILE)): \ + $(VBOX_FBSD_INST_SHAREICON_DIR)/% : $(PATH_STAGE_BIN)/% + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(RM) -f $@ + $(QUIET)$(INSTALL) -m 0644 $< $@ + +# Create pkg_plist +$(VBOX_FBSD_INST_OUT_DIR)/pkg_plist: \ + $(VBOX_PATH_FBSD_INST_SRC)/pkg_plist + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -d $(dir $@) + $(QUIET)$(CP) -- "$<" "$@" +ifdef VBOX_WITH_DTRACE + $(QUIET)$(APPEND) -n "$@" "@mode 644" \ + $(addprefix lib/virtualbox/dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix lib/virtualbox/dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix lib/virtualbox/dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) \ + "@mode 755" \ + "bin/VBoxDTrace" +endif + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/freebsd/pkg-comment b/src/VBox/Installer/freebsd/pkg-comment new file mode 100644 index 00000000..768064dc --- /dev/null +++ b/src/VBox/Installer/freebsd/pkg-comment @@ -0,0 +1 @@ +VirtualBox x86 virtualization package diff --git a/src/VBox/Installer/freebsd/pkg-descr b/src/VBox/Installer/freebsd/pkg-descr new file mode 100644 index 00000000..221d09a3 --- /dev/null +++ b/src/VBox/Installer/freebsd/pkg-descr @@ -0,0 +1,3 @@ +VirtualBox for the FreeBSD operating system + +WWW: http://www.virtualbox.org diff --git a/src/VBox/Installer/freebsd/pkg_plist b/src/VBox/Installer/freebsd/pkg_plist new file mode 100644 index 00000000..f1e79be2 --- /dev/null +++ b/src/VBox/Installer/freebsd/pkg_plist @@ -0,0 +1,92 @@ +@owner root +@group wheel +@mode 755 +lib/virtualbox/VBoxDbg.so +lib/virtualbox/DbgPlugInDiggers.so +lib/virtualbox/VBoxDD.so +lib/virtualbox/VBoxDD2.so +lib/virtualbox/VBoxDDU.so +lib/virtualbox/VBoxGuestPropSvc.so +lib/virtualbox/VBoxGuestControlSvc.so +lib/virtualbox/VBoxHostChannel.so +lib/virtualbox/VBoxHeadless.so +lib/virtualbox/VBoxKeyboard.so +lib/virtualbox/VBoxManage +lib/virtualbox/VBoxNetDHCP.so +lib/virtualbox/VBoxPython.so +lib/virtualbox/VBoxRT.so +lib/virtualbox/VBoxSDL.so +lib/virtualbox/VBoxSharedFolders.so +lib/virtualbox/VBoxSVC +lib/virtualbox/VBoxVMM.so +lib/virtualbox/VBoxVRDP.so +lib/virtualbox/VBoxXPCOM.so +lib/virtualbox/VBoxXPCOMC.so +lib/virtualbox/VBoxXPCOMIPCD +lib/virtualbox/VirtualBox.so +lib/virtualbox/VBoxOGLhostcrutil.so +lib/virtualbox/VBoxOGLhosterrorspu.so +lib/virtualbox/VBoxOGLrenderspu.so +lib/virtualbox/vboxwebsrv +lib/virtualbox/VBoxTestOGL +@mode 4755 +lib/virtualbox/VBoxSDL +lib/virtualbox/VirtualBox +lib/virtualbox/VBoxNetDHCP +lib/virtualbox/VBoxNetAdpCtl +lib/virtualbox/VBoxHeadless +@mode 755 +lib/virtualbox/components/VBoxC.so +lib/virtualbox/components/VBoxSVCM.so +lib/virtualbox/components/VBoxXPCOMIPCC.so +@mode 644 +lib/virtualbox/components/VBoxXPCOMBase.xpt +lib/virtualbox/components/VirtualBox_XPCOM.xpt +@mode 755 +bin/VirtualBox +bin/VBoxManage +bin/VBoxSVC +bin/VBoxHeadless +bin/VBoxSDL +bin/vboxwebsrv +@mode 644 +lib/virtualbox/VBoxDDRC.rc +lib/virtualbox/VBoxDDR0.r0 +lib/virtualbox/VMMRC.rc +lib/virtualbox/VMMR0.r0 +lib/virtualbox/License-7.html +lib/virtualbox/vboxdrv.tar.gz +lib/virtualbox/nls/qt_de.qm +lib/virtualbox/nls/VirtualBox_de.qm +lib/virtualbox/nls/qt_fr.qm +lib/virtualbox/nls/VirtualBox_fr.qm +lib/virtualbox/nls/qt_it.qm +lib/virtualbox/nls/VirtualBox_it.qm +lib/virtualbox/nls/qt_ro.qm +lib/virtualbox/nls/VirtualBox_ro.qm +lib/virtualbox/nls/qt_zh_CN.qm +lib/virtualbox/nls/VirtualBox_zh_CN.qm +lib/virtualbox/nls/qt_ja.qm +lib/virtualbox/nls/VirtualBox_ja.qm +lib/virtualbox/nls/qt_es.qm +lib/virtualbox/nls/VirtualBox_es.qm +lib/virtualbox/nls/qt_ru.qm +lib/virtualbox/nls/VirtualBox_ru.qm +lib/virtualbox/nls/qt_pl.qm +lib/virtualbox/nls/VirtualBox_pl.qm +lib/virtualbox/nls/qt_pt_BR.qm +lib/virtualbox/nls/VirtualBox_pt_BR.qm +lib/virtualbox/nls/qt_ko.qm +lib/virtualbox/nls/VirtualBox_ko.qm +lib/virtualbox/nls/qt_sv.qm +lib/virtualbox/nls/VirtualBox_sv.qm +lib/virtualbox/nls/qt_fi.qm +lib/virtualbox/nls/VirtualBox_fi.qm +lib/virtualbox/nls/qt_hu.qm +lib/virtualbox/nls/VirtualBox_hu.qm +lib/virtualbox/nls/qt_cs.qm +lib/virtualbox/nls/VirtualBox_cs.qm +share/applications/virtualbox.desktop +share/applications/virtualboxvm.desktop +share/pixmaps/VBox.png + diff --git a/src/VBox/Installer/freebsd/postdeinstall.sh b/src/VBox/Installer/freebsd/postdeinstall.sh new file mode 100755 index 00000000..0e659064 --- /dev/null +++ b/src/VBox/Installer/freebsd/postdeinstall.sh @@ -0,0 +1,42 @@ +#!/bin/sh +## @file +# +# VirtualBox postdeinstall script for FreeBSD. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +echo "Removing kernel modules, please wait..." + +kldunload vboxnetadp +kldunload vboxnetflt +kldunload vboxdrv +rm /boot/kernel/vboxnetflt.ko +rm /boot/kernel/vboxnetadp.ko +rm /boot/kernel/vboxdrv.ko +kldxref -R /boot + +echo "Kernel modules successfully removed." + +exit 0 + diff --git a/src/VBox/Installer/freebsd/postinstall.sh b/src/VBox/Installer/freebsd/postinstall.sh new file mode 100755 index 00000000..b6f14c29 --- /dev/null +++ b/src/VBox/Installer/freebsd/postinstall.sh @@ -0,0 +1,86 @@ +#!/bin/sh +## @file +# +# VirtualBox postinstall script for FreeBSD. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +PATH_TMP="/tmp" +PATH_TMP_MODS="$PATH_TMP/vbox_mods" +PATH_INST="/usr/local/lib/virtualbox" +PATH_KERN_SRC="/usr/src/sys" +FILE_VBOXDRV="$PATH_INST/vboxdrv.tar.gz" + + +if [ ! -f $PATH_KERN_SRC/Makefile ]; then + echo "Kernel sources are not installed. Please install them and reinstall VirtualBox" + exit 1 +fi + +echo "Compiling kernel modules, please wait..." + +# Create temporary directory +mkdir -p $PATH_TMP_MODS + +# Unpack archive +tar -C $PATH_TMP_MODS -xf $FILE_VBOXDRV + +# Compile +cd $PATH_TMP_MODS +make + +# Check if we succeeded +if [ $? != 0 ]; then + echo "Compiling kernel modules failed." + cd .. + rm -rf $PATH_TMP_MODS + exit 1 +fi + +# Copy the modules to /boot/kernel +echo "Installing kernel modules to /boot/kernel, please wait..." +cp $PATH_TMP_MODS/vboxdrv.ko /boot/kernel +cp $PATH_TMP_MODS/vboxnetflt.ko /boot/kernel +cp $PATH_TMP_MODS/vboxnetadp.ko /boot/kernel +kldxref -R /boot + +# Load them now, unloading old modules +make load + +if [ $? != 0 ]; then + echo "Loading kernel modules failed" + cd .. + rm -rf $PATH_TMP_MODS + exit 1 +fi + +echo "Kernel modules successfully installed." +echo "To load them on every boot put them into /boot/loader.conf" + +# Cleanup +cd .. +rm -rf $PATH_TMP_MODS + +exit 0 + diff --git a/src/VBox/Installer/linux/Makefile-footer.gmk b/src/VBox/Installer/linux/Makefile-footer.gmk new file mode 100644 index 00000000..1d0f75c0 --- /dev/null +++ b/src/VBox/Installer/linux/Makefile-footer.gmk @@ -0,0 +1,145 @@ +# $Id: Makefile-footer.gmk $ +## @file +# VirtualBox Guest Additions kernel module Makefile, common parts. +# +# See Makefile-header.gmk for details of how to use this. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +VBOXMOD_0_TARGET = $(VBOXMOD_NAME) + +KBUILD_VERBOSE ?= 1 # Variable belongs to our kBuild, not the linux one. +VBOX_LNX_VERBOSE = $(if $(KBUILD_VERBOSE),1,) + +# +# Compiler options +# +VBOXMOD_0_KFLAGS := -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE $(addprefix -D,$(VBOXMOD_DEFS)) +ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64) +VBOXMOD_0_KFLAGS += -DRT_ARCH_AMD64 +else +VBOXMOD_0_KFLAGS += -DRT_ARCH_X86 +endif + +ifeq ($(VBOX_KBUILD_TYPE),debug) +# The -Wno-array-bounds is because of a bug in gcc 4.something, see +# https://sourceware.org/bugzilla/show_bug.cgi?id=10001 + VBOXMOD_0_KFLAGS += -DDEBUG -DDEBUG_$(subst $(subst _, ,_),_,$(USERNAME)) -DDEBUG_USERNAME=$(subst $(subst _, ,_),_,$(USERNAME)) + ifeq ($(shell expr $(KERN_VER) : '[23]\.'),0) + VBOXMOD_0_KFLAGS += -Werror -Wall -Wno-array-bounds +# clang objects to calls to __builtin_frame_address with a non-zero argument +# on general principles in -Wall mode. The x86 linux kernel has two such calls +# in the thread_info.h / arch_within_stack_frames(), though probably safe. + ifndef ($(LLVM),) # (This is how the Linux root Makefile (since 5.7) does the test.) + VBOXMOD_0_KFLAGS += -Wno-frame-address + endif + endif +endif + +ifeq ($(VBOX_KERN_GROKS_EXTMOD),) +# +# Pre 2.6.6 +# +# Note: While pre 2.6.6 kernels could also do "proper" builds from kbuild, the +# make script needed to support it was somewhat different from 2.6. Since this +# script works and pre-2.6.6 is not a moving target we will not try do do things +# the "proper" way. +# +VBOXMOD_EXT := o + + ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64) +VBOXMOD_0_KFLAGS += -mcmodel=kernel + endif + ifeq ($(KERN_VERSION),24) +VBOXMOD_0_KFLAGS += -DVBOX_LINUX_2_4 + endif + +CFLAGS := -O2 $(VBOXMOD_CFLAGS) $(addprefix -I,$(KERN_INCL) $(VBOXMOD_INCL)) $(VBOXMOD_0_KFLAGS) $(KDEBUG) + +# 2.4 Module linking +$(VBOXMOD_0_TARGET).$(VBOXMOD_EXT): $(VBOXMOD_OBJS) + $(LD) -o $@ -r $(VBOXMOD_OBJS) + +all: $(VBOXMOD_0_TARGET) +$(VBOXMOD_0_TARGET): $(VBOXMOD_0_TARGET).$(VBOXMOD_EXT) + +install: $(VBOXMOD_0_TARGET) + @mkdir -p $(MODULE_DIR); \ + install -m 0644 -o root -g root $(VBOXMOD_0_TARGET).$(VBOXMOD_EXT) $(MODULE_DIR); \ + PATH="$(PATH):/bin:/sbin" depmod -a; sync + +clean: + for f in $(sort $(dir $(VBOXMOD_OBJS))); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done + rm -rf .$(VBOXMOD_NAME)* .tmp_ver* $(VBOXMOD_NAME).* Modules.symvers modules.order + +.PHONY: all $(VBOXMOD_0_TARGET) install clean + +else # VBOX_KERN_GROKS_EXTMOD +# +# 2.6.6 and later +# +VBOXMOD_EXT := ko + +# build defs +EXTRA_CFLAGS += $(VBOXMOD_CFLAGS) $(addprefix -I,$(KERN_INCL) $(VBOXMOD_INCL)) $(VBOXMOD_0_KFLAGS) $(KDEBUG) +$(VBOXMOD_0_TARGET)-y := $(VBOXMOD_OBJS) +obj-m += $(VBOXMOD_0_TARGET).o + +# Trigger parallel make job. + ifndef VBOX_NOJOBS +JOBS := $(shell (getconf _NPROCESSORS_ONLN || grep -Ec '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null) + ifeq ($(JOBS),0) + override JOBS := 1 + endif + else +JOBS := + endif + +VBOX_SUBDIR_VAR=$(if $(VBOX_KERN_GROKS_SUBDIRS),SUBDIRS,M) + +# OL/UEK: CONFIG_MODULE_SIG= disables module signing for external modules. +# Ubuntu 18.04.3: CONFIG_MODULE_SIG_ALL= disables signing of all modules. +# We disable signing because we don't have any private key and want to leave +# the key handling and secure boot config to the user. + ifndef VBOX_ALLOW_MODULE_SIGNING +VBOX_DISABLE_SIGN=CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= + endif + +# rules: +all: $(VBOXMOD_0_TARGET) + +$(VBOXMOD_0_TARGET): + $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) $(if $(JOBS),-j$(JOBS),) modules + +install: $(VBOXMOD_0_TARGET) + $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install + +modules_install: install + +clean: + $(MAKE) V=$(VBOX_LNX_VERBOSE) $(VBOX_DISABLE_SIGN) -C $(KERN_DIR) $(VBOX_SUBDIR_VAR)=$(CURDIR) SRCROOT=$(CURDIR) clean + +.PHONY: all $(VBOXMOD_0_TARGET) install modules_install clean +endif # VBOX_KERN_GROKS_EXTMOD + diff --git a/src/VBox/Installer/linux/Makefile-header.gmk b/src/VBox/Installer/linux/Makefile-header.gmk new file mode 100644 index 00000000..59f4caca --- /dev/null +++ b/src/VBox/Installer/linux/Makefile-header.gmk @@ -0,0 +1,301 @@ +# $Id: Makefile-header.gmk $ +## @file +# VirtualBox Guest Additions kernel module Makefile, common parts. +# +# (For 2.6.x, the main file must be called 'Makefile'!) +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Testing: +# * Building with KERN_DIR set uses the value specified and +# the default value for the unspecified one if any. + +# +# These file should be included by the Makefiles for any kernel modules we +# build as part of the Guest Additions. The intended way of doing this is as +# follows: +# +# # Linux kbuild sets this to our source directory if we are called from there +# obj ?= $(CURDIR) +# include $(obj)/Makefile-header.gmk +# VBOXMOD_NAME = +# VBOXMOD_OBJS = +# VBOXMOD_DEFS = +# VBOXMOD_INCL = +# VBOXMOD_CFLAGS = +# include $(obj)/Makefile-footer.gmk +# +# To avoid potential confusion between kmk/kBuild and linux/kbuild, +# we use VBOX_KBUILD_TARGET_ARCH instead of KBUILD_TARGET_ARCH and +# VBOX_KBUILD_TYPE instead of KBUILD_TYPE. The VBOX_KBUILD_ variable +# variant takes percedence over the kmk/kBuild ones. +# + + +# +# First, figure out which architecture we're targeting and the build type. +# (We have to support basic cross building (ARCH=i386|x86_64).) +# While at it, warn about *BUILD_* vars found to help with user problems. +# + +# VBOX_KBUILD_TARGET_ARCH = amd64|x86 +ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),) + VBOX_KBUILD_TARGET_ARCH_DEFAULT := amd64 +else + VBOX_KBUILD_TARGET_ARCH_DEFAULT := x86 +endif +ifdef VBOX_KBUILD_TARGET_ARCH + ifneq ($(filter-out amd64 x86,$(VBOX_KBUILD_TARGET_ARCH)),) + $(warning Ignoring unknown VBOX_KBUILD_TARGET_ARCH value '$(VBOX_KBUILD_TARGET_ARCH)'.) + VBOX_KBUILD_TARGET_ARCH := + endif +else + ifdef KBUILD_TARGET_ARCH + ifneq ($(filter-out amd64 x86,$(KBUILD_TARGET_ARCH)),) + $(warning Ignoring unknown KBUILD_TARGET_ARCH value '$(KBUILD_TARGET_ARCH)'.) + VBOX_KBUILD_TARGET_ARCH := + endif + else + ifdef BUILD_TARGET_ARCH + $(warning BUILD_TARGET_ARCH is deprecated, use VBOX_KBUILD_TARGET_ARCH instead.) + ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),) + $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.) + VBOX_KBUILD_TARGET_ARCH := + endif + endif + endif +endif +ifeq ($(VBOX_KBUILD_TARGET_ARCH),) + ifeq ($(ARCH),x86_64) + VBOX_KBUILD_TARGET_ARCH := amd64 + else + ifeq ($(ARCH),i386) + VBOX_KBUILD_TARGET_ARCH := x86 + else + VBOX_KBUILD_TARGET_ARCH := $(VBOX_KBUILD_TARGET_ARCH_DEFAULT) + endif + endif +else + ifneq ($(VBOX_KBUILD_TARGET_ARCH),$(VBOX_KBUILD_TARGET_ARCH_DEFAULT)) + $(warning Using VBOX_KBUILD_TARGET_ARCH='$(VBOX_KBUILD_TARGET_ARCH)' from the $(origin VBOX_KBUILD_TARGET_ARCH).) + endif +endif + +# VBOX_KBUILD_TYPE = release|debug|profile|strict|asan +ifdef VBOX_KBUILD_TYPE + VBOX_KBUILD_TYPE_VAR := VBOX_KBUILD_TYPE + ifneq ($(filter-out release profile debug strict asan,$(VBOX_KBUILD_TYPE)),) + $(warning Ignoring unknown VBOX_KBUILD_TYPE value '$(VBOX_KBUILD_TYPE)'.) + VBOX_KBUILD_TYPE := + endif +else + ifdef KBUILD_TYPE + VBOX_KBUILD_TYPE_VAR := KBUILD_TYPE + VBOX_KBUILD_TYPE := $(KBUILD_TYPE) + ifneq ($(filter-out release profile debug strict asan,$(KBUILD_TYPE)),) + $(warning Ignoring unknown KBUILD_TYPE value '$(KBUILD_TYPE)'.) + VBOX_KBUILD_TYPE := + endif + else + ifdef BUILD_TYPE + $(warning BUILD_TYPE is deprecated, use VBOX_KBUILD_TYPE instead.) + VBOX_KBUILD_TYPE_VAR := BUILD_TYPE + VBOX_KBUILD_TYPE := $(BUILD_TYPE) + ifneq ($(filter-out release profile debug strict asan,$(BUILD_TYPE)),) + $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.) + VBOX_KBUILD_TYPE := + endif + endif + endif +endif +ifeq ($(VBOX_KBUILD_TYPE),) + VBOX_KBUILD_TYPE_VAR = VBOX_KBUILD_TYPE + VBOX_KBUILD_TYPE := release +else + ifneq ($(VBOX_KBUILD_TYPE),release) + ifndef VBOX_KERN_QUIET + $(warning Using VBOX_KBUILD_TYPE='$(VBOX_KBUILD_TYPE)' from the $(origin $(VBOX_KBUILD_TYPE_VAR)) ($(VBOX_KBUILD_TYPE_VAR)).) + endif + endif +endif + +ifeq ($(USERNAME),) + USERNAME := noname +endif + +ifeq ($(KERNELRELEASE),) + + # + # building from this directory + # + + # kernel base directory + ifdef KERN_DIR + ifndef KERN_VER + ifeq ($(filter %/build,$(KERN_DIR)),) + $(error The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set) + endif + endif + endif + + ifndef KERN_VER + ifdef KERN_DIR + KERN_VER = $(notdir $(patsubst %/build,%,$(KERN_DIR))) + ifeq ($(shell expr $(KERN_VER) : '[0-9]*\.[0-9]*.[0-9]*'),0) + $(error The kernel build folder path must end in /build, or the variable KERN_VER must be set) + endif + endif + KERN_VER ?= $(shell uname -r) + endif + + ifeq ($(KERN_DIR),) + KERN_DIR := /lib/modules/$(KERN_VER)/build + endif + + # Is this 2.4 or < 2.6.6? The UTS_RELEASE "2.x.y.z" define is present in the header until 2.6.1x something. + ifeq ($(shell if grep '"2\.4\.' $(KERN_DIR)/include/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes) + KERN_VERSION := 24 + VBOX_KERN_GROKS_EXTMOD := + else + KERN_VERSION := 26 + VBOX_KERN_GROKS_EXTMOD := yes + ifeq ($(shell if grep '"2\.6\.[012345][."]' $(KERN_DIR)/include/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes) + VBOX_KERN_GROKS_EXTMOD := + endif + VBOX_KERN_GROKS_SUBDIRS := + ifeq ($(shell if grep '"[432]\.' $(KERN_DIR)/include/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes) + VBOX_KERN_GROKS_SUBDIRS := yes + endif + endif + + # + # Hack for Ubuntu 4.10 where we determine 2.6.8.1-3-generic-amd64 here, but the + # the next invocation (M/SUBDIR) ends up with KERNELRELEASE=2.6.8.1-3. + # + ifeq ($(shell if grep '"[2]\.' $(KERN_DIR)/include/linux/version.h > /dev/null 2>&1; then echo yes; fi),yes) + export KERN_VER KERN_DIR + else + # This makefile received some variables in the command line which should + # not be passed to the recursive make invocations (of the Linux makefile + # for building kernel modules), since they should derive KERN_DIR from the + # respective command line variables to come up with the value they expect. + unexport KERN_VER KERN_DIR + MAKEOVERRIDES := $(filter-out KERN_VER=% KERN_DIR=%,$(MAKEOVERRIDES)) + endif + +else # neq($(KERNELRELEASE),) + + # + # building from kbuild (make -C M=`pwd`) + # + + # guess kernel version (24 or 26) + ifeq ($(VERSION).$(PATCHLEVEL),2.4) + KERN_VERSION := 24 + VBOX_KERN_GROKS_EXTMOD := + else + KERN_VERSION := 26 + VBOX_KERN_GROKS_EXTMOD := yes + ifeq ($(VERSION).$(PATCHLEVEL),2.6) + ifeq ($(findstring @$(SUBLEVEL)@,@0@1@2@3@4@5@),@$(SUBLEVEL)@) + VBOX_KERN_GROKS_EXTMOD := + endif + endif + VBOX_KERN_GROKS_SUBDIRS := + ifeq ($(VERSION),2) + VBOX_KERN_GROKS_SUBDIRS := yes + endif + ifeq ($(VERSION),3) + VBOX_KERN_GROKS_SUBDIRS := yes + endif + ifeq ($(VERSION),4) + VBOX_KERN_GROKS_SUBDIRS := yes + endif + endif + + KERN_VER := $(KERNELRELEASE) + + ifeq ($(KERN_DIR),) + ifneq ($(srctree),) + KERN_DIR := $(srctree) + else + KERN_DIR := /lib/modules/$(KERN_VER)/build + endif + endif +endif # neq($(KERNELRELEASE),) + +# Kernel build folder +ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) + $(error Error: unable to find the headers of the Linux kernel to build against (KERN_DIR=$(KERN_DIR)). \ + Specify KERN_VER= (currently $(KERN_VER)) and run Make again) +endif +# Kernel include folder +KERN_INCL := $(KERN_DIR)/include +# module install folder +INSTALL_MOD_DIR ?= misc +MODULE_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KERN_VER)/$(INSTALL_MOD_DIR) + +# For VBOX_GCC_CHECK_CC +VBOX_CLOSEPAR := ) +VBOX_DOLLAR := $$ +## Modified VBOX_GCC_CHECK_EX_CC_CXX macro from /Config.kmk. +# @param 1 The option to test for. +# @param 2 The return value when supported. +# @param 3 The return value when NOT supported. +VBOX_GCC_CHECK_CC = $(shell \ + > /tmp/$(VBOX_DOLLAR)$(VBOX_DOLLAR).check.c; \ + if $(CC) $(subst -Wno-,-W,$(1)) -Werror -c -o /dev/null /tmp/$(VBOX_DOLLAR)$(VBOX_DOLLAR).check.c > /dev/null 2>&1; then \ + case "`LC_ALL=C $(CC) $(subst -Wno-,-W,$(1)) -Werror -c -o /dev/null /tmp/$(VBOX_DOLLAR)$(VBOX_DOLLAR).check.c 2>&1`" in \ + "error: unknown warning option"*$(VBOX_CLOSEPAR) echo "$(3)";; \ + *$(VBOX_CLOSEPAR) echo "$(2)";; \ + esac; \ + else echo "$(3)"; fi; \ + rm -f /tmp/$(VBOX_DOLLAR)$(VBOX_DOLLAR).check.c; ) + +# +# Guess the module directory ASSUMING that this file is located in that directory. +# Note! The special MAKEFILE_LIST variable was introduced in GNU make 3.80. +# +ifndef VBOX_MODULE_SRC_DIR + ifdef MAKEFILE_LIST + VBOX_MODULE_SRC_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) + else + VBOX_MODULE_SRC_DIR := $(CURDIR)/ + endif +endif + + +# debug - show guesses. +ifdef DEBUG + ifndef VBOX_KERN_QUIET +$(warning dbg: INSTALL_MOD_PATH = $(INSTALL_MOD_PATH)) +$(warning dbg: INSTALL_MOD_DIR = $(INSTALL_MOD_DIR)) +$(warning dbg: KERN_DIR = $(KERN_DIR)) +$(warning dbg: KERN_INCL = $(KERN_INCL)) +$(warning dbg: KERN_VERSION = $(KERN_VERSION)) +$(warning dbg: MODULE_DIR = $(MODULE_DIR)) +$(warning dbg: VBOX_MODULE_SRC_DIR = $(VBOX_MODULE_SRC_DIR)) + endif +endif + diff --git a/src/VBox/Installer/linux/Makefile.kmk b/src/VBox/Installer/linux/Makefile.kmk new file mode 100644 index 00000000..777ff95e --- /dev/null +++ b/src/VBox/Installer/linux/Makefile.kmk @@ -0,0 +1,595 @@ +# $Id: Makefile.kmk $ +## @file +# Makefile for the Linux installer. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + +# Include sub-makefiles. + +# We do not install VBoxHeadlessXOrg.sh any more, so this is not needed. +# +# ifdef VBOX_WITH_TESTCASES +# include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk +# endif + +ifneq ($(KBUILD_HOST),linux) + $(error "The Linux installer can only be built on Linux!") +endif + +# +# Globals and targets. +# +VBOX_LNX_APP_PRIVATE := $(if $(VBOX_PATH_APP_PRIVATE),$(VBOX_PATH_APP_PRIVATE),/opt/VirtualBox) +VBOX_LNX_APP_DOCS := $(if $(VBOX_PATH_PACKAGE_DOCS),$(VBOX_PATH_PACKAGE_DOCS),\ + $(if $(VBOX_PATH_APP_DOCS),$(VBOX_PATH_APP_DOCS),/opt/VirtualBox)) +VBOX_PATH_LNX_INST_SRC := $(PATH_SUB_CURRENT) +VBOX_LNX_INST_OUT_DIR := $(PATH_TARGET)/Installer/linux +VBOX_LNX_INST_STAGE_DIR := $(PATH_TARGET)/Installer/linux/install +VBOX_LNX_INST_STAGE_DIR_REL := obj/Installer/linux/install +VBOX_LNX_DBG_PATH := usr/lib/debug/$(VBOX_LNX_APP_PRIVATE) +VBOX_LNX_PACKAGE_NAME = VirtualBox-$(VBOX_VERSION_STRING)-r$(VBOX_SVN_REV).run + +# Unset this to speed up things during makefile hacking. +VBOX_LNX_INST_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) + +BLDDIRS += $(VBOX_LNX_INST_OUT_DIR) $(VBOX_LNX_INST_STAGE_DIR) +if !defined(VBOX_NO_LINUX_RUN_INSTALLER) + PACKING += $(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME) \ + $(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2 +else + PACKING += $(PATH_STAGE_BIN)/VirtualBox.tar +endif + +OTHER_CLEAN += \ + $(addprefix $(VBOX_LNX_INST_STAGE_DIR)/,\ + install.sh \ + VirtualBox.tar.bz2 \ + LICENSE) \ + $(wildcard $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-*) \ + $(VBOX_LNX_INST_OUT_DIR)/install.sh + +# +# Linux installs. +# +INSTALLS += linux-bin +linux-bin_INST = bin/ +linux-bin_MODE = a+rx,u+w +linux-bin_SOURCES = \ + check_module_dependencies.sh \ + postinst-common.sh \ + prerm-common.sh \ + routines.sh \ + VBoxSysInfo.sh \ + vboxautostart-service.sh \ + vboxballoonctrl-service.sh \ + VBoxCreateUSBNode.sh \ + vboxdrv.sh \ + vboxweb-service.sh \ + VBox.sh=>VBox.sh \ + $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py=>vboxshell.py,) + +INSTALLS += linux-scripts +linux-scripts_INST = $(VBOX_LNX_INST_STAGE_DIR_REL)/ +linux-scripts_MODE = a+rx,u+w +linux-scripts_SOURCES = \ + deffiles \ + postinst-common.sh \ + prerm-common.sh \ + routines.sh \ + uninstall.sh \ + vboxautostart-service.sh \ + vboxballoonctrl-service.sh \ + vboxdrv.sh \ + vboxweb-service.sh + +INSTALLS += linux-misc +linux-misc_INST = bin/ +linux-misc_MODE = a+r,u+w +linux-misc_SOURCES = \ + $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_32px.png=>VBox.png \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml \ + $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)=>LICENSE) \ + $(linux-misc_0_OUTDIR)/generated.sh=>scripts/generated.sh \ + $(if $(VBOX_WITH_QTGUI),$(linux-misc_0_OUTDIR)/virtualbox.desktop,) \ + $(if $(VBOX_WITH_QTGUI),$(linux-misc_0_OUTDIR)/virtualboxvm.desktop,) +ifeq ($(KBUILD_TYPE),asan) +linux-misc_SOURCES += $(foreach lib,$(VBOX_GCC_SANITIZER_SO_FILES) \ + ,$(lib)=>$(notdir $(lib)) $(lib)=>testcase/$(notdir $(lib)) $(lib)=>tools/$(notdir $(lib)) ) +endif +linux-misc_CLEAN = \ + $(linux-misc_0_OUTDIR)/generated.sh \ + $(linux-misc_0_OUTDIR)/virtualbox.desktop \ + $(linux-misc_0_OUTDIR)/virtualboxvm.desktop + +$$(linux-misc_0_OUTDIR)/generated.sh: $(VBOX_VERSION_STAMP) $(VBOX_LNX_INST_DEP_ON_MAKEFILE) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(RM) -f '$@' + $(QUIET)$(APPEND) '$@' 'VBOX_PRODUCT="$(VBOX_PRODUCT)"' + $(QUIET)$(APPEND) '$@' 'VBOX_VERSION_STRING="$(VBOX_VERSION_STRING)"' + $(QUIET)$(APPEND) '$@' 'VBOX_C_YEAR="$(VBOX_C_YEAR)"' + $(QUIET)$(APPEND) '$@' 'VBOX_VENDOR="$(VBOX_VENDOR)"' + +$$(linux-misc_0_OUTDIR)/virtualbox.desktop: $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $@ $< + +$$(linux-misc_0_OUTDIR)/virtualboxvm.desktop: $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in $(VBOX_VERSION_STAMP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $@ $< + +INSTALLS += linux-icons +linux-icons_INST = bin/icons/ +linux-icons_MODE = a+r,u+w +linux-icons_SOURCES = $(VBOX_MIME_ICONS) $(VBOX_DESKTOP_ICONS) + + +# +# The files residing in bin/ that we'll ship. +# + +# Strip these binaries +VBOX_LNX_STRIP_BIN = \ + VBoxDD.so \ + VBoxDD2.so \ + VBoxDDU.so \ + VBoxVMM.so \ + VBoxRT.so \ + $(if $(VBOX_WITH_LIBSSH),VBoxLibSsh.so,) \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL $(if $(VBOX_WITH_HARDENING),VBoxSDL.so),) \ + $(if $(VBOX_WITH_SHARED_CLIPBOARD), VBoxSharedClipboard.so,) \ + $(if $(VBOX_WITH_SHARED_FOLDERS), VBoxSharedFolders.so,) \ + $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \ + $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \ + VBoxHostChannel.so \ + $(if $(VBOX_WITH_DRAG_AND_DROP),VBoxDragAndDropSvc.so,) \ + $(if $(VBOX_WITH_MAIN), \ + VBoxAutostart \ + VBoxBalloonCtrl \ + VBoxBugReport \ + VBoxManage \ + VBoxNetDHCP $(if $(VBOX_WITH_HARDENING),VBoxNetDHCP.so,) \ + $(if $(VBOX_WITH_LWIP_NAT),VBoxNetNAT $(if $(VBOX_WITH_HARDENING),VBoxNetNAT.so,),) \ + VBoxNetAdpCtl \ + $(if $(VBOX_WITH_DEVMAPPER),VBoxVolInfo,) \ + VBoxSVC \ + VBoxXPCOM.so \ + VBoxXPCOMC.so \ + VBoxXPCOMIPCD \ + components/VBoxXPCOMIPCC.so \ + components/VBoxSVCM.so \ + components/VBoxC.so,) \ + $(if $(VBOX_WITH_QTGUI),VBoxTestOGL,) \ + $(if $(VBOX_WITH_VMSVGA3D),VBoxSVGA3D.so,) \ + $(if $(VBOX_WITH_DXVK), VBoxDxVk.so,) \ + $(if $(VBOX_WITH_PYTHON),$(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so)),) \ + $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \ + $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \ + ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNC.so \ + ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/VBoxVNCMain.so,) \ + $(if $(VBOX_WITH_DTRACE),VBoxDTrace,)\ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) + +# Do not remove relocation information of these binaries +VBOX_LNX_STRIP_OBJ = \ + VBoxDDR0.r0 \ + VMMR0.r0 +ifdef VBOX_NO_LINUX_RUN_INSTALLER + VBOX_LNX_STRIP_OBJ += \ + VBoxDDR0.debug \ + VMMR0.debug +else + VBOX_LNX_DBG_BIN = \ + VBoxDDR0.debug \ + VMMR0.debug +endif + +ifdef VBOX_WITH_RAW_MODE + VBOX_LNX_STRIP_OBJ += \ + VBoxDDRC.rc \ + VMMRC.rc + ifdef VBOX_NO_LINUX_RUN_INSTALLER + VBOX_LNX_STRIP_OBJ += \ + VBoxDDRC.debug \ + VMMRC.debug + else + VBOX_LNX_DBG_BIN += \ + VBoxDDRC.debug \ + VMMRC.debug + endif +endif + +# Do not strip anything of these files +VBOX_LNX_NO_STRIP = \ + $(if $(VBOX_OSE),,LICENSE) \ + $(if $(VBOX_WITH_MAIN), \ + components/VBoxXPCOMBase.xpt \ + components/VirtualBox_XPCOM.xpt) \ + $(if $(VBOX_WITH_PYTHON),vboxshell.py,) \ + $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \ + ExtensionPacks/VNC/ExtPack.xml \ + ExtensionPacks/VNC/ExtPack-license.html \ + ExtensionPacks/VNC/ExtPack-license.rtf \ + ExtensionPacks/VNC/ExtPack-license.txt,) \ + check_module_dependencies.sh \ + postinst-common.sh \ + prerm-common.sh \ + routines.sh \ + VBoxSysInfo.sh \ + vboxautostart-service.sh \ + vboxballoonctrl-service.sh \ + VBoxCreateUSBNode.sh \ + vboxdrv.sh \ + VBox.sh \ + vboxweb-service.sh \ + VBox.png \ + $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES)) + +ifdef VBOX_WITH_EXTPACK + VBOX_LNX_STRIP_BIN += \ + VBoxExtPackHelperApp +endif + +# Qt GUI +ifdef VBOX_WITH_QTGUI + include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk + VBOX_LNX_STRIP_BIN += \ + VBoxKeyboard.so \ + VirtualBox \ + VirtualBoxVM \ + UICommon.so \ + $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so) + ifdef VBOX_WITH_HARDENING + VBOX_LNX_STRIP_BIN += \ + VirtualBoxVM.so + endif + VBOX_LNX_NO_STRIP += \ + virtualbox.desktop \ + virtualboxvm.desktop \ + virtualbox.xml \ + $(VBOX_LICENSE_FILES) \ + $(if $(VBOX_WITH_ORACLE_QT),$(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)),) \ + $(if $(VBOX_WITH_ORACLE_QT),$(VBOX_QT_PLUGINS)) \ + $(foreach f,$(VBOX_APPROVED_GUI_LANGUAGES),nls/VirtualBox_$(f).qm nls/qt_$(f).qm) \ + icons +endif + +# Guest Additions +ifdef VBOX_WITH_ADDITIONS_PACKING + VBOX_LNX_NO_STRIP += \ + additions/VBoxGuestAdditions.iso +endif + +# Documentation +ifdef VBOX_WITH_DOCS_PACKING + VBOX_LNX_NO_STRIP += \ + UserManual.pdf \ + $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).pdf) + ifdef VBOX_WITH_DOCS_CHM_PACKING + VBOX_LNX_NO_STRIP += \ + VirtualBox.chm \ + $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),VirtualBox_$(f).chm) + endif + ifdef VBOX_WITH_DOCS_QHELP_PACKING + VBOX_LNX_NO_STRIP += \ + UserManual.qch UserManual.qhc \ + $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),UserManual_$(f).qch ,UserManual_$(f).qhc) + endif +endif + +# auth stuff +VBOX_LNX_STRIP_BIN += \ + $(if $(VBOX_WITH_PAM),VBoxAuth.so,) \ + VBoxAuthSimple.so + +# VRDP +ifdef VBOX_WITH_VRDP + ifndef VBOX_WITH_EXTPACK_PUEL + VBOX_LNX_STRIP_BIN += \ + VBoxVRDP.so + endif +endif + +# Python XPCOM glue +ifdef VBOX_WITH_PYTHON + VBOX_LNX_NO_STRIP += \ + $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \ + $(VBOXINST_SDK_INSTALLER_PYTHON_FILES) +endif + +# Java XPCOM bridge +ifdef VBOX_WITH_JXPCOM + VBOX_LNX_NO_STRIP += \ + sdk/bindings/xpcom/java/vboxjxpcom.jar +endif + +# Headless +ifdef VBOX_WITH_HEADLESS + VBOX_LNX_STRIP_BIN += \ + VBoxHeadless \ + $(if $(VBOX_WITH_HARDENING),VBoxHeadless.so) +endif + +# Webservices +ifdef VBOX_WITH_WEBSERVICES + VBOX_LNX_STRIP_BIN += \ + vboxwebsrv +endif + +# vbox-img +if defined(VBOX_WITH_TESTCASES) || defined(VBOX_WITH_VBOX_IMG) + VBOX_LNX_STRIP_BIN += \ + vbox-img +endif + +# vboximg-mount +if defined(VBOX_WITH_VBOXIMGMOUNT) + VBOX_LNX_STRIP_BIN += \ + vboximg-mount +endif + +# EFI firmware +ifdef VBOX_WITH_EFIFW_PACKING + VBOX_LNX_NO_STRIP += \ + VBoxEFI32.fd \ + VBoxEFI64.fd +endif + +# DTrace library and scripts. +ifdef VBOX_WITH_DTRACE + VBOX_LNX_NO_STRIP += \ + $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) +endif + +# The sanitizer shared objects match the compiler we're using (HACK). +ifeq ($(KBUILD_TYPE),asan) + VBOX_LNX_NO_STRIP += $(notdir $(VBOX_GCC_SANITIZER_SO_FILES)) +endif + +# Icons +VBOX_MIME_ICONS = \ + $(addprefix $(PATH_ROOT)/src/VBox/Artwork/other/,\ + $(foreach f,ova ovf vbox vbox-extpack vdi vmdk vhd hdd, \ + $(foreach s,16 20 24 32 48 64 72 96 128 256,\ + virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/virtualbox-$(f).png))) + +VBOX_DESKTOP_ICONS = \ + $(addprefix $(PATH_ROOT)/src/VBox/Artwork/$(if $(VBOX_OSE),OSE,NonOSE)/,\ + $(foreach s,16 20 32 40 48 64 128,\ + virtualbox-$(s)px.png=>$(s)x$(s)/virtualbox.png) \ + virtualbox.svg=>scalable/virtualbox.svg) + +# +# All the bin files that goes into the archives. +# +VBOX_LNX_ARCH_FILES := $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_STRIP_OBJ) $(VBOX_LNX_NO_STRIP) src + +# Cleanup of the files we copy/symlink from bin. +OTHER_CLEAN += $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(filter-out src,$(VBOX_LNX_ARCH_FILES)) src/vboxhost) \ + $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,\ + $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN)) + +# +# The generic installer. +# +$(PATH_STAGE_BIN)/$(VBOX_LNX_PACKAGE_NAME): \ + $(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2 \ + $(VBOX_VERSION_STAMP) \ + $(if $(VBOX_OSE),,$(VBOX_BRAND_LICENSE_TXT)) \ + $(VBOX_LNX_INST_OUT_DIR)/install.sh \ + $$(linux-scripts_2_STAGE_TARGETS) + $(call MSG_TOOL,makeself,,$@) + $(QUIET)$(RM) -f $(wildcard $(PATH_STAGE_BIN)/VirtualBox-*.run) + $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(VBOX_BRAND_LICENSE_TXT) $(VBOX_LNX_INST_STAGE_DIR)/LICENSE) + $(QUIET)$(INSTALL) -m 0755 $(VBOX_LNX_INST_OUT_DIR)/install.sh $(VBOX_LNX_INST_STAGE_DIR)/ + $(QUIET)$(RM) -f $@ + $(QUIET)$(VBOX_MAKESELF) --follow --nocomp $(VBOX_LNX_INST_STAGE_DIR) $@ \ + "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null" + +$(VBOX_LNX_INST_OUT_DIR)/install.sh: $(VBOX_PATH_LNX_INST_SRC)/install.sh $(VBOX_VERSION_STAMP) $(wildcard $(VBOX_SVN_REV_KMK).ts) | $$(dir $$@) + $(QUIET)$(SED) \ + -e "s;_VERSION_;$(VBOX_VERSION_STRING);g" \ + -e "s;_SVNREV_;$(VBOX_SVN_REV);g" \ + -e "s;_BUILD_;$(date-utc );g" \ + -e "s;_ARCH_;$(KBUILD_TARGET_ARCH);g" \ + -e "s;_HARDENED_;$(VBOX_WITH_HARDENING);g" \ + -e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \ + -e "s;_USERNAME_;$(USERNAME);g" \ + -e "s;_INSTALLATION_DIR_;$(VBOX_LNX_APP_PRIVATE);g" \ + -e "s;_PYTHON_;$(VBOX_WITH_PYTHON);g" \ + --output $@ \ + $< + +# +# The files that the tar archives depend on. +# + +include $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/files_vboxdrv +VBOX_LNX_INST_FILES_VBOXDRV=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxdrv/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(FILES_VBOXDRV_NOBIN))))) +include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt +VBOX_LNX_INST_FILES_VBOXNETFLT=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxnetflt/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES))))) +include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/linux/files_vboxnetadp +VBOX_LNX_INST_FILES_VBOXNETADP=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxnetadp/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES))))) + +ifdef VBOX_WITH_PCI_PASSTHROUGH + include $(PATH_ROOT)/src/VBox/HostDrivers/VBoxPci/linux/files_vboxpci + VBOX_LNX_INST_FILES_VBOXPCI=$(patsubst =>%,$(PATH_STAGE_BIN)/src/vboxpci/%,$(filter =>%,$(subst =>, =>,$(subst $(DQUOTE),,$(VBOX_VBOXPCI_SOURCES))))) +endif + +VBOX_LNX_INST_ARCH_DEPS := \ + $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/, $(VBOX_LNX_ARCH_FILES)) \ + $(VBOX_LNX_INST_DEP_ON_MAKEFILE) \ + $(VBOX_VERSION_STAMP) \ + $(VBOX_LNX_INST_FILES_VBOXDRV) \ + $(VBOX_LNX_INST_FILES_VBOXNETFLT) \ + $(VBOX_LNX_INST_FILES_VBOXNETADP) \ + $(if $(VBOX_WITH_PCI_PASSTHROUGH),$(VBOX_LNX_INST_FILES_VBOXPCI),) + +# +# .tar.bz2 for converting into .run +# +$(VBOX_LNX_INST_STAGE_DIR)/VirtualBox.tar.bz2: $(VBOX_LNX_INST_ARCH_DEPS) + $(call MSG_L1,Packing $@) + $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@) + $(QUIET)$(MKDIR) -p $(@D) +ifdef VBOX_USE_PBZIP2 + $(QUIET)tar --dereference --owner 0 --group 0 \ + -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES) + $(QUIET)pbzip2 $(patsubst %.bz2,%,$@) +else + $(QUIET)tar --dereference --owner 0 --group 0 \ + -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive $(VBOX_LNX_ARCH_FILES) +endif + $(QUIET)$(CHMOD) 0644 $@ + +# +# .tar for distribution with the files under VirtualBox-/. +# +$(PATH_STAGE_BIN)/VirtualBox.tar: $(VBOX_LNX_INST_ARCH_DEPS) + $(call MSG_L1,Packing $@) + $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) $@ $(patsubst %.bz2,%,$@) + $(QUIET)$(LN_SYMLINK) $(VBOX_LNX_INST_OUT_DIR)/archive/ $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) + $(QUIET)tar --dereference --owner 0 --group 0 \ + -cRhf $@ -C $(VBOX_LNX_INST_OUT_DIR) \ + $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(VBOX_LNX_ARCH_FILES)) + $(QUIET)$(RM) -f -- $(VBOX_LNX_INST_OUT_DIR)/VirtualBox-$(VBOX_VERSION_STRING) + + +# pattern rule for stripping and copying the VBOX_LNX_STRIP_BIN files to archive/ +$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_BIN)): \ + $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% \ + $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,\ + $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/%) \ + | $$(dir $$@) + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(INSTALL) -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@ + $(QUIET)$(if $(VBOX_NO_LINUX_RUN_INSTALLER),,objcopy --add-gnu-debuglink=$(subst $(VBOX_LNX_INST_OUT_DIR)/archive,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH),$@) $@) + +# pattern rule for copying VBOX_LNX_DBG_BIN files to archive-dbg/ +$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_DBG_BIN)): \ + $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_STAGE_BIN)/% | $$(dir $$@) + $(call MSG_INST_FILE,$<,$@) + $(QUIET)$(CP) $< $@ + +# pattern rule for striping and copying the VBOX_LNX_STRIP_OBJ files to archive/ +$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_STRIP_OBJ)): \ + $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@) + $(call MSG_INST_FILE,$<,$@) +ifeq ($(VBOX_DO_STRIP),) + $(QUIET)$(INSTALL) -m 0644 $< $@ +else # strip to temp file because of umask. + $(QUIET)objcopy --strip-unneeded -R .comment $< $@.tmp + $(QUIET)$(INSTALL) -m 0644 $@.tmp $@ + $(QUIET)$(RM) -f -- $@.tmp +endif + +# pattern rule for linking the VBOX_LNX_NO_STRIP into archive/ +$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive/,$(VBOX_LNX_NO_STRIP)): \ + $(VBOX_LNX_INST_OUT_DIR)/archive/% : $(PATH_STAGE_BIN)/% | $$(dir $$@) + $(call MSG_INST_SYM,$<,$@) + $(QUIET)$(RM) -f $@ + $(QUIET)$(LN_SYMLINK) $< $@ + +# special rule for the kernel modules +$(VBOX_LNX_INST_OUT_DIR)/archive/src: $(PATH_STAGE_BIN)/src | $(dir $@) + $(call MSG_INST_SYM,$<,$@) + $(QUIET)$(RM) -Rf $@ + $(QUIET)$(MKDIR) $@ + $(QUIET)$(LN_SYMLINK) $< $@/vboxhost + +# rules for creating directories in archive (the pattern rules depends on these). +BLDDIRS += $(foreach d,\ + archive \ + archive/components \ + archive/nls \ + $(if $(VBOX_WITH_UNATTENDED),archive/unattended_templates,) \ + $(if $(VBOX_WITH_ORACLE_QT), \ + archive/plugins/platforms \ + archive/plugins/platformthemes \ + archive/plugins/sqldrivers \ + archive/plugins/styles \ + archive/plugins/xcbglintegrations,) \ + $(if $(VBOX_WITH_PYTHON),\ + archive/sdk/installer \ + archive/sdk/installer/vboxapi \ + archive/sdk/bindings/xpcom/python/xpcom \ + archive/sdk/bindings/xpcom/python/xpcom/client \ + archive/sdk/bindings/xpcom/python/xpcom/server,) \ + $(if $(VBOX_WITH_JXPCOM),\ + archive/sdk/bindings/xpcom/java,) \ + $(if $(and $(VBOX_WITH_EXTPACK_VNC),$(VBOX_WITHOUT_EXTPACK_VNC_PACKING)), \ + archive/ExtensionPacks/VNC \ + archive/ExtensionPacks/VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),) \ + archive/additions \ + $(if-expr defined(VBOX_UNATTENDED_TEMPLATES),archive/UnattendedTemplates,) \ + install \ + $(if $(VBOX_WITH_DTRACE),\ + archive/dtrace \ + archive/dtrace/lib \ + archive/dtrace/lib/$(KBUILD_TARGET_ARCH) \ + archive/dtrace/testcase/ \ + archive/dtrace/testcase/$(KBUILD_TARGET_ARCH) \ + archive/dtrace/scripts,) \ +,$(VBOX_LNX_INST_OUT_DIR)/$(d)/) + + +# +# .tar.bz2 for with the debug info. +# +$(PATH_STAGE_BIN)/VirtualBox-dbg.tar.bz2: \ + $(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,\ + $(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN)) + $(call MSG_L1,Packing $@) + $(QUIET)$(RM) -f -- $@ $(patsubst %.bz2,%,$@) +ifdef VBOX_USE_PBZIP2 + $(QUIET)tar --dereference --owner 0 --group 0 \ + -cRhf $(patsubst %.bz2,%,$@) -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \ + $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN)) + $(QUIET)pbzip2 $(patsubst %.bz2,%,$@) +else + $(QUIET)tar --dereference --owner 0 --group 0 \ + -cjRhf $@ -C $(VBOX_LNX_INST_OUT_DIR)/archive-dbg \ + $(addprefix $(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN) $(VBOX_LNX_DBG_BIN)) +endif + +# pattern rule for copying the debug info from the VBOX_LNX_STRIP_BIN files into archive-dbg/$(VBOX_LNX_DBG_PATH)/ +$(addprefix $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/,$(VBOX_LNX_STRIP_BIN)): \ + $(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(VBOX_LNX_DBG_PATH)/% : $(PATH_STAGE_BIN)/% | $$(dir $$@) + $(call MSG_TOOL,copydbg,$<,$@) + $(QUIET)objcopy --only-keep-debug $< $@ + +# rules for creating directories in archive-dbg (the pattern rules depends on these). +BLDDIRS += $(foreach d,\ + $(VBOX_LNX_DBG_PATH) \ + $(VBOX_LNX_DBG_PATH)/components \ +,$(VBOX_LNX_INST_OUT_DIR)/archive-dbg/$(d)/) + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/linux/README.testing b/src/VBox/Installer/linux/README.testing new file mode 100644 index 00000000..bfa161e5 --- /dev/null +++ b/src/VBox/Installer/linux/README.testing @@ -0,0 +1,35 @@ +$Id: README.testing $ +This file documents things which need testing when updating the Linux host +installers or anything which might indirectly affect them. This should be +updated as we discover new things which could break. + +General: + + * Test building, installing and running the run, RPM and Debian packages. + * Test removing the packages - any errors? Any files left behind? Can the + package be re-installed and run after removal? + * Test upgrading them from any version we are likely to want to upgrade from. + Make sure we can start. + * Make sure that RPM/deb packages will not install if the run package is + installed and vice-versa. + +USB: + + * Make sure that /dev/vboxusb and /etc/udev/rules.d/60-vboxdrv.rules exist + after installation with service start and do not exist after removal. They + should disappear when the vboxdrv service is stopped and re-appear when it + is re-started. This should also work when distribution packages are switched + for run and vice-versa. + +Services: + + * Make sure that the services start correctly on different types of system. + Known supported cases: + * old Redhat (e.g. RHEL 5 and earlier): sysvinit and chkconfig + * old SUSE (12.0 and earlier): sysvinit and insserv + * Gentoo: open-rc + * very old Debian (5 and earlier): sysvinit, update-rc.d, non-dependency-based + * old Debian (6 and 7): sysvinit, update-rc.d, dependency-based + * Ubuntu (9.10 to 14.10): upstart + * Ubuntu 14.10: systemd installed, upstart used + * Recent non-Gentoo distributions: systemd diff --git a/src/VBox/Installer/linux/VBox.sh b/src/VBox/Installer/linux/VBox.sh new file mode 100755 index 00000000..4b28149b --- /dev/null +++ b/src/VBox/Installer/linux/VBox.sh @@ -0,0 +1,158 @@ +#!/bin/sh +## @file +# Oracle VM VirtualBox startup script, Linux hosts. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +PATH="/usr/bin:/bin:/usr/sbin:/sbin" + +# The below is GNU-specific. See slightly further down for a version which +# works on Solaris and OS X. +TARGET=`readlink -e -- "${0}"` || exit 1 +MY_DIR="${TARGET%/[!/]*}" + +# ( +# path="${0}" +# while test -n "${path}"; do +# # Make sure we have at least one slash and no leading dash. +# expr "${path}" : / > /dev/null || path="./${path}" +# # Filter out bad characters in the path name. +# expr "${path}" : ".*[*?<>\\]" > /dev/null && exit 1 +# # Catch embedded new-lines and non-existing (or path-relative) files. +# # $0 should always be absolute when scripts are invoked through "#!". +# test "`ls -l -d "${path}" 2> /dev/null | wc -l`" -eq 1 || exit 1 +# # Change to the folder containing the file to resolve relative links. +# folder=`expr "${path}" : "\(.*/\)[^/][^/]*/*$"` || exit 1 +# path=`expr "x\`ls -l -d "${path}"\`" : "[^>]* -> \(.*\)"` +# cd "${folder}" +# # If the last path was not a link then we are in the target folder. +# test -n "${path}" || pwd +# done +# ) + +if test -f /usr/lib/virtualbox/VirtualBox && + test -x /usr/lib/virtualbox/VirtualBox; then + INSTALL_DIR=/usr/lib/virtualbox +elif test -f "${MY_DIR}/VirtualBox" && test -x "${MY_DIR}/VirtualBox"; then + INSTALL_DIR="${MY_DIR}" +else + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 +fi + +# Note: This script must not fail if the module was not successfully installed +# because the user might not want to run a VM but only change VM params! + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +elif ! lsmod|grep -q vboxdrv; then + cat << EOF +WARNING: The vboxdrv kernel module is not loaded. Either there is no module + available for the current kernel (`uname -r`) or it failed to + load. Please recompile the kernel module and install it by + + sudo /sbin/vboxconfig + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -c /dev/vboxdrv ]; then + cat << EOF +WARNING: The character device /dev/vboxdrv does not exist. Try + + sudo /sbin/vboxconfig + + and if that is not successful, try to re-install the package. + + You will not be able to start VMs until this problem is fixed. +EOF +fi + +if [ -f /etc/vbox/module_not_compiled ]; then + cat << EOF +WARNING: The compilation of the vboxdrv.ko kernel module failed during the + installation for some reason. Starting a VM will not be possible. + Please consult the User Manual for build instructions. +EOF +fi + +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` +if [ -z "$SERVER_PID" ]; then + # Server not running yet/anymore, cleanup socket path. + # See IPC_GetDefaultSocketPath()! + if [ -n "$LOGNAME" ]; then + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 + else + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 + fi +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ -n "$SERVER_PID" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=`basename $0` +case "$APP" in + VirtualBox|virtualbox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VirtualBoxVM|virtualboxvm) + exec "$INSTALL_DIR/VirtualBoxVM" "$@" + ;; + VBoxManage|vboxmanage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL|vboxsdl) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP|VBoxHeadless|vboxheadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxAutostart|vboxautostart) + exec "$INSTALL_DIR/VBoxAutostart" "$@" + ;; + VBoxBalloonCtrl|vboxballoonctrl) + exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@" + ;; + VBoxBugReport|vboxbugreport) + exec "$INSTALL_DIR/VBoxBugReport" "$@" + ;; + VBoxDTrace|vboxdtrace) + exec "$INSTALL_DIR/VBoxDTrace" "$@" + ;; + VBoxAudioTest|vboxaudiotest|vkat) + exec "$INSTALL_DIR/VBoxAudioTest" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + *) + echo "Unknown application - $APP" + exit 1 + ;; +esac +exit 0 diff --git a/src/VBox/Installer/linux/VBoxCreateUSBNode.sh b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh new file mode 100755 index 00000000..8e5eee80 --- /dev/null +++ b/src/VBox/Installer/linux/VBoxCreateUSBNode.sh @@ -0,0 +1,61 @@ +#! /bin/sh +# $Id: VBoxCreateUSBNode.sh $ */ +## @file +# VirtualBox USB Proxy Service, Linux Specialization. +# udev helper for creating and removing device nodes for VirtualBox USB devices +# + +# +# Copyright (C) 2010-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Constant, from the USB specifications +usb_class_hub=09 + +do_remove=0 +case "$1" in "--remove") + do_remove=1; shift;; +esac +bus=`expr "$2" '/' 128 + 1` +device=`expr "$2" '%' 128 + 1` +class="$3" +group="$4" +devdir="`printf "/dev/vboxusb/%.3d" $bus`" +devpath="`printf "/dev/vboxusb/%.3d/%.3d" $bus $device`" +case "$do_remove" in + 0) + if test -n "$class" -a "$class" = "$usb_class_hub" + then + exit 0 + fi + case "$group" in "") group="vboxusers";; esac + mkdir /dev/vboxusb -m 0750 2>/dev/null + chown root:$group /dev/vboxusb 2>/dev/null + mkdir "$devdir" -m 0750 2>/dev/null + chown root:$group "$devdir" 2>/dev/null + mknod "$devpath" c $1 $2 -m 0660 2>/dev/null + chown root:$group "$devpath" 2>/dev/null + ;; + 1) + rm -f "$devpath" + ;; +esac + diff --git a/src/VBox/Installer/linux/VBoxSysInfo.sh b/src/VBox/Installer/linux/VBoxSysInfo.sh new file mode 100755 index 00000000..c884a7aa --- /dev/null +++ b/src/VBox/Installer/linux/VBoxSysInfo.sh @@ -0,0 +1,142 @@ +#!/bin/sh + +# @file +# +# Installer (Unix-like) +# Information about the host system/Linux distribution + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Print information about a Linux system +# @param distribution name of the distribution +# @param version version of the distribution +print_linux_info () { + # The following regex is not quite correct for an e-mail address, as + # the local part may not start or end with a dot. Please correct if + # this upsets you. + kern_ver=`cat /proc/version | sed -e 's/ ([a-zA-Z0-9.!#$%*/?^{}\`+=_-]*@[a-zA-Z0-9.-]*)//'` + echo "Distribution: $1 | Version: $2 | Kernel: $kern_ver" +} + +# Determine the distribution name and release for a Linux system and print +# send the information to stdout using the print_linux_info function. +# For practical reasons (i.e. lack of time), this function only gives +# information for distribution releases considered "of interest" and reports +# others as unknown. It can be extended later if other distributions are +# found to be "of interest". +get_linux_info () { + if which lsb_release > /dev/null 2>&1 + then + # LSB-compliant system + print_linux_info `lsb_release -i -s` `lsb_release -r -s` + elif [ -r /etc/debian_version ] + then + # Debian-based system + release=`cat /etc/debian_version` + print_linux_info "Debian" $release + elif [ -r /etc/mandriva-release ] + then + # Mandriva-based system + release=`cat /etc/mandriva-release | sed -e 's/[A-Za-z ]* release //'` + print_linux_info "Mandriva" $release + elif [ -r /etc/fedora-release ] + then + # Fedora-based + release=`cat /etc/fedora-release | sed -e 's/[A-Za-z ]* release //'` + print_linux_info "Fedora" $release + elif [ -r /etc/SuSE-release ] + then + # SUSE-based. + release=`cat /etc/SuSE-release | grep "VERSION" | sed -e 's/VERSION = //'` + if grep openSUSE /etc/SuSE-release + then + # Is it worth distinguishing here? I did it mainly to prevent + # confusion with the version number + print_linux_info "openSUSE" $release + else + print_linux_info "SUSE" $release + fi + elif [ -r /etc/gentoo-release ] + then + # Gentoo-based + release=`cat /etc/gentoo-release | sed -e 's/[A-Za-z ]* release //'` + print_linux_info "Gentoo" $release + elif [ -r /etc/slackware-version ] + then + # Slackware + release=`cat /etc/slackware-version | sed -e 's/Slackware //'` + print_linux_info "Slackware" $release + elif [ -r /etc/arch-release ] + then + # Arch Linux + print_linux_info "Arch Linux" "none" + elif [ -r /etc/redhat-release ] + then + # Redhat-based. This should come near the end, as it other + # distributions may give false positives. + release=`cat /etc/redhat-release | sed -e 's/[A-Za-z ]* release //'` + print_linux_info "Redhat" $release + else + print_linux_info "unknown" "unknown" + fi +} + +# Print information about a Solaris system. FIXME. +get_solaris_info () { + kernel=`uname -v` + echo "Kernel: $kernel" +} + +# Print information about a MacOS system. FIXME. +get_macos_info () { + machine=`uname -m` + kernel=`uname -v` + echo "Machine: $machine | Kernel: $kernel" +} + +# Print information about a FreeBSD system. FIXME. +get_freebsd_info () { + kernel=`uname -v` + echo "Kernel: $kernel" +} + +system=`uname -s` +case "$system" in +Linux|linux) + get_linux_info + ;; +SunOS) + get_solaris_info + ;; +Darwin) + get_macos_info + ;; +FreeBSD) + get_freebsd_info + ;; +*) + echo "System unknown" + exit 1 + ;; +esac +exit 0 diff --git a/src/VBox/Installer/linux/check_module_dependencies.sh b/src/VBox/Installer/linux/check_module_dependencies.sh new file mode 100755 index 00000000..3f2360ac --- /dev/null +++ b/src/VBox/Installer/linux/check_module_dependencies.sh @@ -0,0 +1,227 @@ +#!/bin/sh +# +# Oracle VM VirtualBox +# VirtualBox linux installation script + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +set -e + +# Usage: +USAGE_MESSAGE=\ +'Usage: `basename ${0}` [-h|--help| + --test [ rpm|dpkg [ ]]] +This script tests whether a Linux system is set up to build kernel modules, +and if not prints a guess as to which distribution packages need to be +installed to do so, and what commands to use. It uses the output of the +"uname -r" command to guess the packages and searches for packaging tools +by checking for packaging databases. + +For testing you can specify the output of "uname -r" which will be used +instead of the real one and the package type, and optionally the expected +output. --test without parameters will test a number of known inputs.' + +# General theory of operation (valid Nov 19 2016): we check whether this is an +# rpm or dpkg system by checking for the respective non-empty database directory +# (we assert that only one is present), and based on that we map uname -r output +# to a kernel package name. Here is a textual description of known mappings +# (not all of these are currently implemented) for both the general package name +# and the version-specific package name. Keeping this here as it took some time +# and pain to research. +# +# Debian/Ubuntu (dpkg): - -> linux-headers-, +# linux-headers-- +DEBIAN_FLAVOURS="generic lowlatency virtual 486 686-pae amd64 rt-686-pae \ + rt-amd64 i386 586 grsec-686-pae grsec-amd64 686" +# SUSE (rpm): - -> kernel--devel, +# kernel--devel- +SUSE_FLAVOURS="debug default ec2 pae trace vanilla vmi xen" +# OL/RHEL/CentOS (rpm): [.i686|.x86_64] -> kernel--devel, +# kernel--devel-<`uname -r`>, where ends in el*. +EL_FLAVOURS="uek xen" +# Fedora (rpm): -> kernel-devel, kernel-devel-, where +# ends in fc*. +# +# OUTPUT NOT YET TESTED ON REAL SYSTEMS +# +# Mageia (rpm): -*.mga* -> kernel-linus-latest, +# kernel-linus-<`uname -r`> +# --*.mga* -> kernel--latest, +# kernel--<`uname -r`> +MAGEIA_FLAVOURS="desktop desktop586 server tmb-desktop" +# PCLinuxOS (dpkg): -pclos* -> kernel-devel, kernel-devel-<`uname -r`> + +PATH=$PATH:/bin:/sbin:/usr/sbin + +HAVE_TOOLS= +HAVE_HEADERS= +PACKAGE_TYPE= +UNAME= +BASE_PACKAGE= +VERSIONED_PACKAGE= +TOOLS="gcc make perl" +TEST= +UNIT_TEST= + +case "${1}" in +"") + # Return immediately successfully if everything is installed + type ${TOOLS} >/dev/null 2>&1 && HAVE_TOOLS=yes + test -d "/lib/modules/`uname -r`/build/include" && HAVE_HEADERS=yes + test -n "${HAVE_TOOLS}" && test -n "${HAVE_HEADERS}" && exit 0 + UNAME=`uname -r` + for i in rpm dpkg; do + for j in /var/lib/${i}/*; do + test -e "${j}" || break + if test -z "${PACKAGE_TYPE}"; then + PACKAGE_TYPE="${i}" + else + PACKAGE_TYPE=unknown + fi + break + done + done + ;; +-h|--help) + echo "${USAGE_MESSAGE}" + exit 0 ;; +*) + ERROR="" + UNAME="${2}" + PACKAGE_TYPE="${3}" + BASE_EXPECTED="${4}" + VERSIONED_EXPECTED="${5}" + test "${1}" = --test || ERROR=yes + test -n "${UNAME}" && test -n "${PACKAGE_TYPE}" || test -z "${UNAME}" || + ERROR=yes + test -n "${BASE_EXPECTED}" && test -n "${VERSIONED_EXPECTED}" || + test -z "${BASE_EXPECTED}" || ERROR=yes + case "${ERROR}" in ?*) + echo "${USAGE_MESSAGE}" >&2 + exit 1 + esac + TEST=yes + TEST_PARAMS="${2} ${3} ${4} ${5}" + test -z "${UNAME}" && UNIT_TEST=yes + ;; +esac + +case "${PACKAGE_TYPE}" in +rpm) + for i in ${SUSE_FLAVOURS}; do + case "${UNAME}" in *-"${i}") + BASE_PACKAGE="kernel-${i}-devel" + VERSIONED_PACKAGE="kernel-${i}-devel-${UNAME%-${i}}" + break + esac + done + for i in ${EL_FLAVOURS} ""; do + case "${UNAME}" in *.el5"${i}"|*.el*"${i}".i686|*.el*"${i}".x86_64) + test -n "${i}" && i="${i}-" # Hack to handle empty flavour. + BASE_PACKAGE="kernel-${i}devel" + VERSIONED_PACKAGE="kernel-${i}devel-${UNAME}" + break + esac + done + case "${UNAME}" in *.fc*.i686|*.fc*.x86_64) # Fedora + BASE_PACKAGE="kernel-devel" + VERSIONED_PACKAGE="kernel-devel-${UNAME}" + esac + for i in ${MAGEIA_FLAVOURS} ""; do # Mageia + case "${UNAME}" in *-"${i}"*.mga*) + if test -z "${i}"; then + BASE_PACKAGE="kernel-linus-devel" + VERSIONED_PACKAGE="kernel-linus-devel-${UNAME}" + else + BASE_PACKAGE="kernel-${i}-devel" + VERSIONED_PACKAGE="kernel-${i}-devel-${UNAME%-${i}*}${UNAME#*${i}}" + fi + break + esac + done + ;; +dpkg) + for i in ${DEBIAN_FLAVOURS}; do # Debian/Ubuntu + case "${UNAME}" in *-${i}) + BASE_PACKAGE="linux-headers-${i}" + VERSIONED_PACKAGE="linux-headers-${UNAME}" + break + esac + done + case "${UNAME}" in *-pclos*) # PCLinuxOS + BASE_PACKAGE="kernel-devel" + VERSIONED_PACKAGE="kernel-devel-${UNAME}" + esac +esac + +case "${UNIT_TEST}${BASE_EXPECTED}" in "") + echo "This system is currently not set up to build kernel modules." >&2 + test -n "${HAVE_TOOLS}" || + echo "Please install the ${TOOLS} packages from your distribution." >&2 + test -n "${HAVE_HEADERS}" && exit 1 + echo "Please install the Linux kernel \"header\" files matching the current kernel" >&2 + echo "for adding new hardware support to the system." >&2 + if test -n "${BASE_PACKAGE}${VERSIONED_PACKAGE}"; then + echo "The distribution packages containing the headers are probably:" >&2 + echo " ${BASE_PACKAGE} ${VERSIONED_PACKAGE}" >&2 + fi + test -z "${TEST}" && exit 1 + exit 0 +esac + +case "${BASE_EXPECTED}" in ?*) + case "${BASE_EXPECTED} ${VERSIONED_EXPECTED}" in + "${BASE_PACKAGE} ${VERSIONED_PACKAGE}") + exit 0 + esac + echo "Test: ${TEST_PARAMS}" >&2 + echo "Result: ${BASE_PACKAGE} ${VERSIONED_PACKAGE}" + exit 1 +esac + +# Unit test as of here. +# Test expected correct results. +for i in \ + "4.1.12-37.5.1.el6uek.x86_64 rpm kernel-uek-devel kernel-uek-devel-4.1.12-37.5.1.el6uek.x86_64" \ + "2.6.32-642.el6.x86_64 rpm kernel-devel kernel-devel-2.6.32-642.el6.x86_64" \ + "4.1.12-vanilla rpm kernel-vanilla-devel kernel-vanilla-devel-4.1.12" \ + "4.8.8-pclos1 dpkg kernel-devel kernel-devel-4.8.8-pclos1" \ + "4.8.8-desktop-1.mga6 rpm kernel-desktop-devel kernel-desktop-devel-4.8.8-1.mga6" \ + "3.19.8-2.mga5 rpm kernel-linus-devel kernel-linus-devel-3.19.8-2.mga5" \ + "4.8.0-27-generic dpkg linux-headers-generic linux-headers-4.8.0-27-generic" +do + "${0}" --test ${i} || exit 1 +done + +# Test argument combinations expected to fail. +for i in \ + "--test NOT_EMPTY" \ + "--test NOT_EMPTY NOT_EMPTY NOT_EMPTY" \ + "--wrong" \ + "--test 4.8.8-pclos1 dpkg kernel-devel kernel-devel-WRONG" \ + "--test 4.8.8-pclos1 dpkg kernel-WRONG kernel-devel-4.8.8-pclos1" +do + "${0}" ${i} >/dev/null 2>&1 && echo "Bad argument test failed:" && + echo " ${i}" && exit 1 +done +exit 0 diff --git a/src/VBox/Installer/linux/deffiles b/src/VBox/Installer/linux/deffiles new file mode 100755 index 00000000..84db5936 --- /dev/null +++ b/src/VBox/Installer/linux/deffiles @@ -0,0 +1,615 @@ +#!/bin/sh +# $Id$ +## @file +# Oracle VM VirtualBox - linux default files list. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# No entries should ever be removed from this file, as it is used +# for uninstalling old installations of VirtualBox which did not +# keep track of the names of their files. Similarly it should not +# be necessary to add new entries to the list (in fact all of the +# entries added after the file was first created are probably +# redundant). Actually though it can't hurt, in case something goes +# wrong with an installation... + +DEFAULT_FILE_NAMES=" \ + VBoxDD.so \ + VBoxDD2.so \ + VBoxDTrace \ + VBoxKeyboard.so \ + VBoxManage \ + VBoxNetDHCP \ + VBoxNetDHCP.so \ + VBoxRT.so \ + VBoxSDL \ + VBoxSDL.so \ + VBoxSVC \ + VBoxSVCM.so \ + VBoxDDU.so \ + VBoxVMM.so \ + VBoxXPCOM.so \ + VBoxXPCOMC.so \ + VBoxXPCOMIPCD \ + VirtualBox \ + VirtualBoxVM \ + VirtualBox.so \ + VBoxSettings.so \ + VBoxSharedFolders.so \ + VBoxSharedClipboard.so \ + VBoxGuestPropSvc.so \ + VBoxGuestControlSvc.so \ + VBoxHostChannel.so \ + VBoxDragAndDropSvc.so \ + VBoxAuth.so \ + VBoxAuthSimple.so \ + VBoxDbg.so \ + VBoxDbg3.so \ + DbgPlugInDiggers.so \ + DBGCPlugInDiggers.so \ + VBoxHeadless \ + VBoxHeadless.so \ + VBoxDD2RC.rc \ + VBoxDD2R0.r0 \ + VBoxDD2GC.gc \ + VBoxDDRC.rc \ + VBoxDDR0.r0 \ + VBoxDDGC.gc \ + VMMRC.rc \ + VMMR0.r0 \ + VMMGC.gc \ + vboxefi.fv \ + vboxefi64.fv \ + vboxwebsrv \ + vbox-img \ + vboximg-mount \ + components/comreg.dat \ + components/xpti.dat \ + components/VBoxC.so \ + components/VBoxDDU.so \ + components/VBoxRT.so \ + components/VBoxVMM.so \ + components/VBoxXPCOM.so \ + components/VBoxXPCOMBase.xpt \ + components/VBoxXPCOMIPCC.so \ + components/VirtualBox_XPCOM.xpt \ + dtrace/lib/amd64/vbox-types.d \ + dtrace/lib/amd64/vbox-arch-types.d \ + dtrace/lib/amd64/vm.d \ + dtrace/lib/amd64/cpumctx.d \ + dtrace/lib/amd64/CPUMInternal.d \ + dtrace/lib/amd64/x86.d \ + dtrace/lib/x86/vbox-types.d \ + dtrace/lib/x86/vbox-arch-types.d \ + dtrace/lib/x86/vm.d \ + dtrace/lib/x86/cpumctx.d \ + dtrace/lib/x86/CPUMInternal.d \ + dtrace/lib/x86/x86.d \ + dtrace/testcase/amd64/vbox-vm-struct-test.d \ + dtrace/testcase/x86/vbox-vm-struct-test.d \ + VBox.sh \ + VBox.png \ + virtualbox.desktop \ + virtualboxvm.desktop \ + src/ \ + src/include/ \ + src/include/iprt/ \ + src/include/iprt/alloc.h \ + src/include/iprt/asm.h \ + src/include/iprt/assert.h \ + src/include/iprt/cdefs.h \ + src/include/iprt/err.h \ + src/include/iprt/log.h \ + src/include/iprt/mem.h \ + src/include/iprt/param.h \ + src/include/iprt/semaphore.h \ + src/include/iprt/spinlock.h \ + src/include/iprt/stdarg.h \ + src/include/iprt/stdint.h \ + src/include/iprt/string.h \ + src/include/iprt/thread.h \ + src/include/iprt/types.h \ + src/include/iprt/uuid.h \ + src/include/iprt/x86.h \ + src/include/internal/initterm.h \ + src/include/internal/magics.h \ + src/include/internal/thread.h \ + src/include/VBox/ \ + src/include/VBox/cdefs.h \ + src/include/VBox/err.h \ + src/include/VBox/log.h \ + src/include/VBox/sup.h \ + src/include/VBox/hwaccm_svm.h \ + src/include/VBox/hwaccm_vmx.h \ + src/include/VBox/x86.h \ + src/include/VBox/types.h \ + src/linux/ \ + src/linux/SUPDrv-linux.c \ + src/Makefile \ + src/r0drv/ \ + src/r0drv/alloc-r0drv.c \ + src/r0drv/alloc-r0drv.h \ + src/r0drv/linux/ \ + src/r0drv/linux/alloc-r0drv-linux.c \ + src/r0drv/linux/semaphore-r0drv-linux.c \ + src/r0drv/linux/spinlock-r0drv-linux.c \ + src/r0drv/linux/string.h \ + src/r0drv/linux/thread-r0drv-linux.c \ + src/r0drv/linux/the-linux-kernel.h \ + src/SUPDRVIOC.h \ + src/SUPDRVShared.c \ + src/SUPDrv.c \ + src/SUPDrvAgnostic.c \ + src/SUPDrvIDC.h \ + src/SUPDrvIOC.h \ + src/SUPDrvInternal.h \ + src/SUPDrvSem.c \ + src/Modules.symvers \ + src/version-generated.h \ + nls/qt_de.qm \ + nls/VirtualBox_de.qm \ + nls/qt_fr.qm \ + nls/VirtualBox_fr.qm \ + nls/qt_it.qm \ + nls/VirtualBox_it.qm \ + nls/qt_ro.qm \ + nls/VirtualBox_ro.qm \ + nls/qt_zh_CN.qm \ + nls/VirtualBox_zh_CN.qm \ + nls/qt_ja.qm \ + nls/VirtualBox_ja.qm \ + nls/qt_es.ts \ + nls/VirtualBox_es.ts \ + nls/qt_ru.ts \ + nls/VirtualBox_ru.ts \ + nls/qt_pl.ts \ + nls/VirtualBox_pl.ts \ + nls/qt_pt_BR.ts \ + nls/VirtualBox_pt_BR.ts \ + nls/qt_ko.ts \ + nls/VirtualBox_ko.ts \ + nls/qt_sv.ts \ + nls/VirtualBox_sv.ts \ + nls/qt_fi.ts \ + nls/VirtualBox_fi.ts \ + nls/qt_hu.ts \ + nls/VirtualBox_hu.ts \ + nls/qt_cs.ts \ + nls/VirtualBox_cs.ts \ + sdk/ \ + sdk/include/ \ + sdk/include/xpcom/ \ + sdk/include/xpcom/nsprpub/ \ + sdk/include/xpcom/nsprpub/md/ \ + sdk/include/xpcom/nsprpub/md/prosdep.h \ + sdk/include/xpcom/nsprpub/md/_pth.h \ + sdk/include/xpcom/nsprpub/md/_unix_errors.h \ + sdk/include/xpcom/nsprpub/md/_unixos.h \ + sdk/include/xpcom/nsprpub/md/_l4v2.h \ + sdk/include/xpcom/nsprpub/md/_linux.h \ + sdk/include/xpcom/nsprpub/obsolete/ \ + sdk/include/xpcom/nsprpub/obsolete/prsem.h \ + sdk/include/xpcom/nsprpub/obsolete/protypes.h \ + sdk/include/xpcom/nsprpub/obsolete/probslet.h \ + sdk/include/xpcom/nsprpub/obsolete/pralarm.h \ + sdk/include/xpcom/nsprpub/private/ \ + sdk/include/xpcom/nsprpub/private/prpriv.h \ + sdk/include/xpcom/nsprpub/private/pprthred.h \ + sdk/include/xpcom/nsprpub/private/pprio.h \ + sdk/include/xpcom/nsprpub/prcpucfg.h \ + sdk/include/xpcom/nsprpub/_linuxcfg.h \ + sdk/include/xpcom/nsprpub/_l4v2cfg.h \ + sdk/include/xpcom/nsprpub/prwin16.h \ + sdk/include/xpcom/nsprpub/prvrsion.h \ + sdk/include/xpcom/nsprpub/prtypes.h \ + sdk/include/xpcom/nsprpub/prtrace.h \ + sdk/include/xpcom/nsprpub/prtpool.h \ + sdk/include/xpcom/nsprpub/prtime.h \ + sdk/include/xpcom/nsprpub/prthread.h \ + sdk/include/xpcom/nsprpub/prsystem.h \ + sdk/include/xpcom/nsprpub/prshma.h \ + sdk/include/xpcom/nsprpub/prshm.h \ + sdk/include/xpcom/nsprpub/prrwlock.h \ + sdk/include/xpcom/nsprpub/prrng.h \ + sdk/include/xpcom/nsprpub/prproces.h \ + sdk/include/xpcom/nsprpub/prprf.h \ + sdk/include/xpcom/nsprpub/prpdce.h \ + sdk/include/xpcom/nsprpub/prolock.h \ + sdk/include/xpcom/nsprpub/prnetdb.h \ + sdk/include/xpcom/nsprpub/prmwait.h \ + sdk/include/xpcom/nsprpub/prmon.h \ + sdk/include/xpcom/nsprpub/prmem.h \ + sdk/include/xpcom/nsprpub/prlong.h \ + sdk/include/xpcom/nsprpub/prlog.h \ + sdk/include/xpcom/nsprpub/prlock.h \ + sdk/include/xpcom/nsprpub/prlink.h \ + sdk/include/xpcom/nsprpub/pripcsem.h \ + sdk/include/xpcom/nsprpub/prio.h \ + sdk/include/xpcom/nsprpub/prinrval.h \ + sdk/include/xpcom/nsprpub/prinit.h \ + sdk/include/xpcom/nsprpub/prinet.h \ + sdk/include/xpcom/nsprpub/prerror.h \ + sdk/include/xpcom/nsprpub/prerr.h \ + sdk/include/xpcom/nsprpub/prenv.h \ + sdk/include/xpcom/nsprpub/prdtoa.h \ + sdk/include/xpcom/nsprpub/prcvar.h \ + sdk/include/xpcom/nsprpub/prcountr.h \ + sdk/include/xpcom/nsprpub/prcmon.h \ + sdk/include/xpcom/nsprpub/prclist.h \ + sdk/include/xpcom/nsprpub/prbit.h \ + sdk/include/xpcom/nsprpub/pratom.h \ + sdk/include/xpcom/nsprpub/plstr.h \ + sdk/include/xpcom/nsprpub/plresolv.h \ + sdk/include/xpcom/nsprpub/plhash.h \ + sdk/include/xpcom/nsprpub/plgetopt.h \ + sdk/include/xpcom/nsprpub/plerror.h \ + sdk/include/xpcom/nsprpub/plbase64.h \ + sdk/include/xpcom/nsprpub/plarenas.h \ + sdk/include/xpcom/nsprpub/plarena.h \ + sdk/include/xpcom/nsprpub/nspr.h \ + sdk/include/xpcom/string/ \ + sdk/include/xpcom/string/string-template-undef.h \ + sdk/include/xpcom/string/string-template-def-unichar.h \ + sdk/include/xpcom/string/string-template-def-char.h \ + sdk/include/xpcom/string/nsXPIDLString.h \ + sdk/include/xpcom/string/nsUTF8Utils.h \ + sdk/include/xpcom/string/nsTSubstringTuple.h \ + sdk/include/xpcom/string/nsTSubstring.h \ + sdk/include/xpcom/string/nsTString.h \ + sdk/include/xpcom/string/nsTPromiseFlatString.h \ + sdk/include/xpcom/string/nsTObsoleteAString.h \ + sdk/include/xpcom/string/nsTDependentSubstring.h \ + sdk/include/xpcom/string/nsTDependentString.h \ + sdk/include/xpcom/string/nsTAString.h \ + sdk/include/xpcom/string/nsSubstringTuple.h \ + sdk/include/xpcom/string/nsSubstring.h \ + sdk/include/xpcom/string/nsStringIterator.h \ + sdk/include/xpcom/string/nsStringFwd.h \ + sdk/include/xpcom/string/nsStringAPI.h \ + sdk/include/xpcom/string/nsString.h \ + sdk/include/xpcom/string/nsReadableUtils.h \ + sdk/include/xpcom/string/nsPromiseFlatString.h \ + sdk/include/xpcom/string/nsPrintfCString.h \ + sdk/include/xpcom/string/nsObsoleteAString.h \ + sdk/include/xpcom/string/nsLiteralString.h \ + sdk/include/xpcom/string/nsEmbedString.h \ + sdk/include/xpcom/string/nsDependentSubstring.h \ + sdk/include/xpcom/string/nsDependentString.h \ + sdk/include/xpcom/string/nsCharTraits.h \ + sdk/include/xpcom/string/nsAlgorithm.h \ + sdk/include/xpcom/string/nsAString.h \ + sdk/include/xpcom/xpcom/ \ + sdk/include/xpcom/xpcom/xpcom-config.h \ + sdk/include/xpcom/xpcom/xptinfo.h \ + sdk/include/xpcom/xpcom/xptcstubsdef.inc \ + sdk/include/xpcom/xpcom/xptcstubsdecl.inc \ + sdk/include/xpcom/xpcom/xptcall.h \ + sdk/include/xpcom/xpcom/xpt_xdr.h \ + sdk/include/xpcom/xpcom/xpt_struct.h \ + sdk/include/xpcom/xpcom/xpt_arena.h \ + sdk/include/xpcom/xpcom/xcDll.h \ + sdk/include/xpcom/xpcom/plevent.h \ + sdk/include/xpcom/xpcom/pldhash.h \ + sdk/include/xpcom/xpcom/nscore.h \ + sdk/include/xpcom/xpcom/nsXPCOMGlue.h \ + sdk/include/xpcom/xpcom/nsXPCOMCID.h \ + sdk/include/xpcom/xpcom/nsXPCOM.h \ + sdk/include/xpcom/xpcom/nsWeakReference.h \ + sdk/include/xpcom/xpcom/nsWeakPtr.h \ + sdk/include/xpcom/xpcom/nsVoidArray.h \ + sdk/include/xpcom/xpcom/nsVariant.h \ + sdk/include/xpcom/xpcom/nsValueArray.h \ + sdk/include/xpcom/xpcom/nsUnitConversion.h \ + sdk/include/xpcom/xpcom/nsTraceRefcntImpl.h \ + sdk/include/xpcom/xpcom/nsTraceRefcnt.h \ + sdk/include/xpcom/xpcom/nsTime.h \ + sdk/include/xpcom/xpcom/nsTextFormatter.h \ + sdk/include/xpcom/xpcom/nsTHashtable.h \ + sdk/include/xpcom/xpcom/nsSupportsPrimitives.h \ + sdk/include/xpcom/xpcom/nsSupportsArray.h \ + sdk/include/xpcom/xpcom/nsStringStream.h \ + sdk/include/xpcom/xpcom/nsStringIO.h \ + sdk/include/xpcom/xpcom/nsStringEnumerator.h \ + sdk/include/xpcom/xpcom/nsStreamUtils.h \ + sdk/include/xpcom/xpcom/nsStorageStream.h \ + sdk/include/xpcom/xpcom/nsStaticNameTable.h \ + sdk/include/xpcom/xpcom/nsStaticComponent.h \ + sdk/include/xpcom/xpcom/nsStaticAtom.h \ + sdk/include/xpcom/xpcom/nsScriptableInputStream.h \ + sdk/include/xpcom/xpcom/nsRefPtrHashtable.h \ + sdk/include/xpcom/xpcom/nsRecyclingAllocator.h \ + sdk/include/xpcom/xpcom/nsQuickSort.h \ + sdk/include/xpcom/xpcom/nsProxyRelease.h \ + sdk/include/xpcom/xpcom/nsProxyEvent.h \ + sdk/include/xpcom/xpcom/nsProxiedService.h \ + sdk/include/xpcom/xpcom/nsProcess.h \ + sdk/include/xpcom/xpcom/nsObsoleteModuleLoading.h \ + sdk/include/xpcom/xpcom/nsObserverService.h \ + sdk/include/xpcom/xpcom/nsNativeComponentLoader.h \ + sdk/include/xpcom/xpcom/nsNativeCharsetUtils.h \ + sdk/include/xpcom/xpcom/nsMultiplexInputStream.h \ + sdk/include/xpcom/xpcom/nsModule.h \ + sdk/include/xpcom/xpcom/nsMemory.h \ + sdk/include/xpcom/xpcom/nsLocalFileUnix.h \ + sdk/include/xpcom/xpcom/nsLocalFile.h \ + sdk/include/xpcom/xpcom/nsLinebreakConverter.h \ + sdk/include/xpcom/xpcom/nsInterfaceHashtable.h \ + sdk/include/xpcom/xpcom/nsInt64.h \ + sdk/include/xpcom/xpcom/nsIWeakReferenceUtils.h \ + sdk/include/xpcom/xpcom/nsIUnicharInputStream.h \ + sdk/include/xpcom/xpcom/nsIUnicharBuffer.h \ + sdk/include/xpcom/xpcom/nsISupportsUtils.h \ + sdk/include/xpcom/xpcom/nsISupportsObsolete.h \ + sdk/include/xpcom/xpcom/nsISupportsImpl.h \ + sdk/include/xpcom/xpcom/nsISupportsBase.h \ + sdk/include/xpcom/xpcom/nsIServiceManagerUtils.h \ + sdk/include/xpcom/xpcom/nsIServiceManagerObsolete.h \ + sdk/include/xpcom/xpcom/nsIInterfaceRequestorUtils.h \ + sdk/include/xpcom/xpcom/nsIID.h \ + sdk/include/xpcom/xpcom/nsIGenericFactory.h \ + sdk/include/xpcom/xpcom/nsID.h \ + sdk/include/xpcom/xpcom/nsIByteBuffer.h \ + sdk/include/xpcom/xpcom/nsIAllocator.h \ + sdk/include/xpcom/xpcom/nsHashtable.h \ + sdk/include/xpcom/xpcom/nsHashSets.h \ + sdk/include/xpcom/xpcom/nsHashKeys.h \ + sdk/include/xpcom/xpcom/nsGenericFactory.h \ + sdk/include/xpcom/xpcom/nsFixedSizeAllocator.h \ + sdk/include/xpcom/xpcom/nsFastLoadService.h \ + sdk/include/xpcom/xpcom/nsFastLoadPtr.h \ + sdk/include/xpcom/xpcom/nsEventQueueUtils.h \ + sdk/include/xpcom/xpcom/nsEscape.h \ + sdk/include/xpcom/xpcom/nsError.h \ + sdk/include/xpcom/xpcom/nsEnumeratorUtils.h \ + sdk/include/xpcom/xpcom/nsDoubleHashtable.h \ + sdk/include/xpcom/xpcom/nsDirectoryServiceUtils.h \ + sdk/include/xpcom/xpcom/nsDirectoryServiceDefs.h \ + sdk/include/xpcom/xpcom/nsDirectoryService.h \ + sdk/include/xpcom/xpcom/nsDeque.h \ + sdk/include/xpcom/xpcom/nsDebugImpl.h \ + sdk/include/xpcom/xpcom/nsDebug.h \ + sdk/include/xpcom/xpcom/nsDataHashtable.h \ + sdk/include/xpcom/xpcom/nsCppSharedAllocator.h \ + sdk/include/xpcom/xpcom/nsComponentManagerUtils.h \ + sdk/include/xpcom/xpcom/nsComponentManagerObsolete.h \ + sdk/include/xpcom/xpcom/nsCom.h \ + sdk/include/xpcom/xpcom/nsClassHashtable.h \ + sdk/include/xpcom/xpcom/nsCheapSets.h \ + sdk/include/xpcom/xpcom/nsCategoryManagerUtils.h \ + sdk/include/xpcom/xpcom/nsCRT.h \ + sdk/include/xpcom/xpcom/nsCOMPtr.h \ + sdk/include/xpcom/xpcom/nsCOMArray.h \ + sdk/include/xpcom/xpcom/nsBaseHashtable.h \ + sdk/include/xpcom/xpcom/nsAutoPtr.h \ + sdk/include/xpcom/xpcom/nsAutoLock.h \ + sdk/include/xpcom/xpcom/nsAutoBuffer.h \ + sdk/include/xpcom/xpcom/nsAtomService.h \ + sdk/include/xpcom/xpcom/nsArrayEnumerator.h \ + sdk/include/xpcom/xpcom/nsArray.h \ + sdk/include/xpcom/xpcom/nsAppDirectoryServiceDefs.h \ + sdk/include/xpcom/xpcom/nsAgg.h \ + sdk/include/xpcom/ipcd/ \ + sdk/include/xpcom/ipcd/ipcdclient.h \ + sdk/include/xpcom/ipcd/ipcModuleUtil.h \ + sdk/include/xpcom/ipcd/ipcModule.h \ + sdk/include/xpcom/ipcd/ipcMessageWriter.h \ + sdk/include/xpcom/ipcd/ipcMessageReader.h \ + sdk/include/xpcom/ipcd/ipcLockCID.h \ + sdk/include/xpcom/ipcd/ipcCID.h \ + sdk/include/xpcom/.keep \ + sdk/include/nsIDebug.h \ + sdk/include/nsIInterfaceRequestor.h \ + sdk/include/nsIMemory.h \ + sdk/include/nsIProgrammingLanguage.h \ + sdk/include/nsISupports.h \ + sdk/include/nsITraceRefcnt.h \ + sdk/include/nsIWeakReference.h \ + sdk/include/nsIConsoleMessage.h \ + sdk/include/nsIConsoleService.h \ + sdk/include/nsIConsoleListener.h \ + sdk/include/nsIErrorService.h \ + sdk/include/nsIException.h \ + sdk/include/nsIExceptionService.h \ + sdk/include/nsrootidl.h \ + sdk/include/nsIClassInfo.h \ + sdk/include/nsIComponentRegistrar.h \ + sdk/include/nsIFactory.h \ + sdk/include/nsIModule.h \ + sdk/include/nsIServiceManager.h \ + sdk/include/nsIComponentManager.h \ + sdk/include/nsICategoryManager.h \ + sdk/include/nsIComponentLoader.h \ + sdk/include/nsINativeComponentLoader.h \ + sdk/include/nsIComponentManagerObsolete.h \ + sdk/include/nsIComponentLoaderManager.h \ + sdk/include/nsISupportsArray.h \ + sdk/include/nsICollection.h \ + sdk/include/nsISerializable.h \ + sdk/include/nsIEnumerator.h \ + sdk/include/nsISimpleEnumerator.h \ + sdk/include/nsIObserverService.h \ + sdk/include/nsIObserver.h \ + sdk/include/nsIAtom.h \ + sdk/include/nsIAtomService.h \ + sdk/include/nsIProperties.h \ + sdk/include/nsIPersistentProperties2.h \ + sdk/include/nsIRecyclingAllocator.h \ + sdk/include/nsIStringEnumerator.h \ + sdk/include/nsISupportsPrimitives.h \ + sdk/include/nsISupportsIterators.h \ + sdk/include/nsIVariant.h \ + sdk/include/nsITimelineService.h \ + sdk/include/nsIArray.h \ + sdk/include/nsIPropertyBag.h \ + sdk/include/nsIDirectoryService.h \ + sdk/include/nsIFile.h \ + sdk/include/nsILocalFile.h \ + sdk/include/nsIInputStream.h \ + sdk/include/nsIObjectInputStream.h \ + sdk/include/nsIBinaryInputStream.h \ + sdk/include/nsIObjectOutputStream.h \ + sdk/include/nsIBinaryOutputStream.h \ + sdk/include/nsIOutputStream.h \ + sdk/include/nsIStreamBufferAccess.h \ + sdk/include/nsIByteArrayInputStream.h \ + sdk/include/nsISeekableStream.h \ + sdk/include/nsIFastLoadFileControl.h \ + sdk/include/nsIFastLoadService.h \ + sdk/include/nsIInputStreamTee.h \ + sdk/include/nsIMultiplexInputStream.h \ + sdk/include/nsIPipe.h \ + sdk/include/nsIAsyncInputStream.h \ + sdk/include/nsIAsyncOutputStream.h \ + sdk/include/nsIScriptableInputStream.h \ + sdk/include/nsIStorageStream.h \ + sdk/include/nsIStringStream.h \ + sdk/include/nsILineInputStream.h \ + sdk/include/nsIProxyObjectManager.h \ + sdk/include/nsIEventQueueService.h \ + sdk/include/nsIEventQueue.h \ + sdk/include/nsIEventTarget.h \ + sdk/include/nsIRunnable.h \ + sdk/include/nsIThread.h \ + sdk/include/nsITimer.h \ + sdk/include/nsIEnvironment.h \ + sdk/include/nsITimerInternal.h \ + sdk/include/nsITimerManager.h \ + sdk/include/nsIProcess.h \ + sdk/include/nsIInterfaceInfo.h \ + sdk/include/nsIInterfaceInfoManager.h \ + sdk/include/nsIXPTLoader.h \ + sdk/include/ipcIService.h \ + sdk/include/ipcIMessageObserver.h \ + sdk/include/ipcIClientObserver.h \ + sdk/include/ipcILockService.h \ + sdk/include/ipcITransactionService.h \ + sdk/include/ipcIDConnectService.h \ + sdk/include/ipcITransactionObserver.h \ + sdk/include/VirtualBox_XPCOM.h \ + sdk/include/VBoxAuth.h \ + sdk/installer/build/lib/vboxapi/VirtualBox_constants.py + sdk/installer/build/lib/vboxapi/__init__.py + sdk/idl/ \ + sdk/idl/nsIDebug.idl \ + sdk/idl/nsIInterfaceRequestor.idl \ + sdk/idl/nsIMemory.idl \ + sdk/idl/nsIProgrammingLanguage.idl \ + sdk/idl/nsISupports.idl \ + sdk/idl/nsITraceRefcnt.idl \ + sdk/idl/nsIWeakReference.idl \ + sdk/idl/nsIConsoleMessage.idl \ + sdk/idl/nsIConsoleService.idl \ + sdk/idl/nsIConsoleListener.idl \ + sdk/idl/nsIErrorService.idl \ + sdk/idl/nsIException.idl \ + sdk/idl/nsIExceptionService.idl \ + sdk/idl/nsrootidl.idl \ + sdk/idl/nsIClassInfo.idl \ + sdk/idl/nsIComponentRegistrar.idl \ + sdk/idl/nsIFactory.idl \ + sdk/idl/nsIModule.idl \ + sdk/idl/nsIServiceManager.idl \ + sdk/idl/nsIComponentManager.idl \ + sdk/idl/nsICategoryManager.idl \ + sdk/idl/nsIComponentLoader.idl \ + sdk/idl/nsINativeComponentLoader.idl \ + sdk/idl/nsIComponentManagerObsolete.idl \ + sdk/idl/nsIComponentLoaderManager.idl \ + sdk/idl/nsISupportsArray.idl \ + sdk/idl/nsICollection.idl \ + sdk/idl/nsISerializable.idl \ + sdk/idl/nsIEnumerator.idl \ + sdk/idl/nsISimpleEnumerator.idl \ + sdk/idl/nsIObserverService.idl \ + sdk/idl/nsIObserver.idl \ + sdk/idl/nsIAtom.idl \ + sdk/idl/nsIAtomService.idl \ + sdk/idl/nsIProperties.idl \ + sdk/idl/nsIPersistentProperties2.idl \ + sdk/idl/nsIRecyclingAllocator.idl \ + sdk/idl/nsIStringEnumerator.idl \ + sdk/idl/nsISupportsPrimitives.idl \ + sdk/idl/nsISupportsIterators.idl \ + sdk/idl/nsIVariant.idl \ + sdk/idl/nsITimelineService.idl \ + sdk/idl/nsIArray.idl \ + sdk/idl/nsIPropertyBag.idl \ + sdk/idl/nsIDirectoryService.idl \ + sdk/idl/nsIFile.idl \ + sdk/idl/nsILocalFile.idl \ + sdk/idl/nsIInputStream.idl \ + sdk/idl/nsIObjectInputStream.idl \ + sdk/idl/nsIBinaryInputStream.idl \ + sdk/idl/nsIObjectOutputStream.idl \ + sdk/idl/nsIBinaryOutputStream.idl \ + sdk/idl/nsIOutputStream.idl \ + sdk/idl/nsIStreamBufferAccess.idl \ + sdk/idl/nsIByteArrayInputStream.idl \ + sdk/idl/nsISeekableStream.idl \ + sdk/idl/nsIFastLoadFileControl.idl \ + sdk/idl/nsIFastLoadService.idl \ + sdk/idl/nsIInputStreamTee.idl \ + sdk/idl/nsIMultiplexInputStream.idl \ + sdk/idl/nsIPipe.idl \ + sdk/idl/nsIAsyncInputStream.idl \ + sdk/idl/nsIAsyncOutputStream.idl \ + sdk/idl/nsIScriptableInputStream.idl \ + sdk/idl/nsIStorageStream.idl \ + sdk/idl/nsIStringStream.idl \ + sdk/idl/nsILineInputStream.idl \ + sdk/idl/nsIProxyObjectManager.idl \ + sdk/idl/nsIEventQueueService.idl \ + sdk/idl/nsIEventQueue.idl \ + sdk/idl/nsIEventTarget.idl \ + sdk/idl/nsIRunnable.idl \ + sdk/idl/nsIThread.idl \ + sdk/idl/nsITimer.idl \ + sdk/idl/nsIEnvironment.idl \ + sdk/idl/nsITimerInternal.idl \ + sdk/idl/nsITimerManager.idl \ + sdk/idl/nsIProcess.idl \ + sdk/idl/nsIInterfaceInfo.idl \ + sdk/idl/nsIInterfaceInfoManager.idl \ + sdk/idl/nsIXPTLoader.idl \ + sdk/idl/ipcIService.idl \ + sdk/idl/ipcIMessageObserver.idl \ + sdk/idl/ipcIClientObserver.idl \ + sdk/idl/ipcILockService.idl \ + sdk/idl/ipcITransactionService.idl \ + sdk/idl/ipcIDConnectService.idl \ + sdk/idl/ipcITransactionObserver.idl \ + sdk/idl/VirtualBox_XPCOM.idl \ + sdk/lib/ \ + sdk/lib/VBoxXPCOMGlue.a \ + sdk/webservice/vboxweb.wsdl \ + sdk/webservice/vboxwebService.wsdl \ + sdk/samples/ \ + sdk/samples/auth/ \ + sdk/samples/auth/pam.cpp \ + sdk/samples/API/ \ + sdk/samples/API/tstVBoxAPILinux.cpp \ + sdk/samples/API/makefile.tstVBoxAPILinux \ + sdk/samples/API/tstVBoxAPILinux \ + additions/VBoxGuestAdditions.iso \ + UserManual.pdf " diff --git a/src/VBox/Installer/linux/distributions_deb b/src/VBox/Installer/linux/distributions_deb new file mode 100644 index 00000000..c9762b9e --- /dev/null +++ b/src/VBox/Installer/linux/distributions_deb @@ -0,0 +1,16 @@ +_Debian_sid = DEBIAN_10_0 +_Debian_buster = DEBIAN_10_0 +_Debian_stretch = DEBIAN_9_0 +_Debian_jessie = DEBIAN_8_0 +_Debian_wheezy = DEBIAN_7_0 +_Debian_squeeze = DEBIAN_6_0 +_Ubuntu_jammy = UBUNTU_22_04 +_Ubuntu_eoan = UBUNTU_19_10 +_Ubuntu_bionic = UBUNTU_18_04 +_Ubuntu_xenial = UBUNTU_16_04 +_Ubuntu_wily = UBUNTU_15_10 +_Ubuntu_trusty = UBUNTU_14_04 +_Ubuntu_raring = UBUNTU_13_04 +_Ubuntu_quantal = UBUNTU_12_10 +_Ubuntu_precise = UBUNTU_12_04 +_Ubuntu_lucid = UBUNTU_10_04 diff --git a/src/VBox/Installer/linux/distributions_rpm b/src/VBox/Installer/linux/distributions_rpm new file mode 100644 index 00000000..d8033288 --- /dev/null +++ b/src/VBox/Installer/linux/distributions_rpm @@ -0,0 +1,37 @@ +openSUSETW = OPENSUSE_TW +openSUSE153 = OPENSUSE_15_3 +openSUSE150 = OPENSUSE_15_0 +openSUSE132 = OPENSUSE_13_2 +openSUSE131 = OPENSUSE_13_1 +openSUSE123 = OPENSUSE_12_3 +openSUSE114 = OPENSUSE_11_4 +openSUSE113 = OPENSUSE_11_3 +sles11.0 = SLES_11_0 +sles10.1 = SLES_10_1 +mdv2011.0 = MANDRIVA_2011_0 +fedora36 = FEDORA_36 +fedora35 = FEDORA_35 +fedora33 = FEDORA_33 +fedora32 = FEDORA_32 +fedora31 = FEDORA_31 +fedora29 = FEDORA_29 +fedora26 = FEDORA_26 +fedora25 = FEDORA_25 +fedora24 = FEDORA_24 +fedora22 = FEDORA_22 +fedora21 = FEDORA_21 +fedora20 = FEDORA_20 +fedora19 = FEDORA_19 +fedora18 = FEDORA_18 +fedora17 = FEDORA_17 +fedora16 = FEDORA_16 +fedora15 = FEDORA_15 +el9 = EL_9 +el8 = EL_8 +el7 = EL_7 +el6 = EL_6 +el5 = EL_5 +centos6 = E__6 +centos5 = EL_5 +ol6 = EL_6 +ol5 = EL_5 diff --git a/src/VBox/Installer/linux/install.sh b/src/VBox/Installer/linux/install.sh new file mode 100755 index 00000000..7f6f3709 --- /dev/null +++ b/src/VBox/Installer/linux/install.sh @@ -0,0 +1,448 @@ +#!/bin/sh +# +# Oracle VM VirtualBox +# VirtualBox linux installation script + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Testing: +# * After successful installation, 0 is returned if the vboxdrv module version +# built matches the one loaded. +# * If the kernel modules cannot be built (run the installer with KERN_VER=none) +# or loaded (run with KERN_VER=) +# then 1 is returned. + +PATH=$PATH:/bin:/sbin:/usr/sbin + +# Include routines and utilities needed by the installer +. ./routines.sh + +LOG="/var/log/vbox-install.log" +VERSION="_VERSION_" +SVNREV="_SVNREV_" +BUILD="_BUILD_" +ARCH="_ARCH_" +HARDENED="_HARDENED_" +# The "BUILD_" prefixes prevent the variables from being overwritten when we +# read the configuration from the previous installation. +BUILD_VBOX_KBUILD_TYPE="_BUILDTYPE_" +BUILD_USERNAME="_USERNAME_" +CONFIG_DIR="/etc/vbox" +CONFIG="vbox.cfg" +CONFIG_FILES="filelist" +DEFAULT_FILES=`pwd`/deffiles +GROUPNAME="vboxusers" +INSTALLATION_DIR="_INSTALLATION_DIR_" +LICENSE_ACCEPTED="" +PREV_INSTALLATION="" +PYTHON="_PYTHON_" +ACTION="" +SELF=$1 +RC_SCRIPT=0 +if [ -n "$HARDENED" ]; then + VBOXDRV_MODE=0600 + VBOXDRV_GRP="root" +else + VBOXDRV_MODE=0660 + VBOXDRV_GRP=$GROUPNAME +fi +VBOXUSB_MODE=0664 +VBOXUSB_GRP=$GROUPNAME + +## Were we able to stop any previously running Additions kernel modules? +MODULES_STOPPED=1 + + +############################################################################## +# Helper routines # +############################################################################## + +usage() { + info "" + info "Usage: install | uninstall" + info "" + info "Example:" + info "$SELF install" + exit 1 +} + +module_loaded() { + lsmod | grep -q "vboxdrv[^_-]" +} + +# This routine makes sure that there is no previous installation of +# VirtualBox other than one installed using this install script or a +# compatible method. We do this by checking for any of the VirtualBox +# applications in /usr/bin. If these exist and are not symlinks into +# the installation directory, then we assume that they are from an +# incompatible previous installation. + +## Helper routine: test for a particular VirtualBox binary and see if it +## is a link into a previous installation directory +## +## Arguments: 1) the binary to search for and +## 2) the installation directory (if any) +## Returns: false if an incompatible version was detected, true otherwise +check_binary() { + binary=$1 + install_dir=$2 + test ! -e $binary 2>&1 > /dev/null || + ( test -n "$install_dir" && + readlink $binary 2>/dev/null | grep "$install_dir" > /dev/null + ) +} + +## Main routine +## +## Argument: the directory where the previous installation should be +## located. If this is empty, then we will assume that any +## installation of VirtualBox found is incompatible with this one. +## Returns: false if an incompatible installation was found, true otherwise +check_previous() { + install_dir=$1 + # These should all be symlinks into the installation folder + check_binary "/usr/bin/VirtualBox" "$install_dir" && + check_binary "/usr/bin/VBoxManage" "$install_dir" && + check_binary "/usr/bin/VBoxSDL" "$install_dir" && + check_binary "/usr/bin/VBoxVRDP" "$install_dir" && + check_binary "/usr/bin/VBoxHeadless" "$install_dir" && + check_binary "/usr/bin/VBoxDTrace" "$install_dir" && + check_binary "/usr/bin/VBoxBugReport" "$install_dir" && + check_binary "/usr/bin/VBoxBalloonCtrl" "$install_dir" && + check_binary "/usr/bin/VBoxAutostart" "$install_dir" && + check_binary "/usr/bin/vboxwebsrv" "$install_dir" && + check_binary "/usr/bin/vbox-img" "$install_dir" && + check_binary "/usr/bin/vboximg-mount" "$install_dir" && + check_binary "/sbin/rcvboxdrv" "$install_dir" +} + +############################################################################## +# Main script # +############################################################################## + +info "VirtualBox Version $VERSION r$SVNREV ($BUILD) installer" + + +# Make sure that we were invoked as root... +check_root + +# Set up logging before anything else +create_log $LOG + +log "VirtualBox $VERSION r$SVNREV installer, built $BUILD." +log "" +log "Testing system setup..." + +# Sanity check: figure out whether build arch matches uname arch +cpu=`uname -m`; +case "$cpu" in + i[3456789]86|x86) + cpu="x86" + ;; + x86_64) + cpu="amd64" + ;; +esac +if [ "$cpu" != "$ARCH" ]; then + info "Detected unsupported $cpu environment." + log "Detected unsupported $cpu environment." + exit 1 +fi + +# Sensible default actions +ACTION="install" +BUILD_MODULE="true" +unset FORCE_UPGRADE +while true +do + if [ "$2" = "" ]; then + break + fi + shift + case "$1" in + install|--install) + ACTION="install" + ;; + + uninstall|--uninstall) + ACTION="uninstall" + ;; + + force|--force) + FORCE_UPGRADE=1 + ;; + license_accepted_unconditionally|--license_accepted_unconditionally) + # Legacy option + ;; + no_module|--no_module) + BUILD_MODULE="" + ;; + *) + if [ "$ACTION" = "" ]; then + info "Unknown command '$1'." + usage + fi + info "Specifying an installation path is not allowed -- using _INSTALLATION_DIR_!" + ;; + esac +done + +if [ "$ACTION" = "install" ]; then + # Choose a proper umask + umask 022 + + # Find previous installation + if test -r "$CONFIG_DIR/$CONFIG"; then + . $CONFIG_DIR/$CONFIG + PREV_INSTALLATION=$INSTALL_DIR + fi + if ! check_previous $INSTALL_DIR && test -z "$FORCE_UPGRADE" + then + info + info "You appear to have a version of VirtualBox on your system which was installed" + info "from a different source or using a different type of installer (or a damaged" + info "installation of VirtualBox). We strongly recommend that you remove it before" + info "installing this version of VirtualBox." + info + info "Do you wish to continue anyway? [yes or no]" + read reply dummy + if ! expr "$reply" : [yY] && ! expr "$reply" : [yY][eE][sS] + then + info + info "Cancelling installation." + log "User requested cancellation of the installation" + exit 1 + fi + fi + + # Do additional clean-up in case some-one is running from a build folder. + ./prerm-common.sh || exit 1 + + # Remove previous installation + test "${BUILD_MODULE}" = true || VBOX_DONT_REMOVE_OLD_MODULES=1 + + if [ -n "$PREV_INSTALLATION" ]; then + [ -n "$INSTALL_REV" ] && INSTALL_REV=" r$INSTALL_REV" + info "Removing previous installation of VirtualBox $INSTALL_VER$INSTALL_REV from $PREV_INSTALLATION" + log "Removing previous installation of VirtualBox $INSTALL_VER$INSTALL_REV from $PREV_INSTALLATION" + log "" + + VBOX_NO_UNINSTALL_MESSAGE=1 + # This also checks $BUILD_MODULE and $VBOX_DONT_REMOVE_OLD_MODULES + . ./uninstall.sh + fi + + mkdir -p -m 755 $CONFIG_DIR + touch $CONFIG_DIR/$CONFIG + + info "Installing VirtualBox to $INSTALLATION_DIR" + log "Installing VirtualBox to $INSTALLATION_DIR" + log "" + + # Verify the archive + mkdir -p -m 755 $INSTALLATION_DIR + bzip2 -d -c VirtualBox.tar.bz2 > VirtualBox.tar + if ! tar -tf VirtualBox.tar > $CONFIG_DIR/$CONFIG_FILES; then + rmdir $INSTALLATION_DIR 2> /dev/null + rm -f $CONFIG_DIR/$CONFIG 2> /dev/null + rm -f $CONFIG_DIR/$CONFIG_FILES 2> /dev/null + log 'Error running "bzip2 -d -c VirtualBox.tar.bz2" or "tar -tf VirtualBox.tar".' + abort "Error installing VirtualBox. Installation aborted" + fi + + # Create installation directory and install + if ! tar -xf VirtualBox.tar -C $INSTALLATION_DIR; then + cwd=`pwd` + cd $INSTALLATION_DIR + rm -f `cat $CONFIG_DIR/$CONFIG_FILES` 2> /dev/null + cd $pwd + rmdir $INSTALLATION_DIR 2> /dev/null + rm -f $CONFIG_DIR/$CONFIG 2> /dev/null + log 'Error running "tar -xf VirtualBox.tar -C '"$INSTALLATION_DIR"'".' + abort "Error installing VirtualBox. Installation aborted" + fi + + cp uninstall.sh $INSTALLATION_DIR + echo "uninstall.sh" >> $CONFIG_DIR/$CONFIG_FILES + + # Hardened build: Mark selected binaries set-user-ID-on-execution, + # create symlinks for working around unsupported $ORIGIN/.. in VBoxC.so (setuid), + # and finally make sure the directory is only writable by the user (paranoid). + if [ -n "$HARDENED" ]; then + if [ -f $INSTALLATION_DIR/VirtualBoxVM ]; then + test -e $INSTALLATION_DIR/VirtualBoxVM && chmod 4511 $INSTALLATION_DIR/VirtualBoxVM + else + test -e $INSTALLATION_DIR/VirtualBox && chmod 4511 $INSTALLATION_DIR/VirtualBox + fi + test -e $INSTALLATION_DIR/VBoxSDL && chmod 4511 $INSTALLATION_DIR/VBoxSDL + test -e $INSTALLATION_DIR/VBoxHeadless && chmod 4511 $INSTALLATION_DIR/VBoxHeadless + test -e $INSTALLATION_DIR/VBoxNetDHCP && chmod 4511 $INSTALLATION_DIR/VBoxNetDHCP + test -e $INSTALLATION_DIR/VBoxNetNAT && chmod 4511 $INSTALLATION_DIR/VBoxNetNAT + + ln -sf $INSTALLATION_DIR/VBoxVMM.so $INSTALLATION_DIR/components/VBoxVMM.so + ln -sf $INSTALLATION_DIR/VBoxRT.so $INSTALLATION_DIR/components/VBoxRT.so + + chmod go-w $INSTALLATION_DIR + fi + + # This binaries need to be suid root in any case, even if not hardened + test -e $INSTALLATION_DIR/VBoxNetAdpCtl && chmod 4511 $INSTALLATION_DIR/VBoxNetAdpCtl + test -e $INSTALLATION_DIR/VBoxVolInfo && chmod 4511 $INSTALLATION_DIR/VBoxVolInfo + + # Write the configuration. Needs to be done before the vboxdrv service is + # started. + echo "# VirtualBox installation directory" > $CONFIG_DIR/$CONFIG + echo "INSTALL_DIR='$INSTALLATION_DIR'" >> $CONFIG_DIR/$CONFIG + echo "# VirtualBox version" >> $CONFIG_DIR/$CONFIG + echo "INSTALL_VER='$VERSION'" >> $CONFIG_DIR/$CONFIG + echo "INSTALL_REV='$SVNREV'" >> $CONFIG_DIR/$CONFIG + echo "# Build type and user name for logging purposes" >> $CONFIG_DIR/$CONFIG + echo "VBOX_KBUILD_TYPE='$BUILD_VBOX_KBUILD_TYPE'" >> $CONFIG_DIR/$CONFIG + echo "USERNAME='$BUILD_USERNAME'" >> $CONFIG_DIR/$CONFIG + + # Create users group + groupadd -r -f $GROUPNAME 2> /dev/null + + # Create symlinks to start binaries + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VirtualBox + if [ -f $INSTALLATION_DIR/VirtualBoxVM ]; then + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VirtualBoxVM + fi + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxManage + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxSDL + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxVRDP + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxHeadless + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxBalloonCtrl + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxBugReport + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxAutostart + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/vboxwebsrv + ln -sf $INSTALLATION_DIR/vbox-img /usr/bin/vbox-img + ln -sf $INSTALLATION_DIR/vboximg-mount /usr/bin/vboximg-mount + if [ -d /usr/share/pixmaps/ ]; then + ln -sf $INSTALLATION_DIR/VBox.png /usr/share/pixmaps/VBox.png + fi + if [ -f $INSTALLATION_DIR/VBoxDTrace ]; then + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxDTrace + fi + if [ -f $INSTALLATION_DIR/VBoxAudioTest ]; then + ln -sf $INSTALLATION_DIR/VBox.sh /usr/bin/VBoxAudioTest + fi + # Unity and Nautilus seem to look here for their icons + if [ -d /usr/share/pixmaps/ ]; then + ln -sf $INSTALLATION_DIR/icons/128x128/virtualbox.png /usr/share/pixmaps/virtualbox.png + fi + if [ -d /usr/share/applications/ ]; then + ln -sf $INSTALLATION_DIR/virtualbox.desktop /usr/share/applications/virtualbox.desktop + ln -sf $INSTALLATION_DIR/virtualboxvm.desktop /usr/share/applications/virtualboxvm.desktop + fi + if [ -d /usr/share/mime/packages/ ]; then + ln -sf $INSTALLATION_DIR/virtualbox.xml /usr/share/mime/packages/virtualbox.xml + fi + ln -sf $INSTALLATION_DIR/src/vboxhost /usr/src/vboxhost-_VERSION_ + + # Convenience symlinks. The creation fails if the FS is not case sensitive + ln -sf VirtualBox /usr/bin/virtualbox > /dev/null 2>&1 + if [ -f $INSTALLATION_DIR/VirtualBoxVM ]; then + ln -sf VirtualBoxVM /usr/bin/virtualboxvm > /dev/null 2>&1 + fi + ln -sf VBoxManage /usr/bin/vboxmanage > /dev/null 2>&1 + ln -sf VBoxSDL /usr/bin/vboxsdl > /dev/null 2>&1 + ln -sf VBoxHeadless /usr/bin/vboxheadless > /dev/null 2>&1 + ln -sf VBoxBugReport /usr/bin/vboxbugreport > /dev/null 2>&1 + if [ -f $INSTALLATION_DIR/VBoxDTrace ]; then + ln -sf VBoxDTrace /usr/bin/vboxdtrace > /dev/null 2>&1 + fi + if [ -f $INSTALLATION_DIR/VBoxAudioTest ]; then + ln -sf VBoxAudioTest /usr/bin/vboxaudiotest > /dev/null 2>&1 + fi + + # Icons + cur=`pwd` + cd $INSTALLATION_DIR/icons + for i in *; do + cd $i + if [ -d /usr/share/icons/hicolor/$i ]; then + for j in *; do + if expr "$j" : "virtualbox\..*" > /dev/null; then + dst=apps + else + dst=mimetypes + fi + if [ -d /usr/share/icons/hicolor/$i/$dst ]; then + ln -s $INSTALLATION_DIR/icons/$i/$j /usr/share/icons/hicolor/$i/$dst/$j + echo /usr/share/icons/hicolor/$i/$dst/$j >> $CONFIG_DIR/$CONFIG_FILES + fi + done + fi + cd - + done + cd $cur + + # Update the MIME database + update-mime-database /usr/share/mime 2>/dev/null + + # Update the desktop database + update-desktop-database -q 2>/dev/null + + # If Python is available, install Python bindings + if [ -n "$PYTHON" ]; then + maybe_run_python_bindings_installer $INSTALLATION_DIR $CONFIG_DIR $CONFIG_FILES + fi + + # Do post-installation common to all installer types, currently service + # script set-up. + if test "${BUILD_MODULE}" = "true"; then + START_SERVICES= + else + START_SERVICES="--nostart" + fi + "${INSTALLATION_DIR}/prerm-common.sh" >> "${LOG}" + + # Now check whether the kernel modules were stopped. + lsmod | grep -q vboxdrv && MODULES_STOPPED= + + "${INSTALLATION_DIR}/postinst-common.sh" ${START_SERVICES} >> "${LOG}" + + info "" + info "VirtualBox has been installed successfully." + info "" + info "You will find useful information about using VirtualBox in the user manual" + info " $INSTALLATION_DIR/UserManual.pdf" + info "and in the user FAQ" + info " http://www.virtualbox.org/wiki/User_FAQ" + info "" + info "We hope that you enjoy using VirtualBox." + info "" + + # And do a final test as to whether the kernel modules were properly created + # and loaded. Return 0 if both are true, 1 if not. + test -n "${MODULES_STOPPED}" && + modinfo vboxdrv >/dev/null 2>&1 && + lsmod | grep -q vboxdrv || + abort "The installation log file is at ${LOG}." + + log "Installation successful" +elif [ "$ACTION" = "uninstall" ]; then + . ./uninstall.sh +fi +exit $RC_SCRIPT diff --git a/src/VBox/Installer/linux/postinst-common.sh b/src/VBox/Installer/linux/postinst-common.sh new file mode 100755 index 00000000..3cd947fa --- /dev/null +++ b/src/VBox/Installer/linux/postinst-common.sh @@ -0,0 +1,125 @@ +#!/bin/sh +# $Id: postinst-common.sh $ +## @file +# Oracle VM VirtualBox +# VirtualBox Linux post-installer common portions +# + +# +# Copyright (C) 2015-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Put bits of the post-installation here which should work the same for all of +# the Linux installers. We do not use special helpers (e.g. dh_* on Debian), +# but that should not matter, as we know what those helpers actually do, and we +# have to work on those systems anyway when installed using the all +# distributions installer. +# +# We assume that all required files are in the same folder as this script +# (e.g. /opt/VirtualBox, /usr/lib/VirtualBox, the build output directory). + +# The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. +TARGET=`readlink -e -- "${0}"` || exit 1 +MY_PATH="${TARGET%/[!/]*}" +cd "${MY_PATH}" +. "./routines.sh" + +START=true +while test -n "${1}"; do + case "${1}" in + --nostart) + START= + ;; + *) + echo "Bad argument ${1}" >&2 + exit 1 + ;; + esac + shift +done + +# Remove any traces of DKMS from previous installations. +for i in vboxhost vboxdrv vboxnetflt vboxnetadp; do + rm -rf "/var/lib/dkms/${i}"* +done + +# Install runlevel scripts and systemd unit files +install_init_script "${MY_PATH}/vboxdrv.sh" vboxdrv +install_init_script "${MY_PATH}/vboxballoonctrl-service.sh" vboxballoonctrl-service +install_init_script "${MY_PATH}/vboxautostart-service.sh" vboxautostart-service +install_init_script "${MY_PATH}/vboxweb-service.sh" vboxweb-service +finish_init_script_install + +delrunlevel vboxdrv +addrunlevel vboxdrv +delrunlevel vboxballoonctrl-service +addrunlevel vboxballoonctrl-service +delrunlevel vboxautostart-service +addrunlevel vboxautostart-service +delrunlevel vboxweb-service +addrunlevel vboxweb-service + +ln -sf "${MY_PATH}/postinst-common.sh" /sbin/vboxconfig + +# Set SELinux permissions +# XXX SELinux: allow text relocation entries +if [ -x /usr/bin/chcon ]; then + chcon -t texrel_shlib_t "${MY_PATH}"/*VBox* > /dev/null 2>&1 + chcon -t texrel_shlib_t "${MY_PATH}"/VBoxAuth.so \ + > /dev/null 2>&1 + chcon -t texrel_shlib_t "${MY_PATH}"/VirtualBox.so \ + > /dev/null 2>&1 + chcon -t texrel_shlib_t "${MY_PATH}"/components/VBox*.so \ + > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VirtualBox > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VBoxSDL > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VBoxHeadless \ + > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VBoxNetDHCP \ + > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VBoxNetNAT \ + > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/VBoxExtPackHelperApp \ + > /dev/null 2>&1 + chcon -t java_exec_t "${MY_PATH}"/vboxwebsrv > /dev/null 2>&1 + chcon -t bin_t "${MY_PATH}"/src/vboxhost/build_in_tmp \ + > /dev/null 2>&1 + chcon -t bin_t /usr/share/virtualbox/src/vboxhost/build_in_tmp \ + > /dev/null 2>&1 +fi + +test -n "${START}" && +{ + if ! "${MY_PATH}/vboxdrv.sh" setup; then + "${MY_PATH}/check_module_dependencies.sh" >&2 + echo >&2 + echo "There were problems setting up VirtualBox. To re-start the set-up process, run" >&2 + echo " /sbin/vboxconfig" >&2 + echo "as root. If your system is using EFI Secure Boot you may need to sign the" >&2 + echo "kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load" >&2 + echo "them. Please see your Linux system's documentation for more information." >&2 + else + start_init_script vboxdrv + start_init_script vboxballoonctrl-service + start_init_script vboxautostart-service + start_init_script vboxweb-service + fi +} diff --git a/src/VBox/Installer/linux/prerm-common.sh b/src/VBox/Installer/linux/prerm-common.sh new file mode 100755 index 00000000..522e950d --- /dev/null +++ b/src/VBox/Installer/linux/prerm-common.sh @@ -0,0 +1,81 @@ +#!/bin/sh +# $Id: prerm-common.sh $ +## @file +# Oracle VM VirtualBox +# VirtualBox Linux pre-uninstaller common portions +# + +# +# Copyright (C) 2015-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Put bits of the pre-uninstallation here which should work the same for all of +# the Linux installers. We do not use special helpers (e.g. dh_* on Debian), +# but that should not matter, as we know what those helpers actually do, and we +# have to work on those systems anyway when installed using the all +# distributions installer. +# +# We assume that all required files are in the same folder as this script +# (e.g. /opt/VirtualBox, /usr/lib/VirtualBox, the build output directory). +# +# Script exit status: 0 on success, 1 if VirtualBox is running and can not be +# stopped (installers may show an error themselves or just pass on standard +# error). + + +# The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. +TARGET=`readlink -e -- "${0}"` || exit 1 +MY_PATH="${TARGET%/[!/]*}" +cd "${MY_PATH}" +. "./routines.sh" + +# Stop the ballon control service +stop_init_script vboxballoonctrl-service >/dev/null 2>&1 +# Stop the autostart service +stop_init_script vboxautostart-service >/dev/null 2>&1 +# Stop the web service +stop_init_script vboxweb-service >/dev/null 2>&1 +# Do this check here after we terminated the web service: check whether VBoxSVC +# is running and exit if it can't be stopped. +check_running +# Terminate VBoxNetDHCP if running +terminate_proc VBoxNetDHCP +# Terminate VBoxNetNAT if running +terminate_proc VBoxNetNAT +delrunlevel vboxballoonctrl-service +remove_init_script vboxballoonctrl-service +delrunlevel vboxautostart-service +remove_init_script vboxautostart-service +delrunlevel vboxweb-service +remove_init_script vboxweb-service +# Stop kernel module and uninstall runlevel script +stop_init_script vboxdrv >/dev/null 2>&1 +delrunlevel vboxdrv +remove_init_script vboxdrv +# And do final clean-up +"${MY_PATH}/vboxdrv.sh" cleanup >/dev/null # Do not silence errors for now +# Stop host networking and uninstall runlevel script (obsolete) +stop_init_script vboxnet >/dev/null 2>&1 +delrunlevel vboxnet >/dev/null 2>&1 +remove_init_script vboxnet >/dev/null 2>&1 +finish_init_script_install +rm -f /sbin/vboxconfig +exit 0 diff --git a/src/VBox/Installer/linux/routines.sh b/src/VBox/Installer/linux/routines.sh new file mode 100644 index 00000000..08e06358 --- /dev/null +++ b/src/VBox/Installer/linux/routines.sh @@ -0,0 +1,473 @@ +# $Id: routines.sh $ +# Oracle VM VirtualBox +# VirtualBox installer shell routines +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +ro_LOG_FILE="" +ro_X11_AUTOSTART="/etc/xdg/autostart" +ro_KDE_AUTOSTART="/usr/share/autostart" + +## Aborts the script and prints an error message to stderr. +# +# syntax: abort message + +abort() +{ + echo 1>&2 "$1" + exit 1 +} + +## Creates an empty log file and remembers the name for future logging +# operations +create_log() +{ + ## The path of the file to create. + ro_LOG_FILE="$1" + if [ "$ro_LOG_FILE" = "" ]; then + abort "create_log called without an argument! Aborting..." + fi + # Create an empty file + echo > "$ro_LOG_FILE" 2> /dev/null + if [ ! -f "$ro_LOG_FILE" -o "`cat "$ro_LOG_FILE"`" != "" ]; then + abort "Error creating log file! Aborting..." + fi +} + +## Writes text to standard error, as standard output is masked. +# +# Syntax: info text +info() +{ + echo 1>&2 "$1" +} + +## Copies standard input to standard error, as standard output is masked. +# +# Syntax: info text +catinfo() +{ + cat 1>&2 +} + +## Writes text to the log file +# +# Syntax: log text +log() +{ + if [ "$ro_LOG_FILE" = "" ]; then + abort "Error! Logging has not been set up yet! Aborting..." + fi + echo "$1" >> $ro_LOG_FILE + return 0 +} + +## Writes test to standard output and to the log file +# +# Syntax: infolog text +infolog() +{ + info "$1" + log "$1" +} + +## Checks whether a module is loaded with a given string in its name. +# +# syntax: module_loaded string +module_loaded() +{ + if [ "$1" = "" ]; then + log "module_loaded called without an argument. Aborting..." + abort "Error in installer. Aborting..." + fi + lsmod | grep -q $1 +} + +## Abort if we are not running as root +check_root() +{ + if [ `id -u` -ne 0 ]; then + abort "This program must be run with administrator privileges. Aborting" + fi +} + +## Abort if dependencies are not found +check_deps() +{ + for i in ${@}; do + type "${i}" >/dev/null 2>&1 || + abort "${i} not found. Please install: ${*}; and try again." + done +} + +## Abort if a copy of VirtualBox is already running +check_running() +{ + VBOXSVC_PID=`pidof VBoxSVC 2> /dev/null` + if [ -n "$VBOXSVC_PID" ]; then + if [ -f /etc/init.d/vboxweb-service ]; then + kill -USR1 $VBOXSVC_PID + fi + sleep 1 + if pidof VBoxSVC > /dev/null 2>&1; then + echo 1>&2 "A copy of VirtualBox is currently running. Please close it and try again." + abort "Please note that it can take up to ten seconds for VirtualBox to finish running." + fi + fi +} + +## Creates a systemd wrapper in /lib for an LSB init script +systemd_wrap_init_script() +{ + self="systemd_wrap_init_script" + ## The init script to be installed. The file may be copied or referenced. + script="$(readlink -f -- "${1}")" + ## Name for the service. + name="$2" + test -x "$script" && test ! "$name" = "" || \ + { echo "$self: invalid arguments" >&2 && return 1; } + test -d /usr/lib/systemd/system && unit_path=/usr/lib/systemd/system + test -d /lib/systemd/system && unit_path=/lib/systemd/system + test -n "${unit_path}" || \ + { echo "$self: systemd unit path not found" >&2 && return 1; } + conflicts=`sed -n 's/# *X-Conflicts-With: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'` + description=`sed -n 's/# *Short-Description: *\(.*\)/\1/p' "${script}"` + required=`sed -n 's/# *Required-Start: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'` + required_target=`sed -n 's/# *X-Required-Target-Start: *\(.*\)/\1/p' "${script}"` + startbefore=`sed -n 's/# *X-Start-Before: *\(.*\)/\1/p' "${script}" | sed 's/\$[a-z]*//'` + runlevels=`sed -n 's/# *Default-Start: *\(.*\)/\1/p' "${script}"` + servicetype=`sed -n 's/# *X-Service-Type: *\(.*\)/\1/p' "${script}"` + test -z "${servicetype}" && servicetype="forking" + targets=`for i in ${runlevels}; do printf "runlevel${i}.target "; done` + before=`for i in ${startbefore}; do printf "${i}.service "; done` + after=`for i in ${required_target}; do printf "${i}.target "; done; for i in ${required}; do printf "${i}.service "; done` + cat > "${unit_path}/${name}.service" << EOF +[Unit] +SourcePath=${script} +Description=${description} +Before=${targets}shutdown.target ${before} +After=${after} +Conflicts=shutdown.target ${conflicts} + +[Service] +Type=${servicetype} +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +ExecStart=${script} start +ExecStop=${script} stop + +[Install] +WantedBy=multi-user.target +EOF +} + +# Checks if systemd is the init system of choice +use_systemd() +{ + # First condition is what halfway recent systemd uses itself, and the + # other two checks should cover everything back to v1. + test -e /run/systemd/system || test -e /sys/fs/cgroup/systemd || test -e /cgroup/systemd +} + +## Installs a file containing a shell script as an init script. Call +# finish_init_script_install when all scripts have been installed. +install_init_script() +{ + self="install_init_script" + ## The init script to be installed. The file may be copied or referenced. + script="$1" + ## Name for the service. + name="$2" + + test -x "${script}" && test ! "${name}" = "" || + { echo "${self}: invalid arguments" >&2; return 1; } + # Do not unconditionally silence the following "ln". + test -L "/sbin/rc${name}" && rm "/sbin/rc${name}" + ln -s "${script}" "/sbin/rc${name}" + if test -x "`which systemctl 2>/dev/null`"; then + if use_systemd; then + { systemd_wrap_init_script "$script" "$name"; return; } + fi + fi + if test -d /etc/rc.d/init.d; then + cp "${script}" "/etc/rc.d/init.d/${name}" && + chmod 755 "/etc/rc.d/init.d/${name}" + elif test -d /etc/init.d; then + cp "${script}" "/etc/init.d/${name}" && + chmod 755 "/etc/init.d/${name}" + else + { echo "${self}: error: unknown init type" >&2; return 1; } + fi +} + +## Remove the init script "name" +remove_init_script() +{ + self="remove_init_script" + ## Name of the service to remove. + name="$1" + + test -n "${name}" || + { echo "$self: missing argument"; return 1; } + rm -f "/sbin/rc${name}" + rm -f /lib/systemd/system/"$name".service /usr/lib/systemd/system/"$name".service + rm -f "/etc/rc.d/init.d/$name" + rm -f "/etc/init.d/$name" +} + +## Tell systemd services have been installed or removed. Should not be done +# after each individual one, as systemd can crash if it is done too often +# (reported by the OL team for OL 7.6, may not apply to other versions.) +finish_init_script_install() +{ + if use_systemd; then + systemctl daemon-reload + fi +} + +## Did we install a systemd service? +systemd_service_installed() +{ + ## Name of service to test. + name="${1}" + + test -f /lib/systemd/system/"${name}".service || + test -f /usr/lib/systemd/system/"${name}".service +} + +## Perform an action on a service +do_sysvinit_action() +{ + self="do_sysvinit_action" + ## Name of service to start. + name="${1}" + ## The action to perform, normally "start", "stop" or "status". + action="${2}" + + test ! -z "${name}" && test ! -z "${action}" || + { echo "${self}: missing argument" >&2; return 1; } + if systemd_service_installed "${name}"; then + systemctl -q ${action} "${name}" + elif test -x "/etc/rc.d/init.d/${name}"; then + "/etc/rc.d/init.d/${name}" "${action}" quiet + elif test -x "/etc/init.d/${name}"; then + "/etc/init.d/${name}" "${action}" quiet + fi +} + +## Start a service +start_init_script() +{ + do_sysvinit_action "${1}" start +} + +## Stop the init script "name" +stop_init_script() +{ + do_sysvinit_action "${1}" stop +} + +## Extract chkconfig information from a sysvinit script. +get_chkconfig_info() +{ + ## The script to extract the information from. + script="${1}" + + set `sed -n 's/# *chkconfig: *\([0-9]*\) *\(.*\)/\1 \2/p' "${script}"` + ## Which runlevels should we start in? + runlevels="${1}" + ## How soon in the boot process will we start, from 00 (first) to 99 + start_order="${2}" + ## How soon in the shutdown process will we stop, from 99 (first) to 00 + stop_order="${3}" + test ! -z "${name}" || \ + { echo "${self}: missing name" >&2; return 1; } + expr "${start_order}" + 0 > /dev/null 2>&1 && \ + expr 0 \<= "${start_order}" > /dev/null 2>&1 && \ + test `expr length "${start_order}"` -eq 2 > /dev/null 2>&1 || \ + { echo "${self}: start sequence number must be between 00 and 99" >&2; + return 1; } + expr "${stop_order}" + 0 > /dev/null 2>&1 && \ + expr 0 \<= "${stop_order}" > /dev/null 2>&1 && \ + test `expr length "${stop_order}"` -eq 2 > /dev/null 2>&1 || \ + { echo "${self}: stop sequence number must be between 00 and 99" >&2; + return 1; } +} + +## Add a service to its default runlevels (annotated inside the script, see get_chkconfig_info). +addrunlevel() +{ + self="addrunlevel" + ## Service name. + name="${1}" + + test -n "${name}" || \ + { echo "${self}: missing argument" >&2; return 1; } + systemd_service_installed "${name}" && \ + { systemctl -q enable "${name}"; return; } + if test -x "/etc/rc.d/init.d/${name}"; then + init_d_path=/etc/rc.d + elif test -x "/etc/init.d/${name}"; then + init_d_path=/etc + else + { echo "${self}: error: unknown init type" >&2; return 1; } + fi + get_chkconfig_info "${init_d_path}/init.d/${name}" || return 1 + # Redhat based sysvinit systems + if test -x "`which chkconfig 2>/dev/null`"; then + chkconfig --add "${name}" + # SUSE-based sysvinit systems + elif test -x "`which insserv 2>/dev/null`"; then + insserv "${name}" + # Debian/Ubuntu-based systems + elif test -x "`which update-rc.d 2>/dev/null`"; then + # Old Debians did not support dependencies + update-rc.d "${name}" defaults "${start_order}" "${stop_order}" + # Gentoo Linux + elif test -x "`which rc-update 2>/dev/null`"; then + rc-update add "${name}" default + # Generic sysvinit + elif test -n "${init_d_path}/rc0.d" + then + for locali in 0 1 2 3 4 5 6 + do + target="${init_d_path}/rc${locali}.d/K${stop_order}${name}" + expr "${runlevels}" : ".*${locali}" >/dev/null && \ + target="${init_d_path}/rc${locali}.d/S${start_order}${name}" + test -e "${init_d_path}/rc${locali}.d/"[KS][0-9]*"${name}" || \ + ln -fs "${init_d_path}/init.d/${name}" "${target}" + done + else + { echo "${self}: error: unknown init type" >&2; return 1; } + fi +} + + +## Delete a service from a runlevel +delrunlevel() +{ + self="delrunlevel" + ## Service name. + name="${1}" + + test -n "${name}" || + { echo "${self}: missing argument" >&2; return 1; } + systemctl -q disable "${name}" >/dev/null 2>&1 + # Redhat-based systems + chkconfig --del "${name}" >/dev/null 2>&1 + # SUSE-based sysvinit systems + insserv -r "${name}" >/dev/null 2>&1 + # Debian/Ubuntu-based systems + update-rc.d -f "${name}" remove >/dev/null 2>&1 + # Gentoo Linux + rc-update del "${name}" >/dev/null 2>&1 + # Generic sysvinit + rm -f /etc/rc.d/rc?.d/[SK]??"${name}" + rm -f /etc/rc?.d/[SK]??"${name}" +} + + +terminate_proc() { + PROC_NAME="${1}" + SERVER_PID=`pidof $PROC_NAME 2> /dev/null` + if [ "$SERVER_PID" != "" ]; then + killall -TERM $PROC_NAME > /dev/null 2>&1 + sleep 2 + fi +} + + +# install_python_bindings(pythonbin pythondesc) +# failure: non fatal +install_python_bindings() +{ + pythonbin="$1" + pythondesc="$2" + + # The python binary might not be there, so just exit silently + if test -z "$pythonbin"; then + return 0 + fi + + if test -z "$pythondesc"; then + echo 1>&2 "missing argument to install_python_bindings" + return 1 + fi + + echo 1>&2 "Python found: $pythonbin, installing bindings..." + + # check if python has working distutils + "$pythonbin" -c "from distutils.core import setup" > /dev/null 2>&1 + if test "$?" -ne 0; then + echo 1>&2 "Skipped: $pythondesc install is unusable, missing package 'distutils'" + return 0 + fi + + # Pass install path via environment + export VBOX_INSTALL_PATH + $SHELL -c "cd $VBOX_INSTALL_PATH/sdk/installer && $pythonbin vboxapisetup.py install \ + --record $CONFIG_DIR/python-$CONFIG_FILES" + cat $CONFIG_DIR/python-$CONFIG_FILES >> $CONFIG_DIR/$CONFIG_FILES + rm -f $CONFIG_DIR/python-$CONFIG_FILES + + # Remove files created by Python API setup. + rm -rf $VBOX_INSTALL_PATH/sdk/installer/build +} + +maybe_run_python_bindings_installer() { + VBOX_INSTALL_PATH="${1}" + + # Loop over all usual suspect Python executable names and try installing + # the VirtualBox API bindings. Needs to prevent double installs which waste + # quite a bit of time. + PYTHONS="" + for p in python2.6 python2.7 python2 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 python3.9 python3.10 python3 python; do + if [ "`$p -c 'import sys +if sys.version_info >= (2, 6) and (sys.version_info < (3, 0) or sys.version_info >= (3, 3)): + print(\"test\")' 2> /dev/null`" != "test" ]; then + continue + fi + # Get python major/minor version, and skip if it was already covered. + # Uses grep -F to avoid trouble with '.' matching any char. + pyvers="`$p -c 'import sys +print("%s.%s" % (sys.version_info[0], sys.version_info[1]))' 2> /dev/null`" + if echo "$PYTHONS" | grep -Fq ":$pyvers:"; then + continue + fi + # Record which version will be installed. If it fails there is no point + # trying with different executable/symlink reporting the same version. + PYTHONS="$PYTHONS:$pyvers:" + install_python_bindings "$p" "Python $pyvers" + done + if [ -z "$PYTHONS" ]; then + echo 1>&2 "Python (2.6, 2.7 or 3.3 and later) unavailable, skipping bindings installation." + return 1 + fi + + return 0 +} diff --git a/src/VBox/Installer/linux/rpm/LocalConfig.kmk b/src/VBox/Installer/linux/rpm/LocalConfig.kmk new file mode 100644 index 00000000..752e72b6 --- /dev/null +++ b/src/VBox/Installer/linux/rpm/LocalConfig.kmk @@ -0,0 +1,44 @@ +# -*- Makefile -*- +# +# Overwrite some default kBuild settings +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# don't build testcases to save time, they are not needed for the package +VBOX_WITH_TESTCASES := +VBOX_WITH_VALIDATIONKIT := + +# required for VBOX_WITH_RUNPATH +VBOX_WITH_ORIGIN := + +KBUILD_MSG_STYLE := brief +VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox +VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) +VBOX_WITH_VBOX_IMG := 1 + +# gcc 4.5 produces some more false positives +VBOX_WITH_WARNINGS_AS_ERRORS := diff --git a/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec b/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec new file mode 100644 index 00000000..ee27a218 --- /dev/null +++ b/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec @@ -0,0 +1,371 @@ +# $Id: VirtualBox.tmpl.spec $ +## @file +# Spec file for creating VirtualBox rpm packages +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +%define %SPEC% 1 +%define %OSE% 1 +%define %PYTHON% 1 +%define %QHELP% 1 +%define VBOXDOCDIR %{_defaultdocdir}/%NAME% +%global __requires_exclude_from ^/usr/lib/virtualbox/VBoxPython.*$|^/usr/lib/python.*$|^.*\\.py$ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} + +Summary: Oracle VM VirtualBox +Name: %NAME% +Version: %BUILDVER%_%BUILDREL% +Release: 1 +URL: http://www.virtualbox.org/ +Source: VirtualBox.tar +License: GPLv2 +Group: Applications/System +Vendor: Oracle Corporation +BuildRoot: %BUILDROOT% +Requires: %INITSCRIPTS% %LIBASOUND% %NETTOOLS% %LIBVULKAN% + +%if %{?rpm_suse:1}%{!?rpm_suse:0} +%debug_package +%endif + +%MACROSPYTHON% +%if %{?__python3:1}%{!?__python3:0} +%define vbox_python %{__python3} +%define vbox_python_sitelib %{python3_sitelib} +%else +%define vbox_python %{__python} +%{?rpm_suse: %define vbox_python_sitelib %{py_sitedir}} +%{!?rpm_suse: %define vbox_python_sitelib %{python_sitelib}} +%endif + +# Remove source code from debuginfo package, needed for Fedora 27 and later +# as we build the binaries before creating the RPMs. +%if 0%{?fedora} >= 27 +%undefine _debugsource_packages +%undefine _debuginfo_subpackages +%endif +%if 0%{?rhel} >= 8 +%undefine _debugsource_packages +%undefine _debuginfo_subpackages +%endif + +%description +VirtualBox is a powerful PC virtualization solution allowing +you to run a wide range of PC operating systems on your Linux +system. This includes Windows, Linux, FreeBSD, DOS, OpenBSD +and others. VirtualBox comes with a broad feature set and +excellent performance, making it the premier virtualization +software solution on the market. + + +%prep +%setup -q +DESTDIR="" +unset DESTDIR + + +%build + + +%install +# Mandriva: prevent replacing 'echo' by 'gprintf' +export DONT_GPRINTIFY=1 +rm -rf $RPM_BUILD_ROOT +install -m 755 -d $RPM_BUILD_ROOT/sbin +install -m 755 -d $RPM_BUILD_ROOT%{_initrddir} +install -m 755 -d $RPM_BUILD_ROOT/lib/modules +install -m 755 -d $RPM_BUILD_ROOT/etc/vbox +install -m 755 -d $RPM_BUILD_ROOT/usr/bin +install -m 755 -d $RPM_BUILD_ROOT/usr/src +install -m 755 -d $RPM_BUILD_ROOT/usr/share/applications +install -m 755 -d $RPM_BUILD_ROOT/usr/share/pixmaps +install -m 755 -d $RPM_BUILD_ROOT/usr/share/icons/hicolor +install -m 755 -d $RPM_BUILD_ROOT%{VBOXDOCDIR} +install -m 755 -d $RPM_BUILD_ROOT/usr/lib/virtualbox +install -m 755 -d $RPM_BUILD_ROOT/usr/share/virtualbox +install -m 755 -d $RPM_BUILD_ROOT/usr/share/mime/packages +%if %{?with_python:1}%{!?with_python:0} +(export VBOX_INSTALL_PATH=/usr/lib/virtualbox && \ + cd ./sdk/installer && \ + %{vbox_python} ./vboxapisetup.py install --prefix %{_prefix} --root $RPM_BUILD_ROOT) +%endif +rm -rf sdk/installer +mv UnattendedTemplates $RPM_BUILD_ROOT/usr/share/virtualbox +mv nls $RPM_BUILD_ROOT/usr/share/virtualbox +cp -a src $RPM_BUILD_ROOT/usr/share/virtualbox +mv VBox.sh $RPM_BUILD_ROOT/usr/bin/VBox +mv VBoxSysInfo.sh $RPM_BUILD_ROOT/usr/share/virtualbox +cp icons/128x128/virtualbox.png $RPM_BUILD_ROOT/usr/share/pixmaps/virtualbox.png +cd icons + for i in *; do + if [ -f $i/virtualbox.* ]; then + install -d $RPM_BUILD_ROOT/usr/share/icons/hicolor/$i/apps + mv $i/virtualbox.* $RPM_BUILD_ROOT/usr/share/icons/hicolor/$i/apps + fi + install -d $RPM_BUILD_ROOT/usr/share/icons/hicolor/$i/mimetypes + mv $i/* $RPM_BUILD_ROOT/usr/share/icons/hicolor/$i/mimetypes || true + rmdir $i + done +cd - +rmdir icons +mv virtualbox.xml $RPM_BUILD_ROOT/usr/share/mime/packages +%if %{?is_ose:0}%{!?is_ose:1} +%if "%BUILDREL%" == "el7" +# For el7 we use gcc from devtoolset-4, which is not suitable for kernel work. +# See the PATH trickery in src/VBox/Installer/linux/rpm/rules. +old_path="$PATH" +PATH=${PATH#/opt/rh/devtoolset-4/root/usr/bin:} +%endif +for d in /lib/modules/*; do + if [ -L $d/build ]; then + rm -f /tmp/vboxdrv-Module.symvers + ./src/vboxhost/build_in_tmp \ + --save-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source `pwd`/src/vboxhost/vboxdrv \ + KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \ + %INSTMOD% + ./src/vboxhost/build_in_tmp \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source `pwd`/src/vboxhost/vboxnetflt \ + KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \ + %INSTMOD% + ./src/vboxhost/build_in_tmp \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source `pwd`/src/vboxhost/vboxnetadp \ + KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \ + %INSTMOD% + if [ -e `pwd`/src/vboxhost/vboxpci ]; then + ./src/vboxhost/build_in_tmp \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source `pwd`/src/vboxhost/vboxpci \ + KBUILD_VERBOSE= KERN_VER=$(basename $d) INSTALL_MODULE_PATH=$RPM_BUILD_ROOT -j4 \ + %INSTMOD% + fi + fi +done +%if "%BUILDREL%" == "el7" +# For el7 restore PATH, see above. +PATH="$old_path" +unset old_path +%endif +rm -r src +%endif +for i in additions/VBoxGuestAdditions.iso; do + mv $i $RPM_BUILD_ROOT/usr/share/virtualbox; done +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBox +ln -s VBox $RPM_BUILD_ROOT/usr/bin/virtualbox +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VirtualBoxVM +ln -s VBox $RPM_BUILD_ROOT/usr/bin/virtualboxvm +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxManage +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxmanage +test -f VBoxSDL && ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxSDL +test -f VBoxSDL && ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxsdl +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxVRDP +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxHeadless +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxheadless +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxDTrace +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxAudioTest +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxdtrace +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxaudiotest +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxBugReport +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxbugreport +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxBalloonCtrl +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxballoonctrl +ln -s VBox $RPM_BUILD_ROOT/usr/bin/VBoxAutostart +ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxautostart +test -f vboxwebsrv && ln -s VBox $RPM_BUILD_ROOT/usr/bin/vboxwebsrv +ln -s /usr/lib/virtualbox/vbox-img $RPM_BUILD_ROOT/usr/bin/vbox-img +ln -s /usr/lib/virtualbox/vboximg-mount $RPM_BUILD_ROOT/usr/bin/vboximg-mount +ln -s /usr/share/virtualbox/src/vboxhost $RPM_BUILD_ROOT/usr/src/vboxhost-%VER% +mv virtualbox.desktop $RPM_BUILD_ROOT/usr/share/applications/virtualbox.desktop +mv VBox.png $RPM_BUILD_ROOT/usr/share/pixmaps/VBox.png +%{!?is_ose: mv LICENSE $RPM_BUILD_ROOT%{VBOXDOCDIR}} +mv UserManual*.pdf $RPM_BUILD_ROOT%{VBOXDOCDIR} +%{?with_qhelp: mv UserManual*.qch UserManual*.qhc $RPM_BUILD_ROOT%{VBOXDOCDIR}} +install -m 755 -d $RPM_BUILD_ROOT/usr/lib/debug/usr/lib/virtualbox +%if %{?rpm_suse:1}%{!?rpm_suse:0} +rm *.debug +%else +mv *.debug $RPM_BUILD_ROOT/usr/lib/debug/usr/lib/virtualbox +%endif +mv * $RPM_BUILD_ROOT/usr/lib/virtualbox +if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/libQt5CoreVBox.so.5 ]; then + $RPM_BUILD_ROOT/usr/lib/virtualbox/chrpath --keepgoing --replace /usr/lib/virtualbox \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/*.so.5 \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/plugins/platforms/*.so \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/plugins/platformthemes/*.so \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/plugins/sqldrivers/*.so \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/plugins/styles/*.so \ + $RPM_BUILD_ROOT/usr/lib/virtualbox/plugins/xcbglintegrations/*.so || true + echo "[Paths]" > $RPM_BUILD_ROOT/usr/lib/virtualbox/qt.conf + echo "Plugins = /usr/lib/virtualbox/plugins" >> $RPM_BUILD_ROOT/usr/lib/virtualbox/qt.conf +fi +rm -f $RPM_BUILD_ROOT/usr/lib/virtualbox/chrpath +ln -s ../VBoxVMM.so $RPM_BUILD_ROOT/usr/lib/virtualbox/components/VBoxVMM.so +for i in VBoxHeadless VBoxNetDHCP VBoxNetNAT VBoxNetAdpCtl; do + chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/$i; done +if test -e $RPM_BUILD_ROOT/usr/lib/virtualbox/VirtualBoxVM; then + chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VirtualBoxVM +else + chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VirtualBox +fi +if [ -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo ]; then + chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxVolInfo +fi +test -f $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL && \ + chmod 4511 $RPM_BUILD_ROOT/usr/lib/virtualbox/VBoxSDL +%if %{?with_python:1}%{!?with_python:0} +if [ -x /usr/bin/pathfix.py ]; then + /usr/bin/pathfix.py -pni "%{__python3} %{py3_shbang_opts}" $RPM_BUILD_ROOT/usr/lib/virtualbox/vboxshell.py +fi +%endif + + +%pre +# defaults +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +# check for old installation +if [ -r /etc/vbox/vbox.cfg ]; then + . /etc/vbox/vbox.cfg + if [ "x$INSTALL_DIR" != "x" -a -d "$INSTALL_DIR" ]; then + echo "An old installation of VirtualBox was found. To install this package the" + echo "old package has to be removed first. Have a look at /etc/vbox/vbox.cfg to" + echo "determine the installation directory of the previous installation. After" + echo "uninstalling the old package remove the file /etc/vbox/vbox.cfg." + exit 1 + fi +fi + +# check for active VMs of the installed (old) package +# Execute the installed packages pre-uninstaller if present. +/usr/lib/virtualbox/prerm-common.sh 2>/dev/null +# Stop services from older versions without pre-uninstaller. +/etc/init.d/vboxballoonctrl-service stop 2>/dev/null +/etc/init.d/vboxautostart-service stop 2>/dev/null +/etc/init.d/vboxweb-service stop 2>/dev/null +VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true` +if [ -n "$VBOXSVC_PID" ]; then + # ask the daemon to terminate immediately + kill -USR1 $VBOXSVC_PID + sleep 1 + if pidof VBoxSVC > /dev/null 2>&1; then + echo "A copy of VirtualBox is currently running. Please close it and try again." + echo "Please note that it can take up to ten seconds for VirtualBox (in particular" + echo "the VBoxSVC daemon) to finish running." + exit 1 + fi +fi + + +%post +LOG="/var/log/vbox-install.log" + +# defaults +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +# remove old cruft +if [ -f /etc/init.d/vboxdrv.sh ]; then + echo "Found old version of /etc/init.d/vboxdrv.sh, removing." + rm /etc/init.d/vboxdrv.sh +fi +if [ -f /etc/vbox/vbox.cfg ]; then + echo "Found old version of /etc/vbox/vbox.cfg, removing." + rm /etc/vbox/vbox.cfg +fi +rm -f /etc/vbox/module_not_compiled + +# create users groups (disable with INSTALL_NO_GROUP=1 in /etc/default/virtualbox) +if [ "$INSTALL_NO_GROUP" != "1" ]; then + echo + echo "Creating group 'vboxusers'. VM users must be member of that group!" + echo + groupadd -r -f vboxusers 2> /dev/null +fi + +%if %{?rpm_mdv:1}%{!?rpm_mdv:0} +/sbin/ldconfig +%update_menus +%endif +update-mime-database /usr/share/mime &> /dev/null || : +update-desktop-database -q > /dev/null 2>&1 || : +touch --no-create /usr/share/icons/hicolor +gtk-update-icon-cache -q /usr/share/icons/hicolor 2> /dev/null || : + +# Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox +if test "${INSTALL_NO_VBOXDRV}" = 1; then + POSTINST_START=--nostart +else + POSTINST_START= +fi +# Install and start the new service scripts. +/usr/lib/virtualbox/prerm-common.sh || true +/usr/lib/virtualbox/postinst-common.sh ${POSTINST_START} > /dev/null || true + + +%preun +# Called before the package is removed, or during upgrade after (not before) +# the new version's "post" scriptlet. +# $1==0: remove the last version of the package +# $1>=1: upgrade +if [ "$1" = 0 ]; then + /usr/lib/virtualbox/prerm-common.sh || exit 1 + rm -f /etc/udev/rules.d/60-vboxdrv.rules + rm -f /etc/vbox/license_agreed + rm -f /etc/vbox/module_not_compiled +fi + +%postun +%if %{?rpm_mdv:1}%{!?rpm_mdv:0} +/sbin/ldconfig +%{clean_desktop_database} +%clean_menus +%endif +update-mime-database /usr/share/mime &> /dev/null || : +update-desktop-database -q > /dev/null 2>&1 || : +touch --no-create /usr/share/icons/hicolor +gtk-update-icon-cache -q /usr/share/icons/hicolor 2> /dev/null || : +rm -rf /usr/lib/virtualbox/ExtensionPacks + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%doc %{VBOXDOCDIR}/* +%if %{?with_python:1}%{!?with_python:0} +%{vbox_python_sitelib}/* +%endif +/etc/vbox +/usr/bin/* +/usr/src/vbox* +/usr/lib/virtualbox +/usr/share/applications/* +/usr/share/icons/hicolor/*/apps/* +/usr/share/icons/hicolor/*/mimetypes/* +/usr/share/mime/packages/* +/usr/share/pixmaps/* +/usr/share/virtualbox diff --git a/src/VBox/Installer/linux/rpm/rules b/src/VBox/Installer/linux/rpm/rules new file mode 100755 index 00000000..dc199d6c --- /dev/null +++ b/src/VBox/Installer/linux/rpm/rules @@ -0,0 +1,282 @@ +#!/usr/bin/make -f +# $Id: rules $ +## @file +# VirtualBox rules. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# possible overrides: +# OSE=1 force VBOX_OSE +# NOPARALLEL=1 compile with -j1 +# LINUX= compile vboxdrv against Linux found in +# VERBOSE=1 verbose build +# DEBUG=1 debug build +# NOSUBVER=1 disable generation of the sub-version field (which is +# either the subversion rev [if available] or the build date) +# NODOCS=1 don't build docs, use precompiled UserManual*.pdf and +# maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild +# NOMODS=1 don't build any module +# NOQT=1 don't build the Qt GUI +# NOSDL=1 don't build VBoxSDL +# EFI=1 include the EFI binary from prebuild +# VERSUFFIX= set a particular package version suffix (e.g. _customer) +# HEADLESS=1 build the headless version +# VNC=1 build VNC code +# NOWEBSVC=1 don't build the webservice API +# STAGEDISO= don't build the VBoxAdditions, use the precompiled .iso +# PKGDIR= where to store the final package(s) +# svn_revision=xxx do not depend on subversion being available, but use this +# hard-coded revision number instead +# +# NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are +# placed in $(vboxroot)/prebuild. +# STAGEDISO will be set if VBoxGuestAdditions.iso is placed there. +# +# Wine will not be required if STAGEDISO is set. + +verpkg := VirtualBox-7.0 +vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd) +instlin := $(vboxroot)/src/VBox/Installer/linux +pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd)) +outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot)/out) +bldbase := $(outdir)/rpm +builddir := $(bldbase)/builddir +stagedir := $(bldbase)/rpmbuild +rpmlib := $(shell if [ `uname -m` = "x86_64" ]; then echo "lib64"; else echo "lib"; fi) +verfile := $(builddir)/version-generated.mk +ose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1)) +chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi) +-include $(vboxroot)/SVN_REVISION + +NOMODS ?= $(ose) +NOQT ?= $(HEADLESS) +NOSDL ?= $(HEADLESS) +NOWEBSVC ?= +EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,) +NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc)),1,) +STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,) +NOWINE := $(if $(STAGEDISO),1,$(ose)) + +ifneq ($(STAGEDISO),) + ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),) + $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found) + endif +endif + +ifeq ($(wildcard rpm/rules),) +$(error call rpm/rules from src/VBox/Installer/linux) +endif + +ifneq ($(MAKECMDGOALS),clean) + # look for fedora + rpmrel := $(shell cat /etc/fedora-release 2> /dev/null | sed -e 's/^Fedora *release *\([1-9][0-9]*\) .*/fedora\1/') + ifeq ($(rpmrel),) + # look for OEL + rpmrel := $(shell cat /etc/enterprise-release 2> /dev/null | sed -ne 's/^Enterprise Linux[a-zA-Z ]*\([1-9][0-9]*\).*/el\1/p') + endif + ifeq ($(rpmrel),) + # look for OL + rpmrel := $(shell cat /etc/oracle-release 2> /dev/null | sed -ne 's/^Oracle Linux[a-zA-Z ]*\([1-9][0-9]*\).*/el\1/p') + endif + ifeq ($(rpmrel),) + # look for CentOS + rpmrel := $(shell cat /etc/redhat-release 2> /dev/null | sed -ne 's/^CentOS[a-zA-Z ]*\([1-9][0-9]*\).*/el\1/p') + endif + ifeq ($(rpmrel),) + # look for Red Hat + rpmrel := $(shell cat /etc/redhat-release 2> /dev/null | sed -ne 's/^Red Hat[a-zA-Z ]*\([1-9][0-9]*\).*/el\1/p') + endif + ifeq ($(rpmrel),) + # look for openSUSE + rpmrel := $(shell cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *\([0-9]*\)\.\([0-9]*\)/openSUSE\1\2/p') + endif + # look for openSUSE Tumbleweed + ifeq ($(rpmrel),) + rpmrel := $(shell cat /etc/SUSE-brand 2> /dev/null | sed -ne 's/^VERSION *= *tumbleweed/openSUSETW/p') + endif + ifeq ($(rpmrel),) + $(error failed to detect the release type. Hack the detection.) + endif + + rpmdist := $(strip $(shell grep $(rpmrel) $(instlin)/distributions_rpm | cut -d'=' -f2)) + ifeq ($(rpmdist),) + $(error Cannot detect package distribution (rpmrel=$(rpmrel))) + endif + + ifeq ($(filter-out el5 el6 el7 el8 el9 fedora18 fedora19 fedora20 fedora21 fedora22 fedora24 fedora25 fedora26 fedora29 fedora31 fedora32 fedora33 fedora35 fedora36,$(rpmrel)),) + rpmspec := rpm_redhat + endif + ifeq ($(filter-out openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114 openSUSE123 openSUSE131 openSUSE132 openSUSE150 openSUSE153 openSUSETW,$(rpmrel)),) + rpmspec := rpm_suse + endif + ifeq ($(rpmspec),) + $(error failed to detect the .spec file (rpmrel=$(rpmrel))) + endif +endif + +ifneq ($(wildcard $(verfile)),) +include $(verfile) +ver := $(VBOX_VERSION_STRING) +svnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \ + svn info $(vboxroot) > /dev/null 2>&1; then \ + svn info $(vboxroot)|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \ + date +"-%Y%m%d"; fi))) +rpmver := $(ver)$(subst -,_,$(svnver))$(VERSUFFIX)$(if $(HEADLESS),_headless,)$(if $(DEBUG),_dbg,) +archdir := $(bldbase)/VirtualBox-$(ver) +rpmname := $(verpkg)-$(rpmver)_$(rpmrel) +endif + +# never ship any modules +instmod := + +ifeq ($(wildcard /usr/share/doc/packages/bash),) + doc_dir := VBOX_PATH_PACKAGE_DOCS="/usr/share/doc/$(verpkg)" +else + # Novell (OpenSUSE, SLES) + doc_dir := VBOX_PATH_PACKAGE_DOCS="/usr/share/doc/packages/$(verpkg)" +endif + +ifeq ($(NOQT),) + ifeq ($(rpmrel),el7) + # Protect against the fact that this Makefile is run several times, updating + # PATH every time. Still assumes that nothing else is added as a prefix. + PATH := $(PATH:/opt/rh/devtoolset-9/root/usr/bin:%=%) + export PATH := /opt/rh/devtoolset-9/root/usr/bin:$(PATH) + endif +endif + +# EL5 ships Python 2.4 while our Python support requires Python 2.6 or later +cfg_flags := $(if $(NOQT),--disable-qt,) \ + $(if $(NOSDL),--disable-vboxsdl,) \ + $(if $(filter el5 el6,$(rpmrel)),--build-libvpx,) \ + $(if $(filter el5 el6,$(rpmrel)),--build-libopus,) \ + $(if $(filter el5 el6,$(rpmrel)),--build-libssl,) \ + $(if $(filter el5,$(rpmrel)),--build-libcurl,) \ + $(if $(filter el5,$(rpmrel)),--disable-sdl-ttf,) \ + $(if $(filter el5,$(rpmrel)),--disable-pulse,) \ + $(if $(filter el5,$(rpmrel)),--disable-python,) \ + $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \ + $(if $(HEADLESS),--build-headless,) \ + $(if $(DEBUG),--build-debug,) \ + $(if $(NOWINE),,--setup-wine) \ + $(if $(VNC),--enable-vnc,) \ + $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \ + --disable-extpack + +bld_flags := LOCALCFG=$(instlin)/rpm/LocalConfig.kmk \ + PATH_OUT=$(builddir) \ + VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \ + VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \ + $(if $(filter el5 el6,$(rpmrel)),,VBOX_WITH_VMSVGA3D=1) \ + VBOX_DO_STRIP= \ + $(if $(filter el5,$(rpmrel)),VBOX_BLD_PYTHON=$(firstword $(wildcard \ + /usr/local/bin/python2.7 /usr/bin/python2.7 /usr/bin/python2.6 /usr/bin/python2 /usr/bin/python)),) \ + $(if $(filter el5,$(rpmrel)),,VBOX_WITH_SYSFS_BY_DEFAULT=1) \ + $(doc_dir) \ + VBOX_PACKAGE_DIST=$(rpmdist) \ + $(if $(svn_revision),VBOX_SVN_REV=$(svn_revision),) \ + $(if $(NODOCS),VBOX_WITH_DOCS=,) \ + $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \ + $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,) + +configure: $(bldbase)/configure-stamp +$(bldbase)/configure-stamp: + mkdir -p $(bldbase) + cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags) + touch $@ + +build: $(bldbase)/configure-stamp $(bldbase)/build-stamp +$(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp + . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all + # Files from prebuild go to (builddir)/bin to be used during the + # packing stage, overriding what the build did/would produce. + $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc) $(builddir)/bin,) + $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,) + $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,) + mkdir -p $(builddir)/bin/additions + $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,) + . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \ + VBOX_NO_LINUX_RUN_INSTALLER=1 \ + VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \ + VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2 \ + VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \ + VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \ + packing + touch $(bldbase)/build-stamp + +clean: + rm -rf $(archdir) + rm -rf $(stagedir) + rm -rf $(builddir) + rm -rf $(bldbase)/wine.* + rm -rf $(bldbase)/VirtualBox-* + rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2 + rm -f $(bldbase)/build-stamp $(bldbase)/configure-stamp + rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh + rm -f $(bldbase)/VirtualBox.spec + if [ -d $(bldbase) ]; then rmdir $(bldbase); fi + +ifeq ($(VBOX_VERSION_MAJOR),) +binary: build $(verfile) + +$(MAKE) -f rpm/rules binary + +else +binary: build + rm -rf $(bldbase)/VirtualBox-* + tar -xf $(builddir)/bin/VirtualBox.tar -C $(bldbase) + sed \ + -e 's|%VER%|$(ver)|g' \ + -e 's|%NAME%|$(verpkg)|g' \ + -e 's|%BUILDVER%|$(rpmver)|g' \ + -e 's|%BUILDREL%|$(rpmrel)|g' \ + -e 's|%BUILDROOT%|$(bldbase)/buildroot|g' \ + -e 's|%OSE%|$(if $(ose),is_ose,not_ose)|g' \ + -e 's|%SPEC%|$(rpmspec)|g' \ + -e 's|%QHELP%|$(if $(STAGEDQHELP),with_qhelp,without_qhelp)|g' \ + -e 's|%PYTHON%|$(if $(filter el5,$(rpmrel)),without_python,with_python)|g' \ + -e 's|%MACROSPYTHON%|$(if $(wildcard /usr/lib/rpm/macros.d/macros.python3),,$(if $(wildcard /usr/lib/rpm/macros.python),%include /usr/lib/rpm/macros.python,))|g' \ + -e 's|%INSTMOD%|$(instmod)|g' \ + -e 's|%LIBASOUND%|$(if $(filter lib64,$(rpmlib)),libasound.so.2()(64bit),libasound.so.2)|g' \ + -e 's|%INITSCRIPTS%|$(if $(filter fedora,$(rpmspec)),initscripts,)|g' \ + -e 's|%NETTOOLS%|$(if $(filter fedora18 fedora19 fedora20 fedora21 el5 openSUSE110 openSUSE111 openSUSE112 openSUSE113 openSUSE114,$(rpmrel)),net-tools,iproute)|g' \ + -e 's|%LIBVULKAN%|$(if $(filter el7,$(rpmrel)),vulkan,%LIBVULKAN%)|g' \ + -e 's|%LIBVULKAN%|$(if $(findstring el,$(rpmrel)),vulkan-loader,%LIBVULKAN%)|g' \ + -e 's|%LIBVULKAN%|$(if $(findstring fedora,$(rpmrel)),vulkan-loader,%LIBVULKAN%)|g' \ + -e 's|%LIBVULKAN%|$(if $(filter openSUSE153,$(rpmrel)),libvulkan1,)|g' \ + $(instlin)/rpm/VirtualBox.tmpl.spec > $(archdir)/VirtualBox.spec + mv $(bldbase)/VirtualBox-$(ver) $(bldbase)/$(rpmname) + cp $(vboxroot)/tools/linux.$(chrarch)/bin/chrpath $(bldbase)/$(rpmname) || true + tar -cf $(bldbase)/VirtualBox.tar -C $(bldbase) $(rpmname) + rm -f $(stagedir)/RPMS/*/VirtualBox*rpm + rm -f $(stagedir)/SPECS/* + mkdir -p $(stagedir)/BUILD $(stagedir)/RPMS/i386 $(stagedir)/RPMS/x86_64 $(stagedir)/SOURCES $(stagedir)/SPECS $(stagedir)/SRPMS + (cd $(bldbase); rpmbuild --define '_topdir $(stagedir)' -tb --clean VirtualBox.tar) + mv $(stagedir)/RPMS/*/$(verpkg)-debug* $(pkgdir) || true + file=`find $(stagedir)/RPMS -name $(verpkg)*rpm -print`; \ + mv $$file $(pkgdir) +# Note! if rpmbuild fails: sudo chmod a+rw /usr/src/redhat/* /usr/src/redhat/RPMS/* +# Note! if find/mv fails: sudo ln -s redhat/ /usr/src/packages +endif + +.PHONY: binary configure build clean diff --git a/src/VBox/Installer/linux/runasroot.sh b/src/VBox/Installer/linux/runasroot.sh new file mode 100755 index 00000000..7c1e68fa --- /dev/null +++ b/src/VBox/Installer/linux/runasroot.sh @@ -0,0 +1,188 @@ +#!/bin/sh +# $Id: runasroot.sh $ +## @file +# VirtualBox privileged execution helper script for Linux and Solaris +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Deal with differing "which" semantics +mywhich() { + which "$1" 2>/dev/null | grep -v "no $1" +} + +# Get the name and execute switch for a useful terminal emulator +# +# Sets $gxtpath to the emulator path or empty +# Sets $gxttitle to the "title" switch for that emulator +# Sets $gxtexec to the "execute" switch for that emulator +# May clobber $gtx* +# Calls mywhich +getxterm() { + # gnome-terminal uses -e differently to other emulators + for gxti in "konsole --title -e" "gnome-terminal --title -x" "xterm -T -e"; do + set $gxti + gxtpath="`mywhich $1`" + case "$gxtpath" in ?*) + gxttitle=$2 + gxtexec=$3 + return + ;; + esac + done +} + +# Quotes its argument by inserting '\' in front of every character save +# for 'A-Za-z0-9/'. Prints the result to stdout. +quotify() { + echo "$1" | sed -e 's/\([^a-zA-Z0-9/]\)/\\\1/g' +} + +ostype=`uname -s` +if test "$ostype" != "Linux" && test "$ostype" != "SunOS" ; then + echo "Linux/Solaris not detected." + exit 1 +fi + +HAS_TERMINAL="" +case "$1" in "--has-terminal") + shift + HAS_TERMINAL="yes" + ;; +esac + +case "$#" in "2"|"3") + ;; + *) + echo "Usage: `basename $0` DESCRIPTION COMMAND [ADVICE]" >&2 + echo >&2 + echo "Attempt to execute COMMAND with root privileges, displaying DESCRIPTION if" >&2 + echo "possible and displaying ADVICE if possible if no su(1)-like tool is available." >&2 + exit 1 + ;; +esac + +DESCRIPTION=$1 +COMMAND=$2 +ADVICE=$3 +PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/X11/bin + +case "$ostype" in SunOS) + PATH=$PATH:/usr/sfw/bin:/usr/gnu/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/openwin/bin:/usr/ucb + GKSU_SWITCHES="-au root" + ;; + *) + GKSU_SWITCHES="" + ;; +esac + +case "$HAS_TERMINAL" in "") + case "$DISPLAY" in ?*) + KDESUDO="`mywhich kdesudo`" + case "$KDESUDO" in ?*) + eval "`quotify "$KDESUDO"` --comment `quotify "$DESCRIPTION"` -- $COMMAND" + exit + ;; + esac + + KDESU="`mywhich kdesu`" + case "$KDESU" in ?*) + "$KDESU" -c "$COMMAND" + exit + ;; + esac + + GKSU="`mywhich gksu`" + case "$GKSU" in ?*) + # Older gksu does not grok --description nor '--' and multiple args. + # @todo which versions do? + # "$GKSU" --description "$DESCRIPTION" -- "$@" + # Note that $GKSU_SWITCHES is NOT quoted in the following + "$GKSU" $GKSU_SWITCHES "$COMMAND" + exit + ;; + esac + ;; + esac # $DISPLAY + ;; +esac # ! $HAS_TERMINAL + +# pkexec may work for ssh console sessions as well if the right agents +# are installed. However it is very generic and does not allow for any +# custom messages. Thus it comes after gksu. +## @todo should we insist on either a display or a terminal? +# case "$DISPLAY$HAS_TERMINAL" in ?*) +PKEXEC="`mywhich pkexec`" +case "$PKEXEC" in ?*) + eval "\"$PKEXEC\" $COMMAND" + exit + ;; +esac +# ;;S +#esac + +case "$HAS_TERMINAL" in ?*) + USE_SUDO= + grep -q Ubuntu /etc/lsb-release 2>/dev/null && USE_SUDO=true + # On Ubuntu we need sudo instead of su. Assume this works, and is only + # needed for Ubuntu until proven wrong. + case $USE_SUDO in true) + SUDO_COMMAND="`quotify "$SUDO"` -- $COMMAND" + eval "$SUDO_COMMAND" + exit + ;; + esac + + SU="`mywhich su`" + case "$SU" in ?*) + "$SU" - root -c "$COMMAND" + exit + ;; + esac + ;; +esac + +# The ultimate fallback is running 'su -' within an xterm. We use the +# title of the xterm to tell what is going on. +case "$DISPLAY" in ?*) + SU="`mywhich su`" + case "$SU" in ?*) + getxterm + case "$gxtpath" in ?*) + "$gxtpath" "$gxttitle" "$DESCRIPTION - su" "$gxtexec" su - root -c "$COMMAND" + exit + ;; + esac + esac +esac # $DISPLAY + +# Failure... +case "$DISPLAY" in ?*) + echo "Unable to locate 'pkexec', 'gksu' or 'su+xterm'. $ADVICE" >&2 + ;; + *) + echo "Unable to locate 'pkexec'. $ADVICE" >&2 + ;; +esac + +exit 1 diff --git a/src/VBox/Installer/linux/scripts/VBoxHeadlessXOrg.sh b/src/VBox/Installer/linux/scripts/VBoxHeadlessXOrg.sh new file mode 100755 index 00000000..9862438e --- /dev/null +++ b/src/VBox/Installer/linux/scripts/VBoxHeadlessXOrg.sh @@ -0,0 +1,369 @@ +#!/bin/sh +# $Id: VBoxHeadlessXOrg.sh $ +## @file +# VirtualBox X Server auto-start service. +# + +# +# Copyright (C) 2012-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +PATH=$PATH:/bin:/sbin:/usr/sbin + +## Start one or several X servers in the background for use with headless +# rendering. For details, options and configuration see the usage() function +# further down. +# +# I have tried to follow the best practices I could find for writing a Linux +# service (and doing it in shell script) which should work well with +# traditional and modern service systems using minimal init or service files. +# In our case this boils down to: +# * Start with a single command line, stop using one of ${EXIT_SIGNALS} below. +# * Stopping with a signal can be done safely using the pid stored in the +# pid-file and our (presumably unique) command name. For this reason we +# only support running one instance of the service though. +# * Start in the foreground. Systems without proper service control can take +# care of the backgrounding in the init script. +# * Clean up all sub-processes (X servers) ourselves when we are stopped +# cleanly and don't provide any other way to clean them up automatically (in +# case we are stopped uncleanly) as we don't know of a generic safe way to +# do so, though some service management systems (i.e. systemd) can do so. +# (A more thorough automatic clean-up would be possible if Xorg didn't +# potentially have to be run as root, so that we could run all processes +# using a service-specific user account and just terminate all processes +# run by that user to clean up.) + +## Default configuration file name. +# @note This is not very nice - /etc/default is actually Debian-specific. +CONFIGURATION_FILE=/etc/default/virtualbox +## The name of this script. +SCRIPT_NAME="$0" +## The service name. +SERVICE_NAME="vboxheadlessxorg" +## The service description. +SERVICE_DESCRIPTION="Headless rendering service" +## Signals and conditions which may be used to terminate the service. +EXIT_SIGNALS="EXIT HUP INT QUIT ABRT TERM" +## The default run-time data folder. +DEFAULT_RUN_FOLDER="/var/run/${SERVICE_NAME}/" +## The default X server configuration directory. +DEFAULT_CONFIGURATION_FOLDER="${DEFAULT_RUN_FOLDER}/xorg.conf.d/" +## The extra data key used to provide the list of available X server displays. +EXTRA_DATA_KEY_DISPLAYS="HeadlessXServer/Displays" +## The extra data key used to specify the X server authority file. +EXTRA_DATA_KEY_AUTH="HeadlessXServer/AuthFile" + +## Print usage information for the service script. +## @todo Perhaps we should support some of the configuration file options from +# the command line. Opinions welcome. +## @todo Possibly extract this information for the user manual. +usage() { + cat << EOF +Usage: + + $(basename "${SCRIPT_NAME}") [] + +Start one or several X servers in the background for use with headless +rendering. We only support X.Org Server at the moment. On service start-up available graphics devices are detected and an X server configuration file is +generated for each. We attempt to start an X server process for each +configuration file. The process is configurable by setting values in a file as +described below. + +Options: + + -c|--conf-file Specify an alternative locations for the configuration + file. The default location is: + "${CONFIGURATION_FILE}" + + --help|--usage Print this text. + +The optional configuration file should contain a series of lines of the form +"KEY=value". It will be read in as a command shell sub-script. Here is the +current list of possible key settings with a short explanation. Usually it +should be sufficient to change the value of \${HEADLESS_X_ORG_USERS} and to +leave all other settings unchanged. + + HEADLESS_X_ORG_CONFIGURATION_FOLDER + The folder where the X server configuration files are to be created. + + HEADLESS_X_ORG_LOG_FOLDER + The folder where log files will be saved. + + HEADLESS_X_ORG_LOG_FILE + The main log file name. + + HEADLESS_X_ORG_RUN_FOLDER + The folder to store run-time data in. + + HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES + Command to execute to wait until all dependencies for the X servers are + available. The default command waits until the udev event queue has + settled. The command may return failure to signal that it has given up. + No arguments may be passsed. + + HEADLESS_X_ORG_USERS + List of users who will have access to the X servers started and for whom we + will provide the configuration details via VirtualBox extra data. This + variable is only used by the commands in the default configuration + (\${HEADLESS_X_ORG_SERVER_PRE_COMMAND} and + \${HEADLESS_X_ORG_SERVER_POST_COMMAND}), and not by the service itself. + + HEADLESS_X_ORG_FIRST_DISPLAY + The first display number which will be used for a started X server. The + others will use the following numbers. + + HEADLESS_X_ORG_SERVER_PRE_COMMAND + Command to execute once to perform any set-up needed before starting the + X servers, such as setting up the X server authentication. The default + command creates an authority file for each of the users in the list + \${HEADLESS_X_ORG_USERS} and generates server configuration files for all + detected graphics cards. No arguments may be passed. + + HEADLESS_X_ORG_SERVER_COMMAND + The default X server start-up command. It will be passed three parameters + - in order, the screen number to use, the path of the X.Org configuration + file to use and the path of the X server log file to create. + + HEADLESS_X_ORG_SERVER_POST_COMMAND + Command to execute once the X servers have been successfully started. It + will be passed a single parameter which is a space-separated list of the + X server screen numbers. By default this stores the service configuration + information to VirtualBox extra data for each of the users in the list + from the variable HEADLESS_X_ORG_USERS: the list of displays is set to the + key "${EXTRA_DATA_KEY_DISPLAYS}" and the path of the authority file to + "${EXTRA_DATA_KEY_AUTH}". +EOF +} + +# Default configuration. +HEADLESS_X_ORG_CONFIGURATION_FOLDER="${DEFAULT_CONFIGURATION_FOLDER}" +HEADLESS_X_ORG_LOG_FOLDER="/var/log/${SERVICE_NAME}" +HEADLESS_X_ORG_LOG_FILE="${SERVICE_NAME}.log" +HEADLESS_X_ORG_RUN_FOLDER="/var/run/${SERVICE_NAME}" +HEADLESS_X_ORG_USERS="" +HEADLESS_X_ORG_FIRST_DISPLAY=40 +X_AUTH_FILE="${HEADLESS_X_ORG_RUN_FOLDER}/xauth" + +default_wait_for_prerequisites() +{ + udevadm settle || udevsettle # Fails if no udevadm. +} +HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES="default_wait_for_prerequisites" + +default_pre_command() +{ + # Create new authority file. + echo > "${X_AUTH_FILE}" + # Create the xorg.conf files. + mkdir -p "${HEADLESS_X_ORG_CONFIGURATION_FOLDER}" || return 1 + display="${HEADLESS_X_ORG_FIRST_DISPLAY}" + for i in /sys/bus/pci/devices/*; do + read class < "${i}/class" + case "${class}" in *03????) + address="${i##*/}" + address="${address%%:*}${address#*:}" + address="PCI:${address%%.*}:${address#*.}" + read vendor < "${i}/vendor" + case "${vendor}" in *10de|*10DE) # NVIDIA + cat > "${HEADLESS_X_ORG_CONFIGURATION_FOLDER}/xorg.conf.${display}" << EOF +Section "Module" + Load "glx" +EndSection +Section "Device" + Identifier "Device${display}" + Driver "nvidia" + Option "UseDisplayDevice" "none" +EndSection +Section "Screen" + Identifier "Screen${display}" + Device "Device${display}" +EndSection +Section "ServerLayout" + Identifier "Layout${display}" + Screen "Screen${display}" + Option "AllowMouseOpenFail" "true" + Option "AutoAddDevices" "false" + Option "AutoAddGPU" "false" + Option "AutoEnableDevices" "false" + Option "IsolateDevice" "${address}" +EndSection +EOF + esac + # Add key to the authority file. + key="$(dd if=/dev/urandom count=1 bs=16 2>/dev/null | od -An -x)" + xauth -f "${X_AUTH_FILE}" add :${display} . "${key}" + display=`expr ${display} + 1` + esac + done + # Duplicate the authority file. + for i in ${HEADLESS_X_ORG_USERS}; do + cp "${X_AUTH_FILE}" "${X_AUTH_FILE}.${i}" + chown "${i}" "${X_AUTH_FILE}.${i}" + done +} +HEADLESS_X_ORG_SERVER_PRE_COMMAND="default_pre_command" + +default_command() +{ + auth="${HEADLESS_X_ORG_RUN_FOLDER}/xauth" + # screen=$1 + # conf_file=$2 + # log_file=$3 + trap "kill \${PID}; sleep 5; kill -KILL \${PID} 2>/dev/null" ${EXIT_SIGNALS} + Xorg :"${1}" -auth "${auth}" -config "${2}" -logverbose 0 -logfile /dev/null -verbose 7 > "${3}" 2>&1 & + PID="$!" + wait + exit +} +HEADLESS_X_ORG_SERVER_COMMAND="default_command" + +default_post_command() +{ + # screens=$1 + for i in ${HEADLESS_X_ORG_USERS}; do + su ${i} -c "VBoxManage setextradata global ${EXTRA_DATA_KEY_DISPLAYS} \"${1}\"" + su ${i} -c "VBoxManage setextradata global ${EXTRA_DATA_KEY_AUTH} \"${HEADLESS_X_ORG_RUN_FOLDER}/xauth\"" + done +} +HEADLESS_X_ORG_SERVER_POST_COMMAND="default_post_command" + +## The function definition at the start of every non-trivial shell script! +abort() { + ## $@, ... Error text to output to standard error in printf format. + printf "$@" >&2 + exit 1 +} + +## Milder version of abort, when we can't continue because of a valid condition. +abandon() { + ## $@, ... Text to output to standard error in printf format. + printf "$@" >&2 + exit 0 +} + +abort_usage() { + usage >&2 + abort "$@" +} + +# Print a banner message +banner() { + cat << EOF +${VBOX_PRODUCT} VBoxHeadless X Server start-up service Version ${VBOX_VERSION_STRING} +(C) 2005-${VBOX_C_YEAR} ${VBOX_VENDOR} +All rights reserved. + +EOF +} + +# Get the directory where the script is located. +SCRIPT_FOLDER=$(dirname "${SCRIPT_NAME}")"/" +[ -r "${SCRIPT_FOLDER}generated.sh" ] || + abort "${LOG_FILE}" "Failed to find installation information.\n" +. "${SCRIPT_FOLDER}generated.sh" + +# Parse our arguments. +while [ "$#" -gt 0 ]; do + case $1 in + -c|--conf-file) + [ "$#" -gt 1 ] || + { + banner + abort "%s requires at least one argument.\n" "$1" + } + CONFIGURATION_FILE="$2" + shift + ;; + --help|--usage) + banner + usage + exit 0 + ;; + *) + banner + abort_usage "Unknown argument $1.\n" + ;; + esac + shift +done + +[ -r "${CONFIGURATION_FILE}" ] && . "${CONFIGURATION_FILE}" + +# Change to the root directory so we don't hold any other open. +cd / + +# If something fails here we will catch it when we create the directory. +[ -e "${HEADLESS_X_ORG_LOG_FOLDER}" ] && + [ -d "${HEADLESS_X_ORG_LOG_FOLDER}" ] && + rm -rf "${HEADLESS_X_ORG_LOG_FOLDER}.old" 2> /dev/null && +mv "${HEADLESS_X_ORG_LOG_FOLDER}" "${HEADLESS_X_ORG_LOG_FOLDER}.old" 2> /dev/null +mkdir -p "${HEADLESS_X_ORG_LOG_FOLDER}" 2>/dev/null || +{ + banner + abort "Failed to create log folder \"${HEADLESS_X_ORG_LOG_FOLDER}\".\n" +} +mkdir -p "${HEADLESS_X_ORG_RUN_FOLDER}" 2>/dev/null || +{ + banner + abort "Failed to create run folder \"${HEADLESS_X_ORG_RUN_FOLDER}\".\n" +} +exec > "${HEADLESS_X_ORG_LOG_FOLDER}/${HEADLESS_X_ORG_LOG_FILE}" 2>&1 + +banner + +# Wait for our dependencies to become available. +if [ -n "${HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES}" ]; then + "${HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES}" || + abort "Service prerequisites not available.\n" +fi + +# Do any pre-start setup. +if [ -n "${HEADLESS_X_ORG_SERVER_PRE_COMMAND}" ]; then + "${HEADLESS_X_ORG_SERVER_PRE_COMMAND}" || + abort "Pre-requisite failed.\n" +fi + +X_SERVER_PIDS="" +X_SERVER_SCREENS="" +trap "kill \${X_SERVER_PIDS} 2>/dev/null" ${EXIT_SIGNALS} +space="" # Hack to put spaces between the pids but not before or after. +for conf_file in "${HEADLESS_X_ORG_CONFIGURATION_FOLDER}"/*; do + [ x"${conf_file}" = x"${HEADLESS_X_ORG_CONFIGURATION_FOLDER}/*" ] && + ! [ -e "${conf_file}" ] && + abort "No configuration files found.\n" + filename="$(basename "${conf_file}")" + screen="$(expr "${filename}" : "xorg\.conf\.\(.*\)")" + [ 0 -le "${screen}" ] 2>/dev/null || + abort "Badly formed file name \"${conf_file}\".\n" + log_file="${HEADLESS_X_ORG_LOG_FOLDER}/Xorg.${screen}.log" + "${HEADLESS_X_ORG_SERVER_COMMAND}" "${screen}" "${conf_file}" "${log_file}" & + X_SERVER_PIDS="${X_SERVER_PIDS}${space}$!" + X_SERVER_SCREENS="${X_SERVER_SCREENS}${space}${screen}" + space=" " +done + +# Do any post-start work. +if [ -n "${HEADLESS_X_ORG_SERVER_POST_COMMAND}" ]; then + "${HEADLESS_X_ORG_SERVER_POST_COMMAND}" "${X_SERVER_SCREENS}" || + abort "Post-command failed.\n" +fi + +wait diff --git a/src/VBox/Installer/linux/testcase/Makefile.kmk b/src/VBox/Installer/linux/testcase/Makefile.kmk new file mode 100644 index 00000000..f665a935 --- /dev/null +++ b/src/VBox/Installer/linux/testcase/Makefile.kmk @@ -0,0 +1,37 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the VBox Linux installer testcase. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + +INSTALLS += tstHeadlessXOrg +TESTING += tstHeadlessXOrg +tstHeadlessXOrg_INST = $(INST_TESTCASE) +tstHeadlessXOrg_MODE = a+rx,u+w +tstHeadlessXOrg_SOURCES = tstHeadlessXOrg.sh + +include $(FILE_KBUILD_SUB_FOOTER) diff --git a/src/VBox/Installer/linux/testcase/tstHeadlessXOrg.sh b/src/VBox/Installer/linux/testcase/tstHeadlessXOrg.sh new file mode 100755 index 00000000..558075f7 --- /dev/null +++ b/src/VBox/Installer/linux/testcase/tstHeadlessXOrg.sh @@ -0,0 +1,315 @@ +#!/bin/sh +# $Id: tstHeadlessXOrg.sh $ +## @file +# VirtualBox X Server auto-start service unit test. +# + +# +# Copyright (C) 2012-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +## The function definition at the start of every non-trivial shell script! +abort() +{ + ## $@, ... Error text to output to standard error in printf format. + format="$1" + shift + printf "${TEST_NAME}: ${format}" "$@" >&2 + exit 1 +} + +## Print a TESTING line. Takes printf arguments but without a '\n'. +print_line() +{ + format="$1" + shift + printf "${TEST_NAME}: TESTING ${format}... " "$@" +} + +## Expected a process to complete within a certain time and call a function if +# it does which should check whether the test was successful and print status +# information. The function takes the exit status as its single parameter. +expect_exit() +{ + PID="$1" ## The PID we are waiting for. + TIME_OUT="$2" ## The time-out before we terminate the process. + TEST_FUNCTION="$3" ## The function to call on exit to check the test result. + + # Give it time to complete. + { sleep "${TIME_OUT}"; kill "${PID}" 2>/dev/null; } & + + wait "${PID}" + STATUS="$?" + case "${STATUS}" in + 143) # SIGTERM + printf "\nFAILED: time-out.\n" + ;; + *) + ${TEST_FUNCTION} "${STATUS}" +esac +} + +## Create a simple configuration file. Add items onto the end to override them +# on an item-by-item basis. +create_basic_configuration() +{ + TEST_FOLDER="${1}" + FILE_NAME="${TEST_FOLDER}conf" ## The name of the configuration file to create. + BASE_FOLDER="${TEST_FOLDER}" + XORG_FOLDER="${TEST_FOLDER}/xorg" + mkdir -p "${XORG_FOLDER}" + cat > "${FILE_NAME}" << EOF +HEADLESS_X_ORG_CONFIGURATION_FOLDER="${BASE_FOLDER}/xorg" +HEADLESS_X_ORG_LOG_FOLDER="${BASE_FOLDER}/log" +HEADLESS_X_ORG_LOG_FILE="log" +HEADLESS_X_ORG_RUN_FOLDER="${BASE_FOLDER}/run" +HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES="true" +HEADLESS_X_ORG_SERVER_PRE_COMMAND= +HEADLESS_X_ORG_SERVER_COMMAND="echo" +EOF + +} + +# Get the directory where the script is located and the parent. +OUR_FOLDER="$(dirname "$0")" +OUR_FOLDER=$(cd "${OUR_FOLDER}" && pwd) +VBOX_FOLDER=$(cd "${OUR_FOLDER}/.." && pwd) +[ -d "${VBOX_FOLDER}" ] || + abort "Failed to change to directory ${VBOX_FOLDER}.\n" +cd "${VBOX_FOLDER}" + +# Get our name for output. +TEST_NAME="$(basename "$0" .sh)" + +# And remember the full path. +TEST_NAME_FULL="${OUR_FOLDER}/$(basename "$0")" + +# Create a temporary directory for configuration and logging. +TEST_FOLDER_BASE="/tmp/${TEST_NAME} 99/" # Space in the name to test quoting. +if [ -n "${TESTBOX_PATH_SCRATCH}" ]; then + TEST_FOLDER_BASE="${TESTBOX_PATH_SCRATCH}/${TEST_NAME} 99/" +fi +{ + rm -rf "${TEST_FOLDER_BASE}" 2>/dev/null && + mkdir -m 0700 "${TEST_FOLDER_BASE}" 2>/dev/null +} || abort "Could not create test folder (${TEST_FOLDER_BASE}).\n" + +############################################################################### +# Simple start-up test. # +############################################################################### +print_line "simple start-up test" +create_basic_configuration "${TEST_FOLDER_BASE}simple_start-up_test/" +touch "${XORG_FOLDER}/xorg.conf.2" +touch "${XORG_FOLDER}/xorg.conf.4" + +test_simple_start_up() +{ + STATUS="$1" + case "${STATUS}" in + 0) + LOG_FOLDER="${TEST_FOLDER}/log" + LOG="${LOG_FOLDER}/log" + if grep -q "2 ${XORG_FOLDER}/xorg.conf.2 ${LOG_FOLDER}/Xorg.2.log" "${LOG}" && + grep -q "4 ${XORG_FOLDER}/xorg.conf.4 ${LOG_FOLDER}/Xorg.4.log" "${LOG}"; then + printf "SUCCESS.\n" + else + printf "\nFAILED: incorrect log output.\n" + fi + ;; + *) + printf "\nFAILED: exit status ${STATUS}.\n" + esac +} + +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID=$! +expect_exit "${PID}" 5 test_simple_start_up + +############################################################################### +# No configuration files. # +############################################################################### +create_basic_configuration "${TEST_FOLDER_BASE}no_configuration_files/" +print_line "no configuration files" + +test_should_fail() +{ + STATUS="$1" + case "${STATUS}" in + 0) + printf "\nFAILED: successful exit when an error was expected.\n" + ;; + *) + printf "SUCCESS.\n" # At least it behaved the way we wanted. + esac +} + +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID=$! +expect_exit "${PID}" 5 test_should_fail + +############################################################################### +# Bad configuration files. # +############################################################################### +print_line "bad configuration files" +create_basic_configuration "${TEST_FOLDER_BASE}bad_configuration_files/" +touch "${XORG_FOLDER}/xorg.conf.2" +touch "${XORG_FOLDER}/xorg.conf.4" +touch "${XORG_FOLDER}/xorg.conf.other" +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID=$! +expect_exit "${PID}" 5 test_should_fail + +############################################################################### +# Long running server command. # +############################################################################### + +# Set up a configuration file for a long-running command. +create_basic_configuration "${TEST_FOLDER_BASE}long-running_command/" +cat >> "${TEST_FOLDER}conf" << EOF +HEADLESS_X_ORG_SERVER_COMMAND="${TEST_FOLDER}command.sh" +EOF + +cat > "${TEST_FOLDER}command.sh" << EOF +#!/bin/sh +touch "${TEST_FOLDER}stopped" +touch "${TEST_FOLDER}started" +trap "touch \\"${TEST_FOLDER}stopped\\"; exit" TERM +rm "${TEST_FOLDER}stopped" +while true; do :; done +EOF +chmod a+x "${TEST_FOLDER}command.sh" + +print_line "long running server command" +touch "${XORG_FOLDER}/xorg.conf.5" +FAILURE="" +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID="$!" +while [ ! -f "${TEST_FOLDER}started" ]; do :; done +while [ -f "${TEST_FOLDER}stopped" ]; do :; done +[ -n "${PID}" ] && kill "${PID}" 2>/dev/null +while [ ! -f "${TEST_FOLDER}stopped" ]; do :; done +printf "SUCCESS.\n" + +############################################################################### +# Pre-requisite test. # +############################################################################### + +# Set up a configuration file with a pre-requisite. +create_basic_configuration "${TEST_FOLDER_BASE}pre-requisite/" +cat >> "${TEST_FOLDER}conf" << EOF +HEADLESS_X_ORG_WAIT_FOR_PREREQUISITES="false" +EOF + +print_line "configuration file with failed pre-requisite" +touch "${XORG_FOLDER}/xorg.conf.2" +touch "${XORG_FOLDER}/xorg.conf.4" +if scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf"; then + echo "\nFAILED to stop for failed pre-requisite.\n" +else + echo "SUCCESS" +fi + +############################################################################### +# Pre-command test. # +############################################################################### + +# Set up our pre-command test configuration file. +create_basic_configuration "${TEST_FOLDER_BASE}pre-command/" + +cat >> "${TEST_FOLDER}conf" << EOF +test_pre_command_server_pre_command() +{ + touch "${TEST_FOLDER}/run/pre" +} +test_pre_command_server_command() +{ + cp "${TEST_FOLDER}/run/pre" "${TEST_FOLDER}/run/pre2" +} +HEADLESS_X_ORG_SERVER_PRE_COMMAND="test_pre_command_server_pre_command" +HEADLESS_X_ORG_SERVER_COMMAND="test_pre_command_server_command" +EOF + +print_line "pre-command test" +touch "${XORG_FOLDER}/xorg.conf.2" + +test_pre_command() +{ + STATUS="$1" + case "${STATUS}" in + 0) + LOG_FOLDER="${TEST_FOLDER}/log" + LOG="${LOG_FOLDER}/log" + if [ -e "${TEST_FOLDER}/run/pre" ] && [ -e "${TEST_FOLDER}/run/pre2" ]; then + printf "SUCCESS.\n" + else + printf "\nFAILED: pre-command not executed.\n" + fi + ;; + *) + printf "\nFAILED: exit status ${STATUS}.\n" + esac +} + +rm -f "${TEST_FOLDER}/run/pre" +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID=$! +expect_exit "${PID}" 5 test_pre_command + +############################################################################### +# Post-command test. # +############################################################################### + +# Set up our post-command test configuration file. +create_basic_configuration "${TEST_FOLDER_BASE}post-command/" +cat >> "${TEST_FOLDER}conf" << EOF +test_post_command_post_command() +{ + echo "\${1}" > "${TEST_FOLDER}/run/post" +} +HEADLESS_X_ORG_SERVER_POST_COMMAND="test_post_command_post_command" +EOF + +print_line "post-command test" +touch "${XORG_FOLDER}/xorg.conf.2" +touch "${XORG_FOLDER}/xorg.conf.4" + +test_post_command() +{ + STATUS="$1" + case "${STATUS}" in + 0) + LOG_FOLDER="${TEST_FOLDER}/log" + LOG="${LOG_FOLDER}/log" + if grep -q "2 4" "${TEST_FOLDER}/run/post"; then + printf "SUCCESS.\n" + else + printf "\nFAILED: post-command not executed.\n" + fi + ;; + *) + printf "\nFAILED: exit status ${STATUS}.\n" + esac +} + +rm -f "${TEST_FOLDER}/run/post" +scripts/VBoxHeadlessXOrg.sh -c "${TEST_FOLDER}conf" & +PID=$! +expect_exit "${PID}" 5 test_post_command diff --git a/src/VBox/Installer/linux/uninstall.sh b/src/VBox/Installer/linux/uninstall.sh new file mode 100755 index 00000000..7208e768 --- /dev/null +++ b/src/VBox/Installer/linux/uninstall.sh @@ -0,0 +1,166 @@ +#!/bin/sh +# +# Oracle VM VirtualBox +# VirtualBox linux uninstallation script + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. +TARGET=`readlink -e -- "${0}"` || exit 1 +MY_PATH="${TARGET%/[!/]*}" +. "${MY_PATH}/routines.sh" + +if [ -z "$ro_LOG_FILE" ]; then + create_log "/var/log/vbox-uninstall.log" +fi + +if [ -z "VBOX_NO_UNINSTALL_MESSAGE" ]; then + info "Uninstalling VirtualBox" + log "Uninstalling VirtualBox" + log "" +fi + +check_root + +[ -z "$CONFIG_DIR" ] && CONFIG_DIR="/etc/vbox" +[ -z "$CONFIG" ] && CONFIG="vbox.cfg" +[ -z "$CONFIG_FILES" ] && CONFIG_FILES="filelist" +[ -z "$DEFAULT_FILES" ] && DEFAULT_FILES=`pwd`/deffiles + +# Find previous installation +if [ -r "$CONFIG_DIR/$CONFIG" ]; then + . "$CONFIG_DIR/$CONFIG" + PREV_INSTALLATION="$INSTALL_DIR" +fi + +# Remove previous installation +if [ "$PREV_INSTALLATION" = "" ]; then + log "Unable to find a VirtualBox installation, giving up." + abort "Couldn't find a VirtualBox installation to uninstall." +fi + +# Do pre-removal common to all installer types, currently service script +# clean-up. +"${MY_PATH}/prerm-common.sh" || exit 1 + +# Remove kernel module installed +if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then + rm -f "/usr/src/vboxhost-$INSTALL_VER" 2> /dev/null + rm -f "/usr/src/vboxdrv-$INSTALL_VER" 2> /dev/null + rm -f "/usr/src/vboxnetflt-$INSTALL_VER" 2> /dev/null + rm -f "/usr/src/vboxnetadp-$INSTALL_VER" 2> /dev/null + rm -f "/usr/src/vboxpci-$INSTALL_VER" 2> /dev/null +fi + +# Remove symlinks +rm -f \ + /usr/bin/VirtualBox \ + /usr/bin/VirtualBoxVM \ + /usr/bin/VBoxManage \ + /usr/bin/VBoxSDL \ + /usr/bin/VBoxVRDP \ + /usr/bin/VBoxHeadless \ + /usr/bin/VBoxDTrace \ + /usr/bin/VBoxAudioTest \ + /usr/bin/VBoxBugReport \ + /usr/bin/VBoxBalloonCtrl \ + /usr/bin/VBoxAutostart \ + /usr/bin/VBoxNetDHCP \ + /usr/bin/VBoxNetNAT \ + /usr/bin/vboxwebsrv \ + /usr/bin/vbox-img \ + /usr/bin/vboximg-mount \ + /usr/bin/VBoxAddIF \ + /usr/bin/VBoxDeleteIf \ + /usr/bin/VBoxTunctl \ + /usr/bin/virtualbox \ + /usr/bin/virtualboxvm \ + /usr/share/pixmaps/VBox.png \ + /usr/share/pixmaps/virtualbox.png \ + /usr/share/applications/virtualbox.desktop \ + /usr/share/applications/virtualboxvm.desktop \ + /usr/share/mime/packages/virtualbox.xml \ + /usr/bin/rdesktop-vrdp \ + /usr/bin/virtualbox \ + /usr/bin/vboxmanage \ + /usr/bin/vboxsdl \ + /usr/bin/vboxheadless \ + /usr/bin/vboxdtrace \ + /usr/bin/vboxaudiotest \ + /usr/bin/vboxbugreport \ + "$PREV_INSTALLATION/components/VBoxVMM.so" \ + "$PREV_INSTALLATION/components/VBoxREM.so" \ + "$PREV_INSTALLATION/components/VBoxRT.so" \ + "$PREV_INSTALLATION/components/VBoxDDU.so" \ + "$PREV_INSTALLATION/components/VBoxXPCOM.so" \ + "$PREV_INSTALLATION/VBoxREM.so" \ + "$PREV_INSTALLATION/VBoxVRDP" \ + "$PREV_INSTALLATION/VBoxVRDP.so" \ + 2> /dev/null + +cwd=`pwd` +if [ -f "$PREV_INSTALLATION/src/Makefile" ]; then + cd "$PREV_INSTALLATION/src" + make clean > /dev/null 2>&1 +fi +if [ -f "$PREV_INSTALLATION/src/vboxdrv/Makefile" ]; then + cd "$PREV_INSTALLATION/src/vboxdrv" + make clean > /dev/null 2>&1 +fi +if [ -f "$PREV_INSTALLATION/src/vboxnetflt/Makefile" ]; then + cd "$PREV_INSTALLATION/src/vboxnetflt" + make clean > /dev/null 2>&1 +fi +if [ -f "$PREV_INSTALLATION/src/vboxnetadp/Makefile" ]; then + cd "$PREV_INSTALLATION/src/vboxnetadp" + make clean > /dev/null 2>&1 +fi +if [ -f "$PREV_INSTALLATION/src/vboxpci/Makefile" ]; then + cd "$PREV_INSTALLATION/src/vboxpci" + make clean > /dev/null 2>&1 +fi +cd "$PREV_INSTALLATION" +if [ -r "$CONFIG_DIR/$CONFIG_FILES" ]; then + rm -f `cat "$CONFIG_DIR/$CONFIG_FILES"` 2> /dev/null +elif [ -n "$DEFAULT_FILES" -a -r "$DEFAULT_FILES" ]; then + DEFAULT_FILE_NAMES="" + . "$DEFAULT_FILES" + rm -f $DEFAULT_FILE_NAMES 2> /dev/null +fi +for file in `find "$PREV_INSTALLATION" 2> /dev/null`; do + rmdir -p "$file" 2> /dev/null +done +cd "$cwd" 2> /dev/null +mkdir -p "$PREV_INSTALLATION" 2> /dev/null # The above actually removes the current directory and parents! +rmdir "$PREV_INSTALLATION" 2> /dev/null +rm -f "$CONFIG_DIR/$CONFIG" 2> /dev/null +rm -f "$CONFIG_DIR/$CONFIG_FILES" 2> /dev/null +rmdir "$CONFIG_DIR" 2> /dev/null + +update-mime-database /usr/share/mime >/dev/null 2>&1 + +if [ -z "$VBOX_NO_UNINSTALL_MESSAGE" ]; then + [ -n "$INSTALL_REV" ] && INSTALL_REV=" r$INSTALL_REV" + info "VirtualBox $INSTALL_VER$INSTALL_REV has been removed successfully." + log "Successfully $INSTALL_VER$INSTALL_REV removed VirtualBox." +fi diff --git a/src/VBox/Installer/linux/vboxautostart-service.sh b/src/VBox/Installer/linux/vboxautostart-service.sh new file mode 100755 index 00000000..16746db4 --- /dev/null +++ b/src/VBox/Installer/linux/vboxautostart-service.sh @@ -0,0 +1,184 @@ +#!/bin/sh +# $Id: vboxautostart-service.sh $ +## @file +# VirtualBox autostart service init script. +# + +# +# Copyright (C) 2012-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# chkconfig: 345 35 65 +# description: VirtualBox autostart service +# +### BEGIN INIT INFO +# Provides: vboxautostart-service +# Required-Start: vboxdrv +# Required-Stop: vboxdrv +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: VirtualBox autostart service +### END INIT INFO + +PATH=$PATH:/bin:/sbin:/usr/sbin +SCRIPTNAME=vboxautostart-service.sh + +[ -f /etc/debian_release -a -f /lib/lsb/init-functions ] || NOLSB=yes +[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg + +if [ -n "$INSTALL_DIR" ]; then + binary="$INSTALL_DIR/VBoxAutostart" +else + binary="/usr/lib/virtualbox/VBoxAutostart" +fi + +# silently exit if the package was uninstalled but not purged, +# applies to Debian packages only (but shouldn't hurt elsewhere) +[ ! -f /etc/debian_release -o -x $binary ] || exit 0 + +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +# Preamble for Gentoo +if [ "`which $0`" = "/sbin/rc" ]; then + shift +fi + +begin_msg() +{ + test -n "${2}" && echo "${SCRIPTNAME}: ${1}." + logger -t "${SCRIPTNAME}" "${1}." +} + +succ_msg() +{ + logger -t "${SCRIPTNAME}" "${1}." +} + +fail_msg() +{ + echo "${SCRIPTNAME}: failed: ${1}." >&2 + logger -t "${SCRIPTNAME}" "failed: ${1}." +} + +start_daemon() { + usr="$1" + shift + su - $usr -c "$*" +} + +if which start-stop-daemon >/dev/null 2>&1; then + start_daemon() { + usr="$1" + shift + bin="$1" + shift + start-stop-daemon --chuid $usr --start --exec $bin -- $@ + } +fi + +vboxdrvrunning() { + lsmod | grep -q "vboxdrv[^_-]" +} + +valid_db_entry() { + + entry="$1" + [ -z "$entry" ] && return 1 + + user="$2" + [ -z "$user" ] && return 1 + + user_name=$(id -n -u "$user" 2>/dev/null) + [ -z "$user_name" ] && return 1 + + user_id=$(id -u "$user" 2>/dev/null) + + # Verify that @user identifies a user *by name* (i.e. not a numeric id). + # Careful, all numeric user names are legal. + if [ "$user_id" = "$user" ] && [ "$user_name" != "$user" ]; then + return 1 + fi + + # Verify whether file name is the same as file owner name. + [ -z "$(find "$entry" -user "$user" -type f 2>/dev/null)" ] && return 1 + + return 0 +} + +start() { + [ -z "$VBOXAUTOSTART_DB" ] && exit 0 + [ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0 + begin_msg "Starting VirtualBox VMs configured for autostart" console; + vboxdrvrunning || { + fail_msg "VirtualBox kernel module not loaded!" + exit 0 + } + PARAMS="--background --start --config $VBOXAUTOSTART_CONFIG" + + # prevent inheriting this setting to VBoxSVC + unset VBOX_RELEASE_LOG_DEST + + for entry in "$VBOXAUTOSTART_DB"/*.start + do + user=$(basename "$entry" .start) + [ "$user" = "*" ] && break + valid_db_entry "$entry" "$user" || continue + + start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1 + done + + return $RETVAL +} + +stop() { + [ -z "$VBOXAUTOSTART_DB" ] && exit 0 + [ -z "$VBOXAUTOSTART_CONFIG" ] && exit 0 + + PARAMS="--stop --config $VBOXAUTOSTART_CONFIG" + + # prevent inheriting this setting to VBoxSVC + unset VBOX_RELEASE_LOG_DEST + + for entry in "$VBOXAUTOSTART_DB"/*.stop + do + user=$(basename "$entry" .stop) + [ "$user" = "*" ] && break + valid_db_entry "$entry" "$user" || continue + + start_daemon "$user" "$binary" $PARAMS > /dev/null 2>&1 + done + + return $RETVAL +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +*) + echo "Usage: $0 {start|stop}" + exit 1 +esac + +exit $RETVAL diff --git a/src/VBox/Installer/linux/vboxballoonctrl-service.sh b/src/VBox/Installer/linux/vboxballoonctrl-service.sh new file mode 100755 index 00000000..e6f0d8e4 --- /dev/null +++ b/src/VBox/Installer/linux/vboxballoonctrl-service.sh @@ -0,0 +1,218 @@ +#!/bin/sh +# $Id: vboxballoonctrl-service.sh $ +## @file +# VirtualBox watchdog daemon init script. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# chkconfig: 345 35 65 +# description: VirtualBox watchdog daemon +# +### BEGIN INIT INFO +# Provides: vboxballoonctrl-service +# Required-Start: vboxdrv +# Required-Stop: vboxdrv +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: VirtualBox watchdog daemon +### END INIT INFO + +PATH=$PATH:/bin:/sbin:/usr/sbin +SCRIPTNAME=vboxballoonctrl-service.sh + +[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg + +if [ -n "$INSTALL_DIR" ]; then + binary="$INSTALL_DIR/VBoxBalloonCtrl" +else + binary="/usr/lib/virtualbox/VBoxBalloonCtrl" +fi + +# silently exit if the package was uninstalled but not purged, +# applies to Debian packages only (but shouldn't hurt elsewhere) +[ ! -f /etc/debian_release -o -x $binary ] || exit 0 + +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +PIDFILE="/var/run/${SCRIPTNAME}" + +# Preamble for Gentoo +if [ "`which $0`" = "/sbin/rc" ]; then + shift +fi + +begin_msg() +{ + test -n "${2}" && echo "${SCRIPTNAME}: ${1}." + logger -t "${SCRIPTNAME}" "${1}." +} + +succ_msg() +{ + logger -t "${SCRIPTNAME}" "${1}." +} + +fail_msg() +{ + echo "${SCRIPTNAME}: failed: ${1}." >&2 + logger -t "${SCRIPTNAME}" "failed: ${1}." +} + +start_daemon() { + usr="$1" + shift + su - $usr -c "$*" +} + +killproc() { + killall $1 + rm -f $PIDFILE +} + +if which start-stop-daemon >/dev/null 2>&1; then + start_daemon() { + usr="$1" + shift + bin="$1" + shift + start-stop-daemon --background --chuid $usr --start --exec $bin -- $@ + } + + killproc() { + start-stop-daemon --stop --exec $@ + } +fi + +vboxdrvrunning() { + lsmod | grep -q "vboxdrv[^_-]" +} + +check_single_user() { + if [ -n "$2" ]; then + fail_msg "VBOXWATCHDOG_USER must not contain multiple users!" + exit 1 + fi +} + +start() { + if ! test -f $PIDFILE; then + [ -z "$VBOXWATCHDOG_USER" -a -z "$VBOXBALLOONCTRL_USER" ] && exit 0 + [ -z "$VBOXWATCHDOG_USER" ] && VBOXWATCHDOG_USER="$VBOXBALLOONCTRL_USER" + begin_msg "Starting VirtualBox watchdog service" console; + check_single_user $VBOXWATCHDOG_USER + vboxdrvrunning || { + fail_msg "VirtualBox kernel module not loaded!" + exit 0 + } + # Handle legacy parameters, do not add any further ones unless absolutely necessary. + [ -z "$VBOXWATCHDOG_BALLOON_INTERVAL" -a -n "$VBOXBALLOONCTRL_INTERVAL" ] && VBOXWATCHDOG_BALLOON_INTERVAL="$VBOXBALLOONCTRL_INTERVAL" + [ -z "$VBOXWATCHDOG_BALLOON_INCREMENT" -a -n "$VBOXBALLOONCTRL_INCREMENT" ] && VBOXWATCHDOG_BALLOON_INCREMENT="$VBOXBALLOONCTRL_INCREMENT" + [ -z "$VBOXWATCHDOG_BALLOON_DECREMENT" -a -n "$VBOXBALLOONCTRL_DECREMENT" ] && VBOXWATCHDOG_BALLOON_DECREMENT="$VBOXBALLOONCTRL_DECREMENT" + [ -z "$VBOXWATCHDOG_BALLOON_LOWERLIMIT" -a -n "$VBOXBALLOONCTRL_LOWERLIMIT" ] && VBOXWATCHDOG_BALLOON_LOWERLIMIT="$VBOXBALLOONCTRL_LOWERLIMIT" + [ -z "$VBOXWATCHDOG_BALLOON_SAFETYMARGIN" -a -n "$VBOXBALLOONCTRL_SAFETYMARGIN" ] && VBOXWATCHDOG_BALLOON_SAFETYMARGIN="$VBOXBALLOONCTRL_SAFETYMARGIN" + [ -z "$VBOXWATCHDOG_ROTATE" -a -n "$VBOXBALLOONCTRL_ROTATE" ] && VBOXWATCHDOG_ROTATE="$VBOXBALLOONCTRL_ROTATE" + [ -z "$VBOXWATCHDOG_LOGSIZE" -a -n "$VBOXBALLOONCTRL_LOGSIZE" ] && VBOXWATCHDOG_LOGSIZE="$VBOXBALLOONCTRL_LOGSIZE" + [ -z "$VBOXWATCHDOG_LOGINTERVAL" -a -n "$VBOXBALLOONCTRL_LOGINTERVAL" ] && VBOXWATCHDOG_LOGINTERVAL="$VBOXBALLOONCTRL_LOGINTERVAL" + + PARAMS="--background" + [ -n "$VBOXWATCHDOG_BALLOON_INTERVAL" ] && PARAMS="$PARAMS --balloon-interval \"$VBOXWATCHDOG_BALLOON_INTERVAL\"" + [ -n "$VBOXWATCHDOG_BALLOON_INCREMENT" ] && PARAMS="$PARAMS --balloon-inc \"$VBOXWATCHDOG_BALLOON_INCREMENT\"" + [ -n "$VBOXWATCHDOG_BALLOON_DECREMENT" ] && PARAMS="$PARAMS --balloon-dec \"$VBOXWATCHDOG_BALLOON_DECREMENT\"" + [ -n "$VBOXWATCHDOG_BALLOON_LOWERLIMIT" ] && PARAMS="$PARAMS --balloon-lower-limit \"$VBOXWATCHDOG_BALLOON_LOWERLIMIT\"" + [ -n "$VBOXWATCHDOG_BALLOON_SAFETYMARGIN" ] && PARAMS="$PARAMS --balloon-safety-margin \"$VBOXWATCHDOG_BALLOON_SAFETYMARGIN\"" + [ -n "$VBOXWATCHDOG_ROTATE" ] && PARAMS="$PARAMS -R \"$VBOXWATCHDOG_ROTATE\"" + [ -n "$VBOXWATCHDOG_LOGSIZE" ] && PARAMS="$PARAMS -S \"$VBOXWATCHDOG_LOGSIZE\"" + [ -n "$VBOXWATCHDOG_LOGINTERVAL" ] && PARAMS="$PARAMS -I \"$VBOXWATCHDOG_LOGINTERVAL\"" + # prevent inheriting this setting to VBoxSVC + unset VBOX_RELEASE_LOG_DEST + start_daemon $VBOXWATCHDOG_USER $binary $PARAMS > /dev/null 2>&1 + # ugly: wait until the final process has forked + sleep .1 + PID=`pidof $binary 2>/dev/null` + if [ -n "$PID" ]; then + echo "$PID" > $PIDFILE + RETVAL=0 + succ_msg "VirtualBox watchdog service started" + else + RETVAL=1 + fail_msg "VirtualBox watchdog service failed to start" + fi + fi + return $RETVAL +} + +stop() { + if test -f $PIDFILE; then + begin_msg "Stopping VirtualBox watchdog service" console; + killproc $binary + RETVAL=$? + if ! pidof $binary > /dev/null 2>&1; then + rm -f $PIDFILE + succ_msg "VirtualBox watchdog service stopped" + else + fail_msg "VirtualBox watchdog service failed to stop" + fi + fi + return $RETVAL +} + +restart() { + stop && start +} + +status() { + echo -n "Checking for VBox watchdog service" + if [ -f $PIDFILE ]; then + echo " ...running" + else + echo " ...not running" + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +force-reload) + restart + ;; +status) + status + ;; +setup) + ;; +cleanup) + ;; +*) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit $RETVAL diff --git a/src/VBox/Installer/linux/vboxdrv.sh b/src/VBox/Installer/linux/vboxdrv.sh new file mode 100755 index 00000000..9eeac7c4 --- /dev/null +++ b/src/VBox/Installer/linux/vboxdrv.sh @@ -0,0 +1,856 @@ +#! /bin/sh +# Oracle VM VirtualBox +# Linux kernel module init script + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# chkconfig: 345 20 80 +# description: VirtualBox Linux kernel module +# +### BEGIN INIT INFO +# Provides: vboxdrv +# Required-Start: $syslog +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: VirtualBox Linux kernel module +### END INIT INFO + +## @todo This file duplicates a lot of script with vboxadd.sh. When making +# changes please try to reduce differences between the two wherever possible. + +## @todo Remove the stop_vms target so that this script is only relevant to +# kernel modules. Nice but not urgent. + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH +DEVICE=/dev/vboxdrv +MODPROBE=/sbin/modprobe +SCRIPTNAME=vboxdrv.sh + +# The below is GNU-specific. See VBox.sh for the longer Solaris/OS X version. +TARGET=`readlink -e -- "${0}"` || exit 1 +SCRIPT_DIR="${TARGET%/[!/]*}" + +if $MODPROBE -c | grep -q '^allow_unsupported_modules *0'; then + MODPROBE="$MODPROBE --allow-unsupported-modules" +fi + +setup_log() +{ + test -n "${LOG}" && return 0 + # Rotate log files + LOG="/var/log/vbox-setup.log" + mv "${LOG}.3" "${LOG}.4" 2>/dev/null + mv "${LOG}.2" "${LOG}.3" 2>/dev/null + mv "${LOG}.1" "${LOG}.2" 2>/dev/null + mv "${LOG}" "${LOG}.1" 2>/dev/null +} + +[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg +export VBOX_KBUILD_TYPE +export USERNAME +export USER=$USERNAME + +if test -n "${INSTALL_DIR}" && test -x "${INSTALL_DIR}/VirtualBox"; then + MODULE_SRC="${INSTALL_DIR}/src/vboxhost" +elif test -x /usr/lib/virtualbox/VirtualBox; then + INSTALL_DIR=/usr/lib/virtualbox + MODULE_SRC="/usr/share/virtualbox/src/vboxhost" +elif test -x "${SCRIPT_DIR}/VirtualBox"; then + # Executing from the build directory + INSTALL_DIR="${SCRIPT_DIR}" + MODULE_SRC="${INSTALL_DIR}/src" +else + # Silently exit if the package was uninstalled but not purged. + # Applies to Debian packages only (but shouldn't hurt elsewhere) + exit 0 +fi +VIRTUALBOX="${INSTALL_DIR}/VirtualBox" +VBOXMANAGE="${INSTALL_DIR}/VBoxManage" +BUILDINTMP="${MODULE_SRC}/build_in_tmp" +if test -u "${VIRTUALBOX}"; then + GROUP=root + DEVICE_MODE=0600 +else + GROUP=vboxusers + DEVICE_MODE=0660 +fi + +KERN_VER=`uname -r` + +# Prepend PATH for building UEK7 on OL8 distribution. +case "$KERN_VER" in + 5.15.0-*.el8uek*) PATH="/opt/rh/gcc-toolset-11/root/usr/bin:$PATH";; +esac + +if test -e "${MODULE_SRC}/vboxpci"; then + MODULE_LIST="vboxdrv vboxnetflt vboxnetadp vboxpci" +else + MODULE_LIST="vboxdrv vboxnetflt vboxnetadp" +fi +# Secure boot state. +case "`mokutil --sb-state 2>/dev/null`" in + *"disabled in shim"*) unset HAVE_SEC_BOOT;; + *"SecureBoot enabled"*) HAVE_SEC_BOOT=true;; + *) unset HAVE_SEC_BOOT;; +esac +# So far we can only sign modules on Ubuntu and on Debian 10 and later. +DEB_PUB_KEY=/var/lib/shim-signed/mok/MOK.der +DEB_PRIV_KEY=/var/lib/shim-signed/mok/MOK.priv +unset HAVE_DEB_KEY +case "`mokutil --test-key "$DEB_PUB_KEY" 2>/dev/null`" in + *"is already"*) DEB_KEY_ENROLLED=true;; + *) unset DEB_KEY_ENROLLED;; +esac + +# Try to find a tool for modules signing. +SIGN_TOOL=$(which kmodsign 2>/dev/null) +# Attempt to use in-kernel signing tool if kmodsign not found. +if test -z "$SIGN_TOOL"; then + if test -x "/lib/modules/$KERN_VER/build/scripts/sign-file"; then + SIGN_TOOL="/lib/modules/$KERN_VER/build/scripts/sign-file" + fi +fi + +# Check if update-secureboot-policy tool supports required commandline options. +update_secureboot_policy_supports() +{ + opt_name="$1" + [ -n "$opt_name" ] || return + + [ -z "$(update-secureboot-policy --help 2>&1 | grep "$opt_name")" ] && return + echo "1" +} + +HAVE_UPDATE_SECUREBOOT_POLICY_TOOL= +if type update-secureboot-policy >/dev/null 2>&1; then + [ "$(update_secureboot_policy_supports new-key)" = "1" -a "$(update_secureboot_policy_supports enroll-key)" = "1" ] && \ + HAVE_UPDATE_SECUREBOOT_POLICY_TOOL=true +fi + +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +# Preamble for Gentoo +if [ "`which $0`" = "/sbin/rc" ]; then + shift +fi + +begin_msg() +{ + test -n "${2}" && echo "${SCRIPTNAME}: ${1}." + logger -t "${SCRIPTNAME}" "${1}." +} + +succ_msg() +{ + logger -t "${SCRIPTNAME}" "${1}." +} + +fail_msg() +{ + echo "${SCRIPTNAME}: failed: ${1}." >&2 + logger -t "${SCRIPTNAME}" "failed: ${1}." +} + +failure() +{ + fail_msg "$1" + exit 1 +} + +running() +{ + lsmod | grep -q "$1[^_-]" +} + +log() +{ + setup_log + echo "${1}" >> "${LOG}" +} + +module_build_log() +{ + setup_log + echo "${1}" | egrep -v \ + "^test -e include/generated/autoconf.h|^echo >&2|^/bin/false\)$" \ + >> "${LOG}" +} + +# Detect VirtualBox version info or report error. +VBOX_VERSION="`"$VBOXMANAGE" -v | cut -d r -f1`" +[ -n "$VBOX_VERSION" ] || failure 'Cannot detect VirtualBox version number' +VBOX_REVISION="r`"$VBOXMANAGE" -v | cut -d r -f2`" +[ "$VBOX_REVISION" != "r" ] || failure 'Cannot detect VirtualBox revision number' + +## Output the vboxdrv part of our udev rule. This is redirected to the right file. +udev_write_vboxdrv() { + VBOXDRV_GRP="$1" + VBOXDRV_MODE="$2" + + echo "KERNEL==\"vboxdrv\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" + echo "KERNEL==\"vboxdrvu\", OWNER=\"root\", GROUP=\"root\", MODE=\"0666\"" + echo "KERNEL==\"vboxnetctl\", OWNER=\"root\", GROUP=\"$VBOXDRV_GRP\", MODE=\"$VBOXDRV_MODE\"" +} + +## Output the USB part of our udev rule. This is redirected to the right file. +udev_write_usb() { + INSTALLATION_DIR="$1" + USB_GROUP="$2" + + echo "SUBSYSTEM==\"usb_device\", ACTION==\"add\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\"" + echo "SUBSYSTEM==\"usb\", ACTION==\"add\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh \$major \$minor \$attr{bDeviceClass}${USB_GROUP}\"" + echo "SUBSYSTEM==\"usb_device\", ACTION==\"remove\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" + echo "SUBSYSTEM==\"usb\", ACTION==\"remove\", ENV{DEVTYPE}==\"usb_device\", RUN+=\"$INSTALLATION_DIR/VBoxCreateUSBNode.sh --remove \$major \$minor\"" +} + +## Generate our udev rule file. This takes a change in udev rule syntax in +## version 55 into account. It only creates rules for USB for udev versions +## recent enough to support USB device nodes. +generate_udev_rule() { + VBOXDRV_GRP="$1" # The group owning the vboxdrv device + VBOXDRV_MODE="$2" # The access mode for the vboxdrv device + INSTALLATION_DIR="$3" # The directory VirtualBox is installed in + USB_GROUP="$4" # The group that has permission to access USB devices + NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules + + # Extra space! + case "$USB_GROUP" in ?*) USB_GROUP=" $USB_GROUP" ;; esac + case "$NO_INSTALL" in "1") return ;; esac + udev_write_vboxdrv "$VBOXDRV_GRP" "$VBOXDRV_MODE" + udev_write_usb "$INSTALLATION_DIR" "$USB_GROUP" +} + +## Install udev rule (disable with INSTALL_NO_UDEV=1 in +## /etc/default/virtualbox). +install_udev() { + VBOXDRV_GRP="$1" # The group owning the vboxdrv device + VBOXDRV_MODE="$2" # The access mode for the vboxdrv device + INSTALLATION_DIR="$3" # The directory VirtualBox is installed in + USB_GROUP="$4" # The group that has permission to access USB devices + NO_INSTALL="$5" # Set this to "1" to remove but not re-install rules + + if test -d /etc/udev/rules.d; then + generate_udev_rule "$VBOXDRV_GRP" "$VBOXDRV_MODE" "$INSTALLATION_DIR" \ + "$USB_GROUP" "$NO_INSTALL" + fi + # Remove old udev description file + rm -f /etc/udev/rules.d/10-vboxdrv.rules 2> /dev/null +} + +## Create a usb device node for a given sysfs path to a USB device. +install_create_usb_node_for_sysfs() { + path="$1" # sysfs path for the device + usb_createnode="$2" # Path to the USB device node creation script + usb_group="$3" # The group to give ownership of the node to + if test -r "${path}/dev"; then + dev="`cat "${path}/dev" 2> /dev/null`" + major="`expr "$dev" : '\(.*\):' 2> /dev/null`" + minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null`" + class="`cat ${path}/bDeviceClass 2> /dev/null`" + sh "${usb_createnode}" "$major" "$minor" "$class" \ + "${usb_group}" 2>/dev/null + fi +} + +udev_rule_file=/etc/udev/rules.d/60-vboxdrv.rules +sysfs_usb_devices="/sys/bus/usb/devices/*" + +## Install udev rules and create device nodes for usb access +setup_usb() { + VBOXDRV_GRP="$1" # The group that should own /dev/vboxdrv + VBOXDRV_MODE="$2" # The mode to be used for /dev/vboxdrv + INSTALLATION_DIR="$3" # The directory VirtualBox is installed in + USB_GROUP="$4" # The group that should own the /dev/vboxusb device + # nodes unless INSTALL_NO_GROUP=1 in + # /etc/default/virtualbox. Optional. + usb_createnode="$INSTALLATION_DIR/VBoxCreateUSBNode.sh" + # install udev rule (disable with INSTALL_NO_UDEV=1 in + # /etc/default/virtualbox) + if [ "$INSTALL_NO_GROUP" != "1" ]; then + usb_group=$USB_GROUP + vboxdrv_group=$VBOXDRV_GRP + else + usb_group=root + vboxdrv_group=root + fi + install_udev "${vboxdrv_group}" "$VBOXDRV_MODE" \ + "$INSTALLATION_DIR" "${usb_group}" \ + "$INSTALL_NO_UDEV" > ${udev_rule_file} + # Build our device tree + for i in ${sysfs_usb_devices}; do # This line intentionally without quotes. + install_create_usb_node_for_sysfs "$i" "${usb_createnode}" \ + "${usb_group}" + done +} + +cleanup_usb() +{ + # Remove udev description file + rm -f /etc/udev/rules.d/60-vboxdrv.rules + rm -f /etc/udev/rules.d/10-vboxdrv.rules + + # Remove our USB device tree + rm -rf /dev/vboxusb +} + +# Returns path to module file as seen by modinfo(8) or empty string. +module_path() +{ + mod="$1" + [ -n "$mod" ] || return + + modinfo "$mod" 2>/dev/null | grep -e "^filename:" | tr -s ' ' | cut -d " " -f2 +} + +# Returns module version if module is available or empty string. +module_version() +{ + mod="$1" + [ -n "$mod" ] || return + + modinfo "$mod" 2>/dev/null | grep -e "^version:" | tr -s ' ' | cut -d " " -f2 +} + +# Returns module revision if module is available in the system or empty string. +module_revision() +{ + mod="$1" + [ -n "$mod" ] || return + + modinfo "$mod" 2>/dev/null | grep -e "^version:" | tr -s ' ' | cut -d " " -f3 +} + +# Reads kernel configuration option. +kernel_get_config_opt() +{ + opt_name="$1" + [ -n "$opt_name" ] || return + + # Check if there is a kernel tool which can extract config option. + if test -x /lib/modules/"$KERN_VER"/build/scripts/config; then + /lib/modules/"$KERN_VER"/build/scripts/config \ + --file /lib/modules/"$KERN_VER"/build/.config \ + --state "$opt_name" 2>/dev/null + elif test -f /lib/modules/"$KERN_VER"/build/.config; then + # Extract config option manually. + grep "$opt_name" /lib/modules/"$KERN_VER"/build/.config | sed -e "s/^$opt_name=//" -e "s/\"//g" + fi +} + +# Reads CONFIG_MODULE_SIG_HASH from kernel config. +kernel_module_sig_hash() +{ + kernel_get_config_opt "CONFIG_MODULE_SIG_HASH" +} + +# Returns "1" if kernel module signature hash algorithm +# is supported by us. Or empty string otherwise. +module_sig_hash_supported() +{ + sig_hashalgo="$1" + [ -n "$sig_hashalgo" ] || return + + # Go through supported list. + [ "$sig_hashalgo" = "sha1" \ + -o "$sig_hashalgo" = "sha224" \ + -o "$sig_hashalgo" = "sha256" \ + -o "$sig_hashalgo" = "sha384" \ + -o "$sig_hashalgo" = "sha512" ] || return + + echo "1" +} + +# Returns "1" if module is signed and signature can be verified +# with public key provided in DEB_PUB_KEY. Or empty string otherwise. +module_signed() +{ + mod="$1" + [ -n "$mod" ] || return + + extraction_tool=/lib/modules/"$(uname -r)"/build/scripts/extract-module-sig.pl + mod_path=$(module_path "$mod" 2>/dev/null) + openssl_tool=$(which openssl 2>/dev/null) + # Do not use built-in printf! + printf_tool=$(which printf 2>/dev/null) + + # Make sure all the tools required for signature validation are available. + [ -x "$extraction_tool" ] || return + [ -n "$mod_path" ] || return + [ -n "$openssl_tool" ] || return + [ -n "$printf_tool" ] || return + + # Make sure openssl can handle hash algorithm. + sig_hashalgo=$(modinfo -F sig_hashalgo "$mod" 2>/dev/null) + [ "$(module_sig_hash_supported $sig_hashalgo)" = "1" ] || return + + # Generate file names for temporary stuff. + mod_pub_key=$(mktemp -u) + mod_signature=$(mktemp -u) + mod_unsigned=$(mktemp -u) + + # Convert public key in DER format into X509 certificate form. + "$openssl_tool" x509 -pubkey -inform DER -in "$DEB_PUB_KEY" -out "$mod_pub_key" 2>/dev/null + # Extract raw module signature and convert it into binary format. + "$printf_tool" \\x$(modinfo -F signature "$mod" | sed -z 's/[ \t\n]//g' | sed -e "s/:/\\\x/g") 2>/dev/null > "$mod_signature" + # Extract unsigned module for further digest calculation. + "$extraction_tool" -0 "$mod_path" 2>/dev/null > "$mod_unsigned" + + # Verify signature. + rc="" + "$openssl_tool" dgst "-$sig_hashalgo" -binary -verify "$mod_pub_key" -signature "$mod_signature" "$mod_unsigned" 2>&1 >/dev/null && rc="1" + # Clean up. + rm -f $mod_pub_key $mod_signature $mod_unsigned + + # Check result. + [ "$rc" = "1" ] || return + + echo "1" +} + +# Returns "1" if externally built module is available in the system and its +# version and revision number do match to current VirtualBox installation. +# Or empty string otherwise. +module_available() +{ + mod="$1" + [ -n "$mod" ] || return + + [ "$VBOX_VERSION" = "$(module_version "$mod")" ] || return + [ "$VBOX_REVISION" = "$(module_revision "$mod")" ] || return + + # Check if module belongs to VirtualBox installation. + # + # We have a convention that only modules from /lib/modules/*/misc + # belong to us. Modules from other locations are treated as + # externally built. + mod_path="$(module_path "$mod")" + + # If module path points to a symbolic link, resolve actual file location. + [ -L "$mod_path" ] && mod_path="$(readlink -e -- "$mod_path")" + + # File exists? + [ -f "$mod_path" ] || return + + # Extract last component of module path and check whether it is located + # outside of /lib/modules/*/misc. + mod_dir="$(dirname "$mod_path" | sed 's;^.*/;;')" + [ "$mod_dir" = "misc" ] || return + + # In case if system is running in Secure Boot mode, check if module is signed. + if test -n "$HAVE_SEC_BOOT"; then + [ "$(module_signed "$mod")" = "1" ] || return + fi + + echo "1" +} + +# Check if required modules are installed in the system and versions match. +setup_complete() +{ + [ "$(module_available vboxdrv)" = "1" ] || return + [ "$(module_available vboxnetflt)" = "1" ] || return + [ "$(module_available vboxnetadp)" = "1" ] || return + + # All modules are in place. + echo "1" +} + +start() +{ + begin_msg "Starting VirtualBox services" console + if [ -d /proc/xen ]; then + failure "Running VirtualBox in a Xen environment is not supported" + fi + if test -n "$HAVE_SEC_BOOT" && test -z "$DEB_KEY_ENROLLED"; then + if test -n "$HAVE_DEB_KEY"; then + begin_msg "You must re-start your system to finish Debian secure boot set-up." console + else + begin_msg "You must sign these kernel modules before using VirtualBox: + $MODULE_LIST +See the documentation for your Linux distribution." console + fi + fi + + if ! running vboxdrv; then + + # Check if system already has matching modules installed. + [ "$(setup_complete)" = "1" ] || setup + + if ! rm -f $DEVICE; then + failure "Cannot remove $DEVICE" + fi + if ! $MODPROBE vboxdrv > /dev/null 2>&1; then + failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why" + fi + sleep .2 + fi + # ensure the character special exists + if [ ! -c $DEVICE ]; then + MAJOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/devices` + if [ ! -z "$MAJOR" ]; then + MINOR=0 + else + MINOR=`sed -n 's;\([0-9]\+\) vboxdrv$;\1;p' /proc/misc` + if [ ! -z "$MINOR" ]; then + MAJOR=10 + fi + fi + if [ -z "$MAJOR" ]; then + rmmod vboxdrv 2>/dev/null + failure "Cannot locate the VirtualBox device" + fi + if ! mknod -m 0660 $DEVICE c $MAJOR $MINOR 2>/dev/null; then + rmmod vboxdrv 2>/dev/null + failure "Cannot create device $DEVICE with major $MAJOR and minor $MINOR" + fi + fi + # ensure permissions + if ! chown :"${GROUP}" $DEVICE 2>/dev/null; then + rmmod vboxpci 2>/dev/null + rmmod vboxnetadp 2>/dev/null + rmmod vboxnetflt 2>/dev/null + rmmod vboxdrv 2>/dev/null + failure "Cannot change group ${GROUP} for device $DEVICE" + fi + if ! $MODPROBE vboxnetflt > /dev/null 2>&1; then + failure "modprobe vboxnetflt failed. Please use 'dmesg' to find out why" + fi + if ! $MODPROBE vboxnetadp > /dev/null 2>&1; then + failure "modprobe vboxnetadp failed. Please use 'dmesg' to find out why" + fi + if test -e "${MODULE_SRC}/vboxpci" && ! $MODPROBE vboxpci > /dev/null 2>&1; then + failure "modprobe vboxpci failed. Please use 'dmesg' to find out why" + fi + # Create the /dev/vboxusb directory if the host supports that method + # of USB access. The USB code checks for the existance of that path. + if grep -q usb_device /proc/devices; then + mkdir -p -m 0750 /dev/vboxusb 2>/dev/null + chown root:vboxusers /dev/vboxusb 2>/dev/null + fi + # Remove any kernel modules left over from previously installed kernels. + cleanup only_old + succ_msg "VirtualBox services started" +} + +stop() +{ + begin_msg "Stopping VirtualBox services" console + + if running vboxpci; then + if ! rmmod vboxpci 2>/dev/null; then + failure "Cannot unload module vboxpci" + fi + fi + if running vboxnetadp; then + if ! rmmod vboxnetadp 2>/dev/null; then + failure "Cannot unload module vboxnetadp" + fi + fi + if running vboxdrv; then + if running vboxnetflt; then + if ! rmmod vboxnetflt 2>/dev/null; then + failure "Cannot unload module vboxnetflt" + fi + fi + if ! rmmod vboxdrv 2>/dev/null; then + failure "Cannot unload module vboxdrv" + fi + if ! rm -f $DEVICE; then + failure "Cannot unlink $DEVICE" + fi + fi + succ_msg "VirtualBox services stopped" +} + +# enter the following variables in /etc/default/virtualbox: +# SHUTDOWN_USERS="foo bar" +# check for running VMs of user foo and user bar +# SHUTDOWN=poweroff +# SHUTDOWN=acpibutton +# SHUTDOWN=savestate +# select one of these shutdown methods for running VMs +stop_vms() +{ + wait=0 + for i in $SHUTDOWN_USERS; do + # don't create the ipcd directory with wrong permissions! + if [ -d /tmp/.vbox-$i-ipc ]; then + export VBOX_IPC_SOCKETID="$i" + VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null` + if [ -n "$VMS" ]; then + if [ "$SHUTDOWN" = "poweroff" ]; then + begin_msg "Powering off remaining VMs" + for v in $VMS; do + $VBOXMANAGE --nologo controlvm $v poweroff + done + succ_msg "Remaining VMs powered off" + elif [ "$SHUTDOWN" = "acpibutton" ]; then + begin_msg "Sending ACPI power button event to remaining VMs" + for v in $VMS; do + $VBOXMANAGE --nologo controlvm $v acpipowerbutton + wait=30 + done + succ_msg "ACPI power button event sent to remaining VMs" + elif [ "$SHUTDOWN" = "savestate" ]; then + begin_msg "Saving state of remaining VMs" + for v in $VMS; do + $VBOXMANAGE --nologo controlvm $v savestate + done + succ_msg "State of remaining VMs saved" + fi + fi + fi + done + # wait for some seconds when doing ACPI shutdown + if [ "$wait" -ne 0 ]; then + begin_msg "Waiting for $wait seconds for VM shutdown" + sleep $wait + succ_msg "Waited for $wait seconds for VM shutdown" + fi +} + +cleanup() +{ + # If this is set, only remove kernel modules for no longer installed + # kernels. Note that only generated kernel modules should be placed + # in /lib/modules/*/misc. Anything that we should not remove automatically + # should go elsewhere. + only_old="${1}" + for i in /lib/modules/*; do + # Check whether we are only cleaning up for uninstalled kernels. + test -n "${only_old}" && test -e "${i}/kernel/drivers" && continue + + unset do_update + for j in $MODULE_LIST; do + for mod_ext in ko ko.gz ko.xz ko.zst; do + test -f "${i}/misc/${j}.${mod_ext}" && do_update=1 && rm -f "${i}/misc/${j}.${mod_ext}" + done + done + + # Trigger depmod(8) only in case if directory content was modified + # and save a bit of run time. + test -n "$do_update" && depmod -a "$(basename "$i")" && sync + + # Remove the kernel version folder if it was empty except for us. + test "`echo ${i}/misc/* ${i}/misc/.?* ${i}/* ${i}/.?*`" \ + = "${i}/misc/* ${i}/misc/.. ${i}/misc ${i}/.." && + rmdir "${i}/misc" "${i}" # We used to leave empty folders. + done +} + +# setup_script +setup() +{ + begin_msg "Building VirtualBox kernel modules" console + log "Building the main VirtualBox module." + + # Detect if kernel was built with clang. + unset LLVM + vbox_cc_is_clang=$(kernel_get_config_opt "CONFIG_CC_IS_CLANG") + if test "${vbox_cc_is_clang}" = "y"; then + log "Using clang compiler." + export LLVM=1 + fi + + if ! myerr=`$BUILDINTMP \ + --save-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source "$MODULE_SRC/vboxdrv" \ + --no-print-directory install 2>&1`; then + "${INSTALL_DIR}/check_module_dependencies.sh" || exit 1 + log "Error building the module:" + module_build_log "$myerr" + failure "Look at $LOG to find out what went wrong" + fi + log "Building the net filter module." + if ! myerr=`$BUILDINTMP \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source "$MODULE_SRC/vboxnetflt" \ + --no-print-directory install 2>&1`; then + log "Error building the module:" + module_build_log "$myerr" + failure "Look at $LOG to find out what went wrong" + fi + log "Building the net adaptor module." + if ! myerr=`$BUILDINTMP \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source "$MODULE_SRC/vboxnetadp" \ + --no-print-directory install 2>&1`; then + log "Error building the module:" + module_build_log "$myerr" + failure "Look at $LOG to find out what went wrong" + fi + if test -e "$MODULE_SRC/vboxpci"; then + log "Building the PCI pass-through module." + if ! myerr=`$BUILDINTMP \ + --use-module-symvers /tmp/vboxdrv-Module.symvers \ + --module-source "$MODULE_SRC/vboxpci" \ + --no-print-directory install 2>&1`; then + log "Error building the module:" + module_build_log "$myerr" + failure "Look at $LOG to find out what went wrong" + fi + fi + rm -f /etc/vbox/module_not_compiled + depmod -a + sync + succ_msg "VirtualBox kernel modules built" + + # Secure boot on Ubuntu, Debian and Oracle Linux. + if test -n "$HAVE_SEC_BOOT"; then + begin_msg "Signing VirtualBox kernel modules" console + + # Generate new signing key if needed. + [ -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL" ] && SHIM_NOTRIGGER=y update-secureboot-policy --new-key + + # Check if signing keys are in place. + if test ! -f "$DEB_PUB_KEY" || ! test -f "$DEB_PRIV_KEY"; then + # update-secureboot-policy tool present in the system, but keys were not generated. + [ -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL" ] && fail_msg " + +update-secureboot-policy tool does not generate signing keys +in your distribution, see below on how to generate them manually +" + + # update-secureboot-policy not present in the system, recommend generate keys manually. + failure " + +System is running in Secure Boot mode, however your distribution +does not provide tools for automatic generation of keys needed for +modules signing. Please consider to generate and enroll them manually: + + sudo mkdir -p /var/lib/shim-signed/mok + sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext \"extendedKeyUsage=codeSigning\" -keyout $DEB_PRIV_KEY -out $DEB_PUB_KEY + sudo mokutil --import $DEB_PUB_KEY + sudo reboot + +Restart \"rcvboxdrv setup\" after system is rebooted +" + fi + + # Check if signing tool is available. + [ -n "$SIGN_TOOL" ] || failure "Unable to find signing tool" + + # Get kernel signature hash algorithm from kernel config and validate it. + sig_hashalgo=$(kernel_module_sig_hash) + [ "$(module_sig_hash_supported $sig_hashalgo)" = "1" ] \ + || failure "Unsupported kernel signature hash algorithm $sig_hashalgo" + + # Sign modules. + for i in $MODULE_LIST; do + "$SIGN_TOOL" "$sig_hashalgo" "$DEB_PRIV_KEY" "$DEB_PUB_KEY" \ + /lib/modules/"$KERN_VER"/misc/"$i".ko 2>/dev/null || failure "Unable to sign $i.ko" + done + + # Enroll signing key if needed. + if test -n "$HAVE_UPDATE_SECUREBOOT_POLICY_TOOL"; then + # update-secureboot-policy "expects" DKMS modules. + # Work around this and talk to the authors as soon + # as possible to fix it. + mkdir -p /var/lib/dkms/vbox-temp + update-secureboot-policy --enroll-key 2>/dev/null || + begin_msg "Failed to enroll secure boot key." console + rmdir -p /var/lib/dkms/vbox-temp 2>/dev/null + + # Indicate that key has been enrolled and reboot is needed. + HAVE_DEB_KEY=true + fi + succ_msg "Signing completed" + fi +} + +dmnstatus() +{ + if running vboxdrv; then + str="vboxdrv" + if running vboxnetflt; then + str="$str, vboxnetflt" + if running vboxnetadp; then + str="$str, vboxnetadp" + fi + fi + if running vboxpci; then + str="$str, vboxpci" + fi + echo "VirtualBox kernel modules ($str) are loaded." + for i in $SHUTDOWN_USERS; do + # don't create the ipcd directory with wrong permissions! + if [ -d /tmp/.vbox-$i-ipc ]; then + export VBOX_IPC_SOCKETID="$i" + VMS=`$VBOXMANAGE --nologo list runningvms | sed -e 's/^".*".*{\(.*\)}/\1/' 2>/dev/null` + if [ -n "$VMS" ]; then + echo "The following VMs are currently running:" + for v in $VMS; do + echo " $v" + done + fi + fi + done + else + echo "VirtualBox kernel module is not loaded." + fi +} + +case "$1" in +start) + start + ;; +stop) + stop_vms + stop + ;; +stop_vms) + stop_vms + ;; +restart) + stop && start + ;; +setup) + test -n "${2}" && export KERN_VER="${2}" + # Create udev rule and USB device nodes. + ## todo Wouldn't it make more sense to install the rule to /lib/udev? This + ## is not a user-created configuration file after all. + ## todo Do we need a udev rule to create /dev/vboxdrv[u] at all? We have + ## working fall-back code here anyway, and the "right" code is more complex + ## than the fall-back. Unnecessary duplication? + stop && cleanup + setup_usb "$GROUP" "$DEVICE_MODE" "$INSTALL_DIR" + start + ;; +cleanup) + stop && cleanup + cleanup_usb + ;; +force-reload) + stop + start + ;; +status) + dmnstatus + ;; +*) + echo "Usage: $0 {start|stop|stop_vms|restart|setup|cleanup|force-reload|status}" + exit 1 +esac + +exit 0 diff --git a/src/VBox/Installer/linux/vboxweb-service.sh b/src/VBox/Installer/linux/vboxweb-service.sh new file mode 100755 index 00000000..08ad6625 --- /dev/null +++ b/src/VBox/Installer/linux/vboxweb-service.sh @@ -0,0 +1,234 @@ +#!/bin/sh +# $Id: vboxweb-service.sh $ +## @file +# VirtualBox web service API daemon init script. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# chkconfig: 345 35 65 +# description: VirtualBox web service API +# +### BEGIN INIT INFO +# Provides: vboxweb-service +# Required-Start: vboxdrv +# Required-Stop: vboxdrv +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: VirtualBox web service API +# X-Required-Target-Start: network-online +### END INIT INFO + +PATH=$PATH:/bin:/sbin:/usr/sbin +SCRIPTNAME=vboxweb-service.sh + +[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg + +if [ -n "$INSTALL_DIR" ]; then + binary="$INSTALL_DIR/vboxwebsrv" + vboxmanage="$INSTALL_DIR/VBoxManage" +else + binary="/usr/lib/virtualbox/vboxwebsrv" + vboxmanage="/usr/lib/virtualbox/VBoxManage" +fi + +# silently exit if the package was uninstalled but not purged, +# applies to Debian packages only (but shouldn't hurt elsewhere) +[ ! -f /etc/debian_release -o -x $binary ] || exit 0 + +[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox + +PIDFILE="/var/run/${SCRIPTNAME}" + +# Preamble for Gentoo +if [ "`which $0`" = "/sbin/rc" ]; then + shift +fi + +begin_msg() +{ + test -n "${2}" && echo "${SCRIPTNAME}: ${1}." + logger -t "${SCRIPTNAME}" "${1}." +} + +succ_msg() +{ + logger -t "${SCRIPTNAME}" "${1}." +} + +fail_msg() +{ + echo "${SCRIPTNAME}: failed: ${1}." >&2 + logger -t "${SCRIPTNAME}" "failed: ${1}." +} + +start_daemon() { + usr="$1" + shift + su - $usr -c "$*" +} + +killproc() { + killall $1 + rm -f $PIDFILE +} + +if which start-stop-daemon >/dev/null 2>&1; then + start_daemon() { + usr="$1" + shift + bin="$1" + shift + start-stop-daemon --background --chuid $usr --start --exec $bin -- $@ + } + + killproc() { + start-stop-daemon --stop --exec $@ + } +fi + +vboxdrvrunning() { + lsmod | grep -q "vboxdrv[^_-]" +} + +check_single_user() { + if [ -n "$2" ]; then + fail_msg "VBOXWEB_USER must not contain multiple users!" + exit 1 + fi +} + +start() { + if ! test -f $PIDFILE; then + [ -z "$VBOXWEB_USER" ] && exit 0 + begin_msg "Starting VirtualBox web service" console; + check_single_user $VBOXWEB_USER + vboxdrvrunning || { + fail_msg "VirtualBox kernel module not loaded!" + exit 0 + } + PARAMS="--background" + [ -n "$VBOXWEB_HOST" ] && PARAMS="$PARAMS -H $VBOXWEB_HOST" + [ -n "$VBOXWEB_PORT" ] && PARAMS="$PARAMS -p $VBOXWEB_PORT" + [ -n "$VBOXWEB_SSL_KEYFILE" ] && PARAMS="$PARAMS -s -K $VBOXWEB_SSL_KEYFILE" + [ -n "$VBOXWEB_SSL_PASSWORDFILE" ] && PARAMS="$PARAMS -a $VBOXWEB_SSL_PASSWORDFILE" + [ -n "$VBOXWEB_SSL_CACERT" ] && PARAMS="$PARAMS -c $VBOXWEB_SSL_CACERT" + [ -n "$VBOXWEB_SSL_CAPATH" ] && PARAMS="$PARAMS -C $VBOXWEB_SSL_CAPATH" + [ -n "$VBOXWEB_SSL_DHFILE" ] && PARAMS="$PARAMS -D $VBOXWEB_SSL_DHFILE" + [ -n "$VBOXWEB_SSL_RANDFILE" ] && PARAMS="$PARAMS -r $VBOXWEB_SSL_RANDFILE" + [ -n "$VBOXWEB_TIMEOUT" ] && PARAMS="$PARAMS -t $VBOXWEB_TIMEOUT" + [ -n "$VBOXWEB_CHECK_INTERVAL" ] && PARAMS="$PARAMS -i $VBOXWEB_CHECK_INTERVAL" + [ -n "$VBOXWEB_THREADS" ] && PARAMS="$PARAMS -T $VBOXWEB_THREADS" + [ -n "$VBOXWEB_KEEPALIVE" ] && PARAMS="$PARAMS -k $VBOXWEB_KEEPALIVE" + [ -n "$VBOXWEB_AUTHENTICATION" ] && PARAMS="$PARAMS -A $VBOXWEB_AUTHENTICATION" + [ -n "$VBOXWEB_LOGFILE" ] && PARAMS="$PARAMS -F $VBOXWEB_LOGFILE" + [ -n "$VBOXWEB_ROTATE" ] && PARAMS="$PARAMS -R $VBOXWEB_ROTATE" + [ -n "$VBOXWEB_LOGSIZE" ] && PARAMS="$PARAMS -S $VBOXWEB_LOGSIZE" + [ -n "$VBOXWEB_LOGINTERVAL" ] && PARAMS="$PARAMS -I $VBOXWEB_LOGINTERVAL" + # set authentication method + password hash + if [ -n "$VBOXWEB_AUTH_LIBRARY" ]; then + su - "$VBOXWEB_USER" -c "$vboxmanage setproperty websrvauthlibrary \"$VBOXWEB_AUTH_LIBRARY\"" + if [ $? -ne 0 ]; then + fail_msg "Error $? setting webservice authentication library to $VBOXWEB_AUTH_LIBRARY" + fi + fi + if [ -n "$VBOXWEB_AUTH_PWHASH" ]; then + su - "$VBOXWEB_USER" -c "$vboxmanage setextradata global \"VBoxAuthSimple/users/$VBOXWEB_USER\" \"$VBOXWEB_AUTH_PWHASH\"" + if [ $? -ne 0 ]; then + fail_msg "Error $? setting webservice password hash" + fi + fi + # prevent inheriting this setting to VBoxSVC + unset VBOX_RELEASE_LOG_DEST + start_daemon $VBOXWEB_USER $binary $PARAMS > /dev/null 2>&1 + # ugly: wait until the final process has forked + sleep .1 + PID=`pidof $binary 2>/dev/null` + if [ -n "$PID" ]; then + echo "$PID" > $PIDFILE + RETVAL=0 + succ_msg "VirtualBox web service started" + else + RETVAL=1 + fail_msg "VirtualBox web service failed to start" + fi + fi + return $RETVAL +} + +stop() { + if test -f $PIDFILE; then + begin_msg "Stopping VirtualBox web service" console; + killproc $binary + RETVAL=$? + # Be careful: wait 1 second, making sure that everything is cleaned up. + sleep 1 + if ! pidof $binary > /dev/null 2>&1; then + rm -f $PIDFILE + succ_msg "VirtualBox web service stopped" + else + fail_msg "VirtualBox web service failed to stop" + fi + fi + return $RETVAL +} + +restart() { + stop && start +} + +status() { + echo -n "Checking for VBox Web Service" + if [ -f $PIDFILE ]; then + echo " ...running" + else + echo " ...not running" + fi +} + +case "$1" in +start) + start + ;; +stop) + stop + ;; +restart) + restart + ;; +force-reload) + restart + ;; +status) + status + ;; +setup) + ;; +cleanup) + ;; +*) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit $RETVAL diff --git a/src/VBox/Installer/solaris/Makefile.kmk b/src/VBox/Installer/solaris/Makefile.kmk new file mode 100644 index 00000000..4cb51c68 --- /dev/null +++ b/src/VBox/Installer/solaris/Makefile.kmk @@ -0,0 +1,771 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the Solaris installer. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + +ifneq ($(KBUILD_HOST),solaris) +$(error "The Solaris installer can only be built on Solaris!") # yeah, right. +endif + + +# +# Globals +# +VBOX_PATH_SOL_INST_SRC := $(PATH_SUB_CURRENT) +VBOX_PATH_SI_SCRATCH := $(PATH_TARGET)/Installer-solaris +VBOX_PATH_SI_SCRATCH_PKG := $(PATH_TARGET)/Installer-solaris/pkg +VBOX_PATH_SI_SCRATCH_DBG := $(PATH_TARGET)/Installer-solaris/DebugPkg +VBOX_SI_ARCH := $(subst x86,i386,$(KBUILD_TARGET_ARCH)) +VBOX_SI_ICON_TYPES := ova ovf vbox vbox-extpack vdi vmdk vhd hdd +VBOX_SI_ICON_SIZES := 16 20 24 32 48 64 72 96 128 256 +VBOX_SI_GTAR := /usr/sfw/bin/gtar +VBOX_SI_OBJCOPY_STRIP := /usr/sfw/bin/gobjcopy --strip-debug -R .comment +ifeq ($(KBUILD_TARGET_ARCH),amd64) + VBOX_SI_OBJCOPY_DBGINFO := /usr/sfw/bin/gobjcopy --only-keep-debug +else + VBOX_SI_OBJCOPY_DBGINFO := $(CP) -p # Solaris ld/gobjcopy(2.15) don't get along on x86, works only on amd64. So just using cp for now. +endif + +# Unset this to speed up things during makefile hacking. +VBOX_SI_DEP_ON_MAKEFILE := $(MAKEFILE_CURRENT) + + +# Base package +PKGINFO_ARCH = $(shell uname -p) +PKGINFO_DATE = $(date %Y.%m.%d.%H.%M.%S) +PKGINFO_REVSTAMP = $(PKGINFO_DATE).$(VBOX_SVN_REV) +PKGINFO_PSTAMP = vbox_$(subst .,,$(PKGINFO_DATE))_r$(VBOX_SVN_REV) +PKG_FILENAME := VirtualBox-$(VBOX_VERSION_STRING)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV) + +# For Alpha, Beta, RC and releases VBOX_VERSION_STRING needs to be converted into the variant +# which complies to Solaris 11 Image Packaging System (IPS) versioning convention. For GA release, +# we add '.3.0' to the end of the version string in order to make its version look newer from +# IPS point of view. +VBOX_VERSION_SMF_STYLE := $(subst _ALPHA,.0.,$(VBOX_VERSION_STRING)) +VBOX_VERSION_SMF_STYLE := $(subst _BETA,.1.,$(VBOX_VERSION_SMF_STYLE)) +VBOX_VERSION_SMF_STYLE := $(subst _RC,.2.,$(VBOX_VERSION_SMF_STYLE)) +VBOX_VERSION_SMF_STYLE := $(if $(VBOX_VERSION_PRERELEASE),$(VBOX_VERSION_SMF_STYLE),$(VBOX_VERSION_SMF_STYLE).3.0) +PKG_FILENAME_SMF_STYLE := VirtualBox-$(VBOX_VERSION_SMF_STYLE)-SunOS-$(KBUILD_TARGET_ARCH)-r$(VBOX_SVN_REV) + +# +# Targets +# +PROGRAMS += VBoxZoneAccess VBoxISAExec +INSTALLS += solaris-doc solaris-bin solaris-drv-confs solaris-icons +BLDDIRS += $(VBOX_PATH_SI_SCRATCH) +PACKING += \ + $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \ + $(if $(VBOX_WITH_SOLARIS_IPS_PACKAGE),$(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p,) \ + $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2 +OTHER_CLEAN += \ + $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \ + $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz \ + $(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p \ + $(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2 \ + $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts + +# +# VBoxZoneAccess +# +VBoxZoneAccess_TEMPLATE = VBOXR3EXE +VBoxZoneAccess_DEPS = $(VBOX_SVN_REV_KMK) +VBoxZoneAccess_SOURCES = VBoxZoneAccess.c +VBoxZoneAccess_LIBS = $(LIB_RUNTIME) + +# +# VBoxISAExec +# +VBoxISAExec_TEMPLATE = VBOXR3EXE +VBoxISAExec_DEPS = $(VBOX_SVN_REV_KMK) +VBoxISAExec_SOURCES = VBoxISAExec.c + +# +# Solaris installs. +# +solaris-doc_INST = bin/ +solaris-doc_MODE = a+r,u+w +solaris-doc_SOURCES = \ + $(VBOX_BRAND_LICENSE_TXT)=>LICENSE \ + $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/$(if $(VBOX_OSE),OSE,NonOSE)/VirtualBox_64px.png=>VBox.png \ + $(PATH_ROOT)/src/VBox/Artwork/$(if $(VBOX_OSE),OSE,NonOSE)/virtualbox-128px.png=>virtualbox.png + +solaris-bin_INST = bin/ +solaris-bin_MODE = a+rx,u+w +solaris-bin_SOURCES = \ + $(if $(VBOX_WITH_PYTHON),$(PATH_ROOT)/src/VBox/Frontends/VBoxShell/vboxshell.py,) \ + $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh \ + $(VBOX_PATH_SOL_INST_SRC)/VBox.sh \ + $(VBOX_PATH_SOL_INST_SRC)/pkginstall.sh \ + $(VBOX_PATH_SOL_INST_SRC)/smf-vboxballoonctrl.sh \ + $(VBOX_PATH_SOL_INST_SRC)/smf-vboxautostart.sh \ + $(if $(VBOX_WITH_WEBSERVICES),$(VBOX_PATH_SOL_INST_SRC)/smf-vboxwebsrv.sh,) + +solaris-drv-confs_INST = bin/ +solaris-drv-confs_MODE = a+r,u+w +solaris-drv-confs_SOURCES = \ + $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \ + $(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf) \ + $(if $(VBOX_WITH_NETFLT_CROSSBOW),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxbow.conf) \ + $(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf) \ + $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf) \ + $(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusb.conf) + +solaris-icons_INST = bin/icons/ +solaris-icons_MODE = a+r,u+w +solaris-icons_SOURCES = $(foreach f,$(VBOX_SI_ICON_TYPES), $(foreach s,$(VBOX_SI_ICON_SIZES)\ + ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(f)-$(s)px.png=>$(s)x$(s)/mimetypes/virtualbox-$(f).png)) + + +# +# What follows is various files lists (and a symlink list) that lists various +# types of files going from/to various places during installation. +# +# Each list has the following attributes (used by makefile command and +# dependency generation): +# .SUBDIRS := +# .STRIP := +# .MODE := <0644|0755> +# .SRC := +# .DST := +# + + +## List of file list variable names. +SOLARIS_FILE_LIST_VARS := + +## @def SOLARIS_ETC_FILES +# System-wide configuration files to copy from VBOX_PATH_SOL_INST_SRC to /etc. +SOLARIS_FILE_LIST_VARS += SOLARIS_ETC_FILES +SOLARIS_ETC_FILES.SUBDIRS := yes +SOLARIS_ETC_FILES.STRIP := no +SOLARIS_ETC_FILES.MODE := 0644 +SOLARIS_ETC_FILES.SRC := $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris +SOLARIS_ETC_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/etc +SOLARIS_ETC_FILES := $(if-expr defined(VBOX_WITH_NETADP),hostname.vboxnet0,) + +## @def SOLARIS_SMF_FILES +# Service management facility manifest files to copy from VBOX_PATH_SOL_INST_SRC to /var/svc/manifest/application/virtualbox/. +SOLARIS_FILE_LIST_VARS += SOLARIS_SMF_FILES +SOLARIS_SMF_FILES.SUBDIRS := yes +SOLARIS_SMF_FILES.STRIP := no +SOLARIS_SMF_FILES.MODE := 0644 +SOLARIS_SMF_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC) +SOLARIS_SMF_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/virtualbox +SOLARIS_SMF_FILES = \ + virtualbox-zoneaccess.xml \ + virtualbox-balloonctrl.xml \ + virtualbox-autostart.xml \ + $(if-expr defined(VBOX_WITH_WEBSERVICES),virtualbox-webservice.xml,) + +## @def SOLARIS_MIME_INFO_FILES +# MIME info files to be copied directly from VBOX_PATH_SOL_INST_SRC to /usr/share/mime-info/. +SOLARIS_FILE_LIST_VARS += SOLARIS_MIME_INFO_FILES +SOLARIS_MIME_INFO_FILES.SUBDIRS := yes +SOLARIS_MIME_INFO_FILES.STRIP := no +SOLARIS_MIME_INFO_FILES.MODE := 0644 +SOLARIS_MIME_INFO_FILES.SRC := $(VBOX_PATH_SOL_INST_SRC) +SOLARIS_MIME_INFO_FILES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime-info +SOLARIS_MIME_INFO_FILES = \ + virtualbox.keys \ + virtualbox.mime + +## @def SOLARIS_PIXMAP_FILES +# Bitmap files to copy directly from INST_BIN to /usr/share/pixmaps/. +SOLARIS_FILE_LIST_VARS += SOLARIS_PIXMAP_FILES +SOLARIS_PIXMAP_FILES.SUBDIRS = no +SOLARIS_PIXMAP_FILES.STRIP = no +SOLARIS_PIXMAP_FILES.MODE = 0644 +SOLARIS_PIXMAP_FILES.SRC = $(PATH_STAGE_BIN) +SOLARIS_PIXMAP_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/pixmaps +SOLARIS_PIXMAP_FILES = \ + VBox.png \ + virtualbox.png + + +## @def SOLARIS_INSTALLER_SCRIPTS +# Installer shell scripts that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/). +SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_SCRIPTS +SOLARIS_INSTALLER_SCRIPTS.SUBDIRS = no +SOLARIS_INSTALLER_SCRIPTS.STRIP = no +SOLARIS_INSTALLER_SCRIPTS.MODE = 0755 +SOLARIS_INSTALLER_SCRIPTS.SRC = $(VBOX_PATH_SOL_INST_SRC) +SOLARIS_INSTALLER_SCRIPTS.DST = $(VBOX_PATH_SI_SCRATCH_PKG) +SOLARIS_INSTALLER_SCRIPTS = \ + postinstall.sh \ + checkinstall.sh \ + preremove.sh \ + makepackage.sh + +## @def SOLARIS_INSTALLER_FILES +# Installer files that gets copied directly from VBOX_PATH_SOL_INST_SRC to VBOX_PATH_SI_SCRATCH_PKG (/). +SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_FILES +SOLARIS_INSTALLER_FILES.SUBDIRS = no +SOLARIS_INSTALLER_FILES.STRIP = no +SOLARIS_INSTALLER_FILES.MODE = 0644 +SOLARIS_INSTALLER_FILES.SRC = $(VBOX_PATH_SOL_INST_SRC) +SOLARIS_INSTALLER_FILES.DST = $(VBOX_PATH_SI_SCRATCH_PKG) +SOLARIS_INSTALLER_FILES = \ + vbox.space + +## @def SOLARIS_INSTALLER_LICENSE +# List of files that are copied directly from INST_BIN to VBOX_PATH_SI_SCRATCH_PKG (/). +# LICENSE is needed by IPS packaging only. +SOLARIS_FILE_LIST_VARS += SOLARIS_INSTALLER_LICENSE +SOLARIS_INSTALLER_LICENSE.SUBDIRS := no +SOLARIS_INSTALLER_LICENSE.STRIP := no +SOLARIS_INSTALLER_LICENSE.MODE := 0644 +SOLARIS_INSTALLER_LICENSE.SRC := $(PATH_STAGE_BIN) +SOLARIS_INSTALLER_LICENSE.DST := $(VBOX_PATH_SI_SCRATCH_PKG) +SOLARIS_INSTALLER_LICENSE = \ + LICENSE + +## @def SOLARIS_DRIVER_BINS +# List of kernel module files that are copied from INST_BIN to platform/i86pc/kernel/drv/[amd64/] and stripped of debug info. +SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_BINS +SOLARIS_DRIVER_BINS.SUBDIRS := no +SOLARIS_DRIVER_BINS.STRIP := no +SOLARIS_DRIVER_BINS.MODE := 0644 +SOLARIS_DRIVER_BINS.SRC := $(PATH_STAGE_BIN) +SOLARIS_DRIVER_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/$(subst x86,,$(KBUILD_TARGET_ARCH)) +SOLARIS_DRIVER_BINS = \ + vboxdrv \ + $(if $(VBOX_WITH_NETFLT),vboxflt,) \ + $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow,) \ + $(if $(VBOX_WITH_NETADP),vboxnet,) \ + $(if $(VBOX_WITH_USB),vboxusbmon,) \ + $(if $(VBOX_WITH_USB),vboxusb,) + +## @def SOLARIS_DRIVER_CONFS +# List of kernel module configuration files that are copied directly from INST_BIN to platform/i86pc/kernel/drv/. +SOLARIS_FILE_LIST_VARS += SOLARIS_DRIVER_CONFS +SOLARIS_DRIVER_CONFS.SUBDIRS := no +SOLARIS_DRIVER_CONFS.STRIP := no +SOLARIS_DRIVER_CONFS.MODE := 0644 +SOLARIS_DRIVER_CONFS.SRC := $(PATH_STAGE_BIN) +SOLARIS_DRIVER_CONFS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv +SOLARIS_DRIVER_CONFS = \ + vboxdrv.conf \ + $(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \ + $(if $(VBOX_WITH_NETFLT_CROSSBOW),vboxbow.conf,) \ + $(if $(VBOX_WITH_NETADP),vboxnet.conf,) \ + $(if $(VBOX_WITH_USB),vboxusbmon.conf,) \ + $(if $(VBOX_WITH_USB),vboxusb.conf,) + +## @def SOLARIS_COMMON +# List of files that are copied directly from INST_BIN to /opt/VirtualBox/. +SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON +SOLARIS_COMMON.SUBDIRS := yes +SOLARIS_COMMON.STRIP := no +SOLARIS_COMMON.MODE := 0644 +SOLARIS_COMMON.SRC := $(PATH_STAGE_BIN) +SOLARIS_COMMON.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox +SOLARIS_COMMON = \ + LICENSE + +## @def SOLARIS_COMMON_EXES +# List of executable script (and VBoxISAExec) files that are copied directly from INST_BIN to /opt/VirtualBox/. +SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_EXES +SOLARIS_COMMON_EXES.SUBDIRS := no +SOLARIS_COMMON_EXES.STRIP := no +SOLARIS_COMMON_EXES.MODE := 0755 +SOLARIS_COMMON_EXES.SRC := $(PATH_STAGE_BIN) +SOLARIS_COMMON_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox +SOLARIS_COMMON_EXES = \ + VBoxISAExec + +## @def SOLARIS_COMMON_BINS +# List of INST_BIN shared libraries that should be copied into /opt/VirtualBox/ and stripped. +SOLARIS_FILE_LIST_VARS += SOLARIS_COMMON_STRIP_BINS +SOLARIS_COMMON_STRIP_BINS.SUBDIRS := yes +SOLARIS_COMMON_STRIP_BINS.STRIP := yes +SOLARIS_COMMON_STRIP_BINS.MODE := 0644 +SOLARIS_COMMON_STRIP_BINS.SRC := $(PATH_STAGE_BIN) +SOLARIS_COMMON_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ +SOLARIS_COMMON_STRIP_BINS = + +## @def SOLARIS_STRIP_EXES +# List of exectuables files that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info. +SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_EXES +SOLARIS_STRIP_EXES.SUBDIRS := no +SOLARIS_STRIP_EXES.STRIP := yes +SOLARIS_STRIP_EXES.MODE := 0755 +SOLARIS_STRIP_EXES.SRC := $(PATH_STAGE_BIN) +SOLARIS_STRIP_EXES.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH) +SOLARIS_STRIP_EXES = \ + VBoxZoneAccess \ + $(if $(VBOX_WITH_QTGUI),VirtualBox VirtualBoxVM,) \ + VBoxManage \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \ + $(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \ + VBoxNetDHCP \ + VBoxNetNAT \ + $(if $(VBOX_WITH_EXTPACK),VBoxExtPackHelperApp,) \ + VBoxSVC \ + $(if $(VBOX_WITH_VMSVGA3D), VBoxTestOGL,) \ + VBoxXPCOMIPCD \ + $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) + +## @def SOLARIS_STRIP_BINS +# List of shared libraries that are copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and stripped of debug info. +SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_BINS +SOLARIS_STRIP_BINS.SUBDIRS := yes +SOLARIS_STRIP_BINS.STRIP := yes +SOLARIS_STRIP_BINS.MODE := 0644 +SOLARIS_STRIP_BINS.SRC := $(PATH_STAGE_BIN) +SOLARIS_STRIP_BINS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH) +SOLARIS_STRIP_BINS = \ + VBoxDD.so \ + VBoxDD2.so \ + VBoxRT.so \ + VBoxDDU.so \ + VBoxVMM.so \ + $(if $(VBOX_WITH_LIBSSH),VBoxLibSsh.so,) \ + VBoxXPCOM.so \ + VBoxXPCOMC.so \ + $(if $(VBOX_WITH_SHARED_FOLDERS),VBoxSharedFolders.so,) \ + $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBoxSharedClipboard.so,) \ + $(if $(VBOX_WITH_DRAG_AND_DROP),VBoxDragAndDropSvc.so,) \ + $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestPropSvc.so,) \ + $(if $(VBOX_WITH_GUEST_CONTROL),VBoxGuestControlSvc.so,) \ + VBoxHostChannel.so \ + $(if $(VBOX_WITH_JXPCOM),libvboxjxpcom.so,) \ + $(if $(VBOX_WITH_QTGUI),\ + VBoxKeyboard.so) \ + $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so DbgPlugInDiggers.so,) \ + components/VBoxC.so \ + components/VBoxSVCM.so \ + components/VBoxXPCOMIPCC.so + +ifdef VBOX_WITH_QTGUI + ifdef VBOX_WITH_ORACLE_QT + SOLARIS_STRIP_BINS += \ + $(notdir $(wildcard $(PATH_STAGE_BIN)/lib*VBox*)) \ + $(VBOX_QT_PLUGINS) + endif +endif #VBOX_WITH_QTGUI + +ifdef VBOX_WITH_32_ON_64_MAIN_API + SOLARIS_STRIP_BINS += \ + VBoxRT-x86.so \ + VBoxXPCOM-x86.so \ + components/VBoxClient-x86.so \ + components/VBoxSVCM-x86.so \ + components/VBoxXPCOMIPCC-x86.so +endif +ifdef VBOX_WITH_HARDENING + SOLARIS_STRIP_BINS += \ + VBoxNetDHCP.so \ + VBoxNetNAT.so \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL.so,) \ + $(if $(VBOX_WITH_QTGUI),VirtualBoxVM.so UICommon.so,) +endif + +## @def SOLARIS_STRIP_OBJS +# List of relocable object files to be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/ and carefully +# stripped of debug info but not relocation information. These are the ring-0 and raw-mode context modules. +SOLARIS_FILE_LIST_VARS += SOLARIS_STRIP_OBJS +SOLARIS_STRIP_OBJS.SUBDIRS := no +SOLARIS_STRIP_OBJS.STRIP := objcopy +SOLARIS_STRIP_OBJS.MODE := 0644 +SOLARIS_STRIP_OBJS.SRC := $(PATH_STAGE_BIN) +SOLARIS_STRIP_OBJS.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH) +SOLARIS_STRIP_OBJS = \ + VBoxDDR0.r0 \ + VMMR0.r0 +ifdef VBOX_WITH_RAW_MODE +SOLARIS_STRIP_OBJS += \ + VBoxDDRC.rc \ + VMMRC.rc +endif + +## @def SOLARIS_NO_STRIP +# List of data files that should be copied from INST_BIN to /opt/VirtualBox/$(VBOX_SI_ARCH)/. +SOLARIS_FILE_LIST_VARS += SOLARIS_NO_STRIP +SOLARIS_NO_STRIP.SUBDIRS := yes +SOLARIS_NO_STRIP.STRIP := no +SOLARIS_NO_STRIP.MODE := 0644 +SOLARIS_NO_STRIP.SRC := $(PATH_STAGE_BIN) +SOLARIS_NO_STRIP.DST := $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH) +SOLARIS_NO_STRIP = \ + components/VBoxXPCOMBase.xpt \ + components/VirtualBox_XPCOM.xpt \ + $(if $(and $(VBOX_LICENSE_FILES),$(VBOX_WITH_QTGUI)),$(VBOX_LICENSE_FILES)) + +## @def SOLARIS_USRBIN_LINKS +# List of links to create in /usr/bin to /opt/VirtualBox/VBox.sh. +# Naturally no subdirectories. +SOLARIS_USRBIN_LINKS = \ + $(if $(VBOX_WITH_QTGUI),VirtualBox VirtualBoxVM,) \ + $(if $(VBOX_WITH_HEADLESS),VBoxHeadless,) \ + $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \ + VBoxManage \ + $(if $(VBOX_WITH_DTRACE),VBoxDTrace,) \ + $(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),VBoxAudioTest,) + +SOLARIS_COMMON_EXES += \ + vboxconfig.sh \ + VBox.sh \ + pkginstall.sh \ + smf-vboxballoonctrl.sh \ + smf-vboxautostart.sh \ + $(if $(VBOX_WITH_WEBSERVICES),smf-vboxwebsrv.sh,) + + +# Documentation (packed as DOCS as they are arch. neutral) +ifdef VBOX_WITH_DOCS_PACKING + SOLARIS_COMMON += \ + $(if-expr defined(VBOX_WITH_DOCS_CHM_PACKING),VirtualBox.chm,) \ + $(if-expr defined(VBOX_WITH_DOCS_QHELP_PACKING),UserManual.qch UserManual.qhc,) \ + UserManual.pdf \ + $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES), \ + $(if-expr defined(VBOX_WITH_DOCS_CHM_PACKING),VirtualBox_$(f).chm,) \ + $(if-expr defined(VBOX_WITH_DOCS_QHELP_PACKING),UserManual_$(f).qch UserManual_$(f).qhc,) \ + UserManual_$(f).pdf) +endif + +# Python XPCOM glue +ifdef VBOX_WITH_PYTHON + SOLARIS_COMMON += \ + $(VBOXINST_SDK_BINDINGS_XPCOM_PYTHON_FILES) \ + $(VBOXINST_SDK_INSTALLER_PYTHON_FILES) + ifeq ($(KBUILD_TARGET_ARCH),amd64) + SOLARIS_PYTHON_32_ON_64_BINS = $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*_x86.so)) + ifdef VBOX_WITH_32_ON_64_MAIN_API + SOLARIS_COMMON_STRIP_BINS += $(SOLARIS_PYTHON_32_ON_64_BINS) + endif + SOLARIS_COMMON_STRIP_BINS += $(filter-out $(SOLARIS_PYTHON_32_ON_64_BINS), $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so))) + else + SOLARIS_COMMON_STRIP_BINS += $(notdir $(wildcard $(PATH_STAGE_BIN)/VBoxPython*.so))) + endif +endif + +ifdef VBOX_WITH_JXPCOM + SOLARIS_COMMON += \ + sdk/bindings/xpcom/java/vboxjxpcom.jar +endif + +# auth stuff +SOLARIS_STRIP_BINS += \ + VBoxAuth.so \ + VBoxAuthSimple.so + +# VRDP +ifdef VBOX_WITH_VRDP + ifndef VBOX_WITH_EXTPACK_PUEL + SOLARIS_STRIP_BINS += \ + VBoxVRDP.so + endif +endif + +SOLARIS_STRIP_BINS += \ + $(if $(and $(VBOX_WITH_HARDENING),$(VBOX_WITH_HEADLESS)),VBoxHeadless.so,) + +SOLARIS_STRIP_EXES += \ + $(if $(VBOX_WITH_HEADLESS),VBoxHeadless) \ + VBoxBugReport \ + VBoxBalloonCtrl \ + VBoxAutostart \ + $(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \ + $(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),vbox-img) + +# Guest Additions +ifdef VBOX_WITH_ADDITIONS_PACKING +# SOLARIS_COMMON += \ +# additions/VBoxGuestAdditions.iso +endif + + +# EFI firmware +ifdef VBOX_WITH_EFIFW_PACKING + SOLARIS_COMMON += \ + VBoxEFI32.fd \ + VBoxEFI64.fd +endif + +# Unattended installation template scripts. +ifdef VBOX_UNATTENDED_TEMPLATES + SOLARIS_COMMON += $(addprefix UnattendedTemplates/,$(VBOX_UNATTENDED_TEMPLATES)) +endif + +# DTrace library, testcase and scripts (as the rest of this file, this makes bold +# ASSUMPTIONS about VBPX_INST_XXX variable values). +ifdef VBOX_WITH_DTRACE + SOLARIS_COMMON += \ + $(addprefix dtrace/lib/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_LIB_ARCH_FILES)) \ + $(addprefix dtrace/testcase/$(KBUILD_TARGET_ARCH)/,$(VBOXINST_DTRACE_TESTCASE_ARCH_FILES)) \ + $(addprefix dtrace/scripts/,$(VBOXINST_DTRACE_SCRIPTS_FILES)) +endif + + +# +# End of file lists. +# + + + +include $(FILE_KBUILD_SUB_FOOTER) + + +# +# Copy all files needed for packaging into the final directory structure +# +$(VBOX_PATH_SI_SCRATCH)/dist-copy.ts: \ + $(VBOX_VERSION_STAMP) \ + \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.xml \ + $(VBOX_PATH_SOL_INST_SRC)/virtualbox.applications.in \ + $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo \ + $(VBOX_PATH_SOL_INST_SRC)/vbox-ips.mog \ + \ + $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING),$(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso,) \ + $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL), $(KBUILD_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2,) \ + \ + $(foreach var, $(SOLARIS_FILE_LIST_VARS),$(foreach file, $($(var)), $($(var).SRC)/$(file))) \ + \ + $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \ + ,$(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png)) \ + \ + $(VBOX_SI_DEP_ON_MAKEFILE) \ + | $$(dir $$@) + $(call MSG_L1,Copying files to package staging area) +# Start with a clean slate, don't want to pick up random garbage. + $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_PKG)/" + $(QUIET)$(RM) -f -- "$@" + +# Create all the directories we need. We specify each sub directory to make sure the mode is correct. + $(MKDIR) -p -m 0755 -- $(sort $(VBOX_PATH_SI_SCRATCH_PKG)/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/opt/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/amd64/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/platform/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/platform/i86pc/kernel/drv/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/application-registry/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/ \ + $(foreach size, $(VBOX_SI_ICON_SIZES) \ + ,$(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/) \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/mime/packages/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/var/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/ \ + $(VBOX_PATH_SI_SCRATCH_PKG)/var/svc/manifest/application/ \ + $(foreach var,$(SOLARIS_FILE_LIST_VARS), $($(var).DST)/) \ + $(foreach var,$(SOLARIS_FILE_LIST_VARS),$(if-expr "$($(var).SUBDIRS)" == "yes",$(sort $(dir $(addprefix $($(var).DST)/,$($(var))))),)) \ + ) + +# Generic copy file lists. + $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(foreach file, $($(var)) \ + ,$(if-expr "$($(var).STRIP)" == "objcopy" && defined(VBOX_DO_STRIP)\ + ,$(NLTAB)$(VBOX_SI_OBJCOPY_STRIP) "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)" \ + $(NLTAB)$(CHMOD) "$($(var).MODE)" "$($(var).DST)/$(file)" \ + ,$(NLTAB)$(INSTALL) -m "$($(var).MODE)" $(if-expr "$($(var).STRIP)" == "yes" && defined(VBOX_DO_STRIP),-s,) \ + "$($(var).SRC)/$(file)" "$($(var).DST)/$(file)"))) + +# VirtualBox: Common files. + $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \ + ,$(INSTALL) -m 0644 $(PATH_STAGE_BIN)/additions/VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/,) + $(LN_SYMLINK) -f ./pkginstall.sh $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/ipsinstall.sh + $(SED) -e "s/_HARDENED_/$(if $(VBOX_WITH_HARDENED),hardened,)/" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxconfig.sh \ + $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh + $(CHMOD) 0755 $(VBOX_PATH_SOL_INST_SRC)/vboxconfig.sh + $(INSTALL) -m 0644 $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/autoresponse + $(if-expr defined(VBOX_WITH_PYTHON) \ + ,$(SED) -e "s@^#!.*@#!/usr/bin/python3@" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxshell.py \ + $(PATH_STAGE_BIN)/vboxshell.py \ + $(NLTAB)$(CHMOD) 0755 $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/vboxshell.py,) + +# VirtualBox: Arch specific files. + $(if-expr defined(VBOX_WITH_ADDITIONS_PACKING) \ + ,$(NLTAB)$(LN_SYMLINK) ../VBoxGuestAdditions.iso $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,) + + $(if-expr !defined(VBOX_OSE) && defined(VBOX_WITH_VBOXSDL) \ + ,$(INSTALL) -s -m 0644 $(KBUILD_DEVTOOLS_TRG)/libsdl/v1.2.13/lib/libSDL-1.2.so.0.11.2 \ + $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/libSDL-1.2.so.0,) + + $(if-expr defined(VBOX_WITH_EFIFW_PACKING) \ + ,$(LN_SYMLINK) ../VBoxEFI32.fd ../VBoxEFI64.fd $(VBOX_PATH_SI_SCRATCH_PKG)/opt/VirtualBox/$(VBOX_SI_ARCH)/,) + +# Links to /usr/bin. + $(foreach link,$(SOLARIS_USRBIN_LINKS) \ + ,$(NLTAB)$(LN_SYMLINK) ../../opt/VirtualBox/VBox.sh $(VBOX_PATH_SI_SCRATCH_PKG)/usr/bin/$(link)) + +# Desktop stuff in /usr/share/applications/. + $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualbox.desktop.in + $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualbox.desktop + + $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualboxvm.desktop \ + $(VBOX_PATH_INST_COMMON_SRC)/virtualboxvm.desktop.in + $(CHMOD) 0644 $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/applications/virtualboxvm.desktop + +# Desktop stuff in /usr/share/mime/packages/ (S10 cannot deal with icon information in virtualbox.xml). + $(SED) -e '/x/mimetypes/. + $(foreach size, $(VBOX_SI_ICON_SIZES), $(foreach type, $(VBOX_SI_ICON_TYPES) \ + ,$(NLTAB)$(INSTALL) -m 0644 \ + $(PATH_ROOT)/src/VBox/Artwork/other/virtualbox-$(type)-$(size)px.png \ + $(VBOX_PATH_SI_SCRATCH_PKG)/usr/share/icons/hicolor/$(size)x$(size)/mimetypes/virtualbox-$(type).png)) + +# Files related to package creation. + $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \ + -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \ + -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g" \ + -e "s+@VBOX_VERSION_REVSTAMP@+$(PKGINFO_REVSTAMP)+g" \ + -e "s+@UNAME_P@+$(PKGINFO_ARCH)+g" \ + -e "s+@VBOX_PSTAMP@+$(PKGINFO_PSTAMP)+g" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox.pkginfo \ + $(VBOX_PATH_SOL_INST_SRC)/vbox.pkginfo + $(SED) -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \ + -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \ + -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_SMF_STYLE)+g" \ + -e "s+@VBOX_SVN_REV@+$(VBOX_SVN_REV)+g" \ + -e "s+@UNAME_P@+$(PKGINFO_ARCH)+g" \ + --output $(VBOX_PATH_SI_SCRATCH_PKG)/vbox-ips.mog \ + $(VBOX_PATH_SOL_INST_SRC)/vbox-ips.mog + $(APPEND) -t $@ "done" + +# +# Creates the System V style installer package. +# +solaris-package:: $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg +$(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg: \ + $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts \ + $(VBOX_SI_DEP_ON_MAKEFILE) \ + | $$(dir $$@) + $(call MSG_L1,Creating install package: $(PKG_FILENAME).pkg) + $(VBOX_PATH_SI_SCRATCH_PKG)/makepackage.sh \ + $(if-expr defined(VBOX_WITH_HARDENING),--hardened,) \ + $(VBOX_PATH_SI_SCRATCH_PKG) \ + $(PKG_FILENAME) \ + $(KBUILD_TARGET_ARCH) \ + $(VBOX_SVN_REV) + $(MV) -- "$(VBOX_PATH_SI_SCRATCH_PKG)/$(PKG_FILENAME).pkg" "$@" + +# +# Creates the tar file containing license, readme and autoresponse file in addition to the System V package. +# +solaris-package-tar-gz:: $(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz +$(PATH_STAGE_BIN)/$(PKG_FILENAME).tar.gz: \ + $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg \ + $(PATH_STAGE_BIN)/LICENSE \ + $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \ + $(PATH_ROOT)/doc/ReadMe-Solaris.txt \ + $(VBOX_SI_DEP_ON_MAKEFILE) \ + | $(VBOX_PATH_SI_SCRATCH)/ + $(call MSG_L1,Creating final tar.gz package: $(PKG_FILENAME).tar.gz) + $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt "$@" + $(QUIET)$(SED) \ + -e "s+@VBOX_PRODUCT@+$(VBOX_PRODUCT)+g" \ + -e "s+@VBOX_VENDOR@+$(VBOX_VENDOR)+g" \ + -e "s+@VBOX_VERSION_STRING@+$(VBOX_VERSION_STRING)+g" \ + -e "s+@KBUILD_TARGET_ARCH@+$(KBUILD_TARGET_ARCH)+g" \ + -e "s+@VBOX_SVN_REV@+$(VBOX_SVN_REV)+g" \ + --output $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \ + $(PATH_ROOT)/doc/ReadMe-Solaris.txt + $(QUIET)$(VBOX_SI_GTAR) -C $(VBOX_PATH_SI_SCRATCH) -czvf "$@" --show-transformed-name \ + --xform 's,^.*/,,g' --xform 's,vbox.pkgresponse,autoresponse,' \ + $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt \ + $(PATH_STAGE_BIN)/LICENSE \ + $(VBOX_PATH_SOL_INST_SRC)/vbox.pkgresponse \ + $(VBOX_PATH_SI_SCRATCH)/$(PKG_FILENAME).pkg + $(QUIET)$(RM) -f -- $(VBOX_PATH_SI_SCRATCH)/ReadMe.txt + $(call MSG_L1,Packaging $@ is completed.) + +# +# Creates the IPS style installer package. +# +solaris-package-ips:: $(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p +$(PATH_STAGE_BIN)/$(PKG_FILENAME_SMF_STYLE).p5p: \ + $(VBOX_PATH_SI_SCRATCH)/dist-copy.ts \ + $(VBOX_SI_DEP_ON_MAKEFILE) \ + | $$(dir $$@) + $(call MSG_L1,Creating install package: $(PKG_FILENAME_SMF_STYLE).p5p) + $(VBOX_PATH_SI_SCRATCH_PKG)/makepackage.sh \ + --ips \ + $(if-expr defined(VBOX_WITH_HARDENING),--hardened,) \ + $(VBOX_PATH_SI_SCRATCH_PKG) \ + $(PKG_FILENAME_SMF_STYLE) \ + $(KBUILD_TARGET_ARCH) \ + $(VBOX_SVN_REV) + $(MV) -- "$(VBOX_PATH_SI_SCRATCH_PKG)/$(PKG_FILENAME_SMF_STYLE).p5p" "$@" + + +## List of file list variable names relevant for debug info. +SOLARIS_FILE_LIST_DBGINFO_VARS := $(foreach var, $(SOLARIS_FILE_LIST_VARS), $(if-expr "$($(var).STRIP)" != "no",$(var),)) +## Adds a .DBGDST property to each of the debug info file lists. Simplifies our job below +$(foreach var,$(SOLARIS_FILE_LIST_DBGINFO_VARS) \ + ,$(eval $(var).DBGDST := $(subst $(VBOX_PATH_SI_SCRATCH_PKG)/,$(VBOX_PATH_SI_SCRATCH_DBG)/,$(subst /opt/VirtualBox,,$($(var).DST))))) + +# +# Creates a tar file containing the debug info. +# +$(PATH_STAGE_BIN)/VirtualBoxDebug.tar.bz2: \ + $(VBOX_VERSION_STAMP) \ + $(VBOX_SI_DEP_ON_MAKEFILE) \ + $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $(foreach file, $($(var)), $($(var).SRC)/$(file))) + $(call MSG_L1,Preparing $@) + $(RM) -Rf -- "$(VBOX_PATH_SI_SCRATCH_DBG)/" + $(RM) -f -- "$@" + $(MKDIR) -p -m 0755 \ + $(VBOX_PATH_SI_SCRATCH_DBG)/ \ + $(sort $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS), $($(var).DBGDST)/ $(if-expr "$($(var).SUBDIRS)" == "yes" \ + ,$(sort $(dir $(foreach file, $($(var)), $($(var).DBGDST)/$(file)))),))) + $(foreach var, $(SOLARIS_FILE_LIST_DBGINFO_VARS),$(foreach file, $($(var)) \ + ,$(NLTAB)$(VBOX_SI_OBJCOPY_DBGINFO) "$($(var).SRC)/$(file)" "$($(var).DBGDST)/$(file)")) + $(call MSG_L1,Packing $@) + $(QUIET)$(VBOX_SI_GTAR) --dereference --owner 0 --group 0 \ + -cvjRhf "$@" -C "$(VBOX_PATH_SI_SCRATCH_DBG)/.." "./$(notdir $(VBOX_PATH_SI_SCRATCH_DBG))/" + $(QUIET)$(CHMOD) 0644 $@ + $(call MSG_L1,Packaging $@ is completed.) + $(RM) -Rf "$(VBOX_PATH_SI_SCRATCH_DBG)/" + diff --git a/src/VBox/Installer/solaris/VBox.sh b/src/VBox/Installer/solaris/VBox.sh new file mode 100755 index 00000000..3e299d8d --- /dev/null +++ b/src/VBox/Installer/solaris/VBox.sh @@ -0,0 +1,82 @@ +#!/bin/sh +## @file +# Oracle VM VirtualBox startup script, Solaris hosts. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +CURRENT_ISA=`isainfo -k` +if test "$CURRENT_ISA" = "amd64"; then + INSTALL_DIR="/opt/VirtualBox/amd64" +else + INSTALL_DIR="/opt/VirtualBox/i386" +fi + +APP=`basename $0` +case "$APP" in + VirtualBox|virtualbox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VirtualBoxVM|virtualboxvm) + exec "$INSTALL_DIR/VirtualBoxVM" "$@" + ;; + VBoxManage|vboxmanage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL|vboxsdl) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP|VBoxHeadless|vboxheadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxBugReport|vboxbugreport) + exec "$INSTALL_DIR/VBoxBugReport" "$@" + ;; + VBoxBalloonCtrl|vboxballoonctrl) + exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@" + ;; + VBoxAutostart|vboxautostart) + exec "$INSTALL_DIR/VBoxAutostart" "$@" + ;; + VBoxDTrace|vboxdtrace) + exec "$INSTALL_DIR/VBoxDTrace" "$@" + ;; + VBoxAudioTest|vboxaudiotest|vkat) + exec "$INSTALL_DIR/VBoxAudioTest" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + VBoxQtconfig) + exec "$INSTALL_DIR/VBoxQtconfig" "$@" + ;; + vbox-img) + exec "$INSTALL_DIR/vbox-img" "$0" + ;; + *) + echo "Unknown application - $APP" + exit 1 + ;; +esac +exit 0 + diff --git a/src/VBox/Installer/solaris/VBoxISAExec.c b/src/VBox/Installer/solaris/VBoxISAExec.c new file mode 100644 index 00000000..021809f6 --- /dev/null +++ b/src/VBox/Installer/solaris/VBoxISAExec.c @@ -0,0 +1,53 @@ +/* $Id: VBoxISAExec.c $ */ +/** @file + * VBoxISAExec, ISA exec wrapper, Solaris hosts. + */ + +/* + * Copyright (C) 2006-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include + +int main(int argc, char *argv[], char *envv[]) +{ + int rc = 0; + const char *pszExec = getexecname(); + + if (!pszExec) + { + fprintf(stderr, "Failed to get executable name.\n"); + return -1; + } + + rc = isaexec(pszExec, argv, envv); + if (rc == -1) + fprintf(stderr, "Failed to find/execute ISA specific executable for %s\n", pszExec); + + return rc; +} + diff --git a/src/VBox/Installer/solaris/VBoxZoneAccess.c b/src/VBox/Installer/solaris/VBoxZoneAccess.c new file mode 100644 index 00000000..094667ca --- /dev/null +++ b/src/VBox/Installer/solaris/VBoxZoneAccess.c @@ -0,0 +1,100 @@ +/* $Id: VBoxZoneAccess.c $ */ +/** @file + * VBoxZoneAccess - Hack that keeps vboxdrv referenced for granting zone access, Solaris hosts. + */ + +/* + * Copyright (C) 2006-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include +#include +#include + +#include + + +/********************************************************************************************************************************* +* Defined Constants And Macros * +*********************************************************************************************************************************/ +#define DEVICE_NAME "/devices/pseudo/vboxdrv@0:vboxdrv" +#define DEVICE_NAME_USR "/devices/pseudo/vboxdrv@0:vboxdrvu" + +int main(int argc, char *argv[]) +{ + int hDevice = -1; + int hDeviceUsr = -1; + + /* Check root permissions. */ + if (geteuid() != 0) + { + fprintf(stderr, "This program needs administrator privileges.\n"); + return -1; + } + + /* Daemonize... */ + RTProcDaemonizeUsingFork(false /* fNoChDir */, + false /* fNoClose */, + NULL /* pszPidfile */); + + /* Open the device */ + hDevice = open(DEVICE_NAME, O_RDWR, 0); + if (hDevice < 0) + { + fprintf(stderr, "Failed to open '%s'. errno=%d\n", DEVICE_NAME, errno); + return errno; + } + + /* Open the user device. */ + hDeviceUsr = open(DEVICE_NAME_USR, O_RDWR, 0); + if (hDeviceUsr < 0) + { + fprintf(stderr, "Failed to open '%s'. errno=%d\n", DEVICE_NAME_USR, errno); + close(hDevice); + return errno; + } + + /* Mark the file handle close on exec. */ + if ( fcntl(hDevice, F_SETFD, FD_CLOEXEC) != 0 + || fcntl(hDeviceUsr, F_SETFD, FD_CLOEXEC) != 0) + { + fprintf(stderr, "Failed to set close on exec. errno=%d\n", errno); + close(hDevice); + close(hDeviceUsr); + return errno; + } + + /* Go to interruptible sleep for ~15 years... */ + /* avoid > 2^31 for Year 2038 32-bit overflow (Solaris 10) */ + sleep(500000000U); + + close(hDevice); + close(hDeviceUsr); + + return 0; +} + diff --git a/src/VBox/Installer/solaris/checkinstall.sh b/src/VBox/Installer/solaris/checkinstall.sh new file mode 100755 index 00000000..01f30045 --- /dev/null +++ b/src/VBox/Installer/solaris/checkinstall.sh @@ -0,0 +1,273 @@ +#!/bin/sh +# $Id: checkinstall.sh $ +## @file +# +# VirtualBox checkinstall script for Solaris. +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +infoprint() +{ + echo 1>&2 "$1" +} + +errorprint() +{ + echo 1>&2 "## $1" +} + +abort_error() +{ + errorprint "Please close all VirtualBox processes and re-run this installer." + exit 1 +} + +checkdep_ips() +{ + if test -z "$1"; then + errorprint "Missing argument to checkdep_ips" + return 1 + fi + # using "list" without "-a" only lists installed pkgs which is what we need + $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1 + if test "$?" -eq 0; then + return 0 + fi + PKG_MISSING_IPS="$PKG_MISSING_IPS $1" + return 1 +} + +checkdep_ips_either() +{ + if test -z "$1" || test -z "$2"; then + errorprint "Missing argument to checkdep_ips_either" + return 1 + fi + # using "list" without "-a" only lists installed pkgs which is what we need + $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1 + if test "$?" -eq 0; then + return 0 + fi + $BIN_PKG $BASEDIR_OPT list "$2" >/dev/null 2>&1 + if test "$?" -eq 0; then + return 0 + fi + PKG_MISSING_IPS="$PKG_MISSING_IPS $1 or $2" + return 1 +} + +disable_service() +{ + if test -z "$1" || test -z "$2"; then + errorprint "Missing argument to disable_service" + return 1 + fi + servicefound=`$BIN_SVCS -H "$1" 2> /dev/null | grep '^online'` + if test ! -z "$servicefound"; then + infoprint "$2 ($1) is still enabled. Disabling..." + $BIN_SVCADM disable -s "$1" + # Don't delete the service, handled by manifest class action + # /usr/sbin/svccfg delete $1 + fi +} + +# find_bin_path() +# !! failure is always fatal +find_bin_path() +{ + if test -z "$1"; then + errorprint "missing argument to find_bin_path()" + exit 1 + fi + + binfilename=`basename $1` + binfilepath=`which $binfilename 2> /dev/null` + if test -x "$binfilepath"; then + echo "$binfilepath" + return 0 + else + errorprint "$1 missing or is not an executable" + exit 1 + fi +} + +# find_bins() +# !! failure is always fatal +find_mandatory_bins() +{ + # Search only for binaries that might be in different locations + if test ! -x "$BIN_SVCS"; then + BIN_SVCS=`find_bin_path "$BIN_SVCS"` + fi + + if test ! -x "$BIN_SVCADM"; then + BIN_SVCADM=`find_bin_path "$BIN_SVCADM"` + fi +} + + +# +# Begin execution +# + +# Nothing to check for remote install +REMOTE_INST=0 +if test "x${PKG_INSTALL_ROOT:=/}" != "x/"; then + BASEDIR_OPT="-R $PKG_INSTALL_ROOT" + REMOTE_INST=1 +fi + +# Nothing to check for non-global zones +currentzone=`zonename` +if test "x$currentzone" != "xglobal"; then + exit 0 +fi + +PKG_MISSING_IPS="" +BIN_PKG=/usr/bin/pkg +BIN_SVCS=/usr/bin/svcs +BIN_SVCADM=/usr/sbin/svcadm + +# Check non-optional binaries +find_mandatory_bins + +infoprint "Checking package dependencies..." + +if test -x "$BIN_PKG"; then + checkdep_ips "system/library/iconv/iconv-core" + checkdep_ips "x11/library/libice" + checkdep_ips "x11/library/libsm" + checkdep_ips "x11/library/libx11" + checkdep_ips "x11/library/libxcb" + checkdep_ips "x11/library/libxext" + checkdep_ips "x11/library/libxfixes" + checkdep_ips "x11/library/libxkbcommon" + checkdep_ips "x11/library/libxrender" + checkdep_ips "x11/library/mesa" + checkdep_ips "x11/library/toolkit/libxt" + checkdep_ips "x11/library/xcb-util" + checkdep_ips_either "runtime/python-26" "runtime/python-27" "runtime/python-35" "runtime/python-36" "runtime/python-37" "runtime/python-38" "runtime/python-39" + checkdep_ips_either "system/library/gcc/gcc-c++-runtime" "system/library/gcc/gcc-c++-runtime-9" + checkdep_ips_either "system/library/gcc/gcc-c-runtime" "system/library/gcc/gcc-c-runtime-9" +else + PKG_MISSING_IPS="runtime/python-37 system/library/iconv/iconv-core system/library/gcc/gcc-c++-runtime-9 system/library/gcc/gcc-c-runtime-9" +fi + +if test "x$PKG_MISSING_IPS" != "x"; then + if test ! -x "$BIN_PKG"; then + errorprint "Missing or non-executable binary: pkg ($BIN_PKG)." + errorprint "Cannot check for dependencies." + errorprint "" + errorprint "Please install one of the required packaging system." + exit 1 + fi + errorprint "Missing packages: $PKG_MISSING_IPS" + errorprint "" + errorprint "Please install these packages before installing VirtualBox." + exit 1 +else + infoprint "Done." +fi + +# Nothing more to do for remote installs +if test "$REMOTE_INST" -eq 1; then + exit 0 +fi + +# Check & disable running services +disable_service "svc:/application/virtualbox/zoneaccess" "VirtualBox zone access service" +disable_service "svc:/application/virtualbox/webservice" "VirtualBox web service" +disable_service "svc:/application/virtualbox/autostart" "VirtualBox auto-start service" +disable_service "svc:/application/virtualbox/balloonctrl" "VirtualBox balloon-control service" + +# Check if VBoxSVC is currently running +VBOXSVC_PID=`ps -eo pid,fname | grep VBoxSVC | grep -v grep | awk '{ print $1 }'` +if test ! -z "$VBOXSVC_PID" && test "$VBOXSVC_PID" -ge 0; then + errorprint "VirtualBox's VBoxSVC (pid $VBOXSVC_PID) still appears to be running." + abort_error +fi + +# Check if VBoxNetDHCP is currently running +VBOXNETDHCP_PID=`ps -eo pid,fname | grep VBoxNetDHCP | grep -v grep | awk '{ print $1 }'` +if test ! -z "$VBOXNETDHCP_PID" && test "$VBOXNETDHCP_PID" -ge 0; then + errorprint "VirtualBox's VBoxNetDHCP (pid $VBOXNETDHCP_PID) still appears to be running." + abort_error +fi + +# Check if VBoxNetNAT is currently running +VBOXNETNAT_PID=`ps -eo pid,fname | grep VBoxNetNAT | grep -v grep | awk '{ print $1 }'` +if test ! -z "$VBOXNETNAT_PID" && test "$VBOXNETNAT_PID" -ge 0; then + errorprint "VirtualBox's VBoxNetNAT (pid $VBOXNETNAT_PID) still appears to be running." + abort_error +fi + +# Check if vboxnet is still plumbed, if so try unplumb it +BIN_IFCONFIG=`which ifconfig 2> /dev/null` +if test -x "$BIN_IFCONFIG"; then + vboxnetup=`$BIN_IFCONFIG vboxnet0 >/dev/null 2>&1` + if test "$?" -eq 0; then + infoprint "VirtualBox NetAdapter is still plumbed" + infoprint "Trying to remove old NetAdapter..." + $BIN_IFCONFIG vboxnet0 unplumb + if test "$?" -ne 0; then + errorprint "VirtualBox NetAdapter 'vboxnet0' couldn't be unplumbed (probably in use)." + abort_error + fi + fi + vboxnetup=`$BIN_IFCONFIG vboxnet0 inet6 >/dev/null 2>&1` + if test "$?" -eq 0; then + infoprint "VirtualBox NetAdapter (Ipv6) is still plumbed" + infoprint "Trying to remove old NetAdapter..." + $BIN_IFCONFIG vboxnet0 inet6 unplumb + if test "$?" -ne 0; then + errorprint "VirtualBox NetAdapter 'vboxnet0' IPv6 couldn't be unplumbed (probably in use)." + abort_error + fi + fi +fi + +# Make sure that SMF has finished removing any services left over from a +# previous installation which may interfere with installing new ones. +# This is only relevant on Solaris 11 for SysV packages. +# +# See BugDB 14838646 for the original problem and @bugref{7866} for +# follow up fixes. +for i in 1 2 3 4 5 6 7 8 9 10; do + $BIN_SVCS -H "svc:/application/virtualbox/autostart" >/dev/null 2>&1 || + $BIN_SVCS -H "svc:/application/virtualbox/webservice" >/dev/null 2>&1 || + $BIN_SVCS -H "svc:/application/virtualbox/zoneaccess" >/dev/null 2>&1 || + $BIN_SVCS -H "svc:/application/virtualbox/balloonctrl" >/dev/null 2>&1 || break + if test "${i}" = "1"; then + printf "Waiting for services from previous installation to be removed." + elif test "${i}" = "10"; then + printf "\nWarning!!! Some service(s) still appears to be present" + else + printf "." + fi + sleep 1 +done +test "${i}" = "1" || printf "\n" + +exit 0 + diff --git a/src/VBox/Installer/solaris/makepackage.sh b/src/VBox/Installer/solaris/makepackage.sh new file mode 100755 index 00000000..73b83121 --- /dev/null +++ b/src/VBox/Installer/solaris/makepackage.sh @@ -0,0 +1,307 @@ +#!/bin/sh +# $Id: makepackage.sh $ +## @file +# VirtualBox package creation script, Solaris hosts. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# Usage: +# makepackage.sh [--hardened] [--ips] $(PATH_TARGET)/install packagename {$(KBUILD_TARGET_ARCH)|neutral} $(VBOX_SVN_REV) + + +# Parse options. +HARDENED="" +IPS_PACKAGE="" +PACKAGE_SPEC="prototype" +while [ $# -ge 1 ]; +do + case "$1" in + --hardened) + HARDENED=1 + ;; + --ips) + IPS_PACKAGE=1 + PACKAGE_SPEC="virtualbox.p5m" + ;; + *) + break + ;; + esac + shift +done + +if [ -z "$4" ]; then + echo "Usage: $0 installdir packagename x86|amd64 svnrev" + echo "-- packagename must not have any extension (e.g. VirtualBox-SunOS-amd64-r28899)" + exit 1 +fi + +PKG_BASE_DIR="$1" +PACKAGE_SPEC="$PKG_BASE_DIR/$PACKAGE_SPEC" +VBOX_INSTALLED_DIR=/opt/VirtualBox +if [ -n "$IPS_PACKAGE" ]; then + VBOX_PKGFILE="$2".p5p +else + VBOX_PKGFILE="$2".pkg +fi +# VBOX_PKG_ARCH is currently unused. +VBOX_PKG_ARCH="$3" +VBOX_SVN_REV="$4" + +if [ -n "$IPS_PACKAGE" ] ; then + VBOX_PKGNAME=system/virtualbox +else + VBOX_PKGNAME=SUNWvbox +fi +# any egrep should do the job, the one from /usr/xpg4/bin isn't required +VBOX_EGREP=/usr/bin/egrep +# need dynamic regex support which isn't available in S11 /usr/bin/awk +VBOX_AWK=/usr/xpg4/bin/awk + +# bail out on non-zero exit status +set -e + +if [ -n "$IPS_PACKAGE" ]; then + +package_spec_create() +{ + > "$PACKAGE_SPEC" +} + +package_spec_append_info() +{ + : # provided by vbox-ips.mog +} + +package_spec_append_content() +{ + rm -rf "$1/vbox-repo" + pkgsend generate "$1" | pkgfmt >> "$PACKAGE_SPEC" +} + +package_spec_append_hardlink() +{ + if [ -f "$3$4/amd64/$2" -o -f "$3$4/i386/$2" ]; then + echo "hardlink path=$4/$2 target=$1" >> "$PACKAGE_SPEC" + fi +} + +package_spec_fixup_content() +{ + : +} + +package_create() +{ + VBOX_DEF_HARDENED= + [ -z "$HARDENED" ] && VBOX_DEF_HARDENED='#' + + pkgmogrify -DVBOX_PKGNAME="$VBOX_PKGNAME" -DHARDENED_ONLY="$VBOX_DEF_HARDENED" "$PACKAGE_SPEC" "$1/vbox-ips.mog" | pkgfmt > "$PACKAGE_SPEC.1" + + pkgdepend generate -m -d "$1" "$PACKAGE_SPEC.1" | pkgfmt > "$PACKAGE_SPEC.2" + + pkgdepend resolve -m "$PACKAGE_SPEC.2" + + # Too expensive, and in this form not useful since it does not have + # the package manifests without using options -r (for repo access) and + # -c (for caching the data). Not viable since the cache would be lost + # for every build. + #pkglint "$PACKAGE_SPEC.2.res" + + pkgrepo create "$1/vbox-repo" + pkgrepo -s "$1/vbox-repo" set publisher/prefix=virtualbox + + # Create package in local file repository + pkgsend -s "$1/vbox-repo" publish -d "$1" "$PACKAGE_SPEC.2.res" + + pkgrepo -s "$1/vbox-repo" info + pkgrepo -s "$1/vbox-repo" list + + # Convert into package archive + rm -f "$1/$2" + pkgrecv -a -s "$1/vbox-repo" -d "$1/$2" -m latest "$3" + rm -rf "$1/vbox-repo" +} + +else + +package_spec_create() +{ + > "$PACKAGE_SPEC" +} + +package_spec_append_info() +{ + echo 'i pkginfo=vbox.pkginfo' >> "$PACKAGE_SPEC" + echo 'i checkinstall=checkinstall.sh' >> "$PACKAGE_SPEC" + echo 'i postinstall=postinstall.sh' >> "$PACKAGE_SPEC" + echo 'i preremove=preremove.sh' >> "$PACKAGE_SPEC" + echo 'i space=vbox.space' >> "$PACKAGE_SPEC" +} + +# Our package is a non-relocatable package. +# +# pkgadd will take care of "relocating" them when they are used for remote installations using +# $PKG_INSTALL_ROOT and not $BASEDIR. Seems this little subtlety led to it's own page: +# https://docs.oracle.com/cd/E19253-01/820-4042/package-2/index.html + +package_spec_append_content() +{ + cd "$1" + # Exclude directories to not cause install-time conflicts with existing system directories + find . ! -type d | "$VBOX_EGREP" -v '^\./(LICENSE|prototype|makepackage\.sh|vbox\.pkginfo|postinstall\.sh|checkinstall\.sh|preremove\.sh|vbox\.space|vbox-ips.mog|virtualbox\.p5m.*)$' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC" + cd - + "$VBOX_AWK" 'NF == 3 && $1 == "s" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" + mv -f "$PACKAGE_SPEC.tmp" "$PACKAGE_SPEC" + "$VBOX_AWK" 'NF == 6 && ($1 == "f" || $1 == "l") && ($2 == "none" || $2 == "manifest") { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" + mv -f "$PACKAGE_SPEC.tmp" "$PACKAGE_SPEC" + + cd "$1" + # Include opt/VirtualBox and subdirectories as we want uninstall to clean up directory structure. + # Include var/svc for manifest class action script does not create them. + find . -type d | "$VBOX_EGREP" 'opt/VirtualBox|var/svc/manifest/application/virtualbox' | LC_COLLATE=C sort | pkgproto >> "$PACKAGE_SPEC" + cd - + "$VBOX_AWK" 'NF == 6 && $1 == "d" && $2 == "none" { $3="/"$3 } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" + mv -f "$PACKAGE_SPEC.tmp" "$PACKAGE_SPEC" +} + +package_spec_append_hardlink() +{ + if [ -f "$3$4/amd64/$2" -o -f "$3$4/i386/$2" ]; then + echo "l none $4/$2=$1" >> "$PACKAGE_SPEC" + fi +} + +# Fixup filelist using awk, the parameters must be in awk syntax +# params: filename condition action +package_spec_fixup_filelist() +{ + "$VBOX_AWK" 'NF == 6 && '"$1"' { '"$2"' } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" + mv -f "$PACKAGE_SPEC.tmp" "$PACKAGE_SPEC" +} + +package_spec_fixup_dirlist() +{ + "$VBOX_AWK" 'NF == 6 && $1 == "d" && '"$1"' { '"$2"' } { print }' "$PACKAGE_SPEC" > "$PACKAGE_SPEC.tmp" + mv -f "$PACKAGE_SPEC.tmp" "$PACKAGE_SPEC" +} + +package_spec_fixup_content() +{ + # fix up file permissions (owner/group) + # don't grok for class-specific files (like sed, if any) + package_spec_fixup_filelist '$2 == "none"' '$5 = "root"; $6 = "bin"' + + # HostDriver vboxdrv + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxdrv.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxdrv"' '$6 = "sys"' + + # NetFilter vboxflt + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxflt.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxflt"' '$6 = "sys"' + + # NetFilter vboxbow + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxbow.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxbow"' '$6 = "sys"' + + # NetAdapter vboxnet + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxnet.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxnet"' '$6 = "sys"' + + # USBMonitor vboxusbmon + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusbmon.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusbmon"' '$6 = "sys"' + + # USB Client vboxusb + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/vboxusb.conf"' '$6 = "sys"' + package_spec_fixup_filelist '$3 == "/platform/i86pc/kernel/drv/amd64/vboxusb"' '$6 = "sys"' + + # Manifest class action scripts + package_spec_fixup_filelist '$3 == "/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml"' '$2 = "manifest";$6 = "sys"' + package_spec_fixup_filelist '$3 == "/var/svc/manifest/application/virtualbox/virtualbox-balloonctrl.xml"' '$2 = "manifest";$6 = "sys"' + package_spec_fixup_filelist '$3 == "/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml"' '$2 = "manifest";$6 = "sys"' + + # Use 'root' as group so as to match attributes with the previous installation and prevent a conflict. Otherwise pkgadd bails out thinking + # we're violating directory attributes of another (non existing) package + package_spec_fixup_dirlist '$3 == "/var/svc/manifest/application/virtualbox"' '$6 = "root"' + + # Hardening requires some executables to be marked setuid. + if [ -n "$HARDENED" ]; then + package_spec_fixup_filelist '( $3 == "/opt/VirtualBox/amd64/VirtualBoxVM" \ + || $3 == "/opt/VirtualBox/amd64/VBoxHeadless" \ + || $3 == "/opt/VirtualBox/amd64/VBoxSDL" \ + || $3 == "/opt/VirtualBox/i386/VirtualBox" \ + || $3 == "/opt/VirtualBox/i386/VBoxHeadless" \ + || $3 == "/opt/VirtualBox/i386/VBoxSDL" )' '$4 = "4755"' + fi + + # Other executables that need setuid root (hardened or otherwise) + package_spec_fixup_filelist '( $3 == "/opt/VirtualBox/amd64/VBoxNetAdpCtl" \ + || $3 == "/opt/VirtualBox/i386/VBoxNetAdpCtl" \ + || $3 == "/opt/VirtualBox/amd64/VBoxNetDHCP" \ + || $3 == "/opt/VirtualBox/i386/VBoxNetDHCP" \ + || $3 == "/opt/VirtualBox/amd64/VBoxNetNAT" \ + || $3 == "/opt/VirtualBox/i386/VBoxNetNAT" )' '$4 = "4755"' + + echo " --- start of $PACKAGE_SPEC ---" + cat "$PACKAGE_SPEC" + echo " --- end of $PACKAGE_SPEC ---" +} + +package_create() +{ + # Create the package instance + pkgmk -o -f "$PACKAGE_SPEC" -r "$1" + + # Translate into package datastream + pkgtrans -s -o /var/spool/pkg "$1/$2" "$3" + + rm -rf "/var/spool/pkg/$2" +} + +fi + + +# Prepare package spec +package_spec_create + +# Metadata +package_spec_append_info "$PKG_BASE_DIR" + +# File and direcory list +package_spec_append_content "$PKG_BASE_DIR" + +# Add hardlinks for executables to launch the 32-bit or 64-bit executable +for f in VBoxManage VBoxSDL VBoxAutostart vboxwebsrv VBoxZoneAccess VBoxSVC VBoxBugReport VBoxBalloonCtrl VBoxTestOGL VirtualBox VirtualBoxVM vbox-img VBoxHeadless; do + package_spec_append_hardlink VBoxISAExec $f "$PKG_BASE_DIR" "$VBOX_INSTALLED_DIR" +done + +package_spec_fixup_content + +package_create "$PKG_BASE_DIR" "$VBOX_PKGFILE" "$VBOX_PKGNAME" "$VBOX_SVN_REV" + +echo "## Package file created successfully!" + +exit $? diff --git a/src/VBox/Installer/solaris/pkginstall.sh b/src/VBox/Installer/solaris/pkginstall.sh new file mode 100755 index 00000000..64a2e6a2 --- /dev/null +++ b/src/VBox/Installer/solaris/pkginstall.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# $Id: pkginstall.sh $ +## @file +# +# VirtualBox postinstall script for Solaris. +# +# If you just installed VirtualBox using IPS/pkg(5), you should run this +# script once to avoid rebooting the system before using VirtualBox. +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +if test "$1" != "--srv4"; then + # IPS package + echo "Checking for older & partially installed bits..." + ISIPS="--ips" +else + # SRv4 package + echo "Checking for older bits..." + ISIPS="" +fi + +# pkgadd -v +if test "$1" = "--sh-trace" || test "$2" = "--sh-trace" || test "$3" = "--sh-trace"; then + set -x +fi +DEBUGOPT=`set -o 2>/dev/null | sed -ne 's/^xtrace *on$/--sh-trace/p'` # propagate pkgadd -v + +# If PKG_INSTALL_ROOT is undefined or NULL, redefine to '/' and carry on. +${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove --fatal ${ISIPS} ${DEBUGOPT} + +if test "$?" -eq 0; then + echo "Installing new ones..." + $PKG_INSTALL_ROOT/opt/VirtualBox/vboxconfig.sh --postinstall ${DEBUGOPT} + rc=$? + if test "$rc" -ne 0; then + echo 1>&2 "## Completed but with errors." + rc=1 + else + if test "$1" != "--srv4"; then + echo "Post installation completed successfully!" + fi + fi +else + echo 1>&2 "## ERROR!! Failed to remove older/partially installed bits." + rc=1 +fi + +exit "$rc" + diff --git a/src/VBox/Installer/solaris/postinstall.sh b/src/VBox/Installer/solaris/postinstall.sh new file mode 100755 index 00000000..d7921752 --- /dev/null +++ b/src/VBox/Installer/solaris/postinstall.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# $Id: postinstall.sh $ +## @file +# VirtualBox postinstall script for Solaris. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +rc=0 +currentzone=`zonename` +if test "$currentzone" = "global"; then + DEBUGOPT=`set -o 2>/dev/null | sed -ne 's/^xtrace *on$/--sh-trace/p'` # propagate pkgadd -v + ${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/pkginstall.sh --srv4 ${DEBUGOPT} + rc=$? +fi + +# installf inherits ${PKG_INSTALL_ROOT} from pkgadd, no need to explicitly specify +/usr/sbin/installf -f $PKGINST + +# return 20 = requires reboot, 2 = partial failure, 0 = success +exit "$rc" + diff --git a/src/VBox/Installer/solaris/preremove.sh b/src/VBox/Installer/solaris/preremove.sh new file mode 100755 index 00000000..722fa978 --- /dev/null +++ b/src/VBox/Installer/solaris/preremove.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# $Id: preremove.sh $ +## @file +# VirtualBox preremove script for Solaris. +# + +# +# Copyright (C) 2007-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +currentzone=`zonename` +if test "x$currentzone" = "xglobal"; then + echo "Removing VirtualBox services and drivers..." + ${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove + if test "$?" -eq 0; then + echo "Done." + exit 0 + fi + echo 1>&2 "## Failed." + exit 1 +fi + +exit 0 + diff --git a/src/VBox/Installer/solaris/smf-vboxautostart.sh b/src/VBox/Installer/solaris/smf-vboxautostart.sh new file mode 100755 index 00000000..5dd1ff94 --- /dev/null +++ b/src/VBox/Installer/solaris/smf-vboxautostart.sh @@ -0,0 +1,128 @@ +#!/sbin/sh +# $Id: smf-vboxautostart.sh $ + +# +# Copyright (C) 2012-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# smf-vboxautostart method +# +# Argument is the method name (start, stop, ...) + +. /lib/svc/share/smf_include.sh + +VW_OPT="$1" +VW_EXIT=0 + +case $VW_OPT in + start) + if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then + echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." + return $SMF_EXIT_ERR_CONFIG + fi + + if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then + echo "ERROR: /opt/VirtualBox/VBoxAutostart is not exectuable." + return $SMF_EXIT_ERR_CONFIG + fi + + # Get svc configuration + VW_CONFIG=`/usr/bin/svcprop -p config/config $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_CONFIG= + VW_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_ROTATE= + VW_LOGSIZE=`/usr/bin/svcprop -p config/logsize $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGSIZE= + VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGINTERVAL= + VW_VBOXGROUP=`/usr/bin/svcprop -p config/vboxgroup $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_VBOXGROUP= + + # Provide sensible defaults + [ -z "$VW_CONFIG" ] && VW_CONFIG=/etc/vbox/autostart.cfg + [ -z "$VW_ROTATE" ] && VW_ROTATE=10 + [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 + [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 + [ -z "$VW_VBOXGROUP" ] && VW_VBOXGROUP=staff + + # Get all users + for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1` + do + su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --background --start --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" + + VW_EXIT=$? + if [ $VW_EXIT != 0 ]; then + echo "VBoxAutostart failed with $VW_EXIT." + VW_EXIT=1 + break + fi + done + ;; + stop) + if [ ! -f /opt/VirtualBox/VBoxAutostart ]; then + echo "ERROR: /opt/VirtualBox/VBoxAutostart does not exist." + return $SMF_EXIT_ERR_CONFIG + fi + + if [ ! -x /opt/VirtualBox/VBoxAutostart ]; then + echo "ERROR: /opt/VirtualBox/VBoxAutostart is not executable." + return $SMF_EXIT_ERR_CONFIG + fi + + # Get svc configuration + VW_CONFIG=`/usr/bin/svcprop -p config/config $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_CONFIG= + VW_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_ROTATE= + VW_LOGSIZE=`/usr/bin/svcprop -p config/logsize $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGSIZE= + VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGINTERVAL= + VW_VBOXGROUP=`/usr/bin/svcprop -p config/vboxgroup $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_VBOXGROUP= + + # Provide sensible defaults + [ -z "$VW_CONFIG" ] && VW_CONFIG=/etc/vbox/autostart.cfg + [ -z "$VW_ROTATE" ] && VW_ROTATE=10 + [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 + [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 + [ -z "$VW_VBOXGROUP" ] && VW_VBOXGROUP=staff + + # Get all users + for VW_USER in `logins -g $VW_VBOXGROUP | cut -d' ' -f1` + do + su - "$VW_USER" -c "/opt/VirtualBox/VBoxAutostart --stop --config \"$VW_CONFIG\" --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" + + VW_EXIT=$? + if [ $VW_EXIT != 0 ]; then + echo "VBoxAutostart failed with $VW_EXIT." + VW_EXIT=1 + break + fi + done + ;; + *) + VW_EXIT=$SMF_EXIT_ERR_CONFIG + ;; +esac + +exit $VW_EXIT diff --git a/src/VBox/Installer/solaris/smf-vboxballoonctrl.sh b/src/VBox/Installer/solaris/smf-vboxballoonctrl.sh new file mode 100755 index 00000000..8ab7cb77 --- /dev/null +++ b/src/VBox/Installer/solaris/smf-vboxballoonctrl.sh @@ -0,0 +1,121 @@ +#!/sbin/sh +# $Id: smf-vboxballoonctrl.sh $ + +# +# Copyright (C) 2008-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# smf-vboxballoonctrl method +# +# Argument is the method name (start, stop, ...) + +. /lib/svc/share/smf_include.sh + +VW_OPT="$1" +VW_EXIT=0 + +case $VW_OPT in + start) + if [ ! -f /opt/VirtualBox/VBoxBalloonCtrl ]; then + echo "ERROR: /opt/VirtualBox/VBoxBalloonCtrl does not exist." + return $SMF_EXIT_ERR_CONFIG + fi + + if [ ! -x /opt/VirtualBox/VBoxBalloonCtrl ]; then + echo "ERROR: /opt/VirtualBox/VBoxBalloonCtrl is not executable." + return $SMF_EXIT_ERR_CONFIG + fi + + # Get svc configuration + VBOXWATCHDOG_USER=`/usr/bin/svcprop -p config/user $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_USER= + VBOXWATCHDOG_BALLOON_INTERVAL=`/usr/bin/svcprop -p config/balloon_interval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_INTERVAL= + VBOXWATCHDOG_BALLOON_INCREMENT=`/usr/bin/svcprop -p config/balloon_increment $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_INCREMENT= + VBOXWATCHDOG_BALLOON_DECREMENT=`/usr/bin/svcprop -p config/balloon_decrement $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_DECREMENT= + VBOXWATCHDOG_BALLOON_LOWERLIMIT=`/usr/bin/svcprop -p config/balloon_lowerlimit $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_LOWERLIMIT= + VBOXWATCHDOG_BALLOON_SAFETYMARGIN=`/usr/bin/svcprop -p config/balloon_safetymargin $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_SAFETYMARGIN= + VBOXWATCHDOG_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_ROTATE= + VBOXWATCHDOG_LOGSIZE=`/usr/bin/svcprop -p config/logsize $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_LOGSIZE= + VBOXWATCHDOG_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_LOGINTERVAL= + + # Handle legacy parameters, do not add any further ones unless absolutely necessary. + if [ -z "$VBOXWATCHDOG_BALLOON_INTERVAL" ]; then + VBOXWATCHDOG_BALLOON_INTERVAL=`/usr/bin/svcprop -p config/interval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_INTERVAL= + fi + if [ -z "$VBOXWATCHDOG_BALLOON_INCREMENT" ]; then + VBOXWATCHDOG_BALLOON_INCREMENT=`/usr/bin/svcprop -p config/increment $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_INCREMENT= + fi + if [ -z "$VBOXWATCHDOG_BALLOON_DECREMENT" ]; then + VBOXWATCHDOG_BALLOON_DECREMENT=`/usr/bin/svcprop -p config/decrement $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_DECREMENT= + fi + if [ -z "$VBOXWATCHDOG_BALLOON_LOWERLIMIT" ]; then + VBOXWATCHDOG_BALLOON_LOWERLIMIT=`/usr/bin/svcprop -p config/lowerlimit $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_LOWERLIMIT= + fi + if [ -z "$VBOXWATCHDOG_BALLOON_SAFETYMARGIN" ]; then + VBOXWATCHDOG_BALLOON_SAFETYMARGIN=`/usr/bin/svcprop -p config/safetymargin $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VBOXWATCHDOG_BALLOON_SAFETYMARGIN= + fi + + # Provide sensible defaults + [ -z "$VBOXWATCHDOG_USER" ] && VBOXWATCHDOG_USER=root + + # Assemble the parameter list + PARAMS="--background" + [ -n "$VBOXWATCHDOG_BALLOON_INTERVAL" ] && PARAMS="$PARAMS --balloon-interval \"$VBOXWATCHDOG_BALLOON_INTERVAL\"" + [ -n "$VBOXWATCHDOG_BALLOON_INCREMENT" ] && PARAMS="$PARAMS --balloon-inc \"$VBOXWATCHDOG_BALLOON_INCREMENT\"" + [ -n "$VBOXWATCHDOG_BALLOON_DECREMENT" ] && PARAMS="$PARAMS --balloon-dec \"$VBOXWATCHDOG_BALLOON_DECREMENT\"" + [ -n "$VBOXWATCHDOG_BALLOON_LOWERLIMIT" ] && PARAMS="$PARAMS --balloon-lower-limit \"$VBOXWATCHDOG_BALLOON_LOWERLIMIT\"" + [ -n "$VBOXWATCHDOG_BALLOON_SAFETYMARGIN" ] && PARAMS="$PARAMS --balloon-safety-margin \"$VBOXWATCHDOG_BALLOON_SAFETYMARGIN\"" + [ -n "$VBOXWATCHDOG_ROTATE" ] && PARAMS="$PARAMS -R \"$VBOXWATCHDOG_ROTATE\"" + [ -n "$VBOXWATCHDOG_LOGSIZE" ] && PARAMS="$PARAMS -S \"$VBOXWATCHDOG_LOGSIZE\"" + [ -n "$VBOXWATCHDOG_LOGINTERVAL" ] && PARAMS="$PARAMS -I \"$VBOXWATCHDOG_LOGINTERVAL\"" + + exec su - "$VBOXWATCHDOG_USER" -c "/opt/VirtualBox/VBoxBalloonCtrl $PARAMS" + + VW_EXIT=$? + if [ $VW_EXIT != 0 ]; then + echo "VBoxBalloonCtrl failed with $VW_EXIT." + VW_EXIT=1 + fi + ;; + stop) + # Kill service contract + smf_kill_contract $2 TERM 1 + ;; + *) + VW_EXIT=$SMF_EXIT_ERR_CONFIG + ;; +esac + +exit $VW_EXIT diff --git a/src/VBox/Installer/solaris/smf-vboxwebsrv.sh b/src/VBox/Installer/solaris/smf-vboxwebsrv.sh new file mode 100755 index 00000000..813c928a --- /dev/null +++ b/src/VBox/Installer/solaris/smf-vboxwebsrv.sh @@ -0,0 +1,146 @@ +#!/sbin/sh +# $Id: smf-vboxwebsrv.sh $ + +# +# Copyright (C) 2008-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# +# smf-vboxwebsrv method +# +# Argument is the method name (start, stop, ...) + +. /lib/svc/share/smf_include.sh + +VW_OPT="$1" +VW_EXIT=0 + +case $VW_OPT in + start) + if [ ! -f /opt/VirtualBox/vboxwebsrv ]; then + echo "ERROR: /opt/VirtualBox/vboxwebsrv does not exist." + return $SMF_EXIT_ERR_CONFIG + fi + + if [ ! -x /opt/VirtualBox/vboxwebsrv ]; then + echo "ERROR: /opt/VirtualBox/vboxwebsrv is not executable." + return $SMF_EXIT_ERR_CONFIG + fi + + # Get svc configuration + VW_USER=`/usr/bin/svcprop -p config/user $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_USER= + VW_HOST=`/usr/bin/svcprop -p config/host $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_HOST= + VW_PORT=`/usr/bin/svcprop -p config/port $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_PORT= + VW_SSL_KEYFILE=`/usr/bin/svcprop -p config/ssl_keyfile $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_KEYFILE= + VW_SSL_PASSWORDFILE=`/usr/bin/svcprop -p config/ssl_passwordfile $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_PASSWORDFILE= + VW_SSL_CACERT=`/usr/bin/svcprop -p config/ssl_cacert $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_CACERT= + VW_SSL_CAPATH=`/usr/bin/svcprop -p config/ssl_capath $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_CAPATH= + VW_SSL_DHFILE=`/usr/bin/svcprop -p config/ssl_dhfile $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_DHFILE= + VW_SSL_RANDFILE=`/usr/bin/svcprop -p config/ssl_randfile $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_SSL_RANDFILE= + VW_AUTH_LIBRARY=`/usr/bin/svcprop -p config/auth_library $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_AUTH_LIBRARY= + VW_AUTH_PWHASH=`/usr/bin/svcprop -p config/auth_pwhash $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_AUTH_PWHASH= + VW_TIMEOUT=`/usr/bin/svcprop -p config/timeout $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_TIMEOUT= + VW_CHECK_INTERVAL=`/usr/bin/svcprop -p config/checkinterval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_CHECK_INTERVAL= + VW_THREADS=`/usr/bin/svcprop -p config/threads $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_THREADS= + VW_KEEPALIVE=`/usr/bin/svcprop -p config/keepalive $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_KEEPALIVE= + VW_AUTHENTICATION=`/usr/bin/svcprop -p config/authentication $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_AUTHENTICATION= + VW_LOGFILE=`/usr/bin/svcprop -p config/logfile $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGFILE= + VW_ROTATE=`/usr/bin/svcprop -p config/logrotate $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_ROTATE= + VW_LOGSIZE=`/usr/bin/svcprop -p config/logsize $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGSIZE= + VW_LOGINTERVAL=`/usr/bin/svcprop -p config/loginterval $SMF_FMRI 2>/dev/null` + [ $? != 0 ] && VW_LOGINTERVAL= + + # Provide sensible defaults + [ -z "$VW_USER" ] && VW_USER=root + [ -z "$VW_HOST" ] && VW_HOST=localhost + [ -z "$VW_PORT" -o "$VW_PORT" -eq 0 ] && VW_PORT=18083 + [ -z "$VW_TIMEOUT" ] && VW_TIMEOUT=20 + [ -z "$VW_CHECK_INTERVAL" ] && VW_CHECK_INTERVAL=5 + [ -z "$VW_THREADS" ] && VW_THREADS=100 + [ -z "$VW_KEEPALIVE" ] && VW_KEEPALIVE=100 + [ -z "$VW_ROTATE" ] && VW_ROTATE=10 + [ -z "$VW_LOGSIZE" ] && VW_LOGSIZE=104857600 + [ -z "$VW_LOGINTERVAL" ] && VW_LOGINTERVAL=86400 + + # Derived and optional settings + VW_SSL= + [ -n "$VW_SSL_KEYFILE" ] && VW_SSL=--ssl + [ -n "$VW_SSL_KEYFILE" ] && VW_SSL_KEYFILE="--keyfile $VW_SSL_KEYFILE" + [ -n "$VW_SSL_PASSWORDFILE" ] && VW_SSL_PASSWORDFILE="--passwordfile $VW_SSL_PASSWORDFILE" + [ -n "$VW_SSL_CACERT" ] && VW_SSL_CACERT="--cacert $VW_SSL_CACERT" + [ -n "$VW_SSL_CAPATH" ] && VW_SSL_CAPATH="--capath $VW_SSL_CAPATH" + [ -n "$VW_SSL_DHFILE" ] && VW_SSL_DHFILE="--dhfile $VW_SSL_DHFILE" + [ -n "$VW_SSL_RANDFILE" ] && VW_SSL_RANDFILE="--randfile $VW_SSL_RANDFILE" + [ -n "$VW_LOGFILE" ] && VW_LOGFILE="--logfile $VW_LOGFILE" + + # Set authentication method + password hash + if [ -n "$VW_AUTH_LIBRARY" ]; then + su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setproperty websrvauthlibrary \"$VW_AUTH_LIBRARY\"" + if [ $? != 0 ]; then + echo "Error $? setting webservice authentication library to $VW_AUTH_LIBRARY" + fi + fi + if [ -n "$VW_AUTH_PWHASH" ]; then + su - "$VW_USER" -c "/opt/VirtualBox/VBoxManage setextradata global \"VBoxAuthSimple/users/$VW_USER\" \"$VW_AUTH_PWHASH\"" + if [ $? != 0 ]; then + echo "Error $? setting webservice password hash" + fi + fi + + exec su - "$VW_USER" -c "/opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\" $VW_SSL $VW_SSL_KEYFILE $VW_SSL_PASSWORDFILE $VW_SSL_CACERT $VW_SSL_CAPATH $VW_SSL_DHFILE $VW_SSL_RANDFILE --timeout \"$VW_TIMEOUT\" --check-interval \"$VW_CHECK_INTERVAL\" --threads \"$VW_THREADS\" --keepalive \"$VW_KEEPALIVE\" --authentication \"$VW_AUTHENTICATION\" $VW_LOGFILE --logrotate \"$VW_ROTATE\" --logsize \"$VW_LOGSIZE\" --loginterval \"$VW_LOGINTERVAL\"" + + VW_EXIT=$? + if [ $VW_EXIT != 0 ]; then + echo "vboxwebsrv failed with $VW_EXIT." + VW_EXIT=1 + fi + ;; + stop) + # Kill service contract + smf_kill_contract $2 TERM 1 + # Be careful: wait 1 second, making sure that everything is cleaned up. + smf_kill_contract $2 TERM 1 + ;; + *) + VW_EXIT=$SMF_EXIT_ERR_CONFIG + ;; +esac + +exit $VW_EXIT diff --git a/src/VBox/Installer/solaris/vbox-ips.mog b/src/VBox/Installer/solaris/vbox-ips.mog new file mode 100644 index 00000000..b5bacd49 --- /dev/null +++ b/src/VBox/Installer/solaris/vbox-ips.mog @@ -0,0 +1,71 @@ +# Transmogrification from prepared package directory layout to IPS +set name=pkg.fmri value=$(VBOX_PKGNAME)@@VBOX_VERSION_STRING@,5.11-0.0.0.@VBOX_SVN_REV@.0.0.0 +set name=pkg.human-version value="@VBOX_VERSION_STRING@r@VBOX_SVN_REV@" +set name=pkg.summary value="@VBOX_PRODUCT@" +set name=pkg.description value="A powerful PC virtualization solution" +set name=variant.arch value=@UNAME_P@ +set name=variant.opensolaris.zone value=global value=nonglobal +set name=info.classification value=org.opensolaris.category.2008:System/Virtualization +license LICENSE license="GPLv2 (virtualbox)" +group groupname=vboxusers gid=86 +# The data-xkb was renamed to xkeyboard-config in S11.4, so adjust this when +# we have moved our builds away from S11.3. +depend fmri=pkg:/x11/keyboard/data-xkb type=require +depend fmri=pkg:/system/font/xorg/xorg-core type=require +depend fmri=pkg:/system/font/truetype/dejavu type=require + +# Drop system directories to not have conflicting permissions + drop> + drop> + drop> + drop> + drop> + drop> + drop> + drop> + +# Drop all files in root, they are for packaging purposes + drop> + drop> + +# Drop STREAMS based NetFilter driver, obsolete for Solaris 11 + drop> + drop> + +# Drop all API helper libraries for python 2.x other than 2.7 + drop> + drop> + drop> + +# Ignore dependencies of vboxshell.py + set pkg.depend.bypass-generate .*> + +# Ignore dependencies on libpython2.7.so* since it's getting phased out + set pkg.depend.bypass-generate .*/libpython2\\.7\\.so.*> + +# Tweak: do not try to get the dependencies for libGL.so which is needed by Qt + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + set pkg.depend.runpath /usr/lib/mesa/amd64:$PKGDEPEND_RUNPATH> + +# Some binaries must be SUID. + set mode 4755> +$(HARDENED_ONLY) set mode 4755> + +# Set the appropriate pkg variant for drivers (global zone only) + add variant.opensolaris.zone global> + set reboot-needed true> + emit driver name=vboxdrv perms="* 0600 root sys" perms="vboxdrvu 0666 root sys" devlink=type=ddi_pseudo;name=vboxdrv;minor=vboxdrv\t\D devlink=type=ddi_pseudo;name=vboxdrv;minor=vboxdrvu\t\M0> + emit driver name=vboxnet> + emit driver name=vboxbow> + emit driver name=vboxusbmon perms="* 0660 root vboxusers" devlink=type=ddi_pseudo;name=vboxusbmon\t\D> + emit driver name=vboxusb> + set group sys> + +# Handle SMF manifests + set group sys> + default restart_fmri svc:/system/manifest-import:default> diff --git a/src/VBox/Installer/solaris/vbox.pkginfo b/src/VBox/Installer/solaris/vbox.pkginfo new file mode 100644 index 00000000..cd4b66af --- /dev/null +++ b/src/VBox/Installer/solaris/vbox.pkginfo @@ -0,0 +1,16 @@ +PKG="SUNWvbox" +NAME="@VBOX_PRODUCT@" +SUNW_PRODNAME="@VBOX_PRODUCT@" +ARCH="@UNAME_P@" +VERSION="@VBOX_VERSION_STRING@,REV=@VBOX_VERSION_REVSTAMP@" +SUNW_PRODVERS="@VBOX_VERSION_STRING@" +SUNW_PKGVERS=1.0 +CATEGORY="application" +VENDOR="@VBOX_VENDOR@" +HOTLINE="Please contact your local service provider" +BASEDIR="/" +MAXINST=1 +EMAIL="info@virtualbox.org" +CLASSES=none manifest +DESC="A powerful PC virtualization solution" +PSTAMP="@VBOX_PSTAMP@" diff --git a/src/VBox/Installer/solaris/vbox.pkgresponse b/src/VBox/Installer/solaris/vbox.pkgresponse new file mode 100644 index 00000000..84aa86f6 --- /dev/null +++ b/src/VBox/Installer/solaris/vbox.pkgresponse @@ -0,0 +1,12 @@ +basedir=default +runlevel=nocheck +conflict=quit +setuid=nocheck +action=nocheck +partial=quit +instance=unique +idepend=quit +rdepend=quit +space=quit +mail= + diff --git a/src/VBox/Installer/solaris/vbox.space b/src/VBox/Installer/solaris/vbox.space new file mode 100644 index 00000000..caf8752d --- /dev/null +++ b/src/VBox/Installer/solaris/vbox.space @@ -0,0 +1,5 @@ +# Space file for VirtualBox installer +# We only create a few links so we don't need much space +# pathname blocks inodes +/ 1000 8 + diff --git a/src/VBox/Installer/solaris/vboxconfig.sh b/src/VBox/Installer/solaris/vboxconfig.sh new file mode 100755 index 00000000..20fd3d5f --- /dev/null +++ b/src/VBox/Installer/solaris/vboxconfig.sh @@ -0,0 +1,1480 @@ +#!/bin/sh +# $Id: vboxconfig.sh $ +## @file +# VirtualBox Configuration Script, Solaris host. +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +# Never use exit 2 or exit 20 etc., the return codes are used in +# SRv4 postinstall procedures which carry special meaning. Just use exit 1 for failure. + +# LC_ALL should take precedence over LC_* and LANG but whatever... +LC_ALL=C +export LC_ALL + +LANG=C +export LANG + +VBOX_INSTALL_PATH="$PKG_INSTALL_ROOT/opt/VirtualBox" +CONFIG_DIR=/etc/vbox +CONFIG_FILES=filelist +DIR_CONF="$PKG_INSTALL_ROOT/platform/i86pc/kernel/drv" +DIR_MOD_32="$PKG_INSTALL_ROOT/platform/i86pc/kernel/drv" +DIR_MOD_64="$DIR_MOD_32/amd64" + +# Default paths, these will be overridden by 'which' if they don't exist +BIN_ADDDRV=/usr/sbin/add_drv +BIN_REMDRV=/usr/sbin/rem_drv +BIN_MODLOAD=/usr/sbin/modload +BIN_MODUNLOAD=/usr/sbin/modunload +BIN_MODINFO=/usr/sbin/modinfo +BIN_DEVFSADM=/usr/sbin/devfsadm +BIN_BOOTADM=/sbin/bootadm +BIN_SVCADM=/usr/sbin/svcadm +BIN_SVCCFG=/usr/sbin/svccfg +BIN_SVCS=/usr/bin/svcs +BIN_IFCONFIG=/sbin/ifconfig +BIN_SVCS=/usr/bin/svcs +BIN_ID=/usr/bin/id +BIN_PKILL=/usr/bin/pkill +BIN_PGREP=/usr/bin/pgrep +BIN_IPADM=/usr/sbin/ipadm + +# "vboxdrv" is also used in sed lines here (change those as well if it ever changes) +MOD_VBOXDRV=vboxdrv +DESC_VBOXDRV="Host" + +MOD_VBOXNET=vboxnet +DESC_VBOXNET="NetAdapter" +MOD_VBOXNET_INST=8 + +MOD_VBOXFLT=vboxflt +DESC_VBOXFLT="NetFilter (STREAMS)" + +MOD_VBOXBOW=vboxbow +DESC_VBOXBOW="NetFilter (Crossbow)" + +MOD_VBOXUSBMON=vboxusbmon +DESC_VBOXUSBMON="USBMonitor" + +MOD_VBOXUSB=vboxusb +DESC_VBOXUSB="USB" + +UPDATEBOOTARCHIVE=0 +REMOTEINST=0 +FATALOP=fatal +NULLOP=nulloutput +SILENTOP=silent +IPSOP=ips +ISSILENT= +ISIPS= + +infoprint() +{ + if test "x$ISSILENT" != "x$SILENTOP"; then + echo 1>&2 "$1" + fi +} + +subprint() +{ + if test "x$ISSILENT" != "x$SILENTOP"; then + echo 1>&2 " - $1" + fi +} + +warnprint() +{ + if test "x$ISSILENT" != "x$SILENTOP"; then + echo 1>&2 " * Warning!! $1" + fi +} + +errorprint() +{ + echo 1>&2 "## $1" +} + +helpprint() +{ + echo 1>&2 "$1" +} + +printusage() +{ + helpprint "VirtualBox Configuration Script" + helpprint "usage: $0 [options]" + helpprint + helpprint " must be one of the following:" + helpprint " --postinstall Perform full post installation procedure" + helpprint " --preremove Perform full pre remove procedure" + helpprint " --installdrivers Only install the drivers" + helpprint " --removedrivers Only remove the drivers" + helpprint " --setupdrivers Setup drivers, reloads existing drivers" + helpprint + helpprint "[options] are one or more of the following:" + helpprint " --silent Silent mode" + helpprint " --fatal Don't continue on failure (required for postinstall)" + helpprint " --ips This is an IPS package postinstall/preremove" + helpprint " --altkerndir Use /usr/kernel/drv as the driver directory" + helpprint +} + +# find_bin_path() +# !! failure is always fatal +find_bin_path() +{ + if test -z "$1"; then + errorprint "missing argument to find_bin_path()" + exit 1 + fi + + binfilename=`basename $1` + binfilepath=`which $binfilename 2> /dev/null` + if test -x "$binfilepath"; then + echo "$binfilepath" + return 0 + else + errorprint "$1 missing or is not an executable" + exit 1 + fi +} + +# find_bins() +# !! failure is always fatal +find_bins() +{ + # Search only for binaries that might be in different locations + if test ! -x "$BIN_ID"; then + BIN_ID=`find_bin_path "$BIN_ID"` + fi + + if test ! -x "$BIN_ADDDRV"; then + BIN_ADDDRV=`find_bin_path "$BIN_ADDDRV"` + fi + + if test ! -x "$BIN_REMDRV"; then + BIN_REMDRV=`find_bin_path "$BIN_REMDRV"` + fi + + if test ! -x "$BIN_MODLOAD"; then + BIN_MODLOAD=`check_bin_path "$BIN_MODLOAD"` + fi + + if test ! -x "$BIN_MODUNLOAD"; then + BIN_MODUNLOAD=`find_bin_path "$BIN_MODUNLOAD"` + fi + + if test ! -x "$BIN_MODINFO"; then + BIN_MODINFO=`find_bin_path "$BIN_MODINFO"` + fi + + if test ! -x "$BIN_DEVFSADM"; then + BIN_DEVFSADM=`find_bin_path "$BIN_DEVFSADM"` + fi + + if test ! -x "$BIN_BOOTADM"; then + BIN_BOOTADM=`find_bin_path "$BIN_BOOTADM"` + fi + + if test ! -x "$BIN_SVCADM"; then + BIN_SVCADM=`find_bin_path "$BIN_SVCADM"` + fi + + if test ! -x "$BIN_SVCCFG"; then + BIN_SVCCFG=`find_bin_path "$BIN_SVCCFG"` + fi + + if test ! -x "$BIN_SVCS"; then + BIN_SVCS=`find_bin_path "$BIN_SVCS"` + fi + + if test ! -x "$BIN_IFCONFIG"; then + BIN_IFCONFIG=`find_bin_path "$BIN_IFCONFIG"` + fi + + if test ! -x "$BIN_PKILL"; then + BIN_PKILL=`find_bin_path "$BIN_PKILL"` + fi + + if test ! -x "$BIN_PGREP"; then + BIN_PGREP=`find_bin_path "$BIN_PGREP"` + fi + + if test ! -x "$BIN_IPADM"; then + BIN_IPADM=`find_bin_path "$BIN_IPADM"` + fi +} + +# check_root() +# !! failure is always fatal +check_root() +{ + # Don't use "-u" option as some id binaries don't support it, instead + # rely on "uid=101(username) gid=10(groupname) groups=10(staff)" output + curuid=`$BIN_ID | cut -f 2 -d '=' | cut -f 1 -d '('` + if test "$curuid" -ne 0; then + errorprint "This script must be run with administrator privileges." + exit 1 + fi +} + +# get_unofficial_sysinfo() +# cannot fail +get_unofficial_sysinfo() +{ + HOST_OS_MAJORVERSION="11" + HOST_OS_MINORVERSION="151" +} + +# get_s11_4_sysinfo() +# cannot fail +get_s11_4_sysinfo() +{ + # See check in plumb_net for why this is > 174. The alternative is we declare 11.4+ as S12 with + # a more accurate minor (build) version number. For now this is sufficient to workaround the ever + # changing version numbering policy. + HOST_OS_MAJORVERSION="11" + HOST_OS_MINORVERSION="175" +} + +# get_s11_5_or_newer_sysinfo() +# cannot fail +get_s11_5_or_newer_sysinfo() +{ + # See check in plumb_net for why this is 176. + HOST_OS_MAJORVERSION="11" + HOST_OS_MINORVERSION="176" +} + +# get_sysinfo() +# cannot fail +get_sysinfo() +{ + STR_OSVER=`uname -v` + case "$STR_OSVER" in + # First check 'uname -v' and weed out the recognized, unofficial distros of Solaris + omnios*|oi_*|illumos*) + get_unofficial_sysinfo + return 0 + ;; + # Quick escape workaround for Solaris 11.4, changes the pkg FMRI (yet again). See BugDB #26494983. + 11.4.*) + get_s11_4_sysinfo + return 0 + ;; + # Quick escape workaround for Solaris 11.5. See BugDB #26494983. + 11.5.*) + get_s11_5_or_newer_sysinfo + return 0 + esac + + BIN_PKG=`which pkg 2> /dev/null` + if test -x "$BIN_PKG"; then + PKGFMRI=`$BIN_PKG $BASEDIR_PKGOPT contents -H -t set -a name=pkg.fmri -o pkg.fmri pkg:/system/kernel 2> /dev/null` + if test -z "$PKGFMRI"; then + # Perhaps this is old pkg without '-a' option and/or system/kernel is missing and it's part of 'entire' + # Try fallback. + PKGFMRI=`$BIN_PKG $BASEDIR_PKGOPT contents -H -t set -o pkg.fmri entire | head -1 2> /dev/null` + if test -z "$PKGFMRI"; then + # Perhaps entire is conflicting. Try using opensolaris/entire. + # Last fallback try. + PKGFMRI=`$BIN_PKG $BASEDIR_PKGOPT contents -H -t set -o pkg.fmri opensolaris.org/entire | head -1 2> /dev/null` + fi + fi + if test ! -z "$PKGFMRI"; then + # The format is "pkg://solaris/system/kernel@0.5.11,5.11-0.161:20110315T070332Z" + # or "pkg://solaris/system/kernel@5.12,5.11-5.12.0.0.0.4.1:20120908T030246Z" + # or "pkg://solaris/system/kernel@0.5.11,5.11-0.175.0.0.0.1.0:20111012T032837Z" + # or "pkg://solaris/system/kernel@5.12-5.12.0.0.0.9.1.3.0:20121012T032837Z" [1] + # [1]: The sed below doesn't handle this. It's instead parsed below in the PSARC/2012/240 case. + STR_KERN_MAJOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\,.*//'` + if test ! -z "$STR_KERN_MAJOR"; then + # The format is "0.5.11" or "5.12" + # Let us just hardcode these for now, instead of trying to do things more generically. It's not + # worth trying to bring more order to chaos as it's clear that the version numbering is subject to breakage + # as it has been seen in the past. + if test "x$STR_KERN_MAJOR" = "x5.12"; then + HOST_OS_MAJORVERSION="12" + elif test "x$STR_KERN_MAJOR" = "x0.5.11" || test "x$STR_KERN_MAJOR" = "x5.11"; then + HOST_OS_MAJORVERSION="11" + else + # This could be the PSARC/2012/240 naming scheme for S12. + # The format is "pkg://solaris/system/kernel@5.12-5.12.0.0.0.9.1.3.0:20121012T032837Z" + # The "5.12" following the "@" is the nominal version which we ignore for now as it is + # not set by most pkg(5) tools... + # STR_KERN_MAJOR is now of the format "5.12-5.12.0.0.0.9.1.3.0:20121012T032837Z" with '9' representing + # the build number. + BRANCH_VERSION=$STR_KERN_MAJOR + HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f1,2 -d'.'` + if test "x$HOST_OS_MAJORVERSION" = "x5.12"; then + HOST_OS_MAJORVERSION="12" + HOST_OS_MINORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'` + return 0 + else + errorprint "Failed to parse the Solaris kernel major version." + exit 1 + fi + fi + + # This applies only to S11 and S12 where the transitional "@5.12," component version is + # still part of the pkg(5) package FMRI. The regular S12 will follow the PSARC/2012/240 naming scheme above. + STR_KERN_MINOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'` + if test ! -z "$STR_KERN_MINOR"; then + # The HOST_OS_MINORVERSION is represented as follows: + # For S12 it represents the build numbers. e.g. for 4 : "5.11-5.12.0.0.0.4.1" + # For S11 as the "nevada" version numbers. e.g. for 175: "5.11-0.161" or "5.11-0.175.0.0.0.1.0" + if test "$HOST_OS_MAJORVERSION" -eq 12; then + HOST_OS_MINORVERSION=`echo "$STR_KERN_MINOR" | cut -f2 -d'-' | cut -f6 -d'.'` + elif test "$HOST_OS_MAJORVERSION" -eq 11; then + HOST_OS_MINORVERSION=`echo "$STR_KERN_MINOR" | cut -f2 -d'-' | cut -f2 -d'.'` + else + errorprint "Solaris kernel major version $HOST_OS_MAJORVERSION not supported." + exit 1 + fi + else + errorprint "Failed to parse the Solaris kernel minor version." + exit 1 + fi + else + errorprint "Failed to parse the Solaris kernel package version." + exit 1 + fi + else + errorprint "Failed to detect the Solaris kernel package FMRI." + exit 1 + fi + else + HOST_OS_MAJORVERSION=`uname -r` + if test -z "$HOST_OS_MAJORVERSION" || test "x$HOST_OS_MAJORVERSION" != "x5.10"; then + # S11 without 'pkg'?? Something's wrong... bail. + errorprint "Solaris $HOST_OS_MAJORVERSION detected without executable $BIN_PKG !? I are confused." + exit 1 + fi + HOST_OS_MAJORVERSION="10" + if test "$REMOTEINST" -eq 0; then + # Use uname to verify it's S10. + # Major version is S10, Minor version is no longer relevant (or used), use uname -v so it gets something + # like "Generic_blah" for purely cosmetic purposes + HOST_OS_MINORVERSION=`uname -v` + else + # Remote installs from S10 local. + BIN_PKGCHK=`which pkgchk 2> /dev/null` + if test ! -x "$BIN_PKGCHK"; then + errorprint "Failed to find an executable pkgchk binary $BIN_PKGCHK." + errorprint "Cannot determine Solaris version on remote target $PKG_INSTALL_ROOT" + exit 1 + fi + + REMOTE_S10=`$BIN_PKGCHK -l -p /kernel/amd64/genunix $BASEDIR_PKGOPT 2> /dev/null | grep SUNWckr | tr -d ' \t'` + if test ! -z "$REMOTE_S10" && test "x$REMOTE_S10" = "xSUNWckr"; then + HOST_OS_MAJORVERSION="10" + HOST_OS_MINORVERSION="" + else + errorprint "Remote target $PKG_INSTALL_ROOT is not Solaris 10." + errorprint "Will not attempt to install to an unidentified remote target." + exit 1 + fi + fi + fi +} + +# check_zone() +# !! failure is always fatal +check_zone() +{ + currentzone=`zonename` + if test "x$currentzone" != "xglobal"; then + errorprint "This script must be run from the global zone." + exit 1 + fi +} + +# check_isa() +# !! failure is always fatal +check_isa() +{ + currentisa=`uname -i` + if test "x$currentisa" = "xi86xpv"; then + errorprint "VirtualBox cannot run under xVM Dom0! Fatal Error, Aborting installation!" + exit 1 + fi +} + +# check_module_arch() +# !! failure is always fatal +check_module_arch() +{ + cputype=`isainfo -k` + if test "x$cputype" != "xamd64" && test "x$cputype" != "xi386"; then + errorprint "VirtualBox works only on i386/amd64 hosts, not $cputype" + exit 1 + fi +} + +# update_boot_archive() +# cannot fail +update_boot_archive() +{ + infoprint "Updating the boot archive..." + if test "$REMOTEINST" -eq 0; then + $BIN_BOOTADM update-archive > /dev/null + else + $BIN_BOOTADM update-archive -R "$PKG_INSTALL_ROOT" > /dev/null + fi + UPDATEBOOTARCHIVE=0 +} + + +# module_added(modname) +# returns 1 if added, 0 otherwise +module_added() +{ + if test -z "$1"; then + errorprint "missing argument to module_added()" + exit 1 + fi + + # Add a space at end of module name to make sure we have a perfect match to avoid + # any substring matches: e.g "vboxusb" & "vboxusbmon" + loadentry=`cat "$PKG_INSTALL_ROOT/etc/name_to_major" | grep "$1 "` + if test -z "$loadentry"; then + return 1 + fi + return 0 +} + +# module_loaded(modname) +# returns 1 if loaded, 0 otherwise +module_loaded() +{ + if test -z "$1"; then + errorprint "missing argument to module_loaded()" + exit 1 + fi + + modname=$1 + # modinfo should now work properly since we prevent module autounloading. + loadentry=`$BIN_MODINFO | grep "$modname "` + if test -z "$loadentry"; then + return 1 + fi + return 0 +} + +# add_driver(modname, moddesc, fatal, nulloutput, [driverperm]) +# failure: depends on "fatal" +add_driver() +{ + if test -z "$1" || test -z "$2"; then + errorprint "missing argument to add_driver()" + exit 1 + fi + + modname="$1" + moddesc="$2" + fatal="$3" + nullop="$4" + modperm="$5" + + if test -n "$modperm"; then + if test "x$nullop" = "x$NULLOP"; then + $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname >/dev/null 2>&1 + else + $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname + fi + else + if test "x$nullop" = "x$NULLOP"; then + $BIN_ADDDRV $BASEDIR_OPT $modname >/dev/null 2>&1 + else + $BIN_ADDDRV $BASEDIR_OPT $modname + fi + fi + + if test "$?" -ne 0; then + subprint "Adding: $moddesc module ...FAILED!" + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + return 1 + fi + subprint "Added: $moddesc driver" + return 0 +} + +# rem_driver(modname, moddesc, [fatal]) +# failure: depends on [fatal] +rem_driver() +{ + if test -z "$1" || test -z "$2"; then + errorprint "missing argument to rem_driver()" + exit 1 + fi + + modname=$1 + moddesc=$2 + fatal=$3 + + module_added $modname + if test "$?" -eq 0; then + UPDATEBOOTARCHIVE=1 + if test "x$ISIPS" != "x$IPSOP"; then + $BIN_REMDRV $BASEDIR_OPT $modname + else + $BIN_REMDRV $BASEDIR_OPT $modname >/dev/null 2>&1 + fi + # for remote installs, don't bother with return values of rem_drv + if test "$?" -eq 0 || test "$REMOTEINST" -eq 1; then + subprint "Removed: $moddesc driver" + return 0 + else + subprint "Removing: $moddesc ...FAILED!" + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + return 1 + fi + fi +} + +# unload_module(modname, moddesc, retry, [fatal]) +# failure: fatal +unload_module() +{ + if test -z "$1" || test -z "$2"; then + errorprint "missing argument to unload_module()" + exit 1 + fi + + # No-OP for non-root installs + if test "$REMOTEINST" -eq 1; then + return 0 + fi + + modname=$1 + moddesc=$2 + retry=$3 + fatal=$4 + modid=`$BIN_MODINFO | grep "$modname " | cut -f 1 -d ' ' ` + if test -n "$modid"; then + $BIN_MODUNLOAD -i $modid + if test "$?" -eq 0; then + subprint "Unloaded: $moddesc module" + else + # + # Hack for vboxdrv. Delayed removing when VMM thread-context hooks are used. + # Our automated tests are probably too quick... Fix properly later. + # + result="$?" + if test "$retry" -eq 1; then + cmax=15 + cslept=0 + while test "$result" -ne 0; + do + subprint "Unloading: $moddesc module ...FAILED! Busy? Retrying in 3 seconds..." + sleep 3 + cslept=`expr $cslept + 3` + if test "$cslept" -ge "$cmax"; then + break + fi + $BIN_MODUNLOAD -i $modid + result="$?" + done + fi + + if test "$result" -ne 0; then + subprint "Unloading: $moddesc module ...FAILED!" + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + else + subprint "Unloaded: $moddesc module" + fi + return 1 + fi + fi + return 0 +} + +# load_module(modname, moddesc, [fatal]) +# pass "drv/modname" or "misc/vbi" etc. +# failure: fatal +load_module() +{ + if test -z "$1" || test -z "$2"; then + errorprint "missing argument to load_module()" + exit 1 + fi + + # No-OP for non-root installs + if test "$REMOTEINST" -eq 1; then + return 0 + fi + + modname=$1 + moddesc=$2 + fatal=$3 + $BIN_MODLOAD -p $modname + if test "$?" -eq 0; then + return 0 + else + subprint "Loading: $moddesc module ...FAILED!" + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + return 1 + fi +} + +load_vboxflt() +{ + if test -f "$DIR_CONF/vboxflt.conf"; then + add_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" + load_module "drv/$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP" + else + # For custom pkgs that optionally ship this module, let's not fail but just warn + warnprint "$DESC_VBOXFLT installation requested but not shipped in this package." + fi +} + +load_vboxbow() +{ + if test -f "$DIR_CONF/vboxbow.conf"; then + add_driver "$MOD_VBOXBOW" "$DESC_VBOXBOW" "$FATALOP" + load_module "drv/$MOD_VBOXBOW" "$DESC_VBOXBOW" "$FATALOP" + else + # For custom pkgs that optionally ship this module, let's not fail but just warn + warnprint "$DESC_VBOXBOW installation requested but not shipped in this package." + fi +} + +# install_drivers() +# !! failure is always fatal +install_drivers() +{ + if test -f "$DIR_CONF/vboxdrv.conf"; then + if test -n "_HARDENED_"; then + add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0600 root sys','vboxdrvu 0666 root sys'" + else + add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0666 root sys','vboxdrvu 0666 root sys'" + fi + load_module "drv/$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" + else + errorprint "Extreme error! Missing $DIR_CONF/vboxdrv.conf, aborting." + return 1 + fi + + # Figure out group to use for /etc/devlink.tab (before Solaris 11 SRU6 + # it was always using group sys) + group=sys + if [ -f "$PKG_INSTALL_ROOT/etc/dev/reserved_devnames" ]; then + # Solaris 11 SRU6 and later use group root (check a file which isn't + # tainted by VirtualBox install scripts and allow no other group) + refgroup=`LC_ALL=C /usr/bin/ls -lL "$PKG_INSTALL_ROOT/etc/dev/reserved_devnames" | awk '{ print $4 }' 2>/dev/null` + if [ $? -eq 0 -a "x$refgroup" = "xroot" ]; then + group=root + fi + unset refgroup + fi + + ## Add vboxdrv to devlink.tab (KEEP TABS!) + if test -f "$PKG_INSTALL_ROOT/etc/devlink.tab"; then + sed -e '/name=vboxdrv/d' -e '/name=vboxdrvu/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" + echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrv \D" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox" + echo "type=ddi_pseudo;name=vboxdrv;minor=vboxdrvu \M0" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chmod 0644 "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chown root:$group "$PKG_INSTALL_ROOT/etc/devlink.vbox" + mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" + else + errorprint "Missing $PKG_INSTALL_ROOT/etc/devlink.tab, aborting install" + return 1 + fi + + # Create the device link for non-remote installs (not really relevant any more) + if test "$REMOTEINST" -eq 0; then + /usr/sbin/devfsadm -i "$MOD_VBOXDRV" + if test "$?" -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then + errorprint "Failed to create device link for $MOD_VBOXDRV." + exit 1 + fi + fi + + # Load VBoxNetAdp + if test -f "$DIR_CONF/vboxnet.conf"; then + add_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" + load_module "drv/$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP" + fi + + # If both vboxinst_vboxbow and vboxinst_vboxflt exist, bail. + if test -f "$PKG_INSTALL_ROOT/etc/vboxinst_vboxflt" && test -f "$PKG_INSTALL_ROOT/etc/vboxinst_vboxbow"; then + errorprint "Force-install files '$PKG_INSTALL_ROOT/etc/vboxinst_vboxflt' and '$PKG_INSTALL_ROOT/etc/vboxinst_vboxbow' both exist." + errorprint "Cannot load $DESC_VBOXFLT and $DESC_VBOXBOW drivers at the same time." + return 1 + fi + + # If the force-install files exists, install blindly + if test -f "$PKG_INSTALL_ROOT/etc/vboxinst_vboxflt"; then + subprint "Detected: Force-load file $PKG_INSTALL_ROOT/etc/vboxinst_vboxflt." + load_vboxflt + elif test -f "$PKG_INSTALL_ROOT/etc/vboxinst_vboxbow"; then + subprint "Detected: Force-load file $PKG_INSTALL_ROOT/etc/vboxinst_vboxbow." + load_vboxbow + else + # If host is S10 or S11 (< snv_159) or vboxbow isn't shipped, then load vboxflt + if test "$HOST_OS_MAJORVERSION" -eq 10 \ + || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -lt 159) \ + || test ! -f "$DIR_CONF/vboxbow.conf"; then + load_vboxflt + else + # For S11 snv_159+ load vboxbow + load_vboxbow + fi + fi + + # Load VBoxUSBMon, VBoxUSB + try_vboxusb="no" + if test -f "$DIR_CONF/vboxusbmon.conf"; then + if test -f "$PKG_INSTALL_ROOT/etc/vboxinst_vboxusb"; then + subprint "Detected: Force-load file $PKG_INSTALL_ROOT/etc/vboxinst_vboxusb." + try_vboxusb="yes" + else + # For VirtualBox 3.1 the new USB code requires Nevada > 123 i.e. S12+ or S11 b124+ + if test "$HOST_OS_MAJORVERSION" -gt 11 \ + || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -gt 123); then + try_vboxusb="yes" + else + warnprint "Solaris 11 build 124 or higher required for USB support. Skipped installing USB support." + fi + fi + fi + if test "x$try_vboxusb" = "xyes"; then + # Add a group "vboxuser" (8-character limit) for USB access. + # All users which need host USB-passthrough support will have to be added to this group. + groupadd vboxuser >/dev/null 2>&1 + + add_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'" + load_module "drv/$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" + + chown root:vboxuser "/devices/pseudo/vboxusbmon@0:vboxusbmon" + + # Add vboxusbmon to devlink.tab + sed -e '/name=vboxusbmon/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" + echo "type=ddi_pseudo;name=vboxusbmon \D" >> "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chmod 0644 "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chown root:$group "$PKG_INSTALL_ROOT/etc/devlink.vbox" + mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" + + # Create the device link for non-remote installs + if test "$REMOTEINST" -eq 0; then + /usr/sbin/devfsadm -i "$MOD_VBOXUSBMON" + if test "$?" -ne 0; then + errorprint "Failed to create device link for $MOD_VBOXUSBMON." + exit 1 + fi + fi + + # Add vboxusb if present + # This driver is special, we need it in the boot-archive but since there is no + # USB device to attach to now (it's done at runtime) it will fail to attach so + # redirect attaching failure output to /dev/null + if test -f "$DIR_CONF/vboxusb.conf"; then + add_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" "$NULLOP" + load_module "drv/$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" + fi + fi + + return $? +} + +# remove_drivers([fatal]) +# failure: depends on [fatal] +remove_drivers() +{ + fatal=$1 + + # Figure out group to use for /etc/devlink.tab (before Solaris 11 SRU6 + # it was always using group sys) + group=sys + if [ -f "$PKG_INSTALL_ROOT/etc/dev/reserved_devnames" ]; then + # Solaris 11 SRU6 and later use group root (check a file which isn't + # tainted by VirtualBox install scripts and allow no other group) + refgroup=`LC_ALL=C /usr/bin/ls -lL "$PKG_INSTALL_ROOT/etc/dev/reserved_devnames" | awk '{ print $4 }' 2>/dev/null` + if [ $? -eq 0 -a "x$refgroup" = "xroot" ]; then + group=root + fi + unset refgroup + fi + + # Remove vboxdrv[u] from devlink.tab + if test -f "$PKG_INSTALL_ROOT/etc/devlink.tab"; then + devlinkfound=`cat "$PKG_INSTALL_ROOT/etc/devlink.tab" | grep vboxdrv` + if test -n "$devlinkfound"; then + sed -e '/name=vboxdrv/d' -e '/name=vboxdrvu/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chmod 0644 "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chown root:$group "$PKG_INSTALL_ROOT/etc/devlink.vbox" + mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" + fi + + # Remove vboxusbmon from devlink.tab + devlinkfound=`cat "$PKG_INSTALL_ROOT/etc/devlink.tab" | grep vboxusbmon` + if test -n "$devlinkfound"; then + sed -e '/name=vboxusbmon/d' "$PKG_INSTALL_ROOT/etc/devlink.tab" > "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chmod 0644 "$PKG_INSTALL_ROOT/etc/devlink.vbox" + chown root:$group "$PKG_INSTALL_ROOT/etc/devlink.vbox" + mv -f "$PKG_INSTALL_ROOT/etc/devlink.vbox" "$PKG_INSTALL_ROOT/etc/devlink.tab" + fi + fi + + unload_module "$MOD_VBOXUSB" "$DESC_VBOXUSB" 0 "$fatal" + rem_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$fatal" + + unload_module "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" 0 "$fatal" + rem_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$fatal" + + unload_module "$MOD_VBOXFLT" "$DESC_VBOXFLT" 0 "$fatal" + rem_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$fatal" + + unload_module "$MOD_VBOXBOW" "$DESC_VBOXBOW" 0 "$fatal" + rem_driver "$MOD_VBOXBOW" "$DESC_VBOXBOW" "$fatal" + + unload_module "$MOD_VBOXNET" "$DESC_VBOXNET" 0 "$fatal" + rem_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$fatal" + + unload_module "$MOD_VBOXDRV" "$DESC_VBOXDRV" 1 "$fatal" + rem_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$fatal" + + # remove devlinks + if test -h "$PKG_INSTALL_ROOT/dev/vboxdrv" || test -f "$PKG_INSTALL_ROOT/dev/vboxdrv"; then + rm -f "$PKG_INSTALL_ROOT/dev/vboxdrv" + fi + if test -h "$PKG_INSTALL_ROOT/dev/vboxdrvu" || test -f "$PKG_INSTALL_ROOT/dev/vboxdrvu"; then + rm -f "$PKG_INSTALL_ROOT/dev/vboxdrvu" + fi + if test -h "$PKG_INSTALL_ROOT/dev/vboxusbmon" || test -f "$PKG_INSTALL_ROOT/dev/vboxusbmon"; then + rm -f "$PKG_INSTALL_ROOT/dev/vboxusbmon" + fi + + # unpatch nwam/dhcpagent fix + nwamfile="$PKG_INSTALL_ROOT/etc/nwam/llp" + nwambackupfile=$nwamfile.vbox + if test -f "$nwamfile"; then + sed -e '/vboxnet/d' $nwamfile > $nwambackupfile + mv -f $nwambackupfile $nwamfile + fi + + # remove netmask configuration + if test -h "$PKG_INSTALL_ROOT/etc/netmasks"; then + nmaskfile="$PKG_INSTALL_ROOT/etc/inet/netmasks" + else + nmaskfile="$PKG_INSTALL_ROOT/etc/netmasks" + fi + nmaskbackupfile=$nmaskfile.vbox + if test -f "$nmaskfile"; then + sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile + mv -f $nmaskbackupfile $nmaskfile + fi + + if test $UPDATEBOOTARCHIVE -eq 1; then + update_boot_archive + fi + + return 0 +} + +# install_python_bindings(pythonbin pythondesc) +# failure: non fatal +install_python_bindings() +{ + pythonbin="$1" + pythondesc="$2" + + # The python binary might not be there, so just exit silently + if test -z "$pythonbin"; then + return 0 + fi + + if test -z "$pythondesc"; then + errorprint "missing argument to install_python_bindings" + return 1 + fi + + infoprint "Python found: $pythonbin, installing bindings..." + + # check if python has working distutils + "$pythonbin" -c "from distutils.core import setup" > /dev/null 2>&1 + if test "$?" -ne 0; then + subprint "Skipped: $pythondesc install is unusable, missing package 'distutils'" + return 0 + fi + + # Pass install path via environment + export VBOX_INSTALL_PATH + mkdir -p "$CONFIG_DIR" + rm -f "$CONFIG_DIR/python-$CONFIG_FILES" + $SHELL -c "cd \"$VBOX_INSTALL_PATH\"/sdk/installer && \"$pythonbin\" ./vboxapisetup.py install \ + --record \"$CONFIG_DIR/python-$CONFIG_FILES\"" > /dev/null 2>&1 + if test "$?" -eq 0; then + cat "$CONFIG_DIR/python-$CONFIG_FILES" >> "$CONFIG_DIR/$CONFIG_FILES" + else + errorprint "Failed to install bindings for $pythondesc" + fi + rm "$CONFIG_DIR/python-$CONFIG_FILES" + + # Remove files created by Python API setup. + rm -rf $VBOX_INSTALL_PATH/sdk/installer/build + return 0 +} + +# is_process_running(processname) +# returns 1 if the process is running, 0 otherwise +is_process_running() +{ + if test -z "$1"; then + errorprint "missing argument to is_process_running()" + exit 1 + fi + + procname="$1" + $BIN_PGREP "$procname" > /dev/null 2>&1 + if test "$?" -eq 0; then + return 1 + fi + return 0 +} + + +# stop_process(processname) +# failure: depends on [fatal] +stop_process() +{ + if test -z "$1"; then + errorprint "missing argument to stop_process()" + exit 1 + fi + + procname="$1" + is_process_running "$procname" + if test "$?" -eq 1; then + $BIN_PKILL "$procname" + sleep 2 + is_process_running "$procname" + if test "$?" -eq 1; then + subprint "Terminating: $procname ...FAILED!" + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + else + subprint "Terminated: $procname" + fi + fi +} + +# start_service(servicename, shortFMRI pretty printing, full FMRI, log-file path) +# failure: non-fatal +start_service() +{ + if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4"; then + errorprint "missing argument to enable_service()" + exit 1 + fi + + # Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can + # take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in + # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds. + cmax=32 + cslept=0 + success=0 + + $BIN_SVCS "$3" >/dev/null 2>&1 + while test "$?" -ne 0; + do + sleep 1 + cslept=`expr $cslept + 1` + if test "$cslept" -eq "$cmax"; then + success=1 + break + fi + $BIN_SVCS "$3" >/dev/null 2>&1 + done + if test "$success" -eq 0; then + $BIN_SVCADM enable -s "$3" + if test "$?" -eq 0; then + subprint "Enabled: $1" + return 0 + else + warnprint "Enabling $1 ...FAILED." + warnprint "Refer $4 for details." + fi + else + warnprint "Importing $1 ...FAILED." + warnprint "Refer /var/svc/log/system-manifest-import:default.log for details." + fi + return 1 +} + + +# stop_service(servicename, shortFMRI-suitable for grep, full FMRI) +# failure: non fatal +stop_service() +{ + if test -z "$1" || test -z "$2" || test -z "$3"; then + errorprint "missing argument to stop_service()" + exit 1 + fi + servicefound=`$BIN_SVCS -H "$2" 2>/dev/null | grep '^online'` + if test ! -z "$servicefound"; then + $BIN_SVCADM disable -s "$3" + # Don't delete the manifest, this is handled by the manifest class action + # $BIN_SVCCFG delete "$3" + if test "$?" -eq 0; then + subprint "Disabled: $1" + else + subprint "Disabling: $1 ...ERROR(S)." + fi + fi +} + + +# plumb vboxnet0 instance +# failure: non fatal +plumb_net() +{ + # S11 175a renames vboxnet0 as 'netX', undo this and rename it back (Solaris 12, Solaris 11.4 or newer) + if test "$HOST_OS_MAJORVERSION" -ge 12 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -ge 175); then + vanityname=`dladm show-phys -po link,device | grep vboxnet0 | cut -f1 -d':'` + if test "$?" -eq 0 && test ! -z "$vanityname" && test "x$vanityname" != "xvboxnet0"; then + dladm rename-link "$vanityname" vboxnet0 + if test "$?" -ne 0; then + errorprint "Failed to rename vanity interface ($vanityname) to vboxnet0" + fi + fi + fi + + # use ipadm for Solaris 12, Solaris 11.5 or newer + if test "$HOST_OS_MAJORVERSION" -ge 12 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -ge 176); then + $BIN_IPADM create-ip vboxnet0 + if test "$?" -eq 0; then + $BIN_IPADM create-addr -T static -a local="192.168.56.1/24" "vboxnet0/v4addr" + if test "$?" -eq 0; then + subprint "Configured: NetAdapter 'vboxnet0'" + else + warnprint "Failed to create local address for vboxnet0!" + fi + else + warnprint "Failed to create IP instance for vboxnet0!" + fi + else + $BIN_IFCONFIG vboxnet0 plumb + $BIN_IFCONFIG vboxnet0 up + if test "$?" -eq 0; then + $BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up + + # /etc/netmasks is a symlink, older installers replaced this with + # a copy of the actual file, repair that behaviour here. + recreatelink=0 + if test -h "$PKG_INSTALL_ROOT/etc/netmasks"; then + nmaskfile="$PKG_INSTALL_ROOT/etc/inet/netmasks" + else + nmaskfile="$PKG_INSTALL_ROOT/etc/netmasks" + recreatelink=1 + fi + + # add the netmask to stay persistent across host reboots + nmaskbackupfile=$nmaskfile.vbox + if test -f $nmaskfile; then + sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile + + if test "$recreatelink" -eq 1; then + # Check after removing our settings if /etc/netmasks is identifcal to /etc/inet/netmasks + anydiff=`diff $nmaskbackupfile "$PKG_INSTALL_ROOT/etc/inet/netmasks"` + if test ! -z "$anydiff"; then + # User may have some custom settings in /etc/netmasks, don't overwrite /etc/netmasks! + recreatelink=2 + fi + fi + + echo "#VirtualBox_SectionStart" >> $nmaskbackupfile + inst=0 + networkn=56 + while test "$inst" -ne 1; do + echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile + inst=`expr $inst + 1` + networkn=`expr $networkn + 1` + done + echo "#VirtualBox_SectionEnd" >> $nmaskbackupfile + mv -f $nmaskbackupfile $nmaskfile + + # Recreate /etc/netmasks as a link if necessary + if test "$recreatelink" -eq 1; then + cp -f "$PKG_INSTALL_ROOT/etc/netmasks" "$PKG_INSTALL_ROOT/etc/inet/netmasks" + ln -sf ./inet/netmasks "$PKG_INSTALL_ROOT/etc/netmasks" + elif test "$recreatelink" -eq 2; then + warnprint "/etc/netmasks is a symlink (to /etc/inet/netmasks) that older" + warnprint "VirtualBox installers incorrectly overwrote. Now the contents" + warnprint "of /etc/netmasks and /etc/inet/netmasks differ, therefore " + warnprint "VirtualBox will not attempt to overwrite /etc/netmasks as a" + warnprint "symlink to /etc/inet/netmasks. Please resolve this manually" + warnprint "by updating /etc/inet/netmasks and creating /etc/netmasks as a" + warnprint "symlink to /etc/inet/netmasks" + fi + fi + else + # Should this be fatal? + warnprint "Failed to bring up vboxnet0!" + fi + fi +} + + +# unplumb all vboxnet instances +# failure: fatal +unplumb_net() +{ + inst=0 + # use ipadm for Solaris 12, Solaris 11.5 or newer + if test "$HOST_OS_MAJORVERSION" -ge 12 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -ge 176); then + while test "$inst" -ne $MOD_VBOXNET_INST; do + vboxnetup=`$BIN_IPADM show-addr -p -o addrobj vboxnet$inst >/dev/null 2>&1` + if test "$?" -eq 0; then + $BIN_IPADM delete-addr vboxnet$inst/v4addr + $BIN_IPADM delete-ip vboxnet$inst + if test "$?" -ne 0; then + errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be removed (probably in use)." + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + fi + fi + + inst=`expr $inst + 1` + done + else + inst=0 + while test "$inst" -ne $MOD_VBOXNET_INST; do + vboxnetup=`$BIN_IFCONFIG vboxnet$inst >/dev/null 2>&1` + if test "$?" -eq 0; then + $BIN_IFCONFIG vboxnet$inst unplumb + if test "$?" -ne 0; then + errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be unplumbed (probably in use)." + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + fi + fi + + # unplumb vboxnet0 ipv6 + vboxnetup=`$BIN_IFCONFIG vboxnet$inst inet6 >/dev/null 2>&1` + if test "$?" -eq 0; then + $BIN_IFCONFIG vboxnet$inst inet6 unplumb + if test "$?" -ne 0; then + errorprint "VirtualBox NetAdapter 'vboxnet$inst' IPv6 couldn't be unplumbed (probably in use)." + if test "x$fatal" = "x$FATALOP"; then + exit 1 + fi + fi + fi + + inst=`expr $inst + 1` + done + fi +} + + +# cleanup_install([fatal]) +# failure: depends on [fatal] +cleanup_install() +{ + fatal=$1 + + # No-Op for remote installs + if test "$REMOTEINST" -eq 1; then + return 0 + fi + + # stop the services + stop_service "Web service" "virtualbox/webservice" "svc:/application/virtualbox/webservice:default" + stop_service "Balloon control service" "virtualbox/balloonctrl" "svc:/application/virtualbox/balloonctrl:default" + stop_service "Autostart service" "virtualbox/autostart" "svc:/application/virtualbox/autostart:default" + stop_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default" + + # DEBUG x4600b: verify that the ZoneAccess process is really gone + is_process_running "VBoxZoneAccess" + if test "$?" -eq 1; then + warnprint "VBoxZoneAccess is alive despite its service being dead. Killing..." + stop_process "VBoxZoneAccess" + fi + + # unplumb all vboxnet instances for non-remote installs + unplumb_net + + # Stop our other daemons, non-fatal + stop_process "VBoxNetDHCP" + stop_process "VBoxNetNAT" + + # Stop VBoxSVC quickly using SIGUSR1 + procname="VBoxSVC" + procpid=`ps -eo pid,fname | grep $procname | grep -v grep | awk '{ print $1 }'` + if test ! -z "$procpid" && test "$procpid" -ge 0; then + kill -USR1 $procpid + + # Sleep a while and check if VBoxSVC is still running, if so fail uninstallation. + sleep 2 + is_process_running "VBoxSVC" + if test "$?" -eq 1; then + errorprint "Cannot uninstall VirtualBox while VBoxSVC (pid $procpid) is still running." + errorprint "Please shutdown all VMs and VirtualBox frontends before uninstalling VirtualBox." + exit 1 + fi + + # Some VMs might still be alive after VBoxSVC as they poll less frequently before killing themselves + # Just check for VBoxHeadless & VirtualBox frontends for now. + is_process_running "VBoxHeadless" + if test "$?" -eq 1; then + errorprint "Cannot uninstall VirtualBox while VBoxHeadless is still running." + errorprint "Please shutdown all VMs and VirtualBox frontends before uninstalling VirtualBox." + exit 1 + fi + + is_process_running "VirtualBox" + if test "$?" -eq 1; then + errorprint "Cannot uninstall VirtualBox while any VM is still running." + errorprint "Please shutdown all VMs and VirtualBox frontends before uninstalling VirtualBox." + exit 1 + fi + fi + + # Remove stuff installed for the Python bindings. + if [ -r "$CONFIG_DIR/$CONFIG_FILES" ]; then + rm -f `cat "$CONFIG_DIR/$CONFIG_FILES"` 2> /dev/null + rm -f "$CONFIG_DIR/$CONFIG_FILES" 2> /dev/null + rmdir "$CONFIG_DIR" 2> /dev/null + fi +} + + +# postinstall() +# !! failure is always fatal +postinstall() +{ + infoprint "Detected Solaris $HOST_OS_MAJORVERSION Version $HOST_OS_MINORVERSION" + + infoprint "Loading VirtualBox kernel modules..." + install_drivers + + if test "$?" -eq 0; then + if test -f "$DIR_CONF/vboxnet.conf"; then + # nwam/dhcpagent fix + nwamfile="$PKG_INSTALL_ROOT/etc/nwam/llp" + nwambackupfile=$nwamfile.vbox + if test -f "$nwamfile"; then + sed -e '/vboxnet/d' $nwamfile > $nwambackupfile + + # add all vboxnet instances as static to nwam + inst=0 + networkn=56 + while test "$inst" -ne 1; do + echo "vboxnet$inst static 192.168.$networkn.1" >> $nwambackupfile + inst=`expr $inst + 1` + networkn=`expr $networkn + 1` + done + mv -f $nwambackupfile $nwamfile + fi + + # plumb and configure vboxnet0 for non-remote installs + if test "$REMOTEINST" -eq 0; then + plumb_net + fi + fi + + if test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-webservice.xml" \ + || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml" \ + || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-balloonctrl.xml"\ + || test -f "$PKG_INSTALL_ROOT/var/svc/manifest/application/virtualbox/virtualbox-autostart.xml"; then + infoprint "Configuring services..." + if test "$REMOTEINST" -eq 1; then + subprint "Skipped for targeted installs." + else + # Since S11 the way to import a manifest is via restarting manifest-import which is asynchronous and can + # take a while to complete, using disable/enable -s doesn't work either. So we restart it, and poll in + # 1 second intervals to see if our service has been successfully imported and timeout after 'cmax' seconds. + $BIN_SVCADM restart svc:system/manifest-import:default + + # Start ZoneAccess service, other services are disabled by default. + start_service "Zone access service" "virtualbox/zoneaccess" "svc:/application/virtualbox/zoneaccess:default" \ + "/var/svc/log/application-virtualbox-zoneaccess:default.log" + fi + fi + + # Update mime and desktop databases to get the right menu entries + # and icons. There is still some delay until the GUI picks it up, + # but that cannot be helped. + if test -d "$PKG_INSTALL_ROOT/usr/share/icons"; then + infoprint "Installing MIME types and icons..." + if test "$REMOTEINST" -eq 0; then + /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1 + /usr/bin/update-desktop-database -q 2>/dev/null + else + subprint "Skipped for targeted installs." + fi + fi + + if test -f "$VBOX_INSTALL_PATH/sdk/installer/vboxapisetup.py" || test -h "$VBOX_INSTALL_PATH/sdk/installer/vboxapisetup.py"; then + # Install python bindings for non-remote installs + if test "$REMOTEINST" -eq 0; then + infoprint "Installing Python bindings..." + + # Loop over all usual suspect Python executable names and try + # installing the VirtualBox API bindings. Needs to prevent + # double installs which waste quite a bit of time. + PYTHONS="" + for p in python2.4 python2.5 python2.6 python2.7 python2 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 python3.9 python3.10 python3 python; do + if [ "`$p -c 'import sys +if sys.version_info >= (2, 4) and (sys.version_info < (3, 0) or sys.version_info >= (3, 3)): + print(\"test\")' 2> /dev/null`" != "test" ]; then + continue + fi + # Get python major/minor version, and skip if it was + # already covered. Uses grep -F to avoid trouble with '.' + # matching any char. + pyvers="`$p -c 'import sys +print("%s.%s" % (sys.version_info[0], sys.version_info[1]))' 2> /dev/null`" + if echo "$PYTHONS" | /usr/xpg4/bin/grep -Fq ":$pyvers:"; then + continue + fi + # Record which version will be installed. If it fails there + # is no point trying with different executable/symlink + # reporting the same version. + PYTHONS="$PYTHONS:$pyvers:" + install_python_bindings "$p" "Python $pyvers" + done + if [ -z "$PYTHONS" ]; then + warnprint "Python (2.4 to 2.7 or 3.3 and later) unavailable, skipping bindings installation." + fi + else + warnprint "Skipped installing Python bindings. Run, as root, 'vboxapisetup.py install' manually from the booted system." + fi + fi + + update_boot_archive + + return 0 + else + errorprint "Failed to install drivers" + exit 666 + fi + return 1 +} + +# preremove([fatal]) +# failure: depends on [fatal] +preremove() +{ + fatal=$1 + + cleanup_install "$fatal" + + remove_drivers "$fatal" + if test "$?" -eq 0; then + return 0; + fi + return 1 +} + + +# And it begins... +if test "x${PKG_INSTALL_ROOT:=/}" != "x/"; then + BASEDIR_OPT="-b $PKG_INSTALL_ROOT" + BASEDIR_PKGOPT="-R $PKG_INSTALL_ROOT" + REMOTEINST=1 +fi +find_bins +check_root +check_isa +check_zone +get_sysinfo + + +# Get command line options +while test $# -gt 0; +do + case "$1" in + --postinstall | --preremove | --installdrivers | --removedrivers | --setupdrivers) + drvop="$1" + ;; + --fatal) + fatal="$FATALOP" + ;; + --silent) + ISSILENT="$SILENTOP" + ;; + --ips) + ISIPS="$IPSOP" + ;; + --altkerndir) + # Use alternate kernel driver config folder (dev only) + DIR_CONF="/usr/kernel/drv" + ;; + --sh-trace) # forwarded pkgadd -v + set -x + ;; + --help) + printusage + exit 1 + ;; + *) + # Take a hard line on invalid options. + errorprint "Invalid command line option: \"$1\"" + exit 1; + ;; + esac + shift +done + +case "$drvop" in +--postinstall) + check_module_arch + postinstall + ;; +--preremove) + preremove "$fatal" + ;; +--installdrivers) + check_module_arch + install_drivers + ;; +--removedrivers) + remove_drivers "$fatal" + ;; +--setupdrivers) + remove_drivers "$fatal" + infoprint "Installing VirtualBox drivers:" + install_drivers + ;; +*) + printusage + exit 1 +esac + +exit "$?" + diff --git a/src/VBox/Installer/solaris/virtualbox-autostart.xml b/src/VBox/Installer/solaris/virtualbox-autostart.xml new file mode 100644 index 00000000..667d2b3b --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox-autostart.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/solaris/virtualbox-balloonctrl.xml b/src/VBox/Installer/solaris/virtualbox-balloonctrl.xml new file mode 100644 index 00000000..3bcc620a --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox-balloonctrl.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/solaris/virtualbox-webservice.xml b/src/VBox/Installer/solaris/virtualbox-webservice.xml new file mode 100644 index 00000000..7affba69 --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox-webservice.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/solaris/virtualbox-zoneaccess.xml b/src/VBox/Installer/solaris/virtualbox-zoneaccess.xml new file mode 100644 index 00000000..3ac4aed6 --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox-zoneaccess.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/solaris/virtualbox.applications.in b/src/VBox/Installer/solaris/virtualbox.applications.in new file mode 100644 index 00000000..601d274c --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox.applications.in @@ -0,0 +1,8 @@ +virtualbox + command=VirtualBox + requires_terminal=false + expects_uris=false + can_open_multiple_files=true + name=@VBOX_PRODUCT@ + mime_types=application/x-virtualbox-vbox;application/x-virtualbox-vbox-extpack;application/x-virtualbox-ovf;application/x-virtualbox-ova;application/x-virtualbox-vdi;application/x-virtualbox-vmdk;application/x-virtualbox-vhd;application/x-virtualbox-hdd + diff --git a/src/VBox/Installer/solaris/virtualbox.keys b/src/VBox/Installer/solaris/virtualbox.keys new file mode 100644 index 00000000..65ddd53e --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox.keys @@ -0,0 +1,79 @@ +application/x-virtualbox-vbox + icon_filename=virtualbox-vbox + description=Virtual Machine + default_action_type=application + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-vbox-extpack + icon_filename=virtualbox-vbox-extpack + description=VirtualBox Extension Pack + default_action_type=application + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-ovf + icon_filename=virtualbox-ovf + description=Open Virtualization Format + default_action_type=application + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-ovf + icon_filename=virtualbox-ova + description=Open Virtualization Format Archive + default_action_type=application + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-vdi + icon_filename=virtualbox-vdi + description=Virtual Disk Image + default_action_type=none + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-vmdk + icon_filename=virtualbox-vmdk + description=Virtual Machine Disk Format + default_action_type=none + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-vhd + icon_filename=virtualbox-vhd + description=Virtual Hard Disk + default_action_type=none + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no + +application/x-virtualbox-hdd + icon_filename=virtualbox-hdd + description=Virtual Hard Disk + default_action_type=none + short_list_application_ids_for_novice_user_level=virtualbox + short_list_application_ids_for_intermediate_user_level=virtualbox + short_list_application_ids_for_advanced_user_level=virtualbox + category=System + use_category_default=no diff --git a/src/VBox/Installer/solaris/virtualbox.mime b/src/VBox/Installer/solaris/virtualbox.mime new file mode 100644 index 00000000..7401f4c0 --- /dev/null +++ b/src/VBox/Installer/solaris/virtualbox.mime @@ -0,0 +1,23 @@ +application/x-virtualbox-vbox: + ext: vbox + +application/x-virtualbox-vbox-extpack: + ext: vbox-extpack + +application/x-virtualbox-ovf: + ext: ovf + +application/x-virtualbox-ova: + ext: ova + +application/x-virtualbox-vdi: + ext: vdi + +application/x-virtualbox-vmdk: + ext: vmdk + +application/x-virtualbox-vhd: + ext: vhd + +application/x-virtualbox-hdd: + ext: hdd diff --git a/src/VBox/Installer/win/Binary/Banner.jpg b/src/VBox/Installer/win/Binary/Banner.jpg new file mode 100644 index 00000000..4d54a71f Binary files /dev/null and b/src/VBox/Installer/win/Binary/Banner.jpg differ diff --git a/src/VBox/Installer/win/Binary/Dialog.jpg b/src/VBox/Installer/win/Binary/Dialog.jpg new file mode 100644 index 00000000..da8746c1 Binary files /dev/null and b/src/VBox/Installer/win/Binary/Dialog.jpg differ diff --git a/src/VBox/Installer/win/Binary/Exclamation.ico b/src/VBox/Installer/win/Binary/Exclamation.ico new file mode 100644 index 00000000..906ce324 Binary files /dev/null and b/src/VBox/Installer/win/Binary/Exclamation.ico differ diff --git a/src/VBox/Installer/win/Binary/New.ico b/src/VBox/Installer/win/Binary/New.ico new file mode 100644 index 00000000..27881dfe Binary files /dev/null and b/src/VBox/Installer/win/Binary/New.ico differ diff --git a/src/VBox/Installer/win/Binary/Remove.ico b/src/VBox/Installer/win/Binary/Remove.ico new file mode 100644 index 00000000..097cafe2 Binary files /dev/null and b/src/VBox/Installer/win/Binary/Remove.ico differ diff --git a/src/VBox/Installer/win/Binary/Repair.ico b/src/VBox/Installer/win/Binary/Repair.ico new file mode 100644 index 00000000..6fb68610 Binary files /dev/null and b/src/VBox/Installer/win/Binary/Repair.ico differ diff --git a/src/VBox/Installer/win/Binary/Up.ico b/src/VBox/Installer/win/Binary/Up.ico new file mode 100644 index 00000000..86f6b5a8 Binary files /dev/null and b/src/VBox/Installer/win/Binary/Up.ico differ diff --git a/src/VBox/Installer/win/Binary/info.ico b/src/VBox/Installer/win/Binary/info.ico new file mode 100644 index 00000000..7e0ff7f1 Binary files /dev/null and b/src/VBox/Installer/win/Binary/info.ico differ diff --git a/src/VBox/Installer/win/CommonProperties.wxi b/src/VBox/Installer/win/CommonProperties.wxi new file mode 100644 index 00000000..de687ded --- /dev/null +++ b/src/VBox/Installer/win/CommonProperties.wxi @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/src/VBox/Installer/win/Defines.wxi b/src/VBox/Installer/win/Defines.wxi new file mode 100644 index 00000000..00c740a5 --- /dev/null +++ b/src/VBox/Installer/win/Defines.wxi @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/InstallHelper/Makefile.kmk b/src/VBox/Installer/win/InstallHelper/Makefile.kmk new file mode 100644 index 00000000..8560759a --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/Makefile.kmk @@ -0,0 +1,65 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for VBoxInstallHelper.dll. +# + +# +# Copyright (C) 2008-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + + +DLLS += VBoxInstallHelper +VBoxInstallHelper_TEMPLATE = VBoxR3StaticDllNoAsan +VBoxInstallHelper_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) +VBoxInstallHelper_DEFS = _WIN32_WINNT=0x0501 _UNICODE UNICODE VBOX_SVN_REV=$(VBOX_SVN_REV) +ifdef VBOX_WITH_NETFLT + VBoxInstallHelper_SDKS += VBOX_WIN_NEWDEV + VBoxInstallHelper_DEFS += VBOX_WITH_NETFLT=1 +endif +VBoxInstallHelper_DEPS = $(VBOX_SVN_REV_KMK) +VBoxInstallHelper_SOURCES = \ + VBoxInstallHelper.cpp \ + VBoxInstallHelper.def \ + VBoxInstallHelper.rc \ + VBoxCommon.cpp +ifndef VBOX_OSE + VBoxInstallHelper_SOURCES += \ + internal/VBoxSerial.cpp +endif +VBoxInstallHelper_LIBS = \ + $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Msi.lib +ifdef VBOX_WITH_NETFLT + VBoxInstallHelper_LIBS += \ + $(PATH_STAGE_LIB)/WinNetConfigSharedStatic.lib \ + $(PATH_STAGE_LIB)/VBoxDrvCfgSharedStatic.lib \ + $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \ + $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib +endif + +if "$(KBUILD_TARGET)" == "win" && defined(VBOX_WITH_TESTCASES) && !defined(VBOX_OSE) + include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk +endif + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp b/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp new file mode 100644 index 00000000..87f75ded --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/VBoxCommon.cpp @@ -0,0 +1,103 @@ +/* $Id: VBoxCommon.cpp $ */ +/** @file + * VBoxCommon - Misc helper routines for install helper. + * + * This is used by internal/serial.cpp and VBoxInstallHelper.cpp. + */ + +/* + * Copyright (C) 2008-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include + +#include +#include + + +UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValueBuf, DWORD cwcValueBuf) +{ + RT_BZERO(pwszValueBuf, cwcValueBuf * sizeof(pwszValueBuf[0])); + + /** @todo r=bird: why do we need to query the size first and then the data. + * The API should be perfectly capable of doing that without our help. */ + DWORD cwcNeeded = 0; + UINT uiRet = MsiGetPropertyW(hMsi, pwszName, L"", &cwcNeeded); + if (uiRet == ERROR_MORE_DATA) + { + ++cwcNeeded; /* On output does not include terminating null, so add 1. */ + + if (cwcNeeded > cwcValueBuf) + return ERROR_MORE_DATA; + uiRet = MsiGetPropertyW(hMsi, pwszName, pwszValueBuf, &cwcNeeded); + } + return uiRet; +} + +#if 0 /* unused */ +/** + * Retrieves a MSI property (in UTF-8). + * + * Convenience function for VBoxGetMsiProp(). + * + * @returns VBox status code. + * @param hMsi MSI handle to use. + * @param pcszName Name of property to retrieve. + * @param ppszValue Where to store the allocated value on success. + * Must be free'd using RTStrFree() by the caller. + */ +int VBoxGetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue) +{ + PRTUTF16 pwszName; + int rc = RTStrToUtf16(pcszName, &pwszName); + if (RT_SUCCESS(rc)) + { + WCHAR wszValue[1024]; /* 1024 should be enough for everybody (tm). */ + if (VBoxGetMsiProp(hMsi, pwszName, wszValue, sizeof(wszValue)) == ERROR_SUCCESS) + rc = RTUtf16ToUtf8(wszValue, ppszValue); + else + rc = VERR_NOT_FOUND; + + RTUtf16Free(pwszName); + } + + return rc; +} +#endif + +UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue) +{ + return MsiSetPropertyW(hMsi, pwszName, pwszValue); +} + +UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal) +{ + wchar_t wszTemp[32]; + RTUtf16Printf(wszTemp, RT_ELEMENTS(wszTemp), "%u", dwVal); + return VBoxSetMsiProp(hMsi, pwszName, wszTemp); +} + diff --git a/src/VBox/Installer/win/InstallHelper/VBoxCommon.h b/src/VBox/Installer/win/InstallHelper/VBoxCommon.h new file mode 100644 index 00000000..a186c919 --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/VBoxCommon.h @@ -0,0 +1,44 @@ +/* $Id: VBoxCommon.h $ */ +/** @file + * VBoxCommon - Misc helper routines for install helper. + */ + +/* + * Copyright (C) 2008-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h +#define VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +#if (_MSC_VER < 1400) /* Provide _stprintf_s to VC < 8.0. */ +int swprintf_s(WCHAR *buffer, size_t cbBuffer, const WCHAR *format, ...); +#endif + +UINT VBoxGetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, WCHAR *pwszValueBuf, DWORD cwcValueBuf); +int VBoxGetMsiPropUtf8(MSIHANDLE hMsi, const char *pcszName, char **ppszValue); +UINT VBoxSetMsiProp(MSIHANDLE hMsi, const WCHAR *pwszName, const WCHAR *pwszValue); +UINT VBoxSetMsiPropDWORD(MSIHANDLE hMsi, const WCHAR *pwszName, DWORD dwVal); + +#endif /* !VBOX_INCLUDED_SRC_InstallHelper_VBoxCommon_h */ + diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp new file mode 100644 index 00000000..ccbac0e7 --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp @@ -0,0 +1,2097 @@ +/* $Id: VBoxInstallHelper.cpp $ */ +/** @file + * VBoxInstallHelper - Various helper routines for Windows host installer. + */ + +/* + * Copyright (C) 2008-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#ifdef VBOX_WITH_NETFLT +# include "VBox/VBoxNetCfg-win.h" +# include "VBox/VBoxDrvCfg-win.h" +#endif + +#include +#include + +#define _WIN32_DCOM +#include + +#include +#define INITGUID +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include /* RTPATH_MAX, RTPATH_IS_SLASH */ +#include /* RT_ZERO */ +#include + +#include "VBoxCommon.h" +#ifndef VBOX_OSE +# include "internal/VBoxSerial.h" +#endif + + +/********************************************************************************************************************************* +* Defined Constants And Macros * +*********************************************************************************************************************************/ +#ifdef DEBUG +# define NonStandardAssert(_expr) Assert(_expr) +#else +# define NonStandardAssert(_expr) do{ }while(0) +#endif + +#define MY_WTEXT_HLP(a_str) L##a_str +#define MY_WTEXT(a_str) MY_WTEXT_HLP(a_str) + + + +/** + * DLL entry point. + */ +BOOL WINAPI DllMain(HANDLE hInst, ULONG uReason, LPVOID pReserved) +{ + RT_NOREF(hInst, uReason, pReserved); + +#if 0 + /* + * This is a trick for allowing the debugger to be attached, don't know if + * there is an official way to do that, but this is a pretty efficient. + * + * Monitor the debug output in DbgView and be ready to start windbg when + * the message below appear. This will happen 3-4 times during install, + * and 2-3 times during uninstall. + * + * Note! The DIFxApp.DLL will automatically trigger breakpoints when a + * debugger is attached. Just continue on these. + */ + if (uReason == DLL_PROCESS_ATTACH) + { + WCHAR wszMsg[128]; + RTUtf16Printf(wszMsg, RT_ELEMENTS(wszMsg), "Waiting for debugger to attach: windbg -g -G -p %u\n", GetCurrentProcessId()); + for (unsigned i = 0; i < 128 && !IsDebuggerPresent(); i++) + { + OutputDebugStringW(wszMsg); + Sleep(1001); + } + Sleep(1002); + __debugbreak(); + } +#endif + + return TRUE; +} + +/** + * Format and add message to the MSI log. + * + * UTF-16 strings are formatted using '%ls' (lowercase). + * ANSI strings are formatted using '%s' (uppercase). + */ +static UINT logStringF(MSIHANDLE hInstall, const char *pszFmt, ...) +{ + PMSIHANDLE hMSI = MsiCreateRecord(2 /* cParms */); + if (hMSI) + { + wchar_t wszBuf[RTPATH_MAX + 256]; + va_list va; + va_start(va, pszFmt); + ssize_t cwc = RTUtf16PrintfV(wszBuf, RT_ELEMENTS(wszBuf), pszFmt, va); + va_end(va); + + MsiRecordSetStringW(hMSI, 0, wszBuf); + MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_INFO), hMSI); + + MsiCloseHandle(hMSI); + return cwc < RT_ELEMENTS(wszBuf) ? ERROR_SUCCESS : ERROR_BUFFER_OVERFLOW; + } + return ERROR_ACCESS_DENIED; +} + +UINT __stdcall IsSerialCheckNeeded(MSIHANDLE hModule) +{ +#ifndef VBOX_OSE + /*BOOL fRet =*/ serialCheckNeeded(hModule); +#else + RT_NOREF(hModule); +#endif + return ERROR_SUCCESS; +} + +UINT __stdcall CheckSerial(MSIHANDLE hModule) +{ +#ifndef VBOX_OSE + /*BOOL bRet =*/ serialIsValid(hModule); +#else + RT_NOREF(hModule); +#endif + return ERROR_SUCCESS; +} + +/** + * Runs an executable on the OS. + * + * @returns Windows error code. + * @param hModule Windows installer module handle. + * @param pwszImage The executable to run. + * @param pwszArgs The arguments (command line w/o executable). + */ +static UINT procRun(MSIHANDLE hModule, const wchar_t *pwszImage, wchar_t const *pwszArgs) +{ + /* + * Construct a full command line. + */ + size_t const cwcImage = RTUtf16Len(pwszImage); + size_t const cwcArgs = RTUtf16Len(pwszArgs); + + wchar_t *pwszCmdLine = (wchar_t *)alloca((1 + cwcImage + 1 + 1 + cwcArgs + 1) * sizeof(wchar_t)); + pwszCmdLine[0] = '"'; + memcpy(&pwszCmdLine[1], pwszImage, cwcImage * sizeof(wchar_t)); + pwszCmdLine[1 + cwcImage] = '"'; + pwszCmdLine[1 + cwcImage + 1] = ' '; + memcpy(&pwszCmdLine[1 + cwcImage + 1 + 1], pwszArgs, (cwcArgs + 1) * sizeof(wchar_t)); + + /* + * Construct startup info. + */ + STARTUPINFOW StartupInfo; + RT_ZERO(StartupInfo); + StartupInfo.cb = sizeof(StartupInfo); + StartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE); + StartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + StartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE); + StartupInfo.dwFlags = STARTF_USESTDHANDLES; +#ifndef DEBUG + StartupInfo.dwFlags |= STARTF_USESHOWWINDOW; + StartupInfo.wShowWindow = SW_HIDE; +#endif + + /* + * Start it. + */ + UINT rcWin; + PROCESS_INFORMATION ChildInfo = { NULL, NULL, 0, 0 }; + if (CreateProcessW(pwszImage, pwszCmdLine, NULL /*pProcessAttribs*/, NULL /*pThreadAttribs*/, TRUE /*fInheritHandles*/, + 0 /*fFlags*/, NULL /*pwszEnv*/, NULL /*pwszCwd*/, &StartupInfo, &ChildInfo)) + { + logStringF(hModule, "procRun: Info: Started process %u: %ls", ChildInfo.dwProcessId, pwszCmdLine); + CloseHandle(ChildInfo.hThread); + DWORD const dwWait = WaitForSingleObject(ChildInfo.hProcess, RT_MS_30SEC); + DWORD dwExitCode = 0xf00dface; + if (GetExitCodeProcess(ChildInfo.hProcess, &dwExitCode)) + { + if (dwExitCode == 0) + { + logStringF(hModule, "procRun: Info: Process '%ls' terminated exit code zero", pwszCmdLine); + rcWin = ERROR_SUCCESS; + } + else + { + logStringF(hModule, "procRun: Process '%ls' terminated with non-zero exit code: %u (%#x)", + pwszCmdLine, dwExitCode, dwExitCode); + rcWin = ERROR_GEN_FAILURE; + } + } + else + { + rcWin = GetLastError(); + logStringF(hModule, "procRun: Process '%ls' is probably still running: rcWin=%u dwWait=%u (%#x)", + pwszCmdLine, rcWin, dwWait, dwWait); + } + } + else + { + rcWin = GetLastError(); + logStringF(hModule, "procRun: Creating process '%ls' failed: rcWin=%u\n", pwszCmdLine, rcWin); + } + return rcWin; +} + +/** + * Tries to retrieve the Python installation path on the system, extended version. + * + * @returns Windows error code. + * @param hModule Windows installer module handle. + * @param hKeyRoot Registry root key to use, e.g. HKEY_LOCAL_MACHINE. + * @param pwszPythonPath Buffer to return the path for python.exe in. + * @param cwcPythonPath Buffer size in UTF-16 units. + * @param fReturnExe Return the path to python.exe if true, otherwise + * just the python install directory. + */ +static UINT getPythonPathEx(MSIHANDLE hModule, HKEY hKeyRoot, wchar_t *pwszPythonPath, size_t cwcPythonPath, bool fReturnExe) +{ + *pwszPythonPath = '\0'; + + /* + * Enumerate the subkeys of python core installation key. + * + * Note: The loop ASSUMES that later found versions are higher, e.g. newer + * Python versions. For now we always go by the newest version. + */ + HKEY hKeyPythonCore = NULL; + LSTATUS dwErr = RegOpenKeyExW(hKeyRoot, L"SOFTWARE\\Python\\PythonCore", 0, KEY_READ, &hKeyPythonCore); + if (dwErr != ERROR_SUCCESS) + return dwErr; + + UINT rcWinRet = ERROR_PATH_NOT_FOUND; + for (DWORD i = 0; i < 16384; ++i) + { + static wchar_t const s_wszInstallPath[] = L"\\InstallPath"; + static wchar_t const s_wszPythonExe[] = L"python.exe"; + + /* Get key name: */ + wchar_t wszBuf[RTPATH_MAX + RT_MAX(RT_ELEMENTS(s_wszInstallPath), RT_ELEMENTS(s_wszPythonExe)) + 2]; + DWORD cwcKeyNm = RTPATH_MAX; + DWORD dwKeyType = REG_SZ; + dwErr = RegEnumKeyExW(hKeyPythonCore, i, wszBuf, &cwcKeyNm, NULL, NULL, NULL, NULL); + if (dwErr == ERROR_NO_MORE_ITEMS) + break; + if (dwErr != ERROR_SUCCESS) + continue; + if (dwKeyType != REG_SZ) + continue; + if (cwcKeyNm == 0) + continue; + NonStandardAssert(cwcKeyNm <= sizeof(wszBuf)); + + /* Try Open the InstallPath subkey: */ + memcpy(&wszBuf[cwcKeyNm], s_wszInstallPath, sizeof(s_wszInstallPath)); + + HKEY hKeyInstallPath = NULL; + dwErr = RegOpenKeyExW(hKeyPythonCore, wszBuf, 0, KEY_READ, &hKeyInstallPath); + if (dwErr != ERROR_SUCCESS) + continue; + + /* Query the value. We double buffer this so we don't overwrite an okay + return value with this. Use the smaller of cwcPythonPath and wszValue + so RegQueryValueExW can do all the buffer overflow checking for us. + For paranoid reasons, we reserve a space for a terminator as well as + a slash. (ASSUMES reasonably sized output buffer.) */ + NonStandardAssert(cwcPythonPath > RT_ELEMENTS(s_wszPythonExe) + 16); + DWORD cbValue = (DWORD)RT_MIN( cwcPythonPath * sizeof(wchar_t) + - (fReturnExe ? sizeof(s_wszInstallPath) - sizeof(wchar_t) * 2 : sizeof(wchar_t) * 2), + RTPATH_MAX * sizeof(wchar_t)); + DWORD dwValueType = REG_SZ; + dwErr = RegQueryValueExW(hKeyInstallPath, L"", NULL, &dwValueType, (LPBYTE)wszBuf, &cbValue); + RegCloseKey(hKeyInstallPath); + if ( dwErr == ERROR_SUCCESS + && dwValueType == REG_SZ + && cbValue >= sizeof(L"C:\\") - sizeof(L"")) + { + /* Find length in wchar_t unit w/o terminator: */ + DWORD cwc = cbValue / sizeof(wchar_t); + while (cwc > 0 && wszBuf[cwc - 1] == '\0') + cwc--; + wszBuf[cwc] = '\0'; + if (cwc > 2) + { + /* Check if the path leads to a directory with a python.exe file in it. */ + if (!RTPATH_IS_SLASH(wszBuf[cwc - 1])) + wszBuf[cwc++] = '\\'; + memcpy(&wszBuf[cwc], s_wszPythonExe, sizeof(s_wszPythonExe)); + DWORD const fAttribs = GetFileAttributesW(wszBuf); + if (fAttribs != INVALID_FILE_ATTRIBUTES) + { + if (!(fAttribs & FILE_ATTRIBUTE_DIRECTORY)) + { + /* Okay, we found something that can be returned. */ + if (fReturnExe) + cwc += RT_ELEMENTS(s_wszPythonExe) - 1; + wszBuf[cwc] = '\0'; + logStringF(hModule, "getPythonPath: Found: \"%ls\"", wszBuf); + + NonStandardAssert(cwcPythonPath > cwc); + memcpy(pwszPythonPath, wszBuf, cwc * sizeof(wchar_t)); + pwszPythonPath[cwc] = '\0'; + rcWinRet = ERROR_SUCCESS; + } + else + logStringF(hModule, "getPythonPath: Warning: Skipping \"%ls\": is a directory (%#x)", wszBuf, fAttribs); + } + else + logStringF(hModule, "getPythonPath: Warning: Skipping \"%ls\": Does not exist (%u)", wszBuf, GetLastError()); + } + } + } + + RegCloseKey(hKeyPythonCore); + if (rcWinRet != ERROR_SUCCESS) + logStringF(hModule, "getPythonPath: Unable to find python"); + return rcWinRet; +} + +/** + * Retrieves the absolute path of the Python installation. + * + * @returns Windows error code. + * @param hModule Windows installer module handle. + * @param pwszPythonPath Buffer to return the path for python.exe in. + * @param cwcPythonPath Buffer size in UTF-16 units. + * @param fReturnExe Return the path to python.exe if true, otherwise + * just the python install directory. + */ +static UINT getPythonPath(MSIHANDLE hModule, wchar_t *pwszPythonPath, size_t cwcPythonPath, bool fReturnExe = false) +{ + UINT rcWin = getPythonPathEx(hModule, HKEY_LOCAL_MACHINE, pwszPythonPath, cwcPythonPath, fReturnExe); + if (rcWin != ERROR_SUCCESS) + rcWin = getPythonPathEx(hModule, HKEY_CURRENT_USER, pwszPythonPath, cwcPythonPath, fReturnExe); + return rcWin; +} + +/** + * Retrieves the absolute path of the Python executable. + * + * @returns Windows error code. + * @param hModule Windows installer module handle. + * @param pwszPythonExe Buffer to return the path for python.exe in. + * @param cwcPythonExe Buffer size in UTF-16 units. + */ +static UINT getPythonExe(MSIHANDLE hModule, wchar_t *pwszPythonExe, size_t cwcPythonExe) +{ + return getPythonPath(hModule, pwszPythonExe, cwcPythonExe, true /*fReturnExe*/); +} + +/** + * Checks if all dependencies for running the VBox Python API bindings are met. + * + * @returns VBox status code, or error if depedencies are not met. + * @param hModule Windows installer module handle. + * @param pwszPythonExe Path to Python interpreter image (.exe). + */ +static int checkPythonDependencies(MSIHANDLE hModule, const wchar_t *pwszPythonExe) +{ + /* + * Check if importing the win32api module works. + * This is a prerequisite for setting up the VBox API. + */ + logStringF(hModule, "checkPythonDependencies: Checking for win32api extensions ..."); + + UINT rcWin = procRun(hModule, pwszPythonExe, L"-c \"import win32api\""); + if (rcWin == ERROR_SUCCESS) + logStringF(hModule, "checkPythonDependencies: win32api found\n"); + else + logStringF(hModule, "checkPythonDependencies: Importing win32api failed with %u (%#x)\n", rcWin, rcWin); + + return rcWin; +} + +/** + * Checks for a valid Python installation on the system. + * + * Called from the MSI installer as custom action. + * + * @returns Always ERROR_SUCCESS. + * Sets public property VBOX_PYTHON_INSTALLED to "0" (false) or "1" (success). + * Sets public property VBOX_PYTHON_PATH to the Python installation path (if found). + * + * @param hModule Windows installer module handle. + */ +UINT __stdcall IsPythonInstalled(MSIHANDLE hModule) +{ + wchar_t wszPythonPath[RTPATH_MAX]; + UINT rcWin = getPythonPath(hModule, wszPythonPath, RTPATH_MAX); + if (rcWin == ERROR_SUCCESS) + { + logStringF(hModule, "IsPythonInstalled: Python installation found at \"%ls\"", wszPythonPath); + VBoxSetMsiProp(hModule, L"VBOX_PYTHON_PATH", wszPythonPath); + VBoxSetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"1"); + } + else + { + logStringF(hModule, "IsPythonInstalled: Error: No suitable Python installation found (%u), skipping installation.", rcWin); + logStringF(hModule, "IsPythonInstalled: Python seems not to be installed; please download + install the Python Core package."); + VBoxSetMsiProp(hModule, L"VBOX_PYTHON_INSTALLED", L"0"); + } + + return ERROR_SUCCESS; /* Never return failure. */ +} + +/** + * Checks if all dependencies for running the VBox Python API bindings are met. + * + * Called from the MSI installer as custom action. + * + * @returns Always ERROR_SUCCESS. + * Sets public property VBOX_PYTHON_DEPS_INSTALLED to "0" (false) or "1" (success). + * + * @param hModule Windows installer module handle. + */ +UINT __stdcall ArePythonAPIDepsInstalled(MSIHANDLE hModule) +{ + wchar_t wszPythonExe[RTPATH_MAX]; + UINT dwErr = getPythonExe(hModule, wszPythonExe, RTPATH_MAX); + if (dwErr == ERROR_SUCCESS) + { + dwErr = checkPythonDependencies(hModule, wszPythonExe); + if (dwErr == ERROR_SUCCESS) + logStringF(hModule, "ArePythonAPIDepsInstalled: Dependencies look good."); + } + + if (dwErr != ERROR_SUCCESS) + logStringF(hModule, "ArePythonAPIDepsInstalled: Failed with dwErr=%u", dwErr); + + VBoxSetMsiProp(hModule, L"VBOX_PYTHON_DEPS_INSTALLED", dwErr == ERROR_SUCCESS ? L"1" : L"0"); + return ERROR_SUCCESS; /* Never return failure. */ +} + +/** + * Checks if all required MS CRTs (Visual Studio Redistributable Package) are installed on the system. + * + * Called from the MSI installer as custom action. + * + * @returns Always ERROR_SUCCESS. + * Sets public property VBOX_MSCRT_INSTALLED to "" (false, to use "NOT" in WiX) or "1" (success). + * + * Also exposes public properties VBOX_MSCRT_VER_MIN + VBOX_MSCRT_VER_MAJ strings + * with the most recent MSCRT version detected. + * + * @param hModule Windows installer module handle. + * + * @sa https://docs.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170 + */ +UINT __stdcall IsMSCRTInstalled(MSIHANDLE hModule) +{ + HKEY hKeyVS = NULL; + LSTATUS lrc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\X64", + 0, KEY_READ, &hKeyVS); + if (lrc == ERROR_SUCCESS) + { + DWORD dwVal = 0; + DWORD cbVal = sizeof(dwVal); + DWORD dwValueType = REG_DWORD; /** @todo r=bird: output only parameter, optional, so pointless. */ + lrc = RegQueryValueExW(hKeyVS, L"Installed", NULL, &dwValueType, (LPBYTE)&dwVal, &cbVal); + if (lrc == ERROR_SUCCESS) + { + if (dwVal >= 1) + { + DWORD dwMaj = 0; /** @todo r=bird: It's purdent to initialize values if you don't bother to check the type and size! */ + lrc = RegQueryValueExW(hKeyVS, L"Major", NULL, &dwValueType, (LPBYTE)&dwMaj, &cbVal); + if (lrc == ERROR_SUCCESS) + { + VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MAJ", dwMaj); + + DWORD dwMin = 0; + lrc = RegQueryValueExW(hKeyVS, L"Minor", NULL, &dwValueType, (LPBYTE)&dwMin, &cbVal); + if (lrc == ERROR_SUCCESS) + { + VBoxSetMsiPropDWORD(hModule, L"VBOX_MSCRT_VER_MIN", dwMin); + + logStringF(hModule, "IsMSCRTInstalled: Found v%u.%u\n", dwMaj, dwMin); + + /* Check for at least 2019. */ + if (dwMaj >= 14 && dwMin >= 20) + VBoxSetMsiProp(hModule, L"VBOX_MSCRT_INSTALLED", L"1"); + } + else + logStringF(hModule, "IsMSCRTInstalled: Found, but 'Minor' key not present (lrc=%d)", lrc); + } + else + logStringF(hModule, "IsMSCRTInstalled: Found, but 'Major' key not present (lrc=%d)", lrc); + } + else + { + logStringF(hModule, "IsMSCRTInstalled: Found, but not marked as installed"); + lrc = ERROR_NOT_INSTALLED; + } + } + else + logStringF(hModule, "IsMSCRTInstalled: Found, but 'Installed' key not present (lrc=%d)", lrc); + } + + if (lrc != ERROR_SUCCESS) + logStringF(hModule, "IsMSCRTInstalled: Failed with lrc=%ld", lrc); + + return ERROR_SUCCESS; /* Never return failure. */ +} + +/** + * Checks if the running OS is (at least) Windows 10 (e.g. >= build 10000). + * + * Called from the MSI installer as custom action. + * + * @returns Always ERROR_SUCCESS. + * Sets public property VBOX_IS_WINDOWS_10 to "" (empty / false) or "1" (success). + * + * @param hModule Windows installer module handle. + */ +UINT __stdcall IsWindows10(MSIHANDLE hModule) +{ + /* + * Note: We cannot use RtlGetVersion() / GetVersionExW() here, as the Windows Installer service + * all shims this, unfortunately. So we have to go another route by querying the major version + * number from the registry. + */ + HKEY hKeyCurVer = NULL; + LSTATUS lrc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &hKeyCurVer); + if (lrc == ERROR_SUCCESS) + { + DWORD dwVal = 0; + DWORD cbVal = sizeof(dwVal); + DWORD dwValueType = REG_DWORD; /** @todo r=bird: Again, the type is an optional output parameter. pointless to init or pass it unless you check. */ + lrc = RegQueryValueExW(hKeyCurVer, L"CurrentMajorVersionNumber", NULL, &dwValueType, (LPBYTE)&dwVal, &cbVal); + if (lrc == ERROR_SUCCESS) + { + logStringF(hModule, "IsWindows10/CurrentMajorVersionNumber: %u", dwVal); + + VBoxSetMsiProp(hModule, L"VBOX_IS_WINDOWS_10", dwVal >= 10 ? L"1" : L""); + } + else + logStringF(hModule, "IsWindows10/RegOpenKeyExW: Error reading CurrentMajorVersionNumber (%ld)", lrc); + + RegCloseKey(hKeyCurVer); + } + else + logStringF(hModule, "IsWindows10/RegOpenKeyExW: Error opening CurrentVersion key (%ld)", lrc); + + return ERROR_SUCCESS; /* Never return failure. */ +} + +/** + * Installs and compiles the VBox Python bindings. + * + * Called from the MSI installer as custom action. + * + * @returns Always ERROR_SUCCESS. + * Sets public property VBOX_API_INSTALLED to "0" (false) or "1" (success). + * + * @param hModule Windows installer module handle. + */ +UINT __stdcall InstallPythonAPI(MSIHANDLE hModule) +{ + logStringF(hModule, "InstallPythonAPI: Checking for installed Python environment(s) ..."); + + /** @todo r=bird: Can't we get the VBOX_PYTHON_PATH property here? */ + wchar_t wszPythonExe[RTPATH_MAX]; + UINT rcWin = getPythonExe(hModule, wszPythonExe, RTPATH_MAX); + if (rcWin != ERROR_SUCCESS) + { + VBoxSetMsiProp(hModule, L"VBOX_API_INSTALLED", L"0"); + return ERROR_SUCCESS; + } + + /* + * Set up the VBox API. + */ + /* Get the VBox API setup string. */ + WCHAR wszVBoxSDKPath[RTPATH_MAX]; + rcWin = VBoxGetMsiProp(hModule, L"CustomActionData", wszVBoxSDKPath, RT_ELEMENTS(wszVBoxSDKPath)); + if (rcWin == ERROR_SUCCESS) + { + /* Make sure our current working directory is the VBox installation path. */ + if (SetCurrentDirectoryW(wszVBoxSDKPath)) + { + /* Set required environment variables. */ + if (SetEnvironmentVariableW(L"VBOX_INSTALL_PATH", wszVBoxSDKPath)) + { + logStringF(hModule, "InstallPythonAPI: Invoking vboxapisetup.py in \"%ls\" ...", wszVBoxSDKPath); + + rcWin = procRun(hModule, wszPythonExe, L"vboxapisetup.py install"); + if (rcWin == ERROR_SUCCESS) + { + logStringF(hModule, "InstallPythonAPI: Installation of vboxapisetup.py successful"); + + /* + * Do some sanity checking if the VBox API works. + */ + logStringF(hModule, "InstallPythonAPI: Validating VBox API ..."); + + rcWin = procRun(hModule, wszPythonExe, L"-c \"from vboxapi import VirtualBoxManager\""); + if (rcWin == ERROR_SUCCESS) + { + logStringF(hModule, "InstallPythonAPI: VBox API looks good."); + VBoxSetMsiProp(hModule, L"VBOX_API_INSTALLED", L"1"); + return ERROR_SUCCESS; + } + + /* failed */ + logStringF(hModule, "InstallPythonAPI: Validating VBox API failed with %u (%#x)", rcWin, rcWin); + } + else + logStringF(hModule, "InstallPythonAPI: Calling vboxapisetup.py failed with %u (%#x)", rcWin, rcWin); + } + else + logStringF(hModule, "InstallPythonAPI: Could set environment variable VBOX_INSTALL_PATH: LastError=%u", + GetLastError()); + } + else + logStringF(hModule, "InstallPythonAPI: Could set working directory to \"%ls\": LastError=%u", + wszVBoxSDKPath, GetLastError()); + } + else + logStringF(hModule, "InstallPythonAPI: Unable to retrieve VBox installation directory: rcWin=%u (%#x)", rcWin, rcWin); + + VBoxSetMsiProp(hModule, L"VBOX_API_INSTALLED", L"0"); + logStringF(hModule, "InstallPythonAPI: Installation failed"); + return ERROR_SUCCESS; /* Do not fail here. */ +} + +static LONG installBrandingValue(MSIHANDLE hModule, + const WCHAR *pwszFileName, + const WCHAR *pwszSection, + const WCHAR *pwszValue) +{ + LONG rc; + WCHAR wszValue[MAX_PATH]; + if (GetPrivateProfileStringW(pwszSection, pwszValue, NULL, wszValue, sizeof(wszValue), pwszFileName) > 0) + { + WCHAR wszKey[MAX_PATH + 64]; + if (RTUtf16ICmpAscii(pwszSection, "General") != 0) + RTUtf16Printf(wszKey, RT_ELEMENTS(wszKey), "SOFTWARE\\%s\\VirtualBox\\Branding\\%ls", VBOX_VENDOR_SHORT, pwszSection); + else + RTUtf16Printf(wszKey, RT_ELEMENTS(wszKey), "SOFTWARE\\%s\\VirtualBox\\Branding", VBOX_VENDOR_SHORT); + + HKEY hkBranding = NULL; + rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszKey, 0, KEY_WRITE, &hkBranding); + if (rc == ERROR_SUCCESS) + { + rc = RegSetValueExW(hkBranding, + pwszValue, + NULL, + REG_SZ, + (BYTE *)wszValue, + (DWORD)RTUtf16Len(wszValue)); + if (rc != ERROR_SUCCESS) + logStringF(hModule, "InstallBranding: Could not write value %s! Error %d", pwszValue, rc); + RegCloseKey(hkBranding); + } + } + else + rc = ERROR_NOT_FOUND; + return rc; +} + +/** + * @note Both paths strings must have an extra terminator. + */ +static UINT CopyDir(MSIHANDLE hModule, const WCHAR *pwszzDstDir, const WCHAR *pwszzSrcDir) +{ + NonStandardAssert(pwszzDstDir[RTUtf16Len(pwszzDstDir) + 1] == '\0'); + NonStandardAssert(pwszzSrcDir[RTUtf16Len(pwszzSrcDir) + 1] == '\0'); + + SHFILEOPSTRUCTW s = {0}; + s.hwnd = NULL; + s.wFunc = FO_COPY; + s.pTo = pwszzDstDir; + s.pFrom = pwszzSrcDir; + s.fFlags = FOF_SILENT + | FOF_NOCONFIRMATION + | FOF_NOCONFIRMMKDIR + | FOF_NOERRORUI; + + logStringF(hModule, "CopyDir: pwszzDstDir=%ls, pwszzSrcDir=%ls", pwszzDstDir, pwszzSrcDir); + int r = SHFileOperationW(&s); + if (r == 0) + return ERROR_SUCCESS; + logStringF(hModule, "CopyDir: Copy operation returned status %#x", r); + return ERROR_GEN_FAILURE; +} + +/** + * @note The directory string must have two zero terminators! + */ +static UINT RemoveDir(MSIHANDLE hModule, const WCHAR *pwszzDstDir) +{ + NonStandardAssert(pwszzDstDir[RTUtf16Len(pwszzDstDir) + 1] == '\0'); + + SHFILEOPSTRUCTW s = {0}; + s.hwnd = NULL; + s.wFunc = FO_DELETE; + s.pFrom = pwszzDstDir; + s.fFlags = FOF_SILENT + | FOF_NOCONFIRMATION + | FOF_NOCONFIRMMKDIR + | FOF_NOERRORUI; + + logStringF(hModule, "RemoveDir: pwszzDstDir=%ls", pwszzDstDir); + int r = SHFileOperationW(&s); + if (r == 0) + return ERROR_SUCCESS; + logStringF(hModule, "RemoveDir: Remove operation returned status %#x", r); + return ERROR_GEN_FAILURE; +} + +/** + * @note Both paths strings must have an extra terminator. + */ +static UINT RenameDir(MSIHANDLE hModule, const WCHAR *pwszzDstDir, const WCHAR *pwszzSrcDir) +{ + NonStandardAssert(pwszzDstDir[RTUtf16Len(pwszzDstDir) + 1] == '\0'); + NonStandardAssert(pwszzSrcDir[RTUtf16Len(pwszzSrcDir) + 1] == '\0'); + + SHFILEOPSTRUCTW s = {0}; + s.hwnd = NULL; + s.wFunc = FO_RENAME; + s.pTo = pwszzDstDir; + s.pFrom = pwszzSrcDir; + s.fFlags = FOF_SILENT + | FOF_NOCONFIRMATION + | FOF_NOCONFIRMMKDIR + | FOF_NOERRORUI; + + logStringF(hModule, "RenameDir: pwszzDstDir=%ls, pwszzSrcDir=%ls", pwszzDstDir, pwszzSrcDir); + int r = SHFileOperationW(&s); + if (r == 0) + return ERROR_SUCCESS; + logStringF(hModule, "RenameDir: Rename operation returned status %#x", r); + return ERROR_GEN_FAILURE; +} + +/** RTPathAppend-like function. */ +static UINT AppendToPath(wchar_t *pwszPath, size_t cwcPath, wchar_t *pwszAppend, bool fDoubleTerm = false) +{ + size_t cwcCurPath = RTUtf16Len(pwszPath); + size_t cwcSlash = cwcCurPath > 1 && RTPATH_IS_SLASH(pwszPath[cwcCurPath - 1]) ? 0 : 1; + while (RTPATH_IS_SLASH(*pwszAppend)) + pwszAppend++; + size_t cwcAppend = RTUtf16Len(pwszAppend); + if (cwcCurPath + cwcCurPath + cwcAppend + fDoubleTerm < cwcPath) + { + if (cwcSlash) + pwszPath[cwcCurPath++] = '\\'; + memcpy(&pwszPath[cwcCurPath], pwszAppend, (cwcAppend + 1) * sizeof(wchar_t)); + if (fDoubleTerm) + pwszPath[cwcCurPath + cwcAppend + 1] = '\0'; + return ERROR_SUCCESS; + } + return ERROR_BUFFER_OVERFLOW; +} + +/** RTPathJoin-like function. */ +static UINT JoinPaths(wchar_t *pwszPath, size_t cwcPath, wchar_t *pwszPath1, wchar_t *pwszAppend, bool fDoubleTerm = false) +{ + size_t cwcCurPath = RTUtf16Len(pwszPath1); + if (cwcCurPath < cwcPath) + { + memcpy(pwszPath, pwszPath1, (cwcCurPath + 1) * sizeof(wchar_t)); + return AppendToPath(pwszPath, cwcPath, pwszAppend, fDoubleTerm); + } + return ERROR_BUFFER_OVERFLOW; +} + +UINT __stdcall UninstallBranding(MSIHANDLE hModule) +{ + logStringF(hModule, "UninstallBranding: Handling branding file ..."); + + WCHAR wszPath[RTPATH_MAX]; + UINT rc = VBoxGetMsiProp(hModule, L"CustomActionData", wszPath, RT_ELEMENTS(wszPath)); + if (rc == ERROR_SUCCESS) + { + size_t const cwcPath = RTUtf16Len(wszPath); + rc = AppendToPath(wszPath, RTPATH_MAX, L"custom", true /*fDoubleTerm*/); + if (rc == ERROR_SUCCESS) + rc = RemoveDir(hModule, wszPath); + + /* Check for .custom directory from a failed install and remove it. */ + wszPath[cwcPath] = '\0'; + rc = AppendToPath(wszPath, RTPATH_MAX, L".custom", true /*fDoubleTerm*/); + if (rc == ERROR_SUCCESS) + rc = RemoveDir(hModule, wszPath); + } + + logStringF(hModule, "UninstallBranding: Handling done. (rc=%u (ignored))", rc); + return ERROR_SUCCESS; /* Do not fail here. */ +} + +UINT __stdcall InstallBranding(MSIHANDLE hModule) +{ + logStringF(hModule, "InstallBranding: Handling branding file ..."); + + /* + * Get the paths. + */ + wchar_t wszSrcPath[RTPATH_MAX]; + UINT rc = VBoxGetMsiProp(hModule, L"SOURCEDIR", wszSrcPath, RT_ELEMENTS(wszSrcPath)); + if (rc == ERROR_SUCCESS) + { + wchar_t wszDstPath[RTPATH_MAX]; + rc = VBoxGetMsiProp(hModule, L"CustomActionData", wszDstPath, RT_ELEMENTS(wszDstPath) - 1); + if (rc == ERROR_SUCCESS) + { + /* + * First we copy the src\.custom dir to the target. + */ + rc = AppendToPath(wszSrcPath, RT_ELEMENTS(wszSrcPath) - 1, L".custom", true /*fDoubleTerm*/); + if (rc == ERROR_SUCCESS) + { + rc = CopyDir(hModule, wszDstPath, wszSrcPath); + if (rc == ERROR_SUCCESS) + { + /* + * The rename the '.custom' directory we now got in the target area to 'custom'. + */ + rc = JoinPaths(wszSrcPath, RT_ELEMENTS(wszSrcPath), wszDstPath, L".custom", true /*fDoubleTerm*/); + if (rc == ERROR_SUCCESS) + { + rc = AppendToPath(wszDstPath, RT_ELEMENTS(wszDstPath), L"custom", true /*fDoubleTerm*/); + if (rc == ERROR_SUCCESS) + rc = RenameDir(hModule, wszDstPath, wszSrcPath); + } + } + } + } + } + + logStringF(hModule, "InstallBranding: Handling done. (rc=%u (ignored))", rc); + return ERROR_SUCCESS; /* Do not fail here. */ +} + +#ifdef VBOX_WITH_NETFLT + +/** @todo should use some real VBox app name */ +#define VBOX_NETCFG_APP_NAME L"VirtualBox Installer" +#define VBOX_NETCFG_MAX_RETRIES 10 +#define NETFLT_PT_INF_REL_PATH L"VBoxNetFlt.inf" +#define NETFLT_MP_INF_REL_PATH L"VBoxNetFltM.inf" +#define NETFLT_ID L"sun_VBoxNetFlt" /** @todo Needs to be changed (?). */ +#define NETADP_ID L"sun_VBoxNetAdp" /** @todo Needs to be changed (?). */ + +#define NETLWF_INF_NAME L"VBoxNetLwf.inf" + +static MSIHANDLE g_hCurrentModule = NULL; + +static UINT _uninstallNetFlt(MSIHANDLE hModule); +static UINT _uninstallNetLwf(MSIHANDLE hModule); + +static VOID vboxDrvLoggerCallback(VBOXDRVCFG_LOG_SEVERITY_T enmSeverity, char *pszMsg, void *pvContext) +{ + RT_NOREF1(pvContext); + switch (enmSeverity) + { + case VBOXDRVCFG_LOG_SEVERITY_FLOW: + case VBOXDRVCFG_LOG_SEVERITY_REGULAR: + break; + case VBOXDRVCFG_LOG_SEVERITY_REL: + if (g_hCurrentModule) + logStringF(g_hCurrentModule, "%s", pszMsg); + break; + default: + break; + } +} + +static DECLCALLBACK(void) netCfgLoggerCallback(const char *pszString) +{ + if (g_hCurrentModule) + logStringF(g_hCurrentModule, "%s", pszString); +} + +static VOID netCfgLoggerDisable() +{ + if (g_hCurrentModule) + { + VBoxNetCfgWinSetLogging(NULL); + g_hCurrentModule = NULL; + } +} + +static VOID netCfgLoggerEnable(MSIHANDLE hModule) +{ + NonStandardAssert(hModule); + + if (g_hCurrentModule) + netCfgLoggerDisable(); + + g_hCurrentModule = hModule; + + VBoxNetCfgWinSetLogging(netCfgLoggerCallback); + /* uncomment next line if you want to add logging information from VBoxDrvCfg.cpp */ +// VBoxDrvCfgLoggerSet(vboxDrvLoggerCallback, NULL); +} + +static UINT errorConvertFromHResult(MSIHANDLE hModule, HRESULT hr) +{ + UINT uRet; + switch (hr) + { + case S_OK: + uRet = ERROR_SUCCESS; + break; + + case NETCFG_S_REBOOT: + { + logStringF(hModule, "Reboot required, setting REBOOT property to \"force\""); + HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); + if (hr2 != ERROR_SUCCESS) + logStringF(hModule, "Failed to set REBOOT property, error = %#x", hr2); + uRet = ERROR_SUCCESS; /* Never fail here. */ + break; + } + + default: + logStringF(hModule, "Converting unhandled HRESULT (%#x) to ERROR_GEN_FAILURE", hr); + uRet = ERROR_GEN_FAILURE; + } + return uRet; +} + +static MSIHANDLE createNetCfgLockedMsgRecord(MSIHANDLE hModule) +{ + MSIHANDLE hRecord = MsiCreateRecord(2); + if (hRecord) + { + UINT uErr = MsiRecordSetInteger(hRecord, 1, 25001); + if (uErr != ERROR_SUCCESS) + { + logStringF(hModule, "createNetCfgLockedMsgRecord: MsiRecordSetInteger failed, error = %#x", uErr); + MsiCloseHandle(hRecord); + hRecord = NULL; + } + } + else + logStringF(hModule, "createNetCfgLockedMsgRecord: Failed to create a record"); + + return hRecord; +} + +static UINT doNetCfgInit(MSIHANDLE hModule, INetCfg **ppnc, BOOL bWrite) +{ + MSIHANDLE hMsg = NULL; + UINT uErr = ERROR_GEN_FAILURE; + int MsgResult; + int cRetries = 0; + + do + { + LPWSTR lpszLockedBy; + HRESULT hr = VBoxNetCfgWinQueryINetCfg(ppnc, bWrite, VBOX_NETCFG_APP_NAME, 10000, &lpszLockedBy); + if (hr != NETCFG_E_NO_WRITE_LOCK) + { + if (FAILED(hr)) + logStringF(hModule, "doNetCfgInit: VBoxNetCfgWinQueryINetCfg failed, error = %#x", hr); + uErr = errorConvertFromHResult(hModule, hr); + break; + } + + /* hr == NETCFG_E_NO_WRITE_LOCK */ + + if (!lpszLockedBy) + { + logStringF(hModule, "doNetCfgInit: lpszLockedBy == NULL, breaking"); + break; + } + + /* on vista the 6to4svc.dll periodically maintains the lock for some reason, + * if this is the case, increase the wait period by retrying multiple times + * NOTE: we could alternatively increase the wait timeout, + * however it seems unneeded for most cases, e.g. in case some network connection property + * dialog is opened, it would be better to post a notification to the user as soon as possible + * rather than waiting for a longer period of time before displaying it */ + if ( cRetries < VBOX_NETCFG_MAX_RETRIES + && RTUtf16ICmpAscii(lpszLockedBy, "6to4svc.dll") == 0) + { + cRetries++; + logStringF(hModule, "doNetCfgInit: lpszLockedBy is 6to4svc.dll, retrying %d out of %d", cRetries, VBOX_NETCFG_MAX_RETRIES); + MsgResult = IDRETRY; + } + else + { + if (!hMsg) + { + hMsg = createNetCfgLockedMsgRecord(hModule); + if (!hMsg) + { + logStringF(hModule, "doNetCfgInit: Failed to create a message record, breaking"); + CoTaskMemFree(lpszLockedBy); + break; + } + } + + UINT rTmp = MsiRecordSetStringW(hMsg, 2, lpszLockedBy); + NonStandardAssert(rTmp == ERROR_SUCCESS); + if (rTmp != ERROR_SUCCESS) + { + logStringF(hModule, "doNetCfgInit: MsiRecordSetStringW failed, error = #%x", rTmp); + CoTaskMemFree(lpszLockedBy); + break; + } + + MsgResult = MsiProcessMessage(hModule, (INSTALLMESSAGE)(INSTALLMESSAGE_USER | MB_RETRYCANCEL), hMsg); + NonStandardAssert(MsgResult == IDRETRY || MsgResult == IDCANCEL); + logStringF(hModule, "doNetCfgInit: MsiProcessMessage returned (%#x)", MsgResult); + } + CoTaskMemFree(lpszLockedBy); + } while(MsgResult == IDRETRY); + + if (hMsg) + MsiCloseHandle(hMsg); + + return uErr; +} + +static UINT vboxNetFltQueryInfArray(MSIHANDLE hModule, OUT LPWSTR pwszPtInf, DWORD cwcPtInf, + OUT LPWSTR pwszMpInf, DWORD cwcMpInf) +{ + DWORD cwcEffBuf = cwcPtInf - RT_MAX(sizeof(NETFLT_PT_INF_REL_PATH), sizeof(NETFLT_MP_INF_REL_PATH)) / sizeof(WCHAR); + UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", pwszPtInf, &cwcEffBuf); + if ( uErr == ERROR_SUCCESS + && cwcEffBuf > 0) + { + int vrc = RTUtf16Copy(pwszMpInf, cwcMpInf, pwszPtInf); + AssertRCReturn(vrc, ERROR_BUFFER_OVERFLOW); + + vrc = RTUtf16Cat(pwszPtInf, cwcPtInf, NETFLT_PT_INF_REL_PATH); + AssertRCReturn(vrc, ERROR_BUFFER_OVERFLOW); + logStringF(hModule, "vboxNetFltQueryInfArray: INF 1: %ls", pwszPtInf); + + vrc = RTUtf16Cat(pwszMpInf, cwcMpInf, NETFLT_MP_INF_REL_PATH); + AssertRCReturn(vrc, ERROR_BUFFER_OVERFLOW); + logStringF(hModule, "vboxNetFltQueryInfArray: INF 2: %ls", pwszMpInf); + } + else if (uErr != ERROR_SUCCESS) + logStringF(hModule, "vboxNetFltQueryInfArray: MsiGetPropertyW failed, error = %#x", uErr); + else + { + logStringF(hModule, "vboxNetFltQueryInfArray: Empty installation directory"); + uErr = ERROR_GEN_FAILURE; + } + + return uErr; +} + +#endif /*VBOX_WITH_NETFLT*/ + +/*static*/ UINT _uninstallNetFlt(MSIHANDLE hModule) +{ +#ifdef VBOX_WITH_NETFLT + INetCfg *pNetCfg; + UINT uErr; + + netCfgLoggerEnable(hModule); + + BOOL bOldIntMode = SetupSetNonInteractiveMode(FALSE); + + __try + { + logStringF(hModule, "Uninstalling NetFlt"); + + uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); + if (uErr == ERROR_SUCCESS) + { + HRESULT hr = VBoxNetCfgWinNetFltUninstall(pNetCfg); + if (hr != S_OK) + logStringF(hModule, "UninstallNetFlt: VBoxNetCfgWinUninstallComponent failed, error = %#x", hr); + + uErr = errorConvertFromHResult(hModule, hr); + + VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); + + logStringF(hModule, "Uninstalling NetFlt done, error = %#x", uErr); + } + else + logStringF(hModule, "UninstallNetFlt: doNetCfgInit failed, error = %#x", uErr); + } + __finally + { + if (bOldIntMode) + { + /* The prev mode != FALSE, i.e. non-interactive. */ + SetupSetNonInteractiveMode(bOldIntMode); + } + netCfgLoggerDisable(); + } +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the uninstall even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall UninstallNetFlt(MSIHANDLE hModule) +{ + (void)_uninstallNetLwf(hModule); + return _uninstallNetFlt(hModule); +} + +static UINT _installNetFlt(MSIHANDLE hModule) +{ +#ifdef VBOX_WITH_NETFLT + UINT uErr; + INetCfg *pNetCfg; + + netCfgLoggerEnable(hModule); + + BOOL bOldIntMode = SetupSetNonInteractiveMode(FALSE); + + __try + { + + logStringF(hModule, "InstallNetFlt: Installing NetFlt"); + + uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); + if (uErr == ERROR_SUCCESS) + { + WCHAR wszPtInf[MAX_PATH]; + WCHAR wszMpInf[MAX_PATH]; + uErr = vboxNetFltQueryInfArray(hModule, wszPtInf, RT_ELEMENTS(wszPtInf), wszMpInf, RT_ELEMENTS(wszMpInf)); + if (uErr == ERROR_SUCCESS) + { + LPCWSTR const apwszInfs[] = { wszPtInf, wszMpInf }; + HRESULT hr = VBoxNetCfgWinNetFltInstall(pNetCfg, &apwszInfs[0], RT_ELEMENTS(apwszInfs)); + if (FAILED(hr)) + logStringF(hModule, "InstallNetFlt: VBoxNetCfgWinNetFltInstall failed, error = %#x", hr); + + uErr = errorConvertFromHResult(hModule, hr); + } + else + logStringF(hModule, "InstallNetFlt: vboxNetFltQueryInfArray failed, error = %#x", uErr); + + VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); + + logStringF(hModule, "InstallNetFlt: Done"); + } + else + logStringF(hModule, "InstallNetFlt: doNetCfgInit failed, error = %#x", uErr); + } + __finally + { + if (bOldIntMode) + { + /* The prev mode != FALSE, i.e. non-interactive. */ + SetupSetNonInteractiveMode(bOldIntMode); + } + netCfgLoggerDisable(); + } +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the install even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall InstallNetFlt(MSIHANDLE hModule) +{ + (void)_uninstallNetLwf(hModule); + return _installNetFlt(hModule); +} + + +/*static*/ UINT _uninstallNetLwf(MSIHANDLE hModule) +{ +#ifdef VBOX_WITH_NETFLT + INetCfg *pNetCfg; + UINT uErr; + + netCfgLoggerEnable(hModule); + + BOOL bOldIntMode = SetupSetNonInteractiveMode(FALSE); + + __try + { + logStringF(hModule, "Uninstalling NetLwf"); + + uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); + if (uErr == ERROR_SUCCESS) + { + HRESULT hr = VBoxNetCfgWinNetLwfUninstall(pNetCfg); + if (hr != S_OK) + logStringF(hModule, "UninstallNetLwf: VBoxNetCfgWinUninstallComponent failed, error = %#x", hr); + + uErr = errorConvertFromHResult(hModule, hr); + + VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); + + logStringF(hModule, "Uninstalling NetLwf done, error = %#x", uErr); + } + else + logStringF(hModule, "UninstallNetLwf: doNetCfgInit failed, error = %#x", uErr); + } + __finally + { + if (bOldIntMode) + { + /* The prev mode != FALSE, i.e. non-interactive. */ + SetupSetNonInteractiveMode(bOldIntMode); + } + netCfgLoggerDisable(); + } +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the uninstall even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall UninstallNetLwf(MSIHANDLE hModule) +{ + (void)_uninstallNetFlt(hModule); + return _uninstallNetLwf(hModule); +} + +static UINT _installNetLwf(MSIHANDLE hModule) +{ +#ifdef VBOX_WITH_NETFLT + UINT uErr; + INetCfg *pNetCfg; + + netCfgLoggerEnable(hModule); + + BOOL bOldIntMode = SetupSetNonInteractiveMode(FALSE); + + __try + { + + logStringF(hModule, "InstallNetLwf: Installing NetLwf"); + + uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); + if (uErr == ERROR_SUCCESS) + { + WCHAR wszInf[MAX_PATH]; + DWORD cwcInf = RT_ELEMENTS(wszInf) - sizeof(NETLWF_INF_NAME) - 1; + uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszInf, &cwcInf); + if (uErr == ERROR_SUCCESS) + { + if (cwcInf) + { + if (wszInf[cwcInf - 1] != L'\\') + { + wszInf[cwcInf++] = L'\\'; + wszInf[cwcInf] = L'\0'; + } + + int vrc = RTUtf16Cat(wszInf, RT_ELEMENTS(wszInf), NETLWF_INF_NAME); + AssertRC(vrc); + + HRESULT hr = VBoxNetCfgWinNetLwfInstall(pNetCfg, wszInf); + if (FAILED(hr)) + logStringF(hModule, "InstallNetLwf: VBoxNetCfgWinNetLwfInstall failed, error = %#x", hr); + + uErr = errorConvertFromHResult(hModule, hr); + } + else + { + logStringF(hModule, "vboxNetFltQueryInfArray: Empty installation directory"); + uErr = ERROR_GEN_FAILURE; + } + } + else + logStringF(hModule, "vboxNetFltQueryInfArray: MsiGetPropertyW failed, error = %#x", uErr); + + VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); + + logStringF(hModule, "InstallNetLwf: Done"); + } + else + logStringF(hModule, "InstallNetLwf: doNetCfgInit failed, error = %#x", uErr); + } + __finally + { + if (bOldIntMode) + { + /* The prev mode != FALSE, i.e. non-interactive. */ + SetupSetNonInteractiveMode(bOldIntMode); + } + netCfgLoggerDisable(); + } +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the install even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall InstallNetLwf(MSIHANDLE hModule) +{ + (void)_uninstallNetFlt(hModule); + return _installNetLwf(hModule); +} + + +#if 0 +static BOOL RenameHostOnlyConnectionsCallback(HDEVINFO hDevInfo, PSP_DEVINFO_DATA pDev, PVOID pContext) +{ + WCHAR DevName[256]; + DWORD winEr; + + if (SetupDiGetDeviceRegistryPropertyW(hDevInfo, pDev, + SPDRP_FRIENDLYNAME , /* IN DWORD Property,*/ + NULL, /*OUT PDWORD PropertyRegDataType, OPTIONAL*/ + (PBYTE)DevName, /*OUT PBYTE PropertyBuffer,*/ + sizeof(DevName), /* IN DWORD PropertyBufferSize,*/ + NULL /*OUT PDWORD RequiredSize OPTIONAL*/ + )) + { + HKEY hKey = SetupDiOpenDevRegKey(hDevInfo, pDev, + DICS_FLAG_GLOBAL, /* IN DWORD Scope,*/ + 0, /*IN DWORD HwProfile, */ + DIREG_DRV, /* IN DWORD KeyType, */ + KEY_READ /*IN REGSAM samDesired*/ + ); + NonStandardAssert(hKey != INVALID_HANDLE_VALUE); + if (hKey != INVALID_HANDLE_VALUE) + { + WCHAR guid[50]; + DWORD cbGuid=sizeof(guid); + winEr = RegQueryValueExW(hKey, + L"NetCfgInstanceId", /*__in_opt LPCTSTR lpValueName,*/ + NULL, /*__reserved LPDWORD lpReserved,*/ + NULL, /*__out_opt LPDWORD lpType,*/ + (LPBYTE)guid, /*__out_opt LPBYTE lpData,*/ + &cbGuid /*guid__inout_opt LPDWORD lpcbData*/ + ); + NonStandardAssert(winEr == ERROR_SUCCESS); + if (winEr == ERROR_SUCCESS) + { + WCHAR ConnectoinName[128]; + ULONG cbName = sizeof(ConnectoinName); + + HRESULT hr = VBoxNetCfgWinGenHostonlyConnectionName(DevName, ConnectoinName, &cbName); + NonStandardAssert(hr == S_OK); + if (SUCCEEDED(hr)) + { + hr = VBoxNetCfgWinRenameConnection(guid, ConnectoinName); + NonStandardAssert(hr == S_OK); + } + } + } + RegCloseKey(hKey); + } + else + { + NonStandardAssert(0); + } + + return TRUE; +} +#endif + +static UINT _createHostOnlyInterface(MSIHANDLE hModule, LPCWSTR pwszId, LPCWSTR pwszInfName) +{ +#ifdef VBOX_WITH_NETFLT + netCfgLoggerEnable(hModule); + + BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); + + logStringF(hModule, "CreateHostOnlyInterface: Creating host-only interface"); + + HRESULT hr = E_FAIL; + GUID guid; + WCHAR wszMpInf[MAX_PATH]; + DWORD cwcMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)RTUtf16Len(pwszInfName) - 1 - 1; + LPCWSTR pwszInfPath = NULL; + bool fIsFile = false; + UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cwcMpInf); + if (uErr == ERROR_SUCCESS) + { + if (cwcMpInf) + { + logStringF(hModule, "CreateHostOnlyInterface: NetAdpDir property = %ls", wszMpInf); + if (wszMpInf[cwcMpInf - 1] != L'\\') + { + wszMpInf[cwcMpInf++] = L'\\'; + wszMpInf[cwcMpInf] = L'\0'; + } + + int vrc = RTUtf16Cat(wszMpInf, RT_ELEMENTS(wszMpInf), pwszInfName); + AssertRC(vrc); + + pwszInfPath = wszMpInf; + fIsFile = true; + + logStringF(hModule, "CreateHostOnlyInterface: Resulting INF path = %ls", pwszInfPath); + } + else + logStringF(hModule, "CreateHostOnlyInterface: VBox installation path is empty"); + } + else + logStringF(hModule, "CreateHostOnlyInterface: Unable to retrieve VBox installation path, error = %#x", uErr); + + /* Make sure the inf file is installed. */ + if (pwszInfPath != NULL && fIsFile) + { + logStringF(hModule, "CreateHostOnlyInterface: Calling VBoxDrvCfgInfInstall(%ls)", pwszInfPath); + hr = VBoxDrvCfgInfInstall(pwszInfPath); + logStringF(hModule, "CreateHostOnlyInterface: VBoxDrvCfgInfInstall returns %#x", hr); + if (FAILED(hr)) + logStringF(hModule, "CreateHostOnlyInterface: Failed to install INF file, error = %#x", hr); + } + + if (SUCCEEDED(hr)) + { + //first, try to update Host Only Network Interface + BOOL fRebootRequired = FALSE; + hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(pwszInfPath, &fRebootRequired, pwszId); + if (SUCCEEDED(hr)) + { + if (fRebootRequired) + { + logStringF(hModule, "CreateHostOnlyInterface: Reboot required for update, setting REBOOT property to force"); + HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); + if (hr2 != ERROR_SUCCESS) + logStringF(hModule, "CreateHostOnlyInterface: Failed to set REBOOT property for update, error = %#x", hr2); + } + } + else + { + //in fail case call CreateHostOnlyInterface + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinUpdateHostOnlyNetworkInterface failed, hr = %#x", hr); + logStringF(hModule, "CreateHostOnlyInterface: calling VBoxNetCfgWinCreateHostOnlyNetworkInterface"); +#ifdef VBOXNETCFG_DELAYEDRENAME + BSTR devId; + hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, NULL, &guid, &devId, NULL); +#else /* !VBOXNETCFG_DELAYEDRENAME */ + hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, fIsFile, NULL, &guid, NULL, NULL); +#endif /* !VBOXNETCFG_DELAYEDRENAME */ + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface returns %#x", hr); + if (SUCCEEDED(hr)) + { + ULONG ip = inet_addr("192.168.56.1"); + ULONG mask = inet_addr("255.255.255.0"); + logStringF(hModule, "CreateHostOnlyInterface: calling VBoxNetCfgWinEnableStaticIpConfig"); + hr = VBoxNetCfgWinEnableStaticIpConfig(&guid, ip, mask); + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinEnableStaticIpConfig returns %#x", hr); + if (FAILED(hr)) + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinEnableStaticIpConfig failed, error = %#x", hr); +#ifdef VBOXNETCFG_DELAYEDRENAME + hr = VBoxNetCfgWinRenameHostOnlyConnection(&guid, devId, NULL); + if (FAILED(hr)) + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinRenameHostOnlyConnection failed, error = %#x", hr); + SysFreeString(devId); +#endif /* VBOXNETCFG_DELAYEDRENAME */ + } + else + logStringF(hModule, "CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface failed, error = %#x", hr); + } + } + + if (SUCCEEDED(hr)) + logStringF(hModule, "CreateHostOnlyInterface: Creating host-only interface done"); + + /* Restore original setup mode. */ + logStringF(hModule, "CreateHostOnlyInterface: Almost done..."); + if (fSetupModeInteractive) + SetupSetNonInteractiveMode(fSetupModeInteractive); + + netCfgLoggerDisable(); + +#endif /* VBOX_WITH_NETFLT */ + + logStringF(hModule, "CreateHostOnlyInterface: Returns success (ignoring all failures)"); + /* Never fail the install even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall CreateHostOnlyInterface(MSIHANDLE hModule) +{ + return _createHostOnlyInterface(hModule, NETADP_ID, L"VBoxNetAdp.inf"); +} + +UINT __stdcall Ndis6CreateHostOnlyInterface(MSIHANDLE hModule) +{ +#if 0 /* Trick for allowing the debugger to be attached. */ + for (unsigned i = 0; i < 128 && !IsDebuggerPresent(); i++) + { + logStringF(hModule, "Waiting for debugger to attach: windbg -p %u", GetCurrentProcessId()); + Sleep(1001); + } + Sleep(1002); + __debugbreak(); +#endif + return _createHostOnlyInterface(hModule, NETADP_ID, L"VBoxNetAdp6.inf"); +} + +static UINT _removeHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId) +{ +#ifdef VBOX_WITH_NETFLT + netCfgLoggerEnable(hModule); + + logStringF(hModule, "RemoveHostOnlyInterfaces: Removing all host-only interfaces"); + + BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); + + HRESULT hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(pwszId); + if (SUCCEEDED(hr)) + { + hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, L"Net", pwszId, SUOI_FORCEDELETE/* could be SUOI_FORCEDELETE */); + if (FAILED(hr)) + logStringF(hModule, "RemoveHostOnlyInterfaces: NetAdp uninstalled successfully, but failed to remove INF files"); + else + logStringF(hModule, "RemoveHostOnlyInterfaces: NetAdp uninstalled successfully"); + } + else + logStringF(hModule, "RemoveHostOnlyInterfaces: NetAdp uninstall failed, hr = %#x", hr); + + /* Restore original setup mode. */ + if (fSetupModeInteractive) + SetupSetNonInteractiveMode(fSetupModeInteractive); + + netCfgLoggerDisable(); +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the uninstall even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall RemoveHostOnlyInterfaces(MSIHANDLE hModule) +{ + return _removeHostOnlyInterfaces(hModule, NETADP_ID); +} + +static UINT _stopHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszId) +{ +#ifdef VBOX_WITH_NETFLT + netCfgLoggerEnable(hModule); + + logStringF(hModule, "StopHostOnlyInterfaces: Stopping all host-only interfaces"); + + BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); + + HRESULT hr = VBoxNetCfgWinPropChangeAllNetDevicesOfId(pwszId, VBOXNECTFGWINPROPCHANGE_TYPE_DISABLE); + if (SUCCEEDED(hr)) + logStringF(hModule, "StopHostOnlyInterfaces: Disabling host interfaces was successful, hr = %#x", hr); + else + logStringF(hModule, "StopHostOnlyInterfaces: Disabling host interfaces failed, hr = %#x", hr); + + /* Restore original setup mode. */ + if (fSetupModeInteractive) + SetupSetNonInteractiveMode(fSetupModeInteractive); + + netCfgLoggerDisable(); +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the uninstall even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall StopHostOnlyInterfaces(MSIHANDLE hModule) +{ + return _stopHostOnlyInterfaces(hModule, NETADP_ID); +} + +static UINT _updateHostOnlyInterfaces(MSIHANDLE hModule, LPCWSTR pwszInfName, LPCWSTR pwszId) +{ +#ifdef VBOX_WITH_NETFLT + netCfgLoggerEnable(hModule); + + logStringF(hModule, "UpdateHostOnlyInterfaces: Updating all host-only interfaces"); + + BOOL fSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); + + WCHAR wszMpInf[MAX_PATH]; + DWORD cwcMpInf = RT_ELEMENTS(wszMpInf) - (DWORD)RTUtf16Len(pwszInfName) - 1 - 1; + LPCWSTR pwszInfPath = NULL; + bool fIsFile = false; + UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cwcMpInf); + if (uErr == ERROR_SUCCESS) + { + if (cwcMpInf) + { + logStringF(hModule, "UpdateHostOnlyInterfaces: NetAdpDir property = %ls", wszMpInf); + if (wszMpInf[cwcMpInf - 1] != L'\\') + { + wszMpInf[cwcMpInf++] = L'\\'; + wszMpInf[cwcMpInf] = L'\0'; + } + + int vrc = RTUtf16Cat(wszMpInf, RT_ELEMENTS(wszMpInf), pwszInfName); + AssertRC(vrc); + pwszInfPath = wszMpInf; + fIsFile = true; + + logStringF(hModule, "UpdateHostOnlyInterfaces: Resulting INF path = %ls", pwszInfPath); + + DWORD attrFile = GetFileAttributesW(pwszInfPath); + if (attrFile == INVALID_FILE_ATTRIBUTES) + { + DWORD dwErr = GetLastError(); + logStringF(hModule, "UpdateHostOnlyInterfaces: File \"%ls\" not found, dwErr=%ld", pwszInfPath, dwErr); + } + else + { + logStringF(hModule, "UpdateHostOnlyInterfaces: File \"%ls\" exists", pwszInfPath); + + BOOL fRebootRequired = FALSE; + HRESULT hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(pwszInfPath, &fRebootRequired, pwszId); + if (SUCCEEDED(hr)) + { + if (fRebootRequired) + { + logStringF(hModule, "UpdateHostOnlyInterfaces: Reboot required, setting REBOOT property to force"); + HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); + if (hr2 != ERROR_SUCCESS) + logStringF(hModule, "UpdateHostOnlyInterfaces: Failed to set REBOOT property, error = %#x", hr2); + } + } + else + logStringF(hModule, "UpdateHostOnlyInterfaces: VBoxNetCfgWinUpdateHostOnlyNetworkInterface failed, hr = %#x", hr); + } + } + else + logStringF(hModule, "UpdateHostOnlyInterfaces: VBox installation path is empty"); + } + else + logStringF(hModule, "UpdateHostOnlyInterfaces: Unable to retrieve VBox installation path, error = %#x", uErr); + + /* Restore original setup mode. */ + if (fSetupModeInteractive) + SetupSetNonInteractiveMode(fSetupModeInteractive); + + netCfgLoggerDisable(); +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the update even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall UpdateHostOnlyInterfaces(MSIHANDLE hModule) +{ + return _updateHostOnlyInterfaces(hModule, L"VBoxNetAdp.inf", NETADP_ID); +} + +UINT __stdcall Ndis6UpdateHostOnlyInterfaces(MSIHANDLE hModule) +{ + return _updateHostOnlyInterfaces(hModule, L"VBoxNetAdp6.inf", NETADP_ID); +} + +static UINT _uninstallNetAdp(MSIHANDLE hModule, LPCWSTR pwszId) +{ +#ifdef VBOX_WITH_NETFLT + INetCfg *pNetCfg; + UINT uErr; + + netCfgLoggerEnable(hModule); + + BOOL bOldIntMode = SetupSetNonInteractiveMode(FALSE); + + __try + { + logStringF(hModule, "Uninstalling NetAdp"); + + uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); + if (uErr == ERROR_SUCCESS) + { + HRESULT hr = VBoxNetCfgWinNetAdpUninstall(pNetCfg, pwszId); + if (hr != S_OK) + logStringF(hModule, "UninstallNetAdp: VBoxNetCfgWinUninstallComponent failed, error = %#x", hr); + + uErr = errorConvertFromHResult(hModule, hr); + + VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); + + logStringF(hModule, "Uninstalling NetAdp done, error = %#x", uErr); + } + else + logStringF(hModule, "UninstallNetAdp: doNetCfgInit failed, error = %#x", uErr); + } + __finally + { + if (bOldIntMode) + { + /* The prev mode != FALSE, i.e. non-interactive. */ + SetupSetNonInteractiveMode(bOldIntMode); + } + netCfgLoggerDisable(); + } +#endif /* VBOX_WITH_NETFLT */ + + /* Never fail the uninstall even if we did not succeed. */ + return ERROR_SUCCESS; +} + +UINT __stdcall UninstallNetAdp(MSIHANDLE hModule) +{ + return _uninstallNetAdp(hModule, NETADP_ID); +} + +static bool isTAPDevice(const WCHAR *pwszGUID) +{ + HKEY hNetcard; + bool bIsTapDevice = false; + LONG lStatus = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}", + 0, KEY_READ, &hNetcard); + if (lStatus != ERROR_SUCCESS) + return false; + + int i = 0; + for (;;) + { + WCHAR wszEnumName[256]; + WCHAR wszNetCfgInstanceId[256]; + DWORD dwKeyType; + HKEY hNetCardGUID; + + DWORD dwLen = sizeof(wszEnumName); + lStatus = RegEnumKeyExW(hNetcard, i, wszEnumName, &dwLen, NULL, NULL, NULL, NULL); + if (lStatus != ERROR_SUCCESS) + break; + + lStatus = RegOpenKeyExW(hNetcard, wszEnumName, 0, KEY_READ, &hNetCardGUID); + if (lStatus == ERROR_SUCCESS) + { + dwLen = sizeof(wszNetCfgInstanceId); + lStatus = RegQueryValueExW(hNetCardGUID, L"NetCfgInstanceId", NULL, &dwKeyType, (LPBYTE)wszNetCfgInstanceId, &dwLen); + if ( lStatus == ERROR_SUCCESS + && dwKeyType == REG_SZ) + { + WCHAR wszNetProductName[256]; + WCHAR wszNetProviderName[256]; + + wszNetProductName[0] = 0; + dwLen = sizeof(wszNetProductName); + lStatus = RegQueryValueExW(hNetCardGUID, L"ProductName", NULL, &dwKeyType, (LPBYTE)wszNetProductName, &dwLen); + + wszNetProviderName[0] = 0; + dwLen = sizeof(wszNetProviderName); + lStatus = RegQueryValueExW(hNetCardGUID, L"ProviderName", NULL, &dwKeyType, (LPBYTE)wszNetProviderName, &dwLen); + + if ( !RTUtf16Cmp(wszNetCfgInstanceId, pwszGUID) + && !RTUtf16Cmp(wszNetProductName, L"VirtualBox TAP Adapter") + && ( (!RTUtf16Cmp(wszNetProviderName, L"innotek GmbH")) /* Legacy stuff. */ + || (!RTUtf16Cmp(wszNetProviderName, L"Sun Microsystems, Inc.")) /* Legacy stuff. */ + || (!RTUtf16Cmp(wszNetProviderName, MY_WTEXT(VBOX_VENDOR))) /* Reflects current vendor string. */ + ) + ) + { + bIsTapDevice = true; + RegCloseKey(hNetCardGUID); + break; + } + } + RegCloseKey(hNetCardGUID); + } + ++i; + } + + RegCloseKey(hNetcard); + return bIsTapDevice; +} + +/** @todo r=andy BUGBUG WTF! Why do we a) set the rc to 0 (success), and b) need this macro at all!? + * + * @todo r=bird: Because it's returning a bool, not int? The return code is + * ignored anyway, both internally in removeNetworkInterface and in it's caller. + * There is similar code in VBoxNetCfg.cpp, which is probably where it was copied from. */ +#define SetErrBreak(args) \ + if (1) { \ + rc = 0; \ + logStringF args; \ + break; \ + } else do {} while (0) + +int removeNetworkInterface(MSIHANDLE hModule, const WCHAR *pwszGUID) +{ + int rc = 1; + do /* break-loop */ + { + WCHAR wszPnPInstanceId[512] = {0}; + + /* We have to find the device instance ID through a registry search */ + + HKEY hkeyNetwork = 0; + HKEY hkeyConnection = 0; + + do /* break-loop */ + { + WCHAR wszRegLocation[256]; + RTUtf16Printf(wszRegLocation, RT_ELEMENTS(wszRegLocation), + "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%ls", pwszGUID); + LONG lrc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszRegLocation, 0, KEY_READ, &hkeyNetwork); + if (lrc != ERROR_SUCCESS || !hkeyNetwork) + SetErrBreak((hModule, "VBox HostInterfaces: Host interface network was not found in registry (%ls)! (lrc=%d) [1]", + wszRegLocation, lrc)); + + lrc = RegOpenKeyExW(hkeyNetwork, L"Connection", 0, KEY_READ, &hkeyConnection); + if (lrc != ERROR_SUCCESS || !hkeyConnection) + SetErrBreak((hModule, "VBox HostInterfaces: Host interface network was not found in registry (%ls)! (lrc=%d) [2]", + wszRegLocation, lrc)); + + DWORD len = sizeof(wszPnPInstanceId); + DWORD dwKeyType; + lrc = RegQueryValueExW(hkeyConnection, L"PnPInstanceID", NULL, &dwKeyType, (LPBYTE)&wszPnPInstanceId[0], &len); + if (lrc != ERROR_SUCCESS || dwKeyType != REG_SZ) + SetErrBreak((hModule, "VBox HostInterfaces: Host interface network was not found in registry (%ls)! (lrc=%d) [3]", + wszRegLocation, lrc)); + } + while (0); + + if (hkeyConnection) + RegCloseKey(hkeyConnection); + if (hkeyNetwork) + RegCloseKey(hkeyNetwork); + + /* + * Now we are going to enumerate all network devices and + * wait until we encounter the right device instance ID + */ + + HDEVINFO hDeviceInfo = INVALID_HANDLE_VALUE; + BOOL fResult; + + do /* break-loop */ + { + /* initialize the structure size */ + SP_DEVINFO_DATA DeviceInfoData = { sizeof(DeviceInfoData) }; + + /* copy the net class GUID */ + GUID netGuid; + memcpy(&netGuid, &GUID_DEVCLASS_NET, sizeof (GUID_DEVCLASS_NET)); + + /* return a device info set contains all installed devices of the Net class */ + hDeviceInfo = SetupDiGetClassDevs(&netGuid, NULL, NULL, DIGCF_PRESENT); + if (hDeviceInfo == INVALID_HANDLE_VALUE) + { + logStringF(hModule, "VBox HostInterfaces: SetupDiGetClassDevs failed (0x%08X)!", GetLastError()); + SetErrBreak((hModule, "VBox HostInterfaces: Uninstallation failed!")); + } + + /* enumerate the driver info list */ + BOOL fFoundDevice = FALSE; + for (DWORD index = 0;; index++) + { + fResult = SetupDiEnumDeviceInfo(hDeviceInfo, index, &DeviceInfoData); + if (!fResult) + { + if (GetLastError() == ERROR_NO_MORE_ITEMS) + break; + continue; + } + + /* try to get the hardware ID registry property */ + WCHAR *pwszDeviceHwid; + DWORD size = 0; + fResult = SetupDiGetDeviceRegistryProperty(hDeviceInfo, + &DeviceInfoData, + SPDRP_HARDWAREID, + NULL, + NULL, + 0, + &size); + if (!fResult) + { + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + continue; + + pwszDeviceHwid = (WCHAR *)RTMemAllocZ(size); + if (!pwszDeviceHwid) + continue; + + fResult = SetupDiGetDeviceRegistryProperty(hDeviceInfo, + &DeviceInfoData, + SPDRP_HARDWAREID, + NULL, + (PBYTE)pwszDeviceHwid, + size, + &size); + if (!fResult) + { + RTMemFree(pwszDeviceHwid); + continue; + } + } + else + { + /* something is wrong. This shouldn't have worked with a NULL buffer */ + continue; + } + + for (WCHAR *t = pwszDeviceHwid; + *t && t < &pwszDeviceHwid[size / sizeof(WCHAR)]; + t += RTUtf16Len(t) + 1) + { + if (RTUtf16ICmpAscii(t, "vboxtap") == 0) + { + /* get the device instance ID */ + WCHAR wszDevID[MAX_DEVICE_ID_LEN]; + if (CM_Get_Device_IDW(DeviceInfoData.DevInst, wszDevID, MAX_DEVICE_ID_LEN, 0) == CR_SUCCESS) + { + /* compare to what we determined before */ + if (RTUtf16Cmp(wszDevID, wszPnPInstanceId) == 0) + { + fFoundDevice = TRUE; + break; + } + } + } + } + + RTMemFree(pwszDeviceHwid); + + if (fFoundDevice) + break; + } + + if (fFoundDevice) + { + fResult = SetupDiSetSelectedDevice(hDeviceInfo, &DeviceInfoData); + if (!fResult) + { + logStringF(hModule, "VBox HostInterfaces: SetupDiSetSelectedDevice failed (0x%08X)!", GetLastError()); + SetErrBreak((hModule, "VBox HostInterfaces: Uninstallation failed!")); + } + + fResult = SetupDiCallClassInstaller(DIF_REMOVE, hDeviceInfo, &DeviceInfoData); + if (!fResult) + { + logStringF(hModule, "VBox HostInterfaces: SetupDiCallClassInstaller (DIF_REMOVE) failed (0x%08X)!", GetLastError()); + SetErrBreak((hModule, "VBox HostInterfaces: Uninstallation failed!")); + } + } + else + SetErrBreak((hModule, "VBox HostInterfaces: Host interface network device not found!")); + } while (0); + + /* clean up the device info set */ + if (hDeviceInfo != INVALID_HANDLE_VALUE) + SetupDiDestroyDeviceInfoList(hDeviceInfo); + } while (0); + return rc; +} + +UINT __stdcall UninstallTAPInstances(MSIHANDLE hModule) +{ + static const wchar_t s_wszNetworkKey[] = L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"; + HKEY hCtrlNet; + + LSTATUS lrc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, s_wszNetworkKey, 0, KEY_READ, &hCtrlNet); + if (lrc == ERROR_SUCCESS) + { + logStringF(hModule, "VBox HostInterfaces: Enumerating interfaces ..."); + for (int i = 0; ; ++i) + { + WCHAR wszNetworkGUID[256] = { 0 }; + DWORD dwLen = (DWORD)sizeof(wszNetworkGUID); + lrc = RegEnumKeyExW(hCtrlNet, i, wszNetworkGUID, &dwLen, NULL, NULL, NULL, NULL); + if (lrc != ERROR_SUCCESS) + { + switch (lrc) + { + case ERROR_NO_MORE_ITEMS: + logStringF(hModule, "VBox HostInterfaces: No interfaces found."); + break; + default: + logStringF(hModule, "VBox HostInterfaces: Enumeration failed: %ld", lrc); + break; + } + break; + } + + if (isTAPDevice(wszNetworkGUID)) + { + logStringF(hModule, "VBox HostInterfaces: Removing interface \"%ls\" ...", wszNetworkGUID); + removeNetworkInterface(hModule, wszNetworkGUID); + lrc = RegDeleteKeyW(hCtrlNet, wszNetworkGUID); + } + } + RegCloseKey(hCtrlNet); + logStringF(hModule, "VBox HostInterfaces: Removing interfaces done."); + } + return ERROR_SUCCESS; +} + + +/** + * This is used to remove the old VBoxDrv service before installation. + * + * The current service name is VBoxSup but the INF file won't remove the old + * one, so we do it manually to try prevent trouble as the device nodes are the + * same and we would fail starting VBoxSup.sys if VBoxDrv.sys is still loading. + * + * Status code is ignored for now as a reboot should fix most potential trouble + * here (and I don't want to break stuff too badly). + * + * @sa @bugref{10162} + */ +UINT __stdcall UninstallVBoxDrv(MSIHANDLE hModule) +{ + /* + * Try open the service. + */ + SC_HANDLE hSMgr = OpenSCManager(NULL, NULL, SERVICE_CHANGE_CONFIG | SERVICE_STOP | SERVICE_QUERY_STATUS); + if (hSMgr) + { + SC_HANDLE hService = OpenServiceW(hSMgr, L"VBoxDrv", DELETE | SERVICE_STOP | SERVICE_QUERY_STATUS); + if (hService) + { + /* + * Try stop it before we delete it. + */ + SERVICE_STATUS Status = { 0, 0, 0, 0, 0, 0, 0 }; + QueryServiceStatus(hService, &Status); + if (Status.dwCurrentState == SERVICE_STOPPED) + logStringF(hModule, "VBoxDrv: The service old service was already stopped"); + else + { + logStringF(hModule, "VBoxDrv: Stopping the service (state %u)", Status.dwCurrentState); + if (ControlService(hService, SERVICE_CONTROL_STOP, &Status)) + { + /* waiting for it to stop: */ + int iWait = 100; + while (Status.dwCurrentState == SERVICE_STOP_PENDING && iWait-- > 0) + { + Sleep(100); + QueryServiceStatus(hService, &Status); + } + + if (Status.dwCurrentState == SERVICE_STOPPED) + logStringF(hModule, "VBoxDrv: Stopped service"); + else + logStringF(hModule, "VBoxDrv: Failed to stop the service, status: %u", Status.dwCurrentState); + } + else + { + DWORD const dwErr = GetLastError(); + if ( Status.dwCurrentState == SERVICE_STOP_PENDING + && dwErr == ERROR_SERVICE_CANNOT_ACCEPT_CTRL) + logStringF(hModule, "VBoxDrv: Failed to stop the service: stop pending, not accepting control messages"); + else + logStringF(hModule, "VBoxDrv: Failed to stop the service: dwErr=%u status=%u", dwErr, Status.dwCurrentState); + } + } + + /* + * Delete the service, or at least mark it for deletion. + */ + if (DeleteService(hService)) + logStringF(hModule, "VBoxDrv: Successfully delete service"); + else + logStringF(hModule, "VBoxDrv: Failed to delete the service: %u", GetLastError()); + + CloseServiceHandle(hService); + } + else + { + DWORD const dwErr = GetLastError(); + if (dwErr == ERROR_SERVICE_DOES_NOT_EXIST) + logStringF(hModule, "VBoxDrv: Nothing to do, the old service does not exist"); + else + logStringF(hModule, "VBoxDrv: Failed to open the service: %u", dwErr); + } + + CloseServiceHandle(hSMgr); + } + else + logStringF(hModule, "VBoxDrv: Failed to open service manager (%u).", GetLastError()); + + return ERROR_SUCCESS; +} + diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def new file mode 100644 index 00000000..b901d7d2 --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def @@ -0,0 +1,51 @@ +; $Id: VBoxInstallHelper.def $ +;; @file +; VBoxInstallHelper - Defines the exports the MSI engine uses. +; + +; +; Copyright (C) 2008-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY "VBoxInstallHelper" +EXPORTS + IsSerialCheckNeeded + CheckSerial + IsMSCRTInstalled + IsPythonInstalled + IsWindows10 + ArePythonAPIDepsInstalled + InstallPythonAPI + InstallBranding + UninstallBranding + InstallNetFlt + UninstallNetFlt + UninstallNetAdp + InstallNetLwf + UninstallNetLwf + UninstallTAPInstances + UninstallVBoxDrv + CreateHostOnlyInterface + StopHostOnlyInterfaces + UpdateHostOnlyInterfaces + RemoveHostOnlyInterfaces + Ndis6CreateHostOnlyInterface + Ndis6UpdateHostOnlyInterfaces diff --git a/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc new file mode 100644 index 00000000..b478b61d --- /dev/null +++ b/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.rc @@ -0,0 +1,61 @@ +/* $Id: VBoxInstallHelper.rc $ */ +/** @file + * VBoxInstallHelper - Resource file containing version info. + */ + +/* + * Copyright (C) 2015-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VBOX_RC_FILE_VERSION + PRODUCTVERSION VBOX_RC_FILE_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS VBOX_RC_FILE_FLAGS + FILEOS VBOX_RC_FILE_OS + FILETYPE VBOX_RC_TYPE_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" // Lang=US English, CharSet=Unicode + BEGIN + VALUE "FileDescription", "VirtualBox Installation Helper\0" + VALUE "InternalName", "VBoxInstallHelper\0" + VALUE "OriginalFilename", "VBoxInstallHelper.dll\0" + VALUE "CompanyName", VBOX_RC_COMPANY_NAME + VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR + VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT + VALUE "ProductName", VBOX_RC_PRODUCT_NAME_STR + VALUE "ProductVersion", VBOX_RC_PRODUCT_VERSION_STR + VBOX_RC_MORE_STRINGS + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/VBox/Installer/win/Makefile.kmk b/src/VBox/Installer/win/Makefile.kmk new file mode 100644 index 00000000..28280b4a --- /dev/null +++ b/src/VBox/Installer/win/Makefile.kmk @@ -0,0 +1,1337 @@ +# $Id: Makefile.kmk $ +## @file +# Makefile for the Windows installer. +# + +# +# Copyright (C) 2006-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../.. +include $(KBUILD_PATH)/subheader.kmk + +ifneq ($(KBUILD_HOST),win) + $(error "The Windows installer can only be built on Windows!") +endif + + +# +# Include Sub-Makefiles. +# +include $(PATH_SUB_CURRENT)/InstallHelper/Makefile.kmk + +include $(PATH_SUB_CURRENT)/Stub/Makefile.kmk +include $(PATH_SUB_CURRENT)/StubBld/Makefile.kmk +include $(PATH_SUB_CURRENT)/Resources/Makefile.kmk +ifdef VBOX_WITH_MSI_HACK + include $(PATH_SUB_CURRENT)/MsiHack/Makefile.kmk +endif + +# +# Profile for quickly testing the actual mechanisms of our installer. +# This leaves out most of the optional stuff to make compilation / linking much +# faster for development cycles. Tweak to your likings if needed. +# +# Note! Rather hacky approach -- this *only* works when 'packing' is executed +# directly in the VBox\Installer directory; otherwise with WILL break the +# build mostly likely, as we mess with dependencies between components. +# +# A better appraoch would be to define separate packing defines for dependencies +# to decouple the building process from the packing more in such a scenario. +# +# Use with care! +# +ifdef VBOX_INSTALLER_QUICK + VBOX_INSTALLER_LANGUAGES := en_US + VBOX_WITH_LICENSE_DISPLAY := + VBOX_WITH_SERIALNUMBER_INSTALL := + VBOX_WITH_ADDITIONS_PACKING := + VBOX_WITH_DEBUGGER_GUI := + VBOX_WITH_EFIFW_PACKING := + VBOX_WITH_EXTPACK := + VBOX_WITH_NETADP := + VBOX_WITH_NETFLT := + VBOX_WITH_PYTHON := + VBOX_WITH_SDS := + VBOX_WITH_WEBSERVICES := + VBOX_WITH_UNATTENDED := + VBOX_WITH_DOCS_PACKING := + VBOX_WITH_QTGUI := + VBOX_WITH_USB := + VBOX_WITH_VBOX_IMG := + VBOX_WITH_VBOXSDL := + VBOX_CAB_COMPRESSION_LEVEL := none +endif + +# +# Globals. +# +# Tip: Use VBOX_CAB_COMPRESSION_LEVEL=none on the kmk command line when working +# on the installer. +# +VBOX_WIN_INST_MAKEFILE_DEP := $(MAKEFILE_CURRENT) +ifndef VBOX_CAB_COMPRESSION_LEVEL + VBOX_CAB_COMPRESSION_LEVEL := high +endif + +VBOX_PATH_WIN_INST_SRC := $(PATH_SUB_CURRENT) +VBOX_WIN_INST_OUT_DIR := $(PATH_TARGET)/Installer/win +VBOX_WIN_INST_REPACK_DIR := $(PATH_OUT)/repack + +# Note: en_US *must* come first for the dependency file generation. +ifndef VBOX_INSTALLER_LANGUAGES + VBOX_INSTALLER_LANGUAGES = en_US de_DE el_GR fr_FR it_IT tr_TR zh_TW zh_CN + VBOX_INSTALLER_LANGUAGES += $(VBOX_INSTALLER_ADD_LANGUAGES) +endif + +# Aliases for VBOX_SIGN_FILE_FN that allows better control of the MSI and MSM signing. +VBOX_SIGN_MSI_FN ?= $(VBOX_SIGN_FILE_FN) +VBOX_SIGN_MSM_FN ?= $(VBOX_SIGN_FILE_FN) +VBOX_SIGN_CAB_FN ?= $(VBOX_SIGN_FILE_FN) + +# +# List of merge modules to use. +# +ifndef VBOX_INSTALLER_MERGE_MODULES + VBOX_INSTALLER_MERGE_MODULES = App + ifdef VBOX_WITH_NETADP + VBOX_INSTALLER_MERGE_MODULES += NetAdp NetAdp6 + endif + ifdef VBOX_WITH_NETFLT + VBOX_INSTALLER_MERGE_MODULES += NetLwf NetFlt + endif + ifdef VBOX_WITH_USB + VBOX_INSTALLER_MERGE_MODULES += USB + endif + ifdef VBOX_WITH_PYTHON + VBOX_INSTALLER_MERGE_MODULES += Python + endif +endif +ifeq ($(KBUILD_TARGET_ARCH),amd64) + VBOX_INSTALLER_MERGE_MODULES += COM32On64 +endif + +# We only ship the merge modules in locale en_US for the moment. +ifdef VBOX_WITH_MSM_INSTALL + VBOX_INSTALLER_LANGUAGES := en_US + VBOX_INSTALLER_MERGE_LANGUAGES = $(VBOX_INSTALLER_LANGUAGES) +endif + +# +# Language IDs (LCID, decimal) +# +VBOX_BRAND_en_US_LANG_ID ?= 1033 +VBOX_BRAND_de_DE_LANG_ID ?= 1031 +VBOX_BRAND_el_GR_LANG_ID ?= 1032 +VBOX_BRAND_fa_IR_LANG_ID ?= 1065 +VBOX_BRAND_fr_FR_LANG_ID ?= 1036 +VBOX_BRAND_it_IT_LANG_ID ?= 1040 +VBOX_BRAND_tr_TR_LANG_ID ?= 1055 +VBOX_BRAND_zh_TW_LANG_ID ?= 1028 +VBOX_BRAND_zh_CN_LANG_ID ?= 2052 + +# Standard language names (in the native language), to be extended as we go. +# VBOX_BRAND_$(lang)_LANG_NAME must be defined for each language which occurs +# in either VBOX_LICENSE_ADD_LANGUAGES or VBOX_MANUAL_ADD_LANGUAGES. +VBOX_BRAND_en_US_LANG_NAME := English +VBOX_BRAND_de_DE_LANG_NAME := Deutsch +VBOX_BRAND_el_GR_LANG_NAME := Ελληνικά +VBOX_BRAND_fr_FR_LANG_NAME := Français +VBOX_BRAND_it_IT_LANG_NAME := Italiano +VBOX_BRAND_tr_TR_LANG_NAME := Türkçe +VBOX_BRAND_zh_TW_LANG_NAME := 正體中文 +VBOX_BRAND_zh_CN_LANG_NAME := 简体中文 + + +# +# We don't have the license text in another language than English yet, +# so just define the branding targets to use the English one for now. +# The installer generation assumes that there is a translation for each +# of VBOX_INSTALLER_LANGUAGES. +# +$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(eval VBOX_BRAND_$(lang)_LICENSE_RTF := $(VBOX_BRAND_LICENSE_RTF))) + +# +# Set the codepage for all languages to 1252, covers most cases. +# +$(foreach lang,$(sort $(VBOX_INSTALLER_LANGUAGES) $(VBOX_LICENSE_ADD_LANGUAGES) $(VBOX_MANUAL_ADD_LANGUAGES)), \ + $(eval VBOX_BRAND_$(lang)_LANGUAGE_CODEPAGE := 1252)) +# Exceptions: +VBOX_BRAND_zh_TW_LANGUAGE_CODEPAGE := 950 +VBOX_BRAND_zh_CN_LANGUAGE_CODEPAGE := 936 +VBOX_BRAND_fa_IR_LANGUAGE_CODEPAGE := 1256 +VBOX_BRAND_tr_TR_LANGUAGE_CODEPAGE := 1254 + +# +# If we want to build a combined package, we separate all common stuff +# (that is all 100% identical content between 32-/64-bit builds) +# into an own .cab file to save space. This .cab file then gets included +# and used by the 32-/64-bit installers. +# +ifdef VBOX_WITH_COMBINED_PACKAGE + VBOX_INSTALLER_COMMON_DISKID := 2 +else + VBOX_INSTALLER_COMMON_DISKID := 1 +endif + +## @todo VBOX_ prefixes! +PACKAGE_BASE := VirtualBox-$(VBOX_VERSION_STRING) +PACKAGE_NAME_LANG := $(PACKAGE_BASE)-r$(VBOX_SVN_REV) +PACKAGE_NAME_FINAL := $(PATH_STAGE_BIN)/$(PACKAGE_NAME_LANG).msi + +ifdef VBOX_WITH_COMBINED_PACKAGE + PATH_MULTIARCH_TEMP := $(PATH_OUT_BASE)/win.x86/$(KBUILD_TYPE)/obj/Installer + PATH_MULTIARCH_GUEST_ADDITIONS_ISO := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/bin/additions + PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch + PACKAGE_NAME_MULTIARCH.x86 := $(PACKAGE_NAME_MULTIARCH)_x86.msi + PACKAGE_NAME_MULTIARCH.amd64 := $(PACKAGE_NAME_MULTIARCH)_amd64.msi + PACKAGE_NAME_FINAL := $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.$(KBUILD_TARGET_ARCH)) + PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe + # Always take the common.cab from the amd64 build, as it + # might contain certain files for x86 compatibility such + # as our 32-on-64-bit COM stuff. + PACKAGE_NAME_MULTIARCH_COMMONCAB := $(PATH_OUT_BASE)/win.amd64/$(KBUILD_TYPE)/obj/Installer/win/common.cab + + BLDDIRS += $(PATH_MULTIARCH_TEMP) + PACKING += $(PACKAGE_NAME_FINAL) + ifeq ($(KBUILD_TARGET_ARCH),x86) + PACKING += $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) + endif +else + PACKAGE_NAME_MULTIARCH := $(PACKAGE_NAME_LANG)-MultiArch + PACKAGE_NAME_MULTIARCH_FINAL := $(PACKAGE_NAME_MULTIARCH).exe + PACKING += $(PACKAGE_NAME_FINAL) $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) +endif +BLDDIRS += \ + $(VBOX_WIN_INST_OUT_DIR) \ + $(VBOX_WIN_INST_REPACK_DIR)/ \ + $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/ \ + $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/ )\ + $(VBOX_WIN_INST_OUT_DIR)/NLS/ + +OTHER_CLEAN += \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wix \ + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox.wix \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox.wixobj.dep \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_ProxyStub.wxi \ + $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \ + $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wix \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj.dep \ + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).wix \ + $(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files \ + $(VBOX_WIN_INST_REPACK_DIR)/2-link-$(PACKAGE_NAME_LANG).cmd \ + $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/Language_$(lang).wxl \ + $(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/License_$(lang).wxl )\ + $(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \ + $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd \ + $(PATH_STAGE_BIN)/$(PACKAGE_NAME_MULTIARCH_FINAL) + +ifdef VBOX_WITH_COMBINED_PACKAGE + ifeq ($(KBUILD_TARGET_ARCH),x86) + OTHER_CLEAN += \ + $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd \ + $(PATH_MULTIARCH_TEMP)/$(PACKAGE_NAME_MULTIARCH.x86) + endif + ifndef VBOX_WITH_MSM_INSTALL + OTHER_CLEAN += \ + $(VBOX_WIN_INST_OUT_DIR)/common.cab + endif +else + OTHER_CLEAN += \ + $(VBOX_WIN_INST_REPACK_DIR)/4-multiarch-$(PACKAGE_NAME_MULTIARCH_FINAL).cmd \ + $(PACKAGE_NAME_FINAL) +endif + +ifdef VBOX_WITH_MSM_INSTALL + OTHER_CLEAN += \ + $(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \ + $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang)_$(KBUILD_TARGET_ARCH).msm \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj.dep \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixpdb \ + $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix \ + $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files) + BLDDIRS += $foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \ + $(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/) +endif + +# +# Suppress/skip the following ICE (Internal Consistency Evaluators): +# - ICE64: Checks that new directories in the user profile are removed correctly in roaming scenarios. +# -> We don't want to remove system folders (like "Microsoft/Internet Explorer/Quick Launch"). +# - ICE69: Checks if file references are within the same component. +# -> We reference to files within different components, but these components are installed using +# the same feature, so that's fine. +# +VBOX_MSI_ICE_IGNORE := \ + -ice:64 \ + -ice:69 + +# +# Create intermediate XML file for languages (needed for .MSI linking). +# +# Note: The double escaping of $(dir $@) in the prereq/dep list is because we first have +# to escape the expansion of the $(eval ) argument and then the definition of the +# rule. The statement is finally expanded during second dependency expansion, which +# takes place after all makefiles has been loaded and with the @ variable defined. +# +define def_vbox_lang_xml +$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl: $(VBOX_PATH_WIN_INST_SRC)/NLS/$(lang).wxl | $$$$(dir $$$$@) + $$(call MSG_GENERATE,,$$@,$$<) + $(QUIET)$(INSTALL) -m 0644 $$< $$@ +endef + +$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(eval $(def_vbox_lang_xml))) + +# +# Create intermediate XML file for licenses (needed for .MSI linking). +# These files are created from the original .RTF files in the /docs directory. +# +# Note: The redirect command below will open $$@ as stdout in append+text mode +# and then exec cat, thus appending the license file to the result file. +# +# Note: The license_file variable has to be created before def_vbox_license_xml +# is expanded by the 2nd eval because we rely on the that expansion +# replacing all $(license_file) (and $(lang)) references before evaluation. +# +# Note: The REDIRECT + ECHO_EXT is because WiX gets upset if there a newline +# between the tag and the RTF license text. +# +define def_vbox_license_xml +$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl: $(license_file) $(VBOX_WIN_INST_MAKEFILE_DEP) | $$$$(dir $$$$@) + $$(call MSG_GENERATE,,$$@,$$<) + $(APPEND) -t $$@ '' + $(APPEND) $$@ '' + + $(REDIRECT) -a+to $$@ -- $(ECHO_EXT) -n '' + $(REDIRECT) -a+to $$@ -- $(SED) -e "s|<|\<|g" -e "s|>|\>|g" $(license_file) + $(APPEND) $$@ '' + + $(APPEND) $$@ '$(license_file)' + $(APPEND) $$@ 'License_$(lang).rtf' + $(APPEND) $$@ 'L_$(lang).rtf' + + $(APPEND) $$@ '' +endef + +$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(eval local license_file := $(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF)) \ + $(eval $(def_vbox_license_xml))) + +# +# Create one intermediate WXI (Windows Installer Include) file for all installers (needed for .MSI compiling). +# This file includes all language-specific files (PDFs, CHMs, ...) to install. +# +# Note: When using the -n switch, append will append a new line after each +# argument. The -t switch makes it truncate the file. +# +$(VBOX_WIN_INST_OUT_DIR)/Files_Main.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(APPEND) -t $@ '' + $(APPEND) $@ '' +ifdef VBOX_WITH_DOCS_PACKING + ifdef VBOX_WITH_DOCS_CHM_PACKING + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \ + ' ') + endif + ifdef VBOX_WITH_DOCS_QHELP_PACKING + $(APPEND) $@ ' ' + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \ + ' ' \ + ' ') + endif +endif + $(APPEND) $@ '' + +$(VBOX_WIN_INST_OUT_DIR)/Files_Doc.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(APPEND) -t $@ '' + $(APPEND) $@ '' +ifdef VBOX_WITH_DOCS_PACKING + $(APPEND) $@ ' ' + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \ + ' ' \ + ' ') +endif + $(APPEND) $@ '' + +$(VBOX_WIN_INST_OUT_DIR)/Files_License.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(APPEND) -t $@ '' + $(APPEND) $@ '' + $(APPEND) $@ ' ' \ + ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \ + ' ' \ + ' ') + $(APPEND) $@ '' + +$(VBOX_WIN_INST_OUT_DIR)/DirComponentsAndFiles_DTrace.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) $(PATH_SUB_CURRENT)/../Config.kmk | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(QUIET)$(APPEND) -nt "$@" \ + '' \ + '' +ifdef VBOX_WITH_DTRACE + $(QUIET)$(APPEND) -n "$@" \ + '' \ + ' ' \ + ' ' \ + ' ' \ + $(foreach file, $(VBOXINST_DTRACE_LIB_ARCH_FILES) \ + , ' ' ) \ + ' ' \ + ' ' \ + ' ' \ + $(if $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES), \ + ' ' \ + ' ' \ + ' ' \ + $(foreach file, $(VBOXINST_DTRACE_TESTCASE_ARCH_FILES) \ + , ' ' ) \ + ' ' \ + ' ' \ + ' ') \ + $(if $(VBOXINST_DTRACE_SCRIPTS_FILES), \ + ' ' \ + ' ' \ + $(foreach file, $(VBOXINST_DTRACE_SCRIPTS_FILES) \ + , ' ' ) \ + ' ' \ + ' ') \ + '' +endif + $(QUIET)$(APPEND) "$@" '' + + +$(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi: $(VBOX_WIN_INST_MAKEFILE_DEP) | $$(dir $$@) + $(call MSG_GENERATE,,$@,$<) + $(APPEND) -t $@ '' + $(APPEND) $@ '' + # + # Documentation (PDF/CHM) + # +ifdef VBOX_WITH_DOCS_PACKING + ifdef VBOX_WITH_DOCS_CHM_PACKING + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \ + ' ') + endif + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_MANUAL_ADD_LANGUAGES), \ + ' ') +endif + # + # License(s) (RTF) + # + $(APPEND) $@ ' ' + $(APPEND) -n $@ $(foreach lang,$(VBOX_LICENSE_ADD_LANGUAGES), \ + ' ') + $(APPEND) $@ '' + +# +# .MSI linking of the main installer (en_US). +# +# Note: This will clean up any previous .msi and .wixpdb files to prevent dep +# build boxes from filling up with old files. +# +define def_vbox_link_msi +$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(PACKAGE_NAME_LANG)_$(lang).msi \ +$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL), + $(VBOX_WIN_INST_OUT_DIR)/common.cab,): \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ + $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \ + $(VBOX_SVN_REV_KMK) \ + $(VBOX_WIN_INST_MAKEFILE_DEP) \ + $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \ + $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \ + | $$$$(dir $$$$@) + $$(call MSG_L1,Linking installer $$@) + $(QUIET)$(RM) -f $$(wildcard $$(subst r$$(VBOX_SVN_REV),r*,\ + $$@ \ + $$(basename $$@).wixpdb \ + $$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd )) + kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \ + -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \ + -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ + -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \ + $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \ + $(VBOX_MSI_ICE_IGNORE) \ + -out $$@ \ + $$< \ + $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib +if defined(VBOX_WITH_COMBINED_PACKAGE) && !defined(VBOX_WITH_MSM_INSTALL) + $(MV) -f -- $$(@D)/common.cab $$(@D)/../common.cab +endif +ifeq ($(lang),en_US) + $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl" "$(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl" \ + "$(VBOX_WIN_INST_REPACK_DIR)/files-VirtualBox_$(lang)/" +# Create repack script for this step. + $(APPEND) -tn "$$(VBOX_WIN_INST_REPACK_DIR)/2-link-$$(PACKAGE_NAME_LANG).cmd" \ + 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \ + $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\ + '$(VBOX_PATH_WIX)/light.exe -v -nologo ^' \ + ' -loc files-VirtualBox_$(lang)/Language_$(lang).wxl ^' \ + ' -loc files-VirtualBox_$(lang)/License_$(lang).wxl ^' \ + ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^' \ + ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \ + ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \ + $(if-expr defined(VBOX_WITH_MSI_HACK),'-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll ^',) \ + ' $(VBOX_MSI_ICE_IGNORE) ^' \ + ' -out $$(@F) ^' \ + ' $$(> "$$@.dep" + $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep" + $(QUIET)$(APPEND) -n '$$@.dep' '' '' + ifeq ($(lang),en_US) + $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VirtualBox_$(lang)' + $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VirtualBox_$(lang).files" >> '$$@.dep' + $(QUIET)$(APPEND) -n '$$@.dep' '' 'endef' + endif + +$(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VirtualBox_$(lang))) +endef + +$(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + $(eval $(def_vbox_compile_wixobj))) + +# +# MSM (merge module) compile. +# +define def_vbox_compile_msm +includedep $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj.dep +$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wixobj \ ++ $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \ +$(if-expr "$(lang)" != "en_US",, \ ++ $(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix): \ + $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxs \ + $(PATH_SUB_CURRENT)/VBoxMerge$(module).wxi \ + $(PATH_SUB_CURRENT)/VBoxMerge$(module)CA.wxi \ + $(PATH_SUB_CURRENT)/VBoxMerge$(module)Seq.wxi \ + $(PATH_SUB_CURRENT)/UserInterface.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/Shortcuts_StartMenu.wxi \ + $(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi \ + $(if $(VBOX_WITH_32_ON_64_MAIN_API),$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi,) \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi \ + $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi,) \ + $(if $(VBOX_WITH_CRT_PACKING),$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi,) \ + $(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi \ + $(if $(VBOX_WITH_QTGUI),$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) \ + $(VBOX_MSI_DEPENDENCIES) \ + $(VBOX_VERSION_STAMP) \ + | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/ + $(QUIET)$(RM) -f -- "$$@" "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix" + $(REDIRECT) \ + -E 'PATH_OUT=$(subst /,\,$(PATH_OUT))' \ + -E 'PATH_TARGET=$(subst /,\,$(VBOX_WIN_INST_OUT_DIR))' \ + -E 'PATH_ROOT=$(subst /,\,$(PATH_ROOT))' \ + -E 'PATH_MULTIARCH_GUEST_ADDITIONS_ISO=$(subst /,\,$(PATH_MULTIARCH_GUEST_ADDITIONS_ISO))' \ + -E 'VBOX_PATH_WIN_INST_SRC=$(subst /,\,$(VBOX_PATH_WIN_INST_SRC))' \ + -E 'VBOX_BRAND_WIN_INST_DLGJPG=$(subst /,\,$(VBOX_BRAND_WIN_INST_DLGJPG))' \ + -E 'VBOX_ADD_LANGUAGES=$(VBOX_INSTALLER_ADD_LANGUAGES)' \ + -E 'VBOX_BRAND_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_LICENSE_RTF))' \ + $(foreach lang,$(VBOX_INSTALLER_LANGUAGES), \ + -E 'VBOX_BRAND_$(lang)_LICENSE_RTF=$(subst /,\,$(VBOX_BRAND_$(subst en_US_,,$(lang)_)LICENSE_RTF))') \ + -E 'VBOX_BUILD_NR_FOR_INST=$(VBOX_VERSION_BUILD)' \ + -E 'VBOX_VENDOR=$(VBOX_VENDOR)' \ + -E 'VBOX_VENDOR_SHORT=$(VBOX_VENDOR_SHORT)' \ + -E 'VBOX_PRODUCT=$(VBOX_PRODUCT)' \ + -E 'VBOX_C_YEAR=$(VBOX_C_YEAR)' \ + -E 'VBOX_VERSION_STRING=$(VBOX_VERSION_STRING)' \ + -E 'VBOX_VERSION_STRING_RAW=$(VBOX_VERSION_STRING_RAW)' \ + -E 'VBOX_VERSION_MAJOR_INST=$(VBOX_VERSION_MAJOR)' \ + -E 'VBOX_VERSION_MINOR_INST=$(VBOX_VERSION_MINOR)' \ + -E 'VBOX_SIGNING_MODE=$(strip $(if $(VBOX_SIGNING_MODE),$(VBOX_SIGNING_MODE),none))' \ + -E 'VBOX_CAB_COMPRESSION_LEVEL=$(VBOX_CAB_COMPRESSION_LEVEL)' \ + -E 'VBOX_CAB_COMPRESSION_LEVEL_COMMON=$(VBOX_CAB_COMPRESSION_LEVEL)' \ + -E 'VBOX_GUI_USE_QGL=$(if $(VBOX_GUI_USE_QGL),yes,no)' \ + -E 'VBOX_MIDL_PROXY_CLSID=$(VBOX_MIDL_PROXY_CLSID)' \ + -E 'VBOX_WINDOWS_ICON_FILE=$(subst /,\,$(VBOX_WINDOWS_ICON_FILE))' \ + -E 'VBOX_QT_INFIX=$(VBOX_QT_INFIX)' \ + -E 'VBOX_WITH_32_ON_64_MAIN_API=$(if $(VBOX_WITH_32_ON_64_MAIN_API),yes,no)' \ + -E 'VBOX_WITH_ADDITIONS_PACKING=$(if $(VBOX_WITH_ADDITIONS_PACKING),yes,no)' \ + -E 'VBOX_WITH_COMBINED_PACKAGE=$(if-expr defined(VBOX_WITH_COMBINED_PACKAGE),yes,no)' \ + -E 'VBOX_WITH_CRT_PACKING=$(if-expr defined(VBOX_WITH_CRT_PACKING),yes,no)' \ + -E 'VBOX_WITH_DEBUGGER_GUI=$(if-expr defined(VBOX_WITH_DEBUGGER_GUI) && defined(VBOX_WITH_QTGUI),yes,no)' \ + -E 'VBOX_WITH_DOCS_PACKING=$(if $(VBOX_WITH_DOCS_PACKING),yes,no)' \ + -E 'VBOX_WITH_DRAG_AND_DROP=$(if $(VBOX_WITH_DRAG_AND_DROP),yes,no)' \ + -E 'VBOX_WITH_DTRACE=$(if $(VBOX_WITH_DTRACE),yes,no)' \ + -E 'VBOX_WITH_HOST_SHIPPING_AUDIO_TEST=$(if $(VBOX_WITH_HOST_SHIPPING_AUDIO_TEST),yes,no)' \ + -E 'VBOX_WITH_EFIFW_PACKING=$(if $(VBOX_WITH_EFIFW_PACKING),yes,no)' \ + -E 'VBOX_WITH_EXTPACK=$(if $(VBOX_WITH_EXTPACK),yes,no)' \ + -E 'VBOX_WITH_GUEST_CONTROL=$(if $(VBOX_WITH_GUEST_CONTROL),yes,no)' \ + -E 'VBOX_WITH_GUEST_PROPS=$(if $(VBOX_WITH_GUEST_PROPS),yes,no)' \ + -E 'VBOX_WITH_HARDENING=$(if $(VBOX_WITH_HARDENING),yes,no)' \ + -E 'VBOX_WITH_HEADLESS=$(if $(VBOX_WITH_HEADLESS),yes,no)' \ + -E 'VBOX_WITH_FE_BALLOONCTRL=$(if $(VBOX_WITH_FE_BALLOONCTRL),yes,no)' \ + -E 'VBOX_WITH_FE_AUTOSTART=$(if $(VBOX_WITH_FE_AUTOSTART),yes,no)' \ + -E 'VBOX_WITH_FE_BUGREPORT=$(if $(VBOX_WITH_FE_BUGREPORT),yes,no)' \ + -E 'VBOX_WITH_LIBSSH=$(if $(VBOX_WITH_LIBSSH),yes,no)' \ + -E 'VBOX_WITH_LICENSE_DISPLAY=$(if $(VBOX_WITH_LICENSE_DISPLAY),yes,no)' \ + -E 'VBOX_WITH_MIDL_PROXY_STUB=$(if $(VBOX_WITH_MIDL_PROXY_STUB),yes,no)' \ + -E 'VBOX_WITH_MSM_INSTALL=$(if-expr defined(VBOX_WITH_MSM_INSTALL),yes,no)' \ + -E 'VBOX_WITH_NETADP=$(if $(VBOX_WITH_NETADP),yes,no)' \ + -E 'VBOX_WITH_NETFLT=$(if $(VBOX_WITH_NETFLT),yes,no)' \ + -E 'VBOX_WITH_PYTHON=$(if $(VBOX_WITH_PYTHON),yes,no)' \ + -E 'VBOX_WITH_QTGUI=$(if $(VBOX_WITH_QTGUI),yes,no)' \ + -E 'VBOX_WITH_RAW_MODE=$(if $(VBOX_WITH_RAW_MODE),yes,no)' \ + -E 'VBOX_WITH_SECURELABEL=$(if $(VBOX_WITH_SECURELABEL),yes,no)' \ + -E 'VBOX_WITH_SERIALNUMBER_INSTALL=$(if $(VBOX_WITH_SERIALNUMBER_INSTALL),yes,no)' \ + -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \ + -E 'VBOX_WITH_VRDP=$(if-expr defined(VBOX_WITH_VRDP) && !defined(VBOX_WITH_EXTPACK_PUEL),yes,no)' \ + -E 'VBOX_WITH_WEBSERVICES=$(if $(VBOX_WITH_WEBSERVICES),yes,no)' \ + -E 'VBOX_WITH_SDS=$(if $(VBOX_WITH_SDS),yes,no)' \ + -E 'VBOX_WITH_UNATTENDED=$(if $(VBOX_WITH_UNATTENDED),yes,no)' \ + -E 'VBOX_WITH_VBOX_IMG=$(if $(VBOX_WITH_VBOX_IMG),yes,no)' \ + -E 'VBOX_WITH_VBOXSDL=$(if $(VBOX_WITH_VBOXSDL),yes,no)' \ + -E 'VBOX_WITH_VMSVGA3D=$(if $(VBOX_WITH_VMSVGA3D),yes,no)' \ + -E 'VBOX_WITH_VIDEOHWACCEL=$(if $(VBOX_WITH_VIDEOHWACCEL),yes,no)' \ + -E 'KBUILD_TYPE=$(KBUILD_TYPE)' \ + -E 'KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH)' \ + -E 'VBOX_INSTALLER_QUICK=$(VBOX_INSTALLER_QUICK)' \ + -E 'VBOX_VCC_TOOL_STEM=$(VBOX_VCC_TOOL_STEM)' \ + -- \ + $(VBOX_PATH_WIX)/candle.exe $(filter-out $(VBOX_VERSION_STAMP),$$<) \ + -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \ + -p$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix + $(VBOX_PATH_WIX)/candle.exe $(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix \ + -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \ + -out $$@ + ifeq ($(lang),en_US) +# Copy preprocessed wix and change source paths to be relative. Stuff not in ../bin needs copying. + $(SED) -e 's,$(subst /,\\,$(PATH_OUT))\\bin,..\\bin,g' \ + -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.amd64\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.amd64\\$(KBUILD_TYPE)\\bin,g' \ + -e 's,$(subst /,\\,$(PATH_OUT_BASE))\\win.x86\\$(KBUILD_TYPE)\\bin,..\\..\\..\\win.x86\\$(KBUILD_TYPE)\\bin,g' \ + -e 's,$(subst /,\\,$(PATH_ROOT))\\doc\\,files-VBoxMerge$(module)_$(lang)\\,g' \ + -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\Binary\\,files-VBoxMerge$(module)_$(lang)\\,g' \ + -e 's,$(subst /,\\,$(dir $(VBOX_WINDOWS_ICON_FILE))),files-VBoxMerge$(module)_$(lang)\\,g' \ + -e 's,$(subst /,\\,$(VBOX_PATH_WIN_INST_SRC))\\,,g' \ + --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix" \ + "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" + $(SED) -n \ + -e '/<\?ln /d' \ + -e '/$(subst /,\\,$(PATH_ROOT))/p' \ + -e '/$(subst /,\\,$(PATH_ROOT))/q2' \ + "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).wix" + $(SED) -n \ + -e '/<\?ln /d' \ + -e 's/\\/\//g' \ + -e 's,^.*"\($(PATH_ROOT)/doc/[^"]*\)".*$$(DOLLAR),\1,p' \ + -e 's,^.*"\($(VBOX_PATH_WIN_INST_SRC)/Binary/[^"]*\)".*$$(DOLLAR),\1,p' \ + -e 's,^.*"\($(dir $(VBOX_WINDOWS_ICON_FILE))[^"]*\)".*$$(DOLLAR),\1,p' \ + --output "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" \ + "$(VBOX_WIN_INST_OUT_DIR)/VBoxMerge$(module)_$(lang).wix" + $(MKDIR) -p -- "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/" + set -xe && for file in `$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files"`; \ + do $(CP_EXT) -f -- "$$(DOLLAR){file}" "$(VBOX_WIN_INST_REPACK_DIR)/files-VBoxMerge$(module)_$(lang)/"; done +# Create repack script for this step. + $(APPEND) -tn "$(VBOX_WIN_INST_REPACK_DIR)/1-compile-VBoxMerge$(module)_$(lang).cmd" \ + 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \ + $(subst $(KBUILD_DEVTOOLS),%KBUILD_DEVTOOLS%,\ + '$(VBOX_PATH_WIX)/candle.exe VBoxMerge$(module)_$(lang).wix ^' \ + ' -ext $(VBOX_PATH_WIX)/WixUIExtension.dll ^'\ + ' -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll ^' \ + ' -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll ^' \ + ' -out $$(@F) || exit /b1' \ + ) \ + '@echo Created: $$(@F)' + endif +# Generate wxi dependencies based on the sourceLineNumber references in the output. Add repack file list for cleanup. + $(QUIET)$(APPEND) -t '$$@.dep' '$$@: \' + $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep.xsl "$$@" >> "$$@.dep" + $(QUIET)$(VBOX_XSLTPROC) $(VBOX_PATH_WIN_INST_SRC)/dep2.xsl "$$@" | sort | $(SED) '$!N; /^\(.*\)\n\1$$$$/!P; D' >> "$$@.dep" + $(QUIET)$(APPEND) -n '$$@.dep' '' '' + ifeq ($(lang),en_US) + $(QUIET)$(APPEND) -n '$$@.dep' 'define VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang)' + $(QUIET)$(CAT_EXT) "$(VBOX_WIN_INST_REPACK_DIR)/VBoxMerge$(module)_$(lang).files" >> '$$@.dep' + $(QUIET)$(APPEND) -n '$$@.dep' '' 'endef' + endif + +$(eval OTHER_CLEAN += $(VBOX_REPACK_FILES_VBoxMerge$(module)_$(lang))) +endef + +$(foreach module,$(VBOX_INSTALLER_MERGE_MODULES), \ + $(foreach lang,$(VBOX_INSTALLER_MERGE_LANGUAGES), \ + $(eval $(def_vbox_compile_msm)))) + +# +# VirtualBox Type Library definition. +# +$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib.wxi: \ + $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \ + $(VBOX_XIDL_FILE) \ + $(MAKEFILE) \ + | $$(dir $$@) + $(VBOX_XSLTPROC) \ + $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \ + $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \ + -o $@ $< $(VBOX_XIDL_FILE) + +$(VBOX_WIN_INST_OUT_DIR)/VirtualBox_TypeLib_x86.wxi: \ + $(PATH_SUB_CURRENT)/$(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),VirtualBox_TypeLibWithInterfaces.xsl,VirtualBox_TypeLib.xsl) \ + $(VBOX_XIDL_FILE) \ + | $$(dir $$@) + $(VBOX_XSLTPROC) --stringparam "a_sTarget" "VBoxClient-x86" \ + $(if-expr defined(VBOX_WITH_MIDL_PROXY_STUB),--stringparam "a_sProxyStubClsid" "$(VBOX_MIDL_PROXY_CLSID)",) \ + $(if-expr defined(VBOX_WITH_SDS),--stringparam "a_sWithSDS" "yes",) \ + -o $@ $< $(VBOX_XIDL_FILE) + +# +# Construct the list of GUI translations. +# ('-t' -- truncate file; '-n' -- new line between arguments) +# +include $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk +$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi) +$(VBOX_WIN_INST_OUT_DIR)/VBoxGuiNLS.wxi: $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk | $$(dir $$@) + $(APPEND) -t $@ '' + $(APPEND) $@ '' + $(APPEND) -n $@ $(foreach lang,$(VBOX_APPROVED_GUI_LANGUAGES), \ + ' ' \ + ' ') + $(APPEND) $@ '' + +# +# Edit the version stored in the registry. +# +$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi) +$(VBOX_WIN_INST_OUT_DIR)/VBoxKey.wxi: $(PATH_SUB_CURRENT)/VBoxKey.wxi $(VBOX_VERSION_STAMP) | $$(dir $$@) + $(SED) -e 's/%VER%/$(VBOX_VERSION_STRING_RAW)/' \ + -e 's/%VER_EXT%/$(VBOX_VERSION_STRING)/' \ + --output $@ $< + +# +# Generate the list of CRT DLLs. +# +ifndef TOOL_$(VBOX_VCC_TOOL) + include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL).kmk +endif +$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi) +$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls.wxi: | $$(dir $$@) + $(APPEND) -t -n $@ \ + '' \ + '' \ + $(foreach dll \ + ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \ + ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \ + ,$(TOOL_$(VBOX_VCC_TOOL)_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL)_REDIST_CPP_DLLS))) \ + $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-x86_64.dll,) \ + ,' ') \ + '' + +# +# Generate the list of 32-bit CRT DLLs. +# +ifndef TOOL_$(VBOX_VCC_TOOL_STEM)X86 + include $(KBUILD_PATH)/tools/$(VBOX_VCC_TOOL_STEM)X86.kmk +endif +$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi) +$(VBOX_WIN_INST_OUT_DIR)/VBoxCrtDlls32.wxi: | $$(dir $$@) + $(APPEND) -t -n $@ \ + '' \ + '' \ + $(foreach dll \ + ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC100",msvcr100.dll msvcp100.dll \ + ,$(if-expr "$(VBOX_VCC_TOOL_STEM)"=="VCC110",msvcr110.dll msvcp110.dll \ + ,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CRT_DLLS) $(TOOL_$(VBOX_VCC_TOOL_STEM)X86_REDIST_CPP_DLLS))) \ + $(if-expr "$(KBUILD_TYPE)"=="asan",clang_rt.asan_dynamic-i386.dll,) \ + ,' ') \ + '' +# +# Generate the list of unattended template script files. +# +$(call KB_FN_AUTO_CMD_DEPS,$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi) +$(VBOX_WIN_INST_OUT_DIR)/VBoxUnattendedTemplateComponent.wxi: | $$(dir $$@) + $(APPEND) -t -n $@ \ + '' \ + '' +ifdef VBOX_UNATTENDED_TEMPLATES + $(APPEND) -n $@ \ + ' ' \ + ' ' \ + $(foreach file,$(VBOX_UNATTENDED_TEMPLATES), \ + ' ') \ + ' ' \ + ' ' +endif + $(APPEND) $@ '' + + +# +# Build the multi-language version of the .MSI installer (final installer). +# +# This is done by creating binary .MST diffs of all the language-specific installers +# against the en_US one, and then merging the diffs into the en_US one using tools +# from the MS Installer SDK. +# +define def_vbox_create_mst +$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst \ ++ $(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst: \ + $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \ + $(VBOX_WIN_INST_OUT_DIR)/$(lang)/VirtualBox_$(lang).wixobj \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \ + $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ + $(PATH_STAGE_BIN)/VBoxInstallHelper.dll \ + $(VBOX_SVN_REV_KMK) \ + $(VBOX_WIN_INST_MAKEFILE_DEP) \ + $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHack.dll,) \ + $(if-expr defined(VBOX_WITH_MSI_HACK),$(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \ + | $$$$(dir $$$$@) $(VBOX_WIN_INST_REPACK_DIR)/ + $(call MSG_L1,Creating language diff for $(lang)) + kmk_time $$(REDIRECT_EXT) -E WIX_TEMP='$$(subst /,\,$$(@D))' -- $(VBOX_PATH_WIX)/light.exe -v -nologo \ + -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/Language_$(lang).wxl \ + -loc $(VBOX_WIN_INST_OUT_DIR)/NLS/License_$(lang).wxl \ + -ext $(VBOX_PATH_WIX)/WixUIExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixDifxAppExtension.dll \ + -ext $(VBOX_PATH_WIX)/WixUtilExtension.dll \ + $(if-expr defined(VBOX_WITH_MSI_HACK),-ext $(MsiHack_0_OUTDIR)/MsiHackExtension.dll,) \ + $(VBOX_MSI_ICE_IGNORE) \ + -out $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \ + $$(@D)/VirtualBox_$(lang).wixobj \ + $(VBOX_PATH_WIX)/difxapp_$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",x86,x64).wixlib + $(REDIRECT) -C $$(@D) -- $$(VBOX_PATH_MSITRAN) -g $$< $(PACKAGE_NAME_LANG)_$(lang).msi $(lang).mst + $(CP) -f -- "$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst" "$(VBOX_WIN_INST_REPACK_DIR)/$(lang).mst" + $(RM) -f -- $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).msi \ + $$(@D)/$(PACKAGE_NAME_LANG)_$(lang).wixpdb \ + $$(@D)/common.cab + +endef + +$(foreach lang,$(filter-out en_US, $(VBOX_INSTALLER_LANGUAGES)), \ + $(eval local lang_id := $(VBOX_BRAND_$(lang)_LANG_ID)) \ + $(eval $(def_vbox_create_mst))) + + +# Create WISUMINFO argument. +VBOX_INS_PROD_ARCH.amd64 = x64 +VBOX_INS_PROD_ARCH.x86 = Intel +VBOX_INS_PROD_ARCH := $(VBOX_INS_PROD_ARCH.$(KBUILD_TARGET_ARCH)) +$(if $(VBOX_INS_PROD_ARCH),,$(error VBOX_INS_PROD_ARCH is empty!)) +VBOX_INS_PROD_LANG := 7="$(VBOX_INS_PROD_ARCH);1033 +$(foreach lang, $(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES))\ + , $(eval VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)$(COMMA)$(VBOX_BRAND_$(lang)_LANG_ID))) +VBOX_INS_PROD_LANG := $(VBOX_INS_PROD_LANG)" + +# The multilingual installer rule. +$(VBOX_WIN_INST_OUT_DIR)/$(PACKAGE_NAME_LANG).msi \ ++ $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd: \ + $(VBOX_WIN_INST_OUT_DIR)/en_US/$(PACKAGE_NAME_LANG)_en_US.msi \ + $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)),$(VBOX_WIN_INST_OUT_DIR)/$(lang)/$(lang).mst) + $(call MSG_L1,Creating final multilingual MSI) + $(QUIET)$(RM) -f -- \ + $(wildcard $(@D)/$(PACKAGE_BASE)-r*.msi $(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_BASE)-r*.cmd ) + $(CP) -f -- "$<" "$@" + + $(foreach lang,$(filter-out en_US,$(VBOX_INSTALLER_LANGUAGES)), \ + $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- $(VBOX_PATH_MSIDB) -d $@ -r $(lang).mst \ + $(NLTAB)$(REDIRECT) -C $(@D)/$(lang) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $@ $(lang).mst $(VBOX_BRAND_$(lang)_LANG_ID) ) + + $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUBSTG) $(@F) + $(REDIRECT) -C $(@D) -- cscript.exe /nologo $(VBOX_PATH_WISUMINFO) $@ $(VBOX_INS_PROD_LANG) + $(call VBOX_SIGN_MSI_FN,$@,$(VBOX_PRODUCT) $(VBOX_VERSION_STRING)r$(VBOX_SVN_REV) ($(KBUILD_TARGET_ARCH)),,,disable-dual-signing) + +# Create repack script for this step. + $(APPEND) -nt "$(VBOX_WIN_INST_REPACK_DIR)/3-multilingual-$(PACKAGE_NAME_LANG).cmd" \ + 'if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & exit /b1)' \ + 'if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & exit /b1)' \ + 'copy /y "$(. +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + +DLLS += MsiHack +MsiHack_TEMPLATE = VBOXR3STATIC +MsiHack_BLD_TRG_ARCH = x86 +MsiHack_SOURCES = MsiHack.cpp + +ifndef windir + windir = C:/Windows +endif +VBOX_DOT_NET_COMPILER = $(firstword $(rsort $(wildcard $(windir)/Microsoft.NET/Framework/*/csc.exe)) csc.exe) + +OTHERS += $(MsiHack_0_OUTDIR)/MsiHackExtension.dll +$$(MsiHack_0_OUTDIR)/MsiHackExtension.dll: $(PATH_SUB_CURRENT)/MsiHackExtension.cs $(MAKEFILE) | $$(dir $$@) + $(VBOX_DOT_NET_COMPILER) /nologo \ + /out:$@ \ + /target:library \ + /reference:$(VBOX_PATH_WIX)/wix.dll \ + $(subst /,\\,$<) + +MsiHackExtension.dll: $$(MsiHack_0_OUTDIR)/MsiHackExtension.dll + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/win/MsiHack/MsiHack.cpp b/src/VBox/Installer/win/MsiHack/MsiHack.cpp new file mode 100644 index 00000000..766a23ff --- /dev/null +++ b/src/VBox/Installer/win/MsiHack/MsiHack.cpp @@ -0,0 +1,1013 @@ +/* $Id: MsiHack.cpp $ */ +/** @file + * MsiHack - Exterimental DLL that intercept small ReadFile calls from + * MSI, CABINET and WINTEROP, buffering them using memory mapped files. + * + * @remarks Doesn't save as much as hoped on fast disks. + */ + +/* + * Copyright (C) 2016-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include +#include +#include + + +/********************************************************************************************************************************* +* Defined Constants And Macros * +*********************************************************************************************************************************/ +/** @MSI_HACK_HANDLE_TO_INDEX + * Handle to g_papHandles index. + */ +#if ARCH_BITS == 64 +# define MSI_HACK_HANDLE_TO_INDEX(hHandle) (((uintptr_t)hHandle & ~UINT64_C(0x80000000)) >> 3) +#elif ARCH_BITS == 32 +# define MSI_HACK_HANDLE_TO_INDEX(hHandle) (((uintptr_t)hHandle & ~UINT32_C(0x80000000)) >> 2) +#else +# error "Unsupported or missing ARCH_BITS!" +#endif + +/** Generic assertion macro. */ +#define MSIHACK_ASSERT(a_Expr) \ + do { \ + if (!!(a_Expr)) { /* likely */ } \ + else MsiHackErrorF("Assertion failed at line " RT_STR(__LINE__) ": " #a_Expr "\n"); \ + } while (0) + +/** Assertion macro that returns if expression is false. */ +#define MSIHACK_ASSERT_RETURN(a_Expr, a_fRc) \ + do { \ + if (!!(a_Expr)) { /* likely */ } \ + else \ + { \ + MsiHackErrorF("Assertion failed at line " RT_STR(__LINE__) ": " #a_Expr "\n"); \ + return (a_fRc); \ + } \ + } while (0) + +/** Assertion macro that executes a statemtn when false. */ +#define MSIHACK_ASSERT_STMT(a_Expr, a_Stmt) \ + do { \ + if (!!(a_Expr)) { /* likely */ } \ + else \ + { \ + MsiHackErrorF("Assertion failed at line " RT_STR(__LINE__) ": " #a_Expr "\n"); \ + a_Stmt; \ + } \ + } while (0) + +/** Assertion macro that executes a statemtn when false. */ +#define MSIHACK_ASSERT_MSG(a_Expr, a_Msg) \ + do { \ + if (!!(a_Expr)) { /* likely */ } \ + else \ + { \ + MsiHackErrorF("Assertion failed at line " RT_STR(__LINE__) ": " #a_Expr "\n"); \ + MsiHackErrorF a_Msg; \ + } \ + } while (0) + + +/********************************************************************************************************************************* +* Structures and Typedefs * +*********************************************************************************************************************************/ +/** + * Intercepted handle data. + */ +typedef struct MSIHACKHANDLE +{ + /** The actual handle value. */ + HANDLE hHandle; + /** The buffer. */ + uint8_t *pbBuffer; + /** Valid buffer size. */ + size_t cbBuffer; + /** The allocated buffer size. */ + size_t cbBufferAlloc; + /** The file offset of the buffer. */ + uint64_t offFileBuffer; + /** The file size. */ + uint64_t cbFile; + /** The current file offset. */ + uint64_t offFile; + /** Whether pbBuffer is a memory mapping of hHandle. */ + bool fMemoryMapped; + /** We only try caching a file onece. */ + bool fDontTryAgain; + /** Reference counter. */ + int32_t volatile cRefs; + /** Critical section protecting the handle. */ + CRITICAL_SECTION CritSect; +} MSIHACKHANDLE; +/** Pointer to an intercepted handle. */ +typedef MSIHACKHANDLE *PMSIHACKHANDLE; + + +/** + * Replacement function entry. + */ +typedef struct MSIHACKREPLACEMENT +{ + /** The function name. */ + const char *pszFunction; + /** The length of the function name. */ + size_t cchFunction; + /** The module name (optional). */ + const char *pszModule; + /** The replacement function or data address. */ + uintptr_t pfnReplacement; +} MSIHACKREPLACEMENT; +/** Pointer to a replacement function entry */ +typedef MSIHACKREPLACEMENT const *PCMSIHACKREPLACEMENT; + + +/********************************************************************************************************************************* +* Global Variables * +*********************************************************************************************************************************/ +/** Critical section protecting the handle table. */ +static CRITICAL_SECTION g_CritSect; +/** Size of the handle table. */ +static size_t g_cHandles; +/** The handle table. */ +static PMSIHACKHANDLE *g_papHandles; + + + +void MsiHackErrorF(const char *pszFormat, ...) +{ + fprintf(stderr, "MsiHack: error: "); + va_list va; + va_start(va, pszFormat); + vfprintf(stderr, pszFormat, va); + va_end(va); +} + + +void MsiHackDebugF(const char *pszFormat, ...) +{ + if (1) + { + fprintf(stderr, "MsiHack: debug: "); + va_list va; + va_start(va, pszFormat); + vfprintf(stderr, pszFormat, va); + va_end(va); + } +} + + +/** + * Destroys a handle. + */ +DECL_NO_INLINE(static, void) MsiHackHandleDestroy(PMSIHACKHANDLE pHandle) +{ + /* The handle value should always be invalid at this point! */ + MSIHACK_ASSERT(pHandle->hHandle == INVALID_HANDLE_VALUE); + + if (pHandle->fMemoryMapped) + UnmapViewOfFile(pHandle->pbBuffer); + else + free(pHandle->pbBuffer); + pHandle->pbBuffer = NULL; + + DeleteCriticalSection(&pHandle->CritSect); + free(pHandle); +} + + +/** + * Releases a handle reference. + * @param pHandle The handle to release. + */ +DECLINLINE(void) MsiHackHandleRelease(PMSIHACKHANDLE pHandle) +{ + if (ASMAtomicDecS32(&pHandle->cRefs) != 0) + return; + MsiHackHandleDestroy(pHandle); +} + + +/** + * Get and retain handle. + * + * @returns Pointer to a reference handle or NULL if not our handle. + * @param hHandle The handle. + */ +DECLINLINE(PMSIHACKHANDLE) MsiHackHandleRetain(HANDLE hHandle) +{ + uintptr_t const idxHandle = MSI_HACK_HANDLE_TO_INDEX(hHandle); + EnterCriticalSection(&g_CritSect); + if (idxHandle < g_cHandles) + { + PMSIHACKHANDLE pHandle = g_papHandles[idxHandle]; + if (pHandle) + { + ASMAtomicIncS32(&pHandle->cRefs); + LeaveCriticalSection(&g_CritSect); + return pHandle; + } + } + LeaveCriticalSection(&g_CritSect); + return NULL; +} + + +/** + * Enters @a pHandle into the handle table under @a hHandle. + * + * @returns true on succes, false on error. + * @param pHandle The handle to enter. + * @param hHandle The handle value to enter it under. + */ +static bool MsiHackHandleEnter(PMSIHACKHANDLE pHandle, HANDLE hHandle) +{ + uintptr_t const idxHandle = MSI_HACK_HANDLE_TO_INDEX(hHandle); + EnterCriticalSection(&g_CritSect); + + /* + * Make sure there is room in the handle table. + */ + bool fOkay = idxHandle < g_cHandles; + if (fOkay) + { /* typical */ } + else if (idxHandle < _1M) + { + size_t cNew = g_cHandles * 2; + while (cNew < idxHandle) + cNew *= 2; + + void *pvNew = realloc(g_papHandles, cNew * sizeof(g_papHandles[0])); + if (pvNew) + { + g_papHandles = (PMSIHACKHANDLE *)pvNew; + memset(&g_papHandles[g_cHandles], 0, (cNew - g_cHandles) * sizeof(g_papHandles[0])); + g_cHandles = cNew; + fOkay = true; + } + else + MsiHackErrorF("Failed to grow handle table from %p to %p entries!\n", g_cHandles, cNew); + } + else + MsiHackErrorF("Handle %p (0x%p) is above the max handle table size limit!\n", hHandle, idxHandle); + if (fOkay) + { + /* + * Insert it into the table if the entry is empty. + */ + if (g_papHandles[idxHandle] == NULL) + { + g_papHandles[idxHandle] = pHandle; + LeaveCriticalSection(&g_CritSect); + return true; + } + MsiHackErrorF("Handle table entry 0x%p (%p) is already busy with %p! Cannot replace with %p.\n", + hHandle, idxHandle, g_papHandles[idxHandle], pHandle); + } + + LeaveCriticalSection(&g_CritSect); + return false; +} + + +/** + * Prepares a file for potential caching. + * + * If successful, the handled is entered into the handle table. + * + * @param hFile Handle to the file to cache. + */ +static void MsiHackFilePrepare(HANDLE hFile) +{ + DWORD const dwErrSaved = GetLastError(); + + LARGE_INTEGER cbFile; + if (GetFileSizeEx(hFile, &cbFile)) + { + PMSIHACKHANDLE pHandle = (PMSIHACKHANDLE)calloc(1, sizeof(*pHandle)); + if (pHandle) + { + pHandle->cbFile = cbFile.QuadPart; + pHandle->pbBuffer = NULL; + pHandle->cbBuffer = 0; + pHandle->cbBufferAlloc = 0; + pHandle->offFileBuffer = 0; + pHandle->fMemoryMapped = true; + pHandle->cRefs = 1; + InitializeCriticalSection(&pHandle->CritSect); + if (MsiHackHandleEnter(pHandle, hFile)) + { + SetLastError(dwErrSaved); + return; + } + + free(pHandle); + } + } + + SetLastError(dwErrSaved); +} + + +/** + * Worker for MsiHackFileSetupCache + * + * @returns True if sucessfully cached, False if not. + * @param pHandle The file. + * @param hFile The current valid handle. + */ +static bool MsiHackFileSetupCache(PMSIHACKHANDLE pHandle, HANDLE hFile) +{ + DWORD const dwErrSaved = GetLastError(); + HANDLE hMapping = CreateFileMappingW(hFile, NULL /*pSecAttrs*/, PAGE_READONLY, + 0 /*cbMaxLow*/, 0 /*cbMaxHigh*/, NULL /*pwszName*/); + if (hMapping != NULL) + { + pHandle->pbBuffer = (uint8_t *)MapViewOfFile(hMapping, FILE_MAP_READ, 0 /*offFileHigh*/, 0 /*offFileLow*/, + (SIZE_T)pHandle->cbFile); + if (pHandle->pbBuffer) + { + pHandle->cbBuffer = (size_t)pHandle->cbFile; + pHandle->cbBufferAlloc = (size_t)pHandle->cbFile; + pHandle->offFileBuffer = 0; + pHandle->fMemoryMapped = true; + CloseHandle(hMapping); + + SetLastError(dwErrSaved); + return true; + } + CloseHandle(hMapping); + } + SetLastError(dwErrSaved); + pHandle->fDontTryAgain = true; + return false; +} + + +/** + * This is called to check if the file is cached and try cache it. + * + * We delay the actually caching till the file is read, so we don't waste time + * mapping it into memory when all that is wanted is the file size or something + * like that. + * + * @returns True if cached, False if not. + * @param pHandle The file. + * @param hFile The current valid handle. + */ +DECLINLINE(bool) MsiHackFileIsCached(PMSIHACKHANDLE pHandle, HANDLE hFile) +{ + if (pHandle->pbBuffer) + return true; + if (!pHandle->fDontTryAgain) + return MsiHackFileSetupCache(pHandle, hFile); + return false; +} + + +/** Kernel32 - CreateFileA */ +static HANDLE WINAPI MsiHack_Kernel32_CreateFileA(LPCSTR pszFilename, DWORD dwDesiredAccess, DWORD dwShareMode, + LPSECURITY_ATTRIBUTES pSecAttrs, DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) +{ + /* + * If this is read-only access to the file, try cache it. + */ + if (dwCreationDisposition == OPEN_EXISTING) + { + if ( dwDesiredAccess == GENERIC_READ + || dwDesiredAccess == FILE_GENERIC_READ) + { + if (dwShareMode & FILE_SHARE_READ) + { + if ( !pSecAttrs + || ( pSecAttrs->nLength == sizeof(*pSecAttrs) + && pSecAttrs->lpSecurityDescriptor == NULL ) ) + { + HANDLE hFile = CreateFileA(pszFilename, dwDesiredAccess, dwShareMode, pSecAttrs, + dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); + if (hFile != INVALID_HANDLE_VALUE && hFile != NULL) + { + MsiHackDebugF("CreateFileA: %s\n", pszFilename ); + MsiHackFilePrepare(hFile); + } + return hFile; + } + } + } + } + + /* + * Don't intercept it. + */ + return CreateFileA(pszFilename, dwDesiredAccess, dwShareMode, pSecAttrs, + dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +} + + +/** Kernel32 - CreateFileW */ +static HANDLE WINAPI MsiHack_Kernel32_CreateFileW(LPCWSTR pwszFilename, DWORD dwDesiredAccess, DWORD dwShareMode, + LPSECURITY_ATTRIBUTES pSecAttrs, DWORD dwCreationDisposition, + DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) +{ + /* + * If this is read-only access to the file, try cache it. + */ + if (dwCreationDisposition == OPEN_EXISTING) + { + if ( dwDesiredAccess == GENERIC_READ + || dwDesiredAccess == FILE_GENERIC_READ) + { + if (dwShareMode & FILE_SHARE_READ) + { + if ( !pSecAttrs + || ( pSecAttrs->nLength == sizeof(*pSecAttrs) + && pSecAttrs->lpSecurityDescriptor == NULL ) ) + { + HANDLE hFile = CreateFileW(pwszFilename, dwDesiredAccess, dwShareMode, pSecAttrs, + dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); + if (hFile != INVALID_HANDLE_VALUE && hFile != NULL) + { + MsiHackDebugF("CreateFileW: %ls\n", pwszFilename); + MsiHackFilePrepare(hFile); + } + return hFile; + } + } + } + } + + /* + * Don't intercept it. + */ + return CreateFileW(pwszFilename, dwDesiredAccess, dwShareMode, pSecAttrs, + dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +} + + +/** Kernel32 - SetFilePointer */ +static DWORD WINAPI MsiHack_Kernel32_SetFilePointer(HANDLE hFile, LONG cbMove, PLONG pcbMoveHi, DWORD dwMoveMethod) +{ + /* + * If intercepted handle, deal with it. + */ + PMSIHACKHANDLE pHandle = MsiHackHandleRetain(hFile); + if (pHandle) + { + if (MsiHackFileIsCached(pHandle, hFile)) + { + int64_t offMove = pcbMoveHi ? ((int64_t)*pcbMoveHi << 32) | cbMove : cbMove; + + EnterCriticalSection(&pHandle->CritSect); + switch (dwMoveMethod) + { + case FILE_BEGIN: + break; + case FILE_CURRENT: + offMove += pHandle->offFile; + break; + case FILE_END: + offMove += pHandle->cbFile; + break; + default: + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + MsiHackErrorF("SetFilePointer(%p) - invalid method!\n", hFile); + SetLastError(ERROR_INVALID_PARAMETER); + return INVALID_SET_FILE_POINTER; + } + + if (offMove >= 0) + { + /* Seeking beyond the end isn't useful, so just clamp it. */ + if (offMove >= (int64_t)pHandle->cbFile) + offMove = (int64_t)pHandle->cbFile; + pHandle->offFile = (uint64_t)offMove; + } + else + { + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + MsiHackErrorF("SetFilePointer(%p) - negative seek!\n", hFile); + SetLastError(ERROR_NEGATIVE_SEEK); + return INVALID_SET_FILE_POINTER; + } + + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + if (pcbMoveHi) + *pcbMoveHi = (uint64_t)offMove >> 32; + SetLastError(NO_ERROR); + return (uint32_t)offMove; + } + MsiHackHandleRelease(pHandle); + } + + /* + * Not one of ours. + */ + return SetFilePointer(hFile, cbMove, pcbMoveHi, dwMoveMethod); +} + + +/** Kernel32 - SetFilePointerEx */ +static BOOL WINAPI MsiHack_Kernel32_SetFilePointerEx(HANDLE hFile, LARGE_INTEGER offMove, PLARGE_INTEGER poffNew, + DWORD dwMoveMethod) +{ + /* + * If intercepted handle, deal with it. + */ + PMSIHACKHANDLE pHandle = MsiHackHandleRetain(hFile); + if (pHandle) + { + if (MsiHackFileIsCached(pHandle, hFile)) + { + int64_t offMyMove = offMove.QuadPart; + + EnterCriticalSection(&pHandle->CritSect); + switch (dwMoveMethod) + { + case FILE_BEGIN: + break; + case FILE_CURRENT: + offMyMove += pHandle->offFile; + break; + case FILE_END: + offMyMove += pHandle->cbFile; + break; + default: + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + MsiHackErrorF("SetFilePointerEx(%p) - invalid method!\n", hFile); + SetLastError(ERROR_INVALID_PARAMETER); + return INVALID_SET_FILE_POINTER; + } + if (offMyMove >= 0) + { + /* Seeking beyond the end isn't useful, so just clamp it. */ + if (offMyMove >= (int64_t)pHandle->cbFile) + offMyMove = (int64_t)pHandle->cbFile; + pHandle->offFile = (uint64_t)offMyMove; + } + else + { + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + MsiHackErrorF("SetFilePointerEx(%p) - negative seek!\n", hFile); + SetLastError(ERROR_NEGATIVE_SEEK); + return INVALID_SET_FILE_POINTER; + } + + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + if (poffNew) + poffNew->QuadPart = offMyMove; + return TRUE; + } + MsiHackHandleRelease(pHandle); + } + + /* + * Not one of ours. + */ + return SetFilePointerEx(hFile, offMove, poffNew, dwMoveMethod); +} + + +/** Kernel32 - ReadFile */ +static BOOL WINAPI MsiHack_Kernel32_ReadFile(HANDLE hFile, LPVOID pvBuffer, DWORD cbToRead, LPDWORD pcbActuallyRead, + LPOVERLAPPED pOverlapped) +{ + /* + * If intercepted handle, deal with it. + */ + PMSIHACKHANDLE pHandle = MsiHackHandleRetain(hFile); + if (pHandle) + { + if (MsiHackFileIsCached(pHandle, hFile)) + { + EnterCriticalSection(&pHandle->CritSect); + uint32_t cbActually = pHandle->cbFile - pHandle->offFile; + if (cbActually > cbToRead) + cbActually = cbToRead; + + memcpy(pvBuffer, &pHandle->pbBuffer[pHandle->offFile], cbActually); + pHandle->offFile += cbActually; + + LeaveCriticalSection(&pHandle->CritSect); + MsiHackHandleRelease(pHandle); + + MSIHACK_ASSERT(!pOverlapped); MSIHACK_ASSERT(pcbActuallyRead); + *pcbActuallyRead = cbActually; + + return TRUE; + } + MsiHackHandleRelease(pHandle); + } + + /* + * Not one of ours. + */ + return ReadFile(hFile, pvBuffer, cbToRead, pcbActuallyRead, pOverlapped); +} + + +/** Kernel32 - ReadFileEx */ +static BOOL WINAPI MsiHack_Kernel32_ReadFileEx(HANDLE hFile, LPVOID pvBuffer, DWORD cbToRead, LPOVERLAPPED pOverlapped, + LPOVERLAPPED_COMPLETION_ROUTINE pfnCompletionRoutine) +{ + /* + * If intercepted handle, deal with it. + */ + PMSIHACKHANDLE pHandle = MsiHackHandleRetain(hFile); + if (pHandle) + { + MsiHackHandleRelease(pHandle); + + MsiHackErrorF("Unexpected ReadFileEx call!\n"); + SetLastError(ERROR_INVALID_FUNCTION); + return FALSE; + } + + /* + * Not one of ours. + */ + return ReadFileEx(hFile, pvBuffer, cbToRead, pOverlapped, pfnCompletionRoutine); +} + + +/** Kernel32 - DuplicateHandle */ +static BOOL WINAPI MsiHack_Kernel32_DuplicateHandle(HANDLE hSrcProc, HANDLE hSrc, HANDLE hDstProc, PHANDLE phNew, + DWORD dwDesiredAccess, BOOL fInheritHandle, DWORD dwOptions) +{ + /* + * We must catch our handles being duplicated. + */ + if ( hSrcProc == GetCurrentProcess() + && hDstProc == hSrcProc) + { + PMSIHACKHANDLE pSrcHandle = MsiHackHandleRetain(hSrcProc); + if (pSrcHandle) + { + if (dwOptions & DUPLICATE_CLOSE_SOURCE) + MsiHackErrorF("DUPLICATE_CLOSE_SOURCE is not implemented!\n"); + BOOL fRet = DuplicateHandle(hSrcProc, hSrc, hDstProc, phNew, dwDesiredAccess, fInheritHandle, dwOptions); + if (fRet) + { + if (MsiHackHandleEnter(pSrcHandle, *phNew)) + return fRet; /* don't release reference. */ + + CloseHandle(*phNew); + *phNew = INVALID_HANDLE_VALUE; + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + fRet = FALSE; + } + MsiHackHandleRelease(pSrcHandle); + return fRet; + } + } + + /* + * Not one of ours. + */ + return DuplicateHandle(hSrcProc, hSrc, hDstProc, phNew, dwDesiredAccess, fInheritHandle, dwOptions); +} + + +/** Kernel32 - CloseHandle */ +static BOOL WINAPI MsiHack_Kernel32_CloseHandle(HANDLE hObject) +{ + /* + * If intercepted handle, remove it from the table. + */ + uintptr_t const idxHandle = MSI_HACK_HANDLE_TO_INDEX(hObject); + EnterCriticalSection(&g_CritSect); + if (idxHandle < g_cHandles) + { + PMSIHACKHANDLE pHandle = g_papHandles[idxHandle]; + if (pHandle) + { + g_papHandles[idxHandle] = NULL; + LeaveCriticalSection(&g_CritSect); + + /* + * Then close the handle. + */ + EnterCriticalSection(&pHandle->CritSect); + BOOL fRet = CloseHandle(hObject); + pHandle->hHandle = INVALID_HANDLE_VALUE; + DWORD dwErr = GetLastError(); + LeaveCriticalSection(&pHandle->CritSect); + + /* + * And finally release the reference held by the handle table. + */ + MsiHackHandleRelease(pHandle); + SetLastError(dwErr); + return fRet; + } + } + + /* + * Not one of ours. + */ + LeaveCriticalSection(&g_CritSect); + return CloseHandle(hObject); +} + + + + +/** Replacement functions. */ +static const MSIHACKREPLACEMENT g_aReplaceFunctions[] = +{ + { RT_STR_TUPLE("CreateFileA"), NULL, (uintptr_t)MsiHack_Kernel32_CreateFileA }, + { RT_STR_TUPLE("CreateFileW"), NULL, (uintptr_t)MsiHack_Kernel32_CreateFileW }, + { RT_STR_TUPLE("ReadFile"), NULL, (uintptr_t)MsiHack_Kernel32_ReadFile }, + { RT_STR_TUPLE("ReadFileEx"), NULL, (uintptr_t)MsiHack_Kernel32_ReadFileEx }, + { RT_STR_TUPLE("SetFilePointer"), NULL, (uintptr_t)MsiHack_Kernel32_SetFilePointer }, + { RT_STR_TUPLE("SetFilePointerEx"), NULL, (uintptr_t)MsiHack_Kernel32_SetFilePointerEx }, + { RT_STR_TUPLE("DuplicateHandle"), NULL, (uintptr_t)MsiHack_Kernel32_DuplicateHandle }, + { RT_STR_TUPLE("CloseHandle"), NULL, (uintptr_t)MsiHack_Kernel32_CloseHandle }, +}; + + + +/** + * Patches the import table of the given DLL. + * + * @returns true on success, false on failure. + * @param hmod . + */ +__declspec(dllexport) /* kBuild workaround */ +bool MsiHackPatchDll(HMODULE hmod) +{ + uint8_t const * const pbImage = (uint8_t const *)hmod; + + /* + * Locate the import descriptors. + */ + /* MZ header and PE headers. */ + IMAGE_NT_HEADERS const *pNtHdrs; + IMAGE_DOS_HEADER const *pMzHdr = (IMAGE_DOS_HEADER const *)pbImage; + if (pMzHdr->e_magic == IMAGE_DOS_SIGNATURE) + pNtHdrs = (IMAGE_NT_HEADERS const *)&pbImage[pMzHdr->e_lfanew]; + else + pNtHdrs = (IMAGE_NT_HEADERS const *)pbImage; + + /* Check PE header. */ + MSIHACK_ASSERT_RETURN(pNtHdrs->Signature == IMAGE_NT_SIGNATURE, false); + MSIHACK_ASSERT_RETURN(pNtHdrs->FileHeader.SizeOfOptionalHeader == sizeof(pNtHdrs->OptionalHeader), false); + uint32_t const cbImage = pNtHdrs->OptionalHeader.SizeOfImage; + + /* Locate the import descriptor array. */ + IMAGE_DATA_DIRECTORY const *pDirEnt; + pDirEnt = (IMAGE_DATA_DIRECTORY const *)&pNtHdrs->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; + if ( pDirEnt->Size > 0 + && pDirEnt->VirtualAddress != 0) + { + const IMAGE_IMPORT_DESCRIPTOR *pImpDesc = (const IMAGE_IMPORT_DESCRIPTOR *)&pbImage[pDirEnt->VirtualAddress]; + uint32_t cLeft = pDirEnt->Size / sizeof(*pImpDesc); + MEMORY_BASIC_INFORMATION ProtInfo = { NULL, NULL, 0, 0, 0, 0, 0 }; + uint8_t *pbProtRange = NULL; + SIZE_T cbProtRange = 0; + DWORD fOldProt = 0; + uint32_t const cbPage = 0x1000; + BOOL fRc; + + MSIHACK_ASSERT_RETURN(pDirEnt->VirtualAddress < cbImage, false); + MSIHACK_ASSERT_RETURN(pDirEnt->Size < cbImage, false); + MSIHACK_ASSERT_RETURN(pDirEnt->VirtualAddress + pDirEnt->Size <= cbImage, false); + + /* + * Walk the import descriptor array. + * Note! This only works if there's a backup thunk array, otherwise we cannot get at the name. + */ + while ( cLeft-- > 0 + && pImpDesc->Name > 0 + && pImpDesc->FirstThunk > 0) + { + uint32_t iThunk; + const char * const pszImport = (const char *)&pbImage[pImpDesc->Name]; + PIMAGE_THUNK_DATA paThunks = (PIMAGE_THUNK_DATA)&pbImage[pImpDesc->FirstThunk]; + PIMAGE_THUNK_DATA paOrgThunks = (PIMAGE_THUNK_DATA)&pbImage[pImpDesc->OriginalFirstThunk]; + MSIHACK_ASSERT_RETURN(pImpDesc->Name < cbImage, false); + MSIHACK_ASSERT_RETURN(pImpDesc->FirstThunk < cbImage, false); + MSIHACK_ASSERT_RETURN(pImpDesc->OriginalFirstThunk < cbImage, false); + MSIHACK_ASSERT_RETURN(pImpDesc->OriginalFirstThunk != pImpDesc->FirstThunk, false); + MSIHACK_ASSERT_RETURN(pImpDesc->OriginalFirstThunk, false); + + /* Iterate the thunks. */ + for (iThunk = 0; paOrgThunks[iThunk].u1.Ordinal != 0; iThunk++) + { + uintptr_t const off = paOrgThunks[iThunk].u1.Function; + MSIHACK_ASSERT_RETURN(off < cbImage, false); + if (!IMAGE_SNAP_BY_ORDINAL(off)) + { + IMAGE_IMPORT_BY_NAME const *pName = (IMAGE_IMPORT_BY_NAME const *)&pbImage[off]; + size_t const cchSymbol = strlen((const char *)&pName->Name[0]); + uint32_t i = RT_ELEMENTS(g_aReplaceFunctions); + while (i-- > 0) + if ( g_aReplaceFunctions[i].cchFunction == cchSymbol + && memcmp(g_aReplaceFunctions[i].pszFunction, pName->Name, cchSymbol) == 0) + { + if ( !g_aReplaceFunctions[i].pszModule + || stricmp(g_aReplaceFunctions[i].pszModule, pszImport) == 0) + { + MsiHackDebugF("Replacing %s!%s\n", pszImport, pName->Name); + + /* The .rdata section is normally read-only, so we need to make it writable first. */ + if ((uintptr_t)&paThunks[iThunk] - (uintptr_t)pbProtRange >= cbPage) + { + /* Restore previous .rdata page. */ + if (fOldProt) + { + fRc = VirtualProtect(pbProtRange, cbProtRange, fOldProt, NULL /*pfOldProt*/); + MSIHACK_ASSERT(fRc); + fOldProt = 0; + } + + /* Query attributes for the current .rdata page. */ + pbProtRange = (uint8_t *)((uintptr_t)&paThunks[iThunk] & ~(uintptr_t)(cbPage - 1)); + cbProtRange = VirtualQuery(pbProtRange, &ProtInfo, sizeof(ProtInfo)); + MSIHACK_ASSERT(cbProtRange); + if (cbProtRange) + { + switch (ProtInfo.Protect) + { + case PAGE_READWRITE: + case PAGE_WRITECOPY: + case PAGE_EXECUTE_READWRITE: + case PAGE_EXECUTE_WRITECOPY: + /* Already writable, nothing to do. */ + fRc = TRUE; + break; + + default: + MSIHACK_ASSERT_MSG(false, ("%#x\n", ProtInfo.Protect)); + case PAGE_READONLY: + cbProtRange = cbPage; + fRc = VirtualProtect(pbProtRange, cbProtRange, PAGE_READWRITE, &fOldProt); + break; + + case PAGE_EXECUTE: + case PAGE_EXECUTE_READ: + cbProtRange = cbPage; + fRc = VirtualProtect(pbProtRange, cbProtRange, PAGE_EXECUTE_READWRITE, &fOldProt); + break; + } + MSIHACK_ASSERT_STMT(fRc, fOldProt = 0); + } + } + + paThunks[iThunk].u1.AddressOfData = g_aReplaceFunctions[i].pfnReplacement; + break; + } + } + } + } + + + /* Next import descriptor. */ + pImpDesc++; + } + + + if (fOldProt) + { + DWORD fIgnore = 0; + fRc = VirtualProtect(pbProtRange, cbProtRange, fOldProt, &fIgnore); + MSIHACK_ASSERT_MSG(fRc, ("%u\n", GetLastError())); NOREF(fRc); + } + return true; + } + MsiHackErrorF("No imports in target DLL!\n"); + return false; +} + + +/** + * The Dll main entry point. + */ +BOOL __stdcall DllMain(HANDLE hModule, DWORD dwReason, PVOID pvReserved) +{ + RT_NOREF_PV(pvReserved); + + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + { + /* + * Make sure we cannot be unloaded. This saves us the bother of ever + * having to unpatch MSI.DLL + */ + WCHAR wszName[MAX_PATH*2]; + SetLastError(NO_ERROR); + if ( GetModuleFileNameW((HMODULE)hModule, wszName, RT_ELEMENTS(wszName)) > 0 + && GetLastError() == NO_ERROR) + { + int cExtraLoads = 32; + while (cExtraLoads-- > 0) + LoadLibraryW(wszName); + } + + /* + * Initialize globals. + */ + InitializeCriticalSection(&g_CritSect); + g_papHandles = (PMSIHACKHANDLE *)calloc(sizeof(g_papHandles[0]), 8192); + if (g_papHandles) + g_cHandles = 8192; + else + { + MsiHackErrorF("Failed to allocate handle table!\n"); + return FALSE; + } + + /* + * Find MSI and patch it. + */ + static struct + { + const wchar_t *pwszName; /**< Dll name. */ + bool fSystem; /**< Set if system, clear if wix. */ + } s_aDlls[] = + { + { L"MSI.DLL", true }, + { L"CABINET.DLL", true }, + { L"WINTEROP.DLL", false }, + }; + + for (unsigned i = 0; i < RT_ELEMENTS(s_aDlls); i++) + { + HMODULE hmodTarget = GetModuleHandleW(s_aDlls[i].pwszName); + if (!hmodTarget) + { + UINT cwc; + if (s_aDlls[i].fSystem) + cwc = GetSystemDirectoryW(wszName, RT_ELEMENTS(wszName) - 16); + else + { + cwc = GetModuleFileNameW(GetModuleHandleW(NULL), wszName, RT_ELEMENTS(wszName) - 16); + while (cwc > 0 && (wszName[cwc - 1] != '\\' && wszName[cwc - 1] != '/')) + wszName[--cwc] = '\0'; + } + wszName[cwc++] = '\\'; + wcscpy(&wszName[cwc], s_aDlls[i].pwszName); + hmodTarget = LoadLibraryW(wszName); + if (!hmodTarget) + { + MsiHackErrorF("%ls could not be found nor loaded (%ls): %u\n", &wszName[cwc], wszName, GetLastError()); + return FALSE; + } + } + + if (MsiHackPatchDll(hmodTarget)) + MsiHackDebugF("MsiHackPatchDll returned successfully for %ls.\n", s_aDlls[i].pwszName); + else + MsiHackErrorF("MsiHackPatchDll failed for %ls!\n", s_aDlls[i].pwszName); + } + break; + } + + case DLL_PROCESS_DETACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + default: + /* ignore */ + break; + } + return TRUE; +} + diff --git a/src/VBox/Installer/win/MsiHack/MsiHackExtension.cs b/src/VBox/Installer/win/MsiHack/MsiHackExtension.cs new file mode 100644 index 00000000..bd5f5a6b --- /dev/null +++ b/src/VBox/Installer/win/MsiHack/MsiHackExtension.cs @@ -0,0 +1,84 @@ +/* $Id: MsiHackExtension.cs $ */ +/** @file + * MsiHackExtension - Wix Extension that loads MsiHack.dll + */ + +/* + * Copyright (C) 2016-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +using Microsoft.Tools.WindowsInstallerXml; +using System; /* For Console. */ +using System.Reflection; /* For Assembly*(). */ +using System.Runtime.InteropServices; /* For DllImport. */ +using System.IO; /* For Path. */ + + + +[assembly: AssemblyTitle("org.virtualbox.wix.msi.speed.hack")] +[assembly: AssemblyDescription("Speeding up MSI.DLL")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Oracle Corporation")] +[assembly: AssemblyProduct("org.virtualbox.wix.msi.speed.hack")] +[assembly: AssemblyCopyright("Copyright (C) 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: AssemblyDefaultWixExtension(typeof(MsiHackExtension))] + + +static class NativeMethods +{ + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + public static extern IntPtr LoadLibrary(string strPath); +} + + +public class MsiHackExtension : WixExtension +{ + public MsiHackExtension() + { + /* Figure out where we are. */ + string strCodeBase = Assembly.GetExecutingAssembly().CodeBase; + //Console.WriteLine("MsiHackExtension: strCodeBase={0}", strCodeBase); + + UriBuilder uri = new UriBuilder(strCodeBase); + string strPath = Uri.UnescapeDataString(uri.Path); + //Console.WriteLine("MsiHackExtension: strPath={0}", strPath); + + string strDir = Path.GetDirectoryName(strPath); + //Console.WriteLine("MsiHackExtension: strDir={0}", strDir); + + string strHackDll = strDir + "\\MsiHack.dll"; + //Console.WriteLine("strHackDll={0}", strHackDll); + + try + { + IntPtr hHackDll = NativeMethods.LoadLibrary(strHackDll); + Console.WriteLine("MsiHackExtension: Loaded {0} at {1}!", strHackDll, hHackDll.ToString("X")); + } + catch (Exception Xcpt) + { + Console.WriteLine("MsiHackExtension: Exception loading {0}: {1}", strHackDll, Xcpt); + } + } +} + diff --git a/src/VBox/Installer/win/NLS/de_DE.wxl b/src/VBox/Installer/win/NLS/de_DE.wxl new file mode 100644 index 00000000..a13d60f2 --- /dev/null +++ b/src/VBox/Installer/win/NLS/de_DE.wxl @@ -0,0 +1,619 @@ + + + + + + + 1033 + Deutsch + + &Nein + &Ja + A&bbrechen + &Weiter> + < &Zurück + Durch&suchen + O&K + Ü&berprüfen + &Installieren + &Entfernen + &Fertig stellen + &Reparieren + &Zurück + &Wiederholen + I&gnorieren + B&eenden + + Angepasst + Setup + + + + Lizenz + Benutzerhandbuch + + + + [ProductName] Hauptanwendung. + [ProductName] Treiber für USB Geräte-Unterstützung. + [ProductName] Treiber für Netzwerk-Unterstützung. + [ProductName] Treiber für Netzwerkbrücke. + [ProductName] Treiber für virtuellen Netzwerk-Adapter für Host-only Netzwerke. + [ProductName] Treiber für NDIS6-Netzwerkbrücke. + [ProductName] Treiber für virtuellen Netzwerk-Adapter für NDIS6-Host-only-Netzwerke. + + Python-Support für VirtualBox. + + + + Sie benötigen Administrations-Rechte zum (De-)Installieren von [ProductName]! Das Setup wird nun beendet. + Für [ProductName] muss zuerst das Microsoft Visual C++ 2019 Redistributable Package installiert werden. Bitte installieren und danach die Installation von [ProductName] wiederholen. + [ProductName] läuft nur auf Windows XP oder höher! + Diese Applikation läuft nur auf 32-bit Windows-Systemen. Bitte installieren Sie die 64-bit Version von [ProductName]! + Diese Applikation läuft nur auf 64-bit Windows-Systemen. Bitte installieren Sie die 32-bit Version von [ProductName]! + Eine alte Sun Version von VirtualBox wurde auf diesem Computer gefunden. Bitte deinstallieren Sie diese Version zuerst. Danach können Sie [ProductName] installieren! + Eine alte innotek Version von VirtualBox wurde auf diesem Computer gefunden. Bitte deinstallieren Sie diese Version zuerst. Danach können Sie [ProductName] installieren! + + + + Sind Sie sicher, dass Sie die Installation von [ProductName] abbrechen möchten? + + + + Willkommen beim Setup-Assistenten von [ProductName] + Der Setup-Assistent installiert [ProductName] auf Ihrem Computer. Klicken Sie auf "Weiter", um den Vorgang fortzusetzen, oder klicken Sie auf "Abbrechen", um den Setup-Assistenten zu beenden. + + + + Endbenutzer-Lizenzvertrag + Bitte lesen Sie den folgenden Lizenzvertrag sorgfältig durch. + Ich &akzeptiere die Bedingungen des Lizenzvertrags. + Ich &akzeptiere die Bedingungen des Lizenzvertrags nicht. + + + + Seriennummer + Bitte geben Sie die Seriennummer in die unten stehenden Felder ein. Sie finden die Nummer auf dem Aufkleber in der VirtualBox CD-Hülle. + Wenn Sie fertig mit der Eingabe sind, drücken Sie bitte den "Überprüfen"-Knopf unten. + + + + Eingegebene Seriennummer ist ungültig! + Bitte geben Sie Ihre Seriennummer erneut auf der vorherigen Seite ein. + Beachten Sie, dass die Seriennummer exakt so geschrieben sein muss wie sie auf dem Aufkleber erscheint. + + + + Warnung: + Inkompatible Saved States! + Wenn Sie jetzt [ProductName] updaten, werden alle gesicherten Zustände bereits existierender virtueller Maschinen nicht mehr funktionieren! Nach der Installation müssen Sie die gesicherten Zustände manuell verwerfen. + Jetzt mit der Installation weitermachen? + + + + Hostinterfaces + Wenn Sie bei bereits existierenden virtuellen Maschinen sogenannte Hostinterfaces verwenden, müssen Sie diese nach der Installation noch einmal neu erstellen. + + + + Ort: + Speicherplatz + Wählen Sie die Installationsart der Features aus. + Klicken Sie in der unten angezeigten Struktur auf die Symbole, um die Installationsart der Features zu ändern. + Benutzerdefiniertes Setup + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + Anpassen + Bitte unten die gewünschten Optionen auswählen: + Startmenü-Einträge anlegen + Verknüpfung auf dem Desktop anlegen + Verknüpfung in der Schnellstartleiste anlegen + Dateizuordnungen registrieren + + + + Bitte den zu verwendenden Netzwerktreiber auswählen: + NDIS5 Netzwerktreiber. +Standard für ältere Windows-Versionen (vor Vista). + NDIS6 Netzwerktreiber. +Standard für neuere Windows-Versionen (Vista und neuer). + NDIS5 Netzwerktreiber. + NDIS6 Netzwerktreiber. + + + + Warnung: + Netzwerkschnittstellen + Beim Installieren des [ProductName] Netzwerk-Features wird die Netzwerkverbindung unterbrochen und der Computer somit temporär vom Netzwerk getrennt. + Jetzt mit der Installation fortfahren? + + + + Fehlende Abhängigkeiten + Python Core / win32api + Um die [ProductName] Python-Unterstützung zu installieren, werden Python Core als auch das win32api-Paket benötigt. + Wenn nun mit der Installation der [ProductName] Python-Unterstützung fortgefahren wird, muss diese später manuell eingerichtet werden. Bitte dazu im SDK-Handbuch für mehr Informationen nachschlagen. + Jetzt mit der Installation fortfahren? + + + + Der erforderliche Speicherplatz für die Installation der ausgewählten Features. + Die markierten Datenträger verfügen nicht über genügend Speicherplatz für die ausgewählten Features. Sie können entweder einige Dateien von den markierten Datenträgern entfernen, weniger Features installieren oder einen anderen Zieldatenträger auswählen. + Erforderlicher Speicherplatz + {120}{70}{70}{70}{70} + + + + Zum Zielordner wechseln + Zielordner ändern + Eine Verzeichnisebene nach oben + Einen neuen Ordner erstellen + &Suchen in: + &Ordnername: + + + + Der Assistent ist nun bereit die Installationsart "[InstallMode]" zu installieren. + Klicken Sie auf "Installieren", um mit der Installation zu beginnen. Klicken Sie auf "Zurück", um die Installationseinstellungen zu überprüfen oder zu ändern. + Bereit zum Installieren + + + + Klicken Sie auf die Schaltfläche "Fertig stellen", um den Setup-Assistenten fertig zu stellen. + Der Setup-Assistent von [ProductName] wurde fertig gestellt. + [ProductName] nach der Installation starten + + + + Der Setup-Assistent von [ProductName] wurde vorzeitig abgebrochen + Der Setup-Assistent von [ProductName] wurde aufgrund eines Fehlers vorzeitig abgebrochen. Es wurden keine Änderungen an Ihrem System vorgenommen. Um dieses Programm zu einem späteren Zeitpunkt zu installieren, führen Sie den Setup-Assistenten erneut aus. + Klicken Sie auf die Schaltfläche "Fertig stellen", um den Setup-Assistenten fertig zu stellen. + + + + Die folgenden Anwendungen verwenden Dateien, die während des Setups aktualisiert werden müssen. Schließen Sie diese Anwendungen, und klicken Sie anschließend auf "Wiederholen", um die Installation fortzusetzen, oder auf "Beenden", um die Installation zu beenden. + Einige der zu aktualisierenden Dateien werden gerade verwendet. + Verwendete Dateien + + + + Der Setup-Assistent von [ProductName] wurde unterbrochen + Das Setup von [ProductName] wurde unterbrochen. Es wurden keine Änderungen an Ihrem System vorgenommen. Um dieses Programm zu einem späteren Zeitpunkt zu installieren, führen Sie die Installation erneut aus. + Klicken Sie auf die Schaltfläche "Fertig stellen", um den Setup-Assistenten zu beenden. + + + + Warten Sie, während [ProductName] durch den Setup-Assistenten installiert wird. Dies kann einige Zeit in Anspruch nehmen. + + + + Der Setup-Assistent von [ProductName] wird fortgesetzt + Der Setup-Assistent schließt die Installation von [ProductName] auf Ihrem Computer ab. Klicken Sie auf "Installieren", um den Vorgang fortzusetzen, oder klicken Sie auf "Abbrechen", um den Setup-Assistenten zu beenden. + + + + Ändern, Reparieren oder Entfernen der Installation + Wählen Sie den durchzuführenden Vorgang. + R&eparieren + Repariert Fehler in der aktuellen Installation durch Reparieren von fehlenden und beschädigten Dateien, Verknüpfungen und Registrierungseinträgen. + Installation reparieren + Repariere + repariert + En&tfernen + Entfernt [ProductName] vom Computer. + Installation entfernen + Entferne + entfernt + + + + Willkommen beim Setup-Assistenten von [ProductName] + Der Setup-Assistent ermöglicht Ihnen, die Installationsart der auf Ihrem Computer installierten Features von [ProductName] zu ändern oder diese von Ihrem Computer zu entfernen. Klicken Sie auf "Weiter", um den Vorgang fortzusetzen, oder klicken Sie auf "Abbrechen", um den Setup-Assistenten zu beenden. + + + + Für die Installation ist nicht genügend Speicherplatz verfügbar. + Die markierten Datenträger verfügen nicht über genügend Speicherplatz für die ausgewählten Features. Sie können entweder einige Dateien von den markierten Datenträgern entfernen, weniger Features installieren oder einen anderen Zieldatenträger auswählen. + Nicht genügend freier Speicherplatz auf dem Datenträger + + + + Für die Installation ist nicht genügend Speicherplatz verfügbar. + Die markierten Datenträger verfügen nicht über genügend Speicherplatz für die momentan ausgewählten Features. + Nicht genügend freier Speicherplatz auf dem Datenträger + Sie können entweder einige Dateien von den ausgewählten Volumes entfernen, weniger Features installieren oder einen anderen Zieldatenträger auswählen. + + + + [ProductName] entfernen + Sie haben sich entschieden, [ProductName] von Ihrem Computer zu entfernen. + Klicken Sie nun auf "Entfernen" um [ProductName] von Ihrem Computer zu entfernen. Wenn Sie die Installations-Einstellungen sehen oder verändern möchten, klicken Sie auf "Zurück". Klicken Sie auf "Beenden" um den Setup-Assistenten zu beenden. + + + + [ProductName] reparieren + Der Setup-Assistent ist nun bereit für die Reparatur von [ProductName]. + Klicken Sie nun auf "Reparieren" um [ProductName] zu reparieren. Wenn Sie die Installations-Einstellungen sehen oder verändern möchten, klicken Sie auf "Zurück". Klicken Sie auf "Beenden" um den Setup-Assistenten zu beenden. + + + + Bitte warten Sie, während der Setup-Assistent die Speicherplatz-Anforderungen ermittelt. + + + + Die folgenden Anwendungen verwenden Dateien, die aktualisiert werden müssen. Der Setup-Assistent kann diese Anwendungen schließen und erneut starten oder zu einem späteren Zeitpunkt einen Neustart des Computers durchführen. + Einige der zu aktualisierenden Dateien werden gerade verwendet. + Verwendete Dateien + An&wendungen schließen und erneut starten + Anwen&dungen nicht schließen; ein Neustart ist erforderlich + + + {{Schwerwiegender Fehler: }} + {{Fehler [1]. }} + Warnung [1]. + Information [1]. + Bei der Installation dieses Pakets ist ein unerwarteter Fehler aufgetreten. Es liegt eventuell ein das Paket betreffendes Problem vor. Der Fehlercode ist [1]. {{Argumente: [2], [3], [4]}} + {{Datenträger voll: }} + Aktion [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Meldungstyp: [1], Argument: [2] + === Protokollierung gestartet: [Date] [Time] === + === Protokollierung beendet: [Date] [Time] === + Aktion gestartet um [Time]: [1]. + Aktion beendet um [Time]: [1]. Rückgabewert [2]. + Restdauer: {[1] Minute(n) }{[2] Sekunde(n)} + Nicht genügend Arbeitsspeicher. Beenden Sie andere Anwendungen, und wiederholen Sie den Vorgang. + Installer reagiert nicht. + Installer wurde vorzeitig abgebrochen. + Bitte warten Sie, während [ProductName] konfiguriert wird. + Erforderliche Daten werden ermittelt... + Ältere Versionen dieser Anwendung werden entfernt... + Das Entfernen älterer Versionen der Anwendung wird vorbereitet... + Das Setup für {[ProductName]} wurde erfolgreich abgeschlossen. + Das Setup für {[ProductName]} ist fehlgeschlagen. + Fehler beim Lesen der Datei: [3]. {{ Systemfehler [2].}} Stellen Sie sicher, dass die Datei vorhanden ist, und Sie darauf zugreifen können. + Datei "[2]" kann nicht erstellt werden. Ein Verzeichnis mit dem gleichen Namen ist bereits vorhanden. Brechen Sie die Installation ab, und wählen Sie einen anderen Speicherort für die Installation aus. + Legen Sie den Datenträger ein: [2] + Der Installer besitzt keine ausreichenden Rechte, um auf dieses Verzeichnis zuzugreifen: [2]. Die Installation kann nicht fortgesetzt werden. Melden Sie sich als Administrator an, oder wenden Sie sich an Ihren Systemadministrator. + Fehler beim Schreiben in Datei: [2]. Überprüfen Sie, ob Sie Zugriff auf dieses Verzeichnis haben. + Fehler beim Lesen der Datei: [3]. {{ Systemfehler [2].}} Stellen Sie sicher, dass die Datei vorhanden ist und Sie darauf zugreifen können. + Eine andere Anwendung hat exklusiven Zugriff auf die Datei "[2]". Schließen Sie alle anderen Anwendungen, und klicken Sie auf "Wiederholen". + Für die Installation dieser Datei ist nicht genügend Speicherplatz vorhanden: [2]. Geben Sie Speicherplatz frei, und klicken Sie auf "Wiederholen", oder klicken Sie auf "Abbrechen", um den Vorgang zu beenden. + Quelldatei nicht gefunden: [2]. Überprüfen Sie, ob die Datei vorhanden ist und Sie Zugriff darauf haben. + Fehler beim Lesen der Datei: [3]. {{ Systemfehler [2].}} Stellen Sie sicher, dass die Datei vorhanden ist und Sie darauf zugreifen können. + Fehler beim Schreiben in die Datei: [3]. {{ Systemfehler [2].}} Stellen Sie sicher, dass Sie auf das Verzeichnis zugreifen können. + Quelldatei nicht gefunden{{(CAB-Datei)}}: [2]. Überprüfen Sie, ob die Datei vorhanden ist und Sie Zugriff darauf haben. + Das Verzeichnis "[2]" kann nicht erstellt werden. Eine Datei mit diesem Namen ist bereits vorhanden. Benennen Sie die Datei um, oder löschen Sie diese. Klicken Sie anschließend auf "Wiederholen", oder klicken Sie auf "Abbrechen", um den Vorgang zu beenden. + Das Volume [2] ist momentan nicht verfügbar. Wählen Sie ein anderes Volume aus. + Der angegebene Pfad [2] ist nicht verfügbar. + In den angegebenen Ordner konnte nicht geschrieben werden: [2]. + Beim Lesen der Datei [2] ist ein Netzwerkfehler aufgetreten + Beim Erstellen des Verzeichnisses [2] ist ein Fehler aufgetreten + Beim Erstellen des Verzeichnisses [2] ist ein Netzwerkfehler aufgetreten + Beim Öffnen der CAB-Quelldatei [2] ist ein Fehler aufgetreten. + Der angegebene Pfad ist zu lang: [2] + Der Installer besitzt keine ausreichenden Berechtigungen, um diese Datei zu ändern: [2]. + Ein Teil des Ordnerpfads "[2]" ist ungültig. Der Name des Pfads ist entweder leer oder überschreitet die vom System zugelassene Länge. + Der Pfad [2] enthält ungültige Zeichenfolgen. + Der Pfad [2] enthält ein ungültiges Zeichen. + [2] ist kein gültiger kurzer Dateiname. + Fehler beim Ermitteln der Dateisicherheit: [3] GetLastError: [2] + Ungültiges Laufwerk: [2] + Fehler beim Anwenden eines Patches auf die Datei [2]. Die Datei wurde wahrscheinlich bereits anderweitig aktualisiert und kann durch diesen Patch nicht modifiziert werden. Wenden Sie sich an den Hersteller des Patches, um weitere Informationen zu erhalten. {{Systemfehler: [3]}} + Eine erforderliche Datei kann nicht installiert werden, da die CAB-Datei [2] nicht digital signiert ist. Möglicherweise ist die CAB-Datei beschädigt. + Eine erforderliche Datei kann nicht installiert werden, da die CAB-Datei [2] eine ungültige digitale Signatur besitzt. Möglicherweise ist die CAB-Datei beschädigt.{{ Fehler [3] wurde von WinVerifyTrust zurückgegeben.}} + Die Datei [2] konnte nicht kopiert werden: CRC-Fehler. + Die Datei [2] konnte nicht verschoben werden: CRC-Fehler. + Die Datei [2] konnte nicht gepatcht werden: CRC-Fehler. + Die Datei "[2]" kann nicht installiert werden, da die Datei in der CAB-Datei "[3]" nicht gefunden wurde. Dies deutet auf einen Netzwerkfehler, einen CD-ROM-Lesefehler oder auf ein das Paket betreffendes Problem hin. + Die für die Installation erforderliche Datei "[2]" ist beschädigt und kann nicht verwendet werden. Dies deutet auf einen Netzwerkfehler, einen CD-ROM-Lesefehler oder auf ein das Paket betreffendes Problem hin. + Beim Erstellen der für die Installation erforderlichen temporären Datei ist ein Fehler aufgetreten.{{ Ordner: [3]. Systemfehlercode: [2]}} + Der Schlüssel [2] konnte nicht erstellt werden. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der Schlüssel [2] konnte nicht geöffnet werden. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der Wert [2] konnte nicht aus dem Schlüssel [3] gelöscht werden. {{ Systemfehler [4].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der Schlüssel konnte nicht gelöscht werden: [2]. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der Wert [2] konnte nicht aus dem Schlüssel [3] gelesen werden. {{ Systemfehler [4].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der Wert [2] konnte nicht unter den Schlüssel [3] geschrieben werden. {{ Systemfehler [4].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Die Schlüsselnamen für den Schlüssel [2] konnten nicht gelesen werden. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Die Namen der untergeordneten Schlüssel des Schlüssels [2] konnten nicht bestimmt werden. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Die Sicherheitsinformationen für den Schlüssel [2] konnten nicht gelesen werden. {{ Systemfehler [3].}} Stellen Sie sicher, dass Sie ausreichende Zugriffsrechte für diesen Schlüssel besitzen, oder setzen Sie sich mit dem Support in Verbindung. + Der verfügbare Registrierungsspeicher konnte nicht vergrößert werden. [2] KB freier Registrierungsspeicher sind zum Installieren dieser Anwendung erforderlich. + Es wird bereits eine weitere Installation ausgeführt. Sie müssen diese Installation abschließen, bevor Sie den Vorgang fortsetzen können. + Fehler beim Zugriff auf gesicherte Daten. Stellen Sie sicher, dass Windows Installer korrekt konfiguriert ist, und wiederholen Sie die Installation. + Benutzer "[2]" hat die Installation des Produkts "[3]" bereits initiiert. Dieser Benutzer muss die Installation erneut ausführen, bevor dieses Produkt verwendet werden kann. + Benutzer "[2]" hat die Installation des Produkts "[3]" bereits initiiert. Dieser Benutzer muss die Installation erneut ausführen, bevor dieses Produkt verwendet werden kann. + Nicht genügend Speicherplatz -- Volume: "[2]"; benötigter Speicher: [3] KB; verfügbarer Speicher: [4] KB. Geben Sie Speicherplatz frei, und wiederholen Sie den Vorgang. + Sind Sie sicher, dass Sie den Vorgang abbrechen möchten? + Die Datei [2][3] wird im Augenblick von folgendem Prozess verwendet: Name: [4], ID: [5], Fenstertitel: "[6]"}. Schließen Sie diese Anwendung, und wiederholen Sie den Vorgang. + Das Produkt "[2]" ist bereits installiert und verhindert die Installation dieses Produkts. Die beiden Produkte sind inkompatibel. + Auf Volume "[2]" steht nicht genügend Speicherplatz für die Installation bei aktivierter Wiederherstellungsoption zur Verfügung. [3] KB sind erforderlich, aber nur [4] KB sind verfügbar. Klicken Sie auf "Ignorieren", um die Installation ohne Speicherung von Wiederherstellungsinformationen fortzusetzen, klicken Sie auf "Wiederholen", um den verfügbaren Speicher erneut zu überprüfen oder auf "Abbrechen", um die Installation abzubrechen. + Auf den Netzwerkpfad [2] konnte nicht zugegriffen werden. + Die folgenden Anwendungen sollten geschlossen werden, bevor Sie die Installation fortsetzen: + Es konnte kein kompatibles Produkt auf dem Computer gefunden werden, das zur Installation dieses Produkts erforderlich ist. + Beim Übernehmen der Sicherheitseinstellungen ist ein Fehler aufgetreten. [2] ist kein gültiger Benutzer bzw. keine gültige Gruppe. Dies kann ein das Paket betreffendes Problem oder ein bei Herstellung der Netzwerkverbindung mit dem Domänencontroller aufgetretenes Problem sein. Überprüfen Sie die Netzwerkverbindung und klicken Sie auf "Wiederholen" oder "Abbrechen", um die Installation abzubrechen. {{Die SID des Benutzers wurde nicht gefunden, Systemfehler [3]}} + Der Schlüssel [2] ist ungültig. Überprüfen Sie, ob Sie den korrekten Schlüssel eingegeben haben. + Der Installer muss Ihren Computer neu starten, bevor die Konfiguration von [2] fortgesetzt werden kann. Klicken Sie auf "Ja", um den Neustart jetzt durchzuführen, oder klicken Sie auf "Nein", um den Neustart zu einem späteren Zeitpunkt manuell durchzuführen. + Sie müssen den Computer neu starten, damit die geänderte Konfiguration von [2] wirksam wird. Klicken Sie auf "Ja", um den Computer jetzt neu zu starten, oder auf "Nein", um den Computer später manuell neu zu starten. + Eine Installation von [2] ist im Augenblick angehalten. Sie müssen die von dieser Installation vorgenommenen Änderungen rückgängig machen, bevor Sie fortfahren können. Möchten Sie diese Änderungen rückgängig machen? + Im Augenblick wird eine weitere Installation dieses Produkts durchgeführt. Sie müssen die von dieser Installation vorgenommenen Änderungen rückgängig machen, bevor Sie fortfahren können. Möchten Sie diese Änderungen rückgängig machen? + Ein Installationspaket des Produkts [2] konnte nicht gefunden werden. Wiederholen Sie die Installation unter Verwendung einer gültigen Kopie des Installationspakets "[3]". + Die Installation wurde erfolgreich abgeschlossen. + Die Installation ist fehlgeschlagen. + Produkt: [2] -- [3] + Sie können den ursprünglichen Zustand des Computers wiederherstellen oder die Installation später fortsetzen. Möchten Sie eine Wiederherstellung durchführen? + Während des Schreibens der Installationsdaten auf den Datenträger ist ein Fehler aufgetreten. Überprüfen Sie, ob ausreichend Speicherplatz auf dem Datenträger vorhanden ist, und klicken Sie auf "Wiederholen", oder klicken Sie auf "Abbrechen", um die Installation zu beenden. + Eine oder mehrere Dateien, die zum Wiederherstellen des ursprünglichen Zustands Ihres Computers benötigt werden, konnten nicht gefunden werden. Wiederherstellen nicht möglich. + [2] kann eines der erforderlichen Produkte nicht installieren. Wenden Sie sich an den technischen Support. {{Systemfehler [3].}} + Die ältere Version von [2] kann nicht entfernt werden. Wenden Sie sich an den technischen Support. {{Systemfehler [3].}} + [2] wird installiert + [2] wird konfiguriert + [2] wird entfernt + Die Datei [2] wurde von der Richtlinie für die digitale Signatur zurückgewiesen. + Auf den Windows Installer-Dienst konnte nicht zugegriffen werden. Dies kann auftreten, wenn Windows im abgesicherten Modus ausgeführt wird oder wenn der Windows Installer nicht korrekt installiert wurde. Setzen Sie sich mit dem Supportpersonal in Verbindung, um weitere Unterstützung zu erhalten. + Es ist ein Problem mit dem Windows Installer-Paket aufgetreten. Ein für den Abschluss der Installation erforderliches Skript konnte nicht ausgeführt werden. Wenden Sie sich an den Support oder den Hersteller des Pakets. {{Skriptfehler [3], [4] bei benutzerdefinierter Aktion [2]: [5] Zeile [6], Spalte [7], [8]}} + Es liegt ein dieses Windows Installer-Paket betreffendes Problem vor. Ein für den Abschluss der Installation erforderliches Programm konnte nicht ausgeführt werden. Wenden Sie sich an das Supportpersonal oder den Hersteller des Pakets. {{Aktion: [2], Pfad: [3], Befehl: [4] }} + Es ist ein Problem mit dem Windows Installer-Paket aufgetreten. Ein Programm, das als Teil des Setups ausgeführt wird, wurde nicht erwartungsgemäß abgeschlossen. Wenden Sie sich an den Support oder den Hersteller des Pakets. {{Aktion [2], Pfad: [3], Befehl: [4] }} + Es ist ein Problem mit dem Windows Installer-Paket aufgetreten. Eine für den Abschluss dieser Installation erforderliche DLL-Datei konnte nicht ausgeführt werden. Wenden Sie sich an den Support oder den Hersteller des Pakets. {{Aktion [2], Eintrag: [3], Bibliothek: [4] }} + Das Entfernen wurde erfolgreich abgeschlossen. + Das Entfernen ist fehlgeschlagen. + Die Ankündigung wurde erfolgreich abgeschlossen. + Die Ankündigung ist fehlgeschlagen. + Die Konfiguration wurde erfolgreich abgeschlossen. + Die Konfiguration ist fehlgeschlagen. + Sie müssen über Administratorrechte verfügen, um diese Anwendung entfernen zu können. Melden Sie sich als Administrator an, oder wenden Sie sich an den technischen Support, um Unterstützung zu erhalten. + Das Quellinstallationspaket für das Produkt [2] stimmt nicht mehr mit dem Clientpaket überein. Wiederholen Sie die Installation mit einer gültigen Kopie des Installationspakets "[3]". + Sie müssen den Computer neu starten, um die Installation von [2] abzuschließen. Andere Benutzer sind momentan an diesem Computer angemeldet, und ein Neustart könnte unter Umständen dazu führen, dass Änderungen nicht gespeichert werden. Möchten Sie den Computer jetzt neu starten? + Der Pfad [2] ist ungültig. Geben Sie einen gültigen Pfad an. + Nicht genügend Arbeitsspeicher. Beenden Sie andere Anwendungen, und wiederholen Sie den Vorgang. + In Laufwerk [2] ist kein Datenträger eingelegt. Legen Sie einen Datenträger ein und klicken Sie auf "Wiederholen", oder klicken Sie auf "Abbrechen", um zu dem zuvor ausgewählten Volume zurückzukehren. + In Laufwerk [2] ist kein Datenträger eingelegt. Legen Sie einen Datenträger ein und klicken Sie auf "Wiederholen", oder klicken Sie auf "Abbrechen", um zum Dialog "Durchsuchen" zurückzukehren und ein anderes Volume auszuwählen. + Der Ordner [2] ist nicht vorhanden. Geben Sie einen Pfad zu einem vorhandenen Ordner ein. + Ihre Zugriffsrechte reichen nicht aus, um diesen Ordner zu lesen. + Es konnte kein gültiger Zielordner für die Installation bestimmt werden. + Fehler beim Lesen der Quellinstallationsdatenbank: [2]. + Planung des Computerneustarts: Die Datei [2] wird in [3] umbenannt. Der Computer muss neu gestartet werden, um den Vorgang abzuschließen. + Planung des Computerneustarts: Die Datei [2] wird gelöscht. Der Computer muss neu gestartet werden, um den Vorgang abzuschließen. + Fehler beim Registrieren von Modul [2]. HRESULT [3]. Wenden Sie sich an den Support. + Fehler beim Entfernen von Modul [2] aus der Registrierung. HRESULT [3]. Wenden Sie sich an den Support. + Fehler beim Zwischenspeichern von Paket [2]. Fehler: [3]. Wenden Sie sich an den Support. + Die Schriftart [2] konnte nicht registriert werden. Überprüfen Sie, ob Sie über ausreichende Berechtigungen zum Installieren von Schriftarten verfügen, und ob das System diese Schriftart unterstützt. + Die Schriftart [2] konnte nicht aus der Registrierung entfernt werden. Stellen Sie sicher, dass Sie ausreichende Berechtigungen zum Entfernen von Schriftarten besitzen. + Die Verknüpfung [2] konnte nicht erstellt werden. Stellen Sie sicher, dass der Zielordner vorhanden ist, und Sie darauf zugreifen können. + Die Verknüpfung [2] konnte nicht entfernt werden. Stellen Sie sicher, dass die Verknüpfungsdatei vorhanden ist, und Sie darauf zugreifen können. + Typbibliothek für Datei [2] konnte nicht registriert werden. Wenden Sie sich an den Support. + Typbibliothek für Datei [2] konnte nicht aus der Registrierung entfernt werden. Wenden Sie sich an den Support. + Die INI-Datei [2][3] konnte nicht aktualisiert werden. Überprüfen Sie, ob die Datei vorhanden ist und Sie Zugriff darauf haben. + Es konnte nicht festgelegt werden, dass Datei [3] beim Neustart des Computers durch Datei [2] ersetzt wird. Überprüfen Sie, ob Sie Schreibzugriff auf Datei [3] haben. + Fehler beim Entfernen des ODBC-Treiber-Managers, ODBC-Fehler [2]: [3]. Setzen Sie sich mit dem Support in Verbindung. + Fehler beim Installieren des ODBC-Treiber-Managers. ODBC-Fehler [2]: [3]. Setzen Sie sich mit dem Support in Verbindung. + Fehler beim Entfernen des ODBC-Treibers [4], ODBC-Fehler [2]: [3]. Stellen Sie sicher, dass Sie ausreichende Berechtigungen zum Entfernen von ODBC-Treibern besitzen. + Fehler beim Installieren des ODBC-Treibers: [4]. ODBC-Fehler [2]: [3}. Stellen Sie sicher, dass die Datei [4] vorhanden ist und Sie darauf zugreifen können. + Fehler beim Konfigurieren der ODBC-Datenquelle: [4]. ODBC-Fehler [2]: [3}. Stellen Sie sicher, dass die Datei [4] vorhanden ist und Sie darauf zugreifen können. + Dienst "[2]" ([3]) konnte nicht gestartet werden. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Starten von Systemdiensten besitzen. + Dienst "[2]" ([3]) konnte nicht angehalten werden. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Anhalten von Systemdiensten besitzen. + Dienst "[2]" ([3]) konnte nicht entfernt werden. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Entfernen von Systemdiensten besitzen. + Dienst "[2]" ([3]) konnte nicht installiert werden. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Installieren von Systemdiensten besitzen. + Umgebungsvariable "[2]" konnte nicht aktualisiert werden. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Ändern von Umgebungsvariablen besitzen. + Sie besitzen keine ausreichenden Berechtigungen, um diese Installation für alle Benutzer dieses Computers auszuführen. Melden Sie sich als Administrator an, und wiederholen Sie diese Installation. + Dateisicherheit für Datei "[3]" konnte nicht festgelegt werden. Fehler: [2]. Überprüfen Sie, ob Sie ausreichende Berechtigungen zum Ändern der Sicherheitsrechte für diese Datei besitzen. + Die Komponentendienste (COM+ 1.0) sind nicht auf diesem Computer installiert. Diese Installation erfordert Komponentendienste, um ordnungsgemäß abgeschlossen werden zu können. Komponentendienste sind auf Windows 2000 verfügbar. + Fehler beim Registrieren der COM+-Anwendung. Wenden Sie sich an den Support, um weitere Informationen zu erhalten. + Fehler beim Entfernen der COM+-Anwendung aus der Registrierung. Wenden Sie sich an den Support, um weitere Informationen zu erhalten. + Die Beschreibung für den Dienst "[2]" ([3]) konnte nicht geändert werden. + Der Windows Installer-Dienst kann die geschützte Systemdatei "[2]" nicht aktualisieren. Sie müssen eventuell das Betriebssystem aktualisieren, damit dieses Programm richtig ausgeführt werden kann. {{Paketversion: [3], geschützte Betriebssystemversion: [4]}} + Der Dienst "Windows Installer" kann die geschützte Windows-Datei [2] nicht aktualisieren. {{Paketversion: [3], geschützte Betriebssystemversion: [4], Systemdateischutzfehler: [5]}} + Eine oder mehrere geschützte Windows-Dateien konnten nicht aktualisiert werden {{SFP-Fehler: [2]. Liste der geschützten Dateien:\r\n[3]}} + Benutzerinstallationen sind über die Computerrichtlinie deaktiviert. + Fehler während der Installation von Assembly "[6]". Rufen Sie die Hilfe auf, oder wenden Sie sich an den Support. HRESULT: [3]. {{Assemblyschnittstelle: [4], Funktion: [5], Komponente: [2]}} + Fehler während der Installation von Assembly "[6]". Die Assembly hat entweder keinen sicheren Namen, oder sie wurde nicht mit der Mindestschlüssellänge signiert. HRESULT: [3]. {{Assemblyschnittstelle: [4], Funktion: [5], Komponente: [2]}} + Fehler während der Installation von Assembly "[6]". Die Signatur oder der Katalog konnten nicht überprüft werden oder sind ungültig. HRESULT: [3]. {{Assemblyschnittstelle: [4], Funktion: [5], Komponente: [2]}} + Fehler während der Installation der Assembly "[6]". Ein oder mehrere Module der Assembly wurden nicht gefunden. HRESULT: [3]. {{Assemblyschnittstelle: [4], Funktion: [5], Komponente: [2]}} + + + Die Applikation "[2]" muss geschlossen werden um die Installation fortsetzen zu können. + + Die Installation wird überprüft + Neue Dateien werden kopiert + Datei: [1], Verzeichnis: [9], Größe: [6] + Netzwerkinstallationsdateien werden kopiert + Datei: [1], Verzeichnis: [9], Größe: [6] + Speicherplatzbedarf wird berechnet + Speicherplatzbedarf wird berechnet + Speicherplatzbedarf wird berechnet + Verknüpfungen werden erstellt + Verknüpfung: [1] + Qualifizierte Komponenten werden veröffentlicht + Komponenten-ID: [1], Qualifizierer: [2] + Produktfeatures werden veröffentlicht + Feature: [1] + Produktinformationen werden veröffentlicht + Klassenserver werden registriert + Klassen-ID: [1] + Erweiterungsserver werden registriert + Erweiterung: [1] + MIME-Informationen werden registriert + MIME-Inhaltstyp: [1], Erweiterung: [2] + Programm-IDs werden registriert + Programm-ID: [1] + Registrierungsspeicher wird zugeordnet + Freier Speicherplatz: [1] + Installierte Anwendungen werden gesucht + Eigenschaft: [1], Signatur: [2] + Ausführbare Dateien werden gebunden + Datei: [1] + Qualifizierte Produkte werden gesucht + Ordner werden erstellt + Ordner: [1] + Dienste werden gelöscht + Dienst: [1] + Dateien werden dupliziert + Datei: [1], Verzeichnis: [9], Größe: [6] + Nach verwandten Anwendungen wird gesucht + Anwendung gefunden: [1] + ODBC-Komponenten werden installiert + Neue Dienste werden installiert + Dienst: [2] + Die Startbedingungen werden überprüft + Featurestatus verwandter Anwendungen wird migriert + Anwendung: [1] + Dateien werden verschoben + Datei: [1], Verzeichnis: [9], Größe: [6] + Dateien werden gepatcht + Datei: [1], Verzeichnis: [2], Größe: [3] + Komponentenregistrierung wird aktualisiert + COM+-Anwendungen und -Komponenten werden registriert + Anwendungs-ID: [1]{{, Anwendungstyp: [2], Benutzer: [3], RSN: [4]}} + Schriftarten werden registriert + Schriftart: [1] + Produkt wird registriert + [1] + Typenbibliotheken werden registriert + Bibliotheken-ID: [1] + Benutzer wird registriert + [1] + Duplizierte Dateien werden entfernt + Datei: [1], Verzeichnis: [9] + Umgebungsvariablen werden aktualisiert + Name: [1], Wert: [2], Aktion [3] + Anwendungen werden entfernt + Anwendung: [1], Befehlszeile: [2] + Dateien werden entfernt + Datei: [1], Verzeichnis: [9] + Ordner werden entfernt + Ordner: [1] + INI-Dateieinträge werden entfernt + Datei: [1], Abschnitt: [2], Schlüssel: [3], Wert: [4] + ODBC-Komponenten werden entfernt + Systemregistrierungswerte werden entfernt + Schlüssel: [1], Name: [2] + Verknüpfungen werden entfernt + Verknüpfung: [1] + Qualifizierte Produkte werden gesucht + Modul wird aus der Registrierung entfernt + Datei: [1], Ordner: [2] + Modulregistrierung wird aufgehoben + Datei: [1], Ordner: [2] + ODBC-Verzeichnisse werden initialisiert + Dienste werden gestartet + Dienst: [1] + Dienste werden beendet + Dienst: [1] + Veröffentlichung qualifizierter Komponenten wird aufgehoben + Komponenten-ID: [1], Qualifizierer: [2] + Veröffentlichung der Produktfeatures wird aufgehoben + Feature: [1] + Registrierung der Klassenserver wird aufgehoben + Klassen-ID: [1] + Registrierung der COM+-Anwendungen und -Komponenten wird aufgehoben + Anwendungs-ID: [1]{{, Anwendungstyp: [2]}} + Registrierung der Erweiterungsserver wird aufgehoben + Erweiterung: [1] + Registrierung der Schriftarten wird aufgehoben + Schriftart: [1] + Registrierung der MIME-Informationen wird aufgehoben + MIME-Inhaltstyp: [1], Erweiterung: [2] + Registrierung der Programm-IDs wird aufgehoben + Programm-ID: [1] + Registrierung der Typenbibliotheken wird aufgehoben + Bibliotheken-ID: [1] + Umgebungsvariablen werden aktualisiert + Name: [1], Wert: [2], Aktion [3] + INI-Dateiwerte werden geschrieben + Datei: [1], Abschnitt: [2], Schlüssel: [3], Wert: [4] + Systemregistrierungswerte werden geschrieben + Schlüssel: [1], Name: [2], Wert: [3] + Anwendung wird angekündigt + Für folgende Aktion werden Skriptvorgänge erstellt: + [1] + Systemkatalog wird installiert + Datei: [1], Abhängigkeiten: [2] + Assemblyinformationen werden veröffentlicht + Anwendungskontext:[1], Assemblyname:[2] + Veröffentlichung der Assemblierungsinformationen wird aufgehoben + Anwendungskontext:[1], Assemblyname:[2] + Aktion wird rückgängig gemacht: + [1] + Sicherungsdateien werden entfernt + Datei: [1] + Verschobene Dateien werden entfernt + Datei: [1], Verzeichnis: [9] + Veröffentlichung der Produktinformationen wird aufgehoben + + Bytes + GB + KB + MB + Nicht verfügbar + Bei der ersten Verwendung installieren + Alles von CD starten + Alles auf der lokalen Festplatte installieren + Alles vom Netzwerk starten + Von CD starten + Auf der lokalen Festplatte installieren + Vom Netzwerk starten + Erforderliche Daten werden ermittelt... + Dieses Feature wird nicht installiert. + Dieses Feature wird bei der ersten Verwendung installiert. + Dieses Feature wird zum Starten von CD installiert. + Dieses Feature wird auf der lokalen Festplatte installiert. + Dieses Feature wird zum Starten vom Netzwerk installiert. + Dieses Feature wird nicht verfügbar sein. + Dieses Feature wird bei der ersten Verwendung installiert. + Dieses Feature wird von CD gestartet. + Dieses Feature wird auf der lokalen Festplatte installiert. + Dieses Feature wird vom Netzwerk gestartet. + Dieses Feature wird vollständig deinstalliert und kann nicht von CD gestartet werden. + Dieses Feature wird nicht mehr von CD gestartet, sondern bei der ersten Verwendung installiert. + Dieses Feature wird weiterhin von CD gestartet. + Dieses Feature wird nicht mehr von CD gestartet, sondern auf der lokalen Festplatte installiert. + Dieses Feature gibt [1] auf der Festplatte frei. + Diese Funktion erfordert [1] auf der Festplatte. + Kosten für dieses Feature werden berechnet... + Dieses Feature wird vollständig entfernt. + Dieses Feature wird von der lokalen Festplatte entfernt und bei der ersten Verwendung installiert. + Dieses Feature wird von der lokalen Festplatte entfernt, bleibt aber zum Starten von CD installiert. + Dieses Feature bleibt weiterhin auf der lokalen Festplatte installiert. + Dieses Feature wird von der lokalen Festplatte entfernt, bleibt aber zum Starten vom Netzwerk installiert. + Dieses Feature wird vollständig deinstalliert und kann nicht vom Netzwerk gestartet werden. + Dieses Feature wird nicht mehr vom Netzwerk gestartet, sondern bei der ersten Verwendung installiert. + Dieses Feature wird nicht mehr vom Netzwerk gestartet, sondern auf der lokalen Festplatte installiert. + Dieses Feature wird weiterhin vom Netzwerk gestartet. + Dieses Feature gibt [1] auf der Festplatte frei. Es sind [2] von [3] untergeordneten Features ausgewählt, die [4] auf der Festplatte freigeben. + Dieses Feature gibt [1] auf der Festplatte frei. Es sind [2] von [3] untergeordneten Features ausgewählt, die [4] auf der Festplatte erfordern. + Dieses Feature erfordert [1] auf der Festplatte. Es sind [2] von [3] untergeordneten Features ausgewählt, die [4] auf der Festplatte freigeben. + Dieses Feature erfordert [1] auf der Festplatte. Es sind [2] von [3] untergeordneten Features ausgewählt, die [4] auf der Festplatte erfordern. + Restdauer: {[1] Minute(n) }{[2] Sekunde(n)} + Verfügbar + Differenz + Erforderlich + Datenträgergröße + Volume + + diff --git a/src/VBox/Installer/win/NLS/el_GR.wxl b/src/VBox/Installer/win/NLS/el_GR.wxl new file mode 100644 index 00000000..8b52b8cf --- /dev/null +++ b/src/VBox/Installer/win/NLS/el_GR.wxl @@ -0,0 +1,624 @@ + + + + + + + 1032 + Ελληνικά + + Όχι + Ναι + Άκυρο + Επόμενο> + Πίσω + Εξερεύνηση + ΟΚ + Έλεγχος + Εγκατάσταση + Κατάργηση + Τέλος + Επισκευή + Επιστροφή + Επανάληψη + Παράβλεψη + Έξοδος + + Προσαρμοσμένο + Εγκατάσταση + + + + Άδεια + Εγχειρίδιο χρήστη + + + + Εφαρμογή [ProductName]. + Οδηγός συσκευών USB [ProductName] για υποστήριξη συσκευών USB. + Οδηγός συσκευών δικτύου [ProductName] για υποστήριξη δικτύου. + Οδηγός [ProductName] για γεφυρωμένη δικτύωση. + Οδηγός [ProductName] εικονικής κάρτας δικτύου για μόνο-με-οικοδεσπότη δίκτυα. + Οδηγός [ProductName] για NDIS6 γεφυρωμένα δίκτυα. + Οδηγός [ProductName] εικονικής κάρτας δικτύου για NDIS6 μόνο-με-οικοδεσπότη δίκτυα. + + Υποστήριξη Python για το VirtualBox. + + + + Πρέπει να έχετε δικαιώματα διαχειριστή για την (απ)εγκατάσταση του [ProductName]! Η εφαρμογή θα τερματιστεί τώρα. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + Αυτή η εφαρμογή τρέχει μόνο σε Windows XP ή παραπάνω. + Αυτή η εφαρμογή τρέχει μόνο σε συστήματα Windows 32 bit. Εγκαταστήστε την έκδοση 64-bit του [ProductName]! + Αυτή η εφαρμογή τρέχει μόνο σε συστήματα Windows 64 bit. Εγκαταστήστε την έκδοση 32-bit του [ProductName]! + Βρέθηκε μία παλιότερη εγκατάσταση του Sun VirtualBox στον υπολογιστή. Καταργήστε πρώτα την εγκατάσταση αυτού του πακέτου και μετά εγκαταστήστε το [ProductName]! + Βρέθηκε μία παλιότερη εγκατάσταση του innotek VirtualBox στον υπολογιστή. Καταργήστε πρώτα την εγκατάσταση αυτού του πακέτου και μετά εγκαταστήστε το [ProductName]! + + + + Είστε βέβαιοι ότι θέλετε να ακυρώσετε την εγκατάσταση του [ProductName]; + + + + Καλώς ήρθατε στον Οδηγό Εγκατάστασης [ProductName] + Ο Οδηγός Εγκατάστασης θα εγκαταστήσει το [ProductName] στον υπολογιστή σας. Κάντε κλικ στο κουμπί "Επόμενο" για να συνεχίσετε ή στο κουμπί "Άκυρο" για έξοδο από τον Οδηγό Εγκατάστασης. + + + + Συμφωνία Άδειας Χρήσης Τελικού Χρήστη + Διαβάστε προσεκτικά την παρακάτω Άδειας Χρήσης. + Αποδέχομαι τους όρους της Άδειας Χρήσης + Δεν αποδέχομαι τους όρους της Άδειας Χρήσης + + + + Σειριακός Αριθμός + Εισάγετε τον σειριακό αριθμό σας στα παρακάτω πεδία. Θα το βρείτε στο αυτοκόλλητο μέσα στην θήκη του CD του VirtualBox. + Όταν ολοκληρώσετε την εισαγωγή του σειριακού αριθμού, πατήστε το κουμπί "Check" παρακάτω. + + + + Ο καταχωρημένος σειριακός αριθμός δεν ήταν έγκυρος! + Πληκτρολογήσετε ξανά τον σειριακό αριθμό σας. + Λάβετε υπόψη ότι ο σειριακός αριθμός πρέπει να γράφεται ακριβώς όπως είναι τυπωμένος στο αυτοκόλλητο. + + + + Προειδοποίηση: + Μη Συμβατές Αποθηκευμένες Καταστάσεις! + Κατά την αναβάθμιση του [ProductName], όλες οι αποθηκευμένες καταστάσεις από τα ήδη υπάρχοντα σας εικονικές μηχανές δεν θα λειτουργούν πια! Μετά την εγκατάσταση, πρέπει να τις απορρίψετε μη αυτόματα. + Συνέχιση της εγκατάστασης; + + + + Κάρτες Δικτύου + Αν χρησιμοποιούσατε ορισμένες κάρτες δικτύου για τις εικονικές μηχανές σας στην προηγούμενη έκδοση, θα πρέπει να τις ξαναδημιουργήσετε χειροποίητα μετά από την εγκατάσταση. + + + + Η ακόλουθη εφαρμογή θα πρέπει να κλείσει πριν συνεχίσετε την εγκατάσταση: "[2]" + + + + Τοποθεσία: + Χρήση Δίσκου + Επιλέξτε τον τρόπο που θέλετε να εγκατασταθούν οι δυνατότητες. + Κάντε κλικ στα εικονίδια στο παρακάτω δέντρο για να αλλάξετε τον τρόπο που θα εγκατασταθούν οι δυνατότητες. + Προσαρμοσμένη ρύθμιση + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + Προσαρμογή + Διαλέξτε από τις παρακάτω επιλογές: + Δημιουργία καταχωρήσεων στο μενού έναρξης + Δημιουργία συντόμευσης στην επιφάνεια εργασίας + Δημιουργία συντόμευσης στη γραμμή γρήγορης εκκίνησης + Καταχώριση συσχετίσεων αρχείων + + + + Επιλέξτε ποιο τύπο οδηγών δικτύου θα χρησιμοποιήσετε: + Οδηγός δικτύου NDIS5. +Αυτή είναι η προεπιλογή για παλαιότερες εκδόσεις των Windows (προ-Vista). + Οδηγός δικτύου NDIS6. +Αυτό είναι η προεπιλογή για νεότερες εκδόσεις των Windows (Vista και νεώτερα). + Χρησιμοποιήστε τον οδηγό δικτύου NDIS5. + Χρησιμοποιήστε τον οδηγό δικτύου NDIS6. + + + + Προειδοποίηση: + Κάρτες Δικτύου + Η εγκατάσταση των χαρακτηριστικών δικτύου [ProductName] θα επαναφέρει τη σύνδεση δικτύου σας και θα σας αποσυνδέσει προσωρινά από το δίκτυο. + Συνέχιση της εγκατάστασης; + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + Ο χώρος στο δίσκο που απαιτείται για την εγκατάσταση των επιλεγμένων δυνατοτήτων. + Οι επισημασμένοι τόμοι (αν υπάρχουν) δεν διαθέτουν αρκετό χώρο στο δίσκο για τις επιλεγμένες δυνατότητες. Μπορείτε είτε να αφαιρέσετε ορισμένα αρχεία από τους τόμους που έχουν επισημανθεί, είτε να εγκαταστήσετε λιγότερες δυνατότητες σε τοπικές μονάδες, ή να επιλέξετε διαφορετικές μονάδες προορισμού. + Απαιτήσεις Χώρου στο Δίσκο + {120}{70}{70}{70}{70} + + + + Αναζήτηση στο φάκελο προορισμού + Αλλαγή τρέχοντος φακέλου προορισμού + Ένα επίπεδο πιο πάνω + Δημιουργία νέου φακέλου + Αναζήτηση σε: + Όνομα φακέλου: + + + + Ο Οδηγός Εγκατάστασης είναι έτοιμος να ξεκινήσει την [InstallMode] εγκατάσταση. + Κάντε κλικ στο κουμπί "Εγκατάσταση" για να ξεκινήσετε την εγκατάσταση. Αν θέλετε να αναθεωρήσετε ή να αλλάξετε κάποια από τις ρυθμίσεις εγκατάστασης, κάντε κλικ στο κουμπί "Πίσω". Κάντε κλικ στο κουμπί "Άκυρο" για έξοδο από τον οδηγό. + Έτοιμο για εγκατάσταση + + + + Κάντε κλικ στο κουμπί "Τέλος" για να βγείτε από τον Οδηγό εγκατάστασης. + Η εγκατάσταση του [ProductName] ολοκληρώθηκε. + Ξεκινήστε το [ProductName] μετά την εγκατάσταση + + + + Ο Οδηγός Εγκατάστασης του [ProductName] ολοκληρώθηκε πρόωρα + Η εγκατάσταση του [ProductName] σταμάτησε πρόωρα λόγω σφάλματος. Το σύστημά σας δεν έχει τροποποιηθεί. Για να εγκαταστήσετε το πρόγραμμα αργότερα, εκτελέστε ξανά την εγκατάσταση. + Κάντε κλικ στο κουμπί "Τέλος" για να βγείτε από τον Οδηγό Εγκατάστασης. + + + + Οι ακόλουθες εφαρμογές χρησιμοποιούν αρχεία που πρέπει να ενημερωθούν από αυτή τη εγκατάσταση. Κλείστε αυτές τις εφαρμογές και κάντε κλικ στο κουμπί "Επανάληψη" για να συνεχίσετε την εγκατάσταση ή στο κουμπί "Έξοδος" για έξοδο. + Ορισμένα αρχεία που πρέπει να ενημερωθούν χρησιμοποιούνται αυτή τη στιγμή. + Αρχεία σε Χρήση + + + + Ο Οδηγός Εγκατάστασης του [ProductName] διακόπηκε + Η εγκατάσταση του [ProductName] διακόπτεται. Το σύστημά σας δεν έχει τροποποιηθεί. Για να εγκαταστήσετε αυτό το πρόγραμμα αργότερα, εκτελέστε ξανά την εγκατάσταση. + Κάντε κλικ στο κουμπί "Τέλος" για να βγείτε από τον Οδηγό εγκατάστασης. + + + + Περιμένετε μέχρι ο Οδηγός Εγκατάστασης να εγκαταστήσει το [ProductName]. Αυτό μπορεί να διαρκέσει αρκετά λεπτά. + + + + Επαναφορά του Οδηγού Εγκατάστασης [ProductName] + Ο Οδηγός Εγκατάστασης θα ολοκληρώσει την εγκατάσταση του [ProductName] στον υπολογιστή σας. Κάντε κλικ στο κουμπί "Εγκατάσταση" για να συνεχίσετε ή στο κουμπί "Άκυρο" για έξοδο από τον Οδηγό Εγκατάστασης. + + + + Τροποποίηση, Επισκευή ή Κατάργηση εγκατάστασης + Επιλέξτε τη λειτουργία που θέλετε να εκτελέσετε. + Επισκευή + Επισκευή σφαλμάτων στην πιο πρόσφατη κατάσταση εγκατάστασης - διορθώνει αλλοιωμένα αρχεία ή αρχεία που λείπουν, συντομεύσεις και καταχωρήσεις μητρώου. + Επισκευή εγκατάστασης + Επισκευάζει + επισκευές + Κατάργηση + Καταργεί το [ProductName] από τον υπολογιστή σας. + Κατάργηση εγκατάστασης + Κατάργεί + καταργήσεις + + + + Καλώς ήρθατε στον Οδηγό Εγκατάστασης [ProductName] + Ο Οδηγός εγκατάστασης θα σας επιτρέψει να επισκευάσετε την τρέχουσα εγκατάσταση ή να καταργήσετε το [ProductName] από τον υπολογιστή σας. Κάντε κλικ στο κουμπί "Επόμενο" για να συνεχίσετε ή στο κουμπί "Άκυρο" για έξοδο από τον Οδηγό Εγκατάστασης. + + + + Ο χώρος στο δίσκο που απαιτείται για την εγκατάσταση υπερβαίνει το διαθέσιμο χώρο στο δίσκο. + Οι τόμοι που επισημαίνονται δεν έχουν αρκετό διαθέσιμο χώρο στο δίσκο για τις επιλεγμένες δυνατότητες. Μπορείτε να καταργήσετε μερικά αρχεία από τους τόμους που επισημαίνονται, να εγκαταστήσετε λιγότερες δυνατότητες ή να επιλέξετε μια διαφορετική μονάδα δίσκου προορισμού. + Δεν υπάρχει αρκετός χώρος στο δίσκο + + + + Ο χώρος στο δίσκο που απαιτείται για την εγκατάσταση υπερβαίνει το διαθέσιμο χώρο στο δίσκο. + Οι τόμοι που επισημαίνονται δεν έχουν αρκετό διαθέσιμο χώρο στο δίσκο για τις επιλεγμένες δυνατότητες. Μπορείτε να καταργήσετε μερικά αρχεία από τους τόμους που επισημαίνονται, να εγκαταστήσετε λιγότερες δυνατότητες ή να επιλέξετε μια διαφορετική μονάδα δίσκου προορισμού. + Δεν υπάρχει αρκετός χώρος στο δίσκο + Εναλλακτικά, μπορείτε να επιλέξετε να απενεργοποιήσετε τη λειτουργία επαναφοράς του εγκαταστάτη. Αυτό επιτρέπει στο πρόγραμμα εγκατάστασης να επαναφέρει την αρχική κατάσταση του υπολογιστή σας σε περίπτωση διακοπής της εγκατάστασης με οποιονδήποτε τρόπο. Κάντε κλικ στο κουμπί "Ναι" εάν θέλετε να αναλάβετε το ρίσκο απενεργοποίησης της επαναφοράς. + + + + Κατάργηση [ProductName] + Έχετε επιλέξει να καταργήσετε το πρόγραμμα από τον υπολογιστή σας. + Κάντε κλικ στο κουμπί "Κατάργηση" για να καταργήσετε το [ProductName] από τον υπολογιστή σας. Αν θέλετε να αναθεωρήσετε ή να αλλάξετε κάποια από τις ρυθμίσεις εγκατάστασης, κάντε κλικ στο κουμπί "Πίσω". Κάντε κλικ στο κουμπί "Άκυρο" για έξοδο από τον οδηγό. + + + + Επιδιόρθωση [ProductName] + Ο Οδηγός εγκατάστασης είναι έτοιμος να ξεκινήσει την επιδιόρθωση του [ProductName]. + Κάντε κλικ στο κουμπί "Επιδιόρθωση" για να επιδιορθώσετε την εγκατάσταση του [ProductName]. Αν θέλετε να αναθεωρήσετε ή να αλλάξετε κάποια από τις ρυθμίσεις εγκατάστασης, κάντε κλικ στο κουμπί "Πίσω". Κάντε κλικ στο κουμπί "Άκυρο" για έξοδο από τον οδηγό. + + + + Περιμένετε μέχρι να ολοκληρωθεί ο καθορισμός των απαιτήσεων του χώρου στο δίσκο. + + + + Οι ακόλουθες εφαρμογές χρησιμοποιούν αρχεία που πρέπει να ενημερωθούν από αυτή τη ρύθμιση. Μπορείτε να αφήσετε τον Οδηγό εγκατάστασης να τα κλείσει και να επιχειρήσετε να τα επανεκκινήσετε ή να επανεκκινήσετε αργότερα το μηχάνημα. + Ορισμένα αρχεία που πρέπει να ενημερωθούν χρησιμοποιούνται αυτή τη στιγμή. + Αρχεία σε χρήση + Κλείστε τις εφαρμογές και προσπαθήστε να τις επανεκκινήσετε. + Μην κλείσετε εφαρμογές. Απαιτείται επανεκκίνηση. + + + {{Ανεπανόρθωτο σφάλμα: }} + {{Σφάλμα [1]. }} + Προειδοποίηση [1]. + + Πληροφορίες [1]. + Το πρόγραμμα εγκατάστασης αντιμετώπισε ένα μη αναμενόμενο σφάλμα κατά την εγκατάσταση αυτού του πακέτου. Αυτό μπορεί να αποτελεί ένδειξη προβλήματος σε αυτό το πακέτο. Ο κωδικός σφάλματος είναι [1]. {{Τα ορίσματα είναι: [2], [3], [4]}} + + {{Ο δίσκος είναι πλήρης: }} + Ενέργεια [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Τύπος μηνύματος: [1], Όρισμα: [2] + === Έναρξη καταγραφής: [Date] [Time] === + === Διακοπή καταγραφής: [Date] [Time] === + Έναρξη ενέργειας [Time]: [1]. + Τερματισμός ενέργειας [Time]: [1]. Τιμή επιστροφής [2]. + Χρόνος που απομένει: {[1] λεπτά }{[2] δευτερόλεπτα} + Η μνήμη δεν επαρκεί. Τερματίστε τις άλλες εφαρμογές προτού προσπαθήσετε ξανά. + Το πρόγραμμα εγκατάστασης δεν αποκρίνεται πλέον. + Το πρόγραμμα εγκατάστασης τερματίστηκε πρόωρα. + Περιμένετε όσο τα Windows ρυθμίζουν τις παραμέτρους του [ProductName] + Συλλογή απαιτούμενων πληροφοριών... + Κατάργηση παλαιότερων εκδόσεων αυτής της εφαρμογής... + Προετοιμασία για κατάργηση παλαιότερων εκδόσεων της εφαρμογής... + Η εγκατάσταση του {[ProductName] }ολοκληρώθηκε με επιτυχία. + Η εγκατάσταση του {[ProductName] } απέτυχε. + Παρουσιάστηκε σφάλμα κατά την ανάγνωση από το αρχείο: [2]. {{Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Δεν είναι δυνατή η δημιουργία του αρχείου "[2]". Υπάρχει ήδη ένας κατάλογος με αυτό το όνομα. Ακυρώστε την εγκατάσταση και προσπαθήστε να κάνετε εγκατάσταση σε διαφορετική θέση. + Τοποθετήστε το δίσκο: [2] + Το πρόγραμμα εγκατάστασης δεν διαθέτει επαρκή δικαιώματα πρόσβασης σε αυτόν τον κατάλογο: [2]. Δεν είναι δυνατό να συνεχιστεί η εγκατάσταση. Συνδεθείτε ως διαχειριστής ή επικοινωνήστε με το διαχειριστή του συστήματός σας. + Παρουσιάστηκε σφάλμα κατά την εγγραφή στο αρχείο: [2]. Βεβαιωθείτε ότι έχετε πρόσβαση σε αυτόν τον κατάλογο. + Παρουσιάστηκε σφάλμα κατά την ανάγνωση από το αρχείο [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Μια άλλη εφαρμογή έχει αποκλειστικά δικαιώματα πρόσβασης στο αρχείο '[2]'. Τερματίστε όλες τις άλλες εφαρμογές και κάντε κλικ στο κουμπί "Επανάληψη". + Δεν υπάρχει αρκετός χώρος στο δίσκο για την εγκατάσταση αυτού του αρχείου: [2]. Αποδεσμεύστε χώρο από το δίσκο και μετά κάντε κλικ στο κουμπί "Επανάληψη" ή στο κουμπί "Άκυρο" για έξοδο. + Το αρχείο προέλευσης δεν βρέθηκε: [2]. Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Παρουσιάστηκε σφάλμα κατά την ανάγνωση από το αρχείο: [3]. {{ Σφάλμα συστήματος [2].}} Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Παρουσιάστηκε σφάλμα κατά την εγγραφή στο αρχείο: [3]. {{ Σφάλμα συστήματος [2].}} Βεβαιωθείτε ότι έχετε πρόσβαση σε αυτόν τον κατάλογο. + Δεν βρέθηκε το αρχείο προέλευσης{{(αρχειοθήκη)}}: [2]. Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Δεν είναι δυνατή η δημιουργία του καταλόγου "[2]". Υπάρχει ήδη ένα αρχείο με αυτό το όνομα. Μετονομάστε ή καταργήστε το αρχείο και κάντε κλικ στο κουμπί "Επανάληψη" ή στο κουμπί "Άκυρο" για έξοδο. + Ο τόμος [2] δεν είναι διαθέσιμος αυτήν τη στιγμή. Επιλέξτε έναν άλλον τόμο. + Η καθορισμένη διαδρομή "[2]" δεν είναι διαθέσιμη. + Δεν είναι δυνατή η εγγραφή στον καθορισμένο φάκελο: [2]. + Παρουσιάστηκε σφάλμα δικτύου κατά την προσπάθεια ανάγνωσης από το αρχείο: [2] + Παρουσιάστηκε σφάλμα κατά την προσπάθεια δημιουργίας του καταλόγου: [2] + Παρουσιάστηκε σφάλμα δικτύου κατά την προσπάθεια δημιουργίας του καταλόγου: [2] + Παρουσιάστηκε σφάλμα δικτύου κατά την προσπάθεια ανοίγματος της αρχειοθήκης του αρχείου προέλευσης: [2] + Η καθορισμένη διαδρομή είναι υπερβολικά μεγάλη: [2] + Το πρόγραμμα εγκατάστασης δεν έχει επαρκή δικαιώματα για την τροποποίηση αυτού του αρχείου: [2]. + Ένα μέρος της διαδρομής φακέλου "[2]" δεν είναι έγκυρο. Είτε είναι κενό είτε υπερβαίνει το μέγιστο επιτρεπόμενο μήκος του συστήματος. + Η διαδρομή φακέλου "[2]" περιέχει λέξεις που δεν είναι έγκυρες σε διαδρομές φακέλων. + Η διαδρομή φακέλου "[2]" περιέχει ένα μη έγκυρο χαρακτήρα. + Το "[2]" δεν είναι έγκυρο σύντομο όνομα αρχείου. + Παρουσιάστηκε σφάλμα κατά τη λήψη της ασφάλειας του αρχείου: [3] GetLastError: [2] + Η μονάδα δίσκου δεν είναι έγκυρη: [2] + Παρουσιάστηκε σφάλμα κατά την εφαρμογή της ενημέρωσης κώδικα στο αρχείο [2]. Πιθανόν να έχει ενημερωθεί με άλλα μέσα και να μην είναι δυνατή η τροποποίησή του από αυτή την ενημέρωση κώδικα. Για περισσότερες πληροφορίες, επικοινωνήστε με τον προμηθευτή της ενημέρωσης κώδικα. {{Σφάλμα συστήματος: [3]}} + Δεν είναι δυνατή η εγκατάσταση ενός απαιτούμενου αρχείου, επειδή η αρχειοθήκη [2] δεν είναι υπογεγραμμένη ψηφιακά. Αυτό μπορεί να σημαίνει ότι η αρχειοθήκη είναι κατεστραμμένη. + Δεν είναι δυνατή η εγκατάσταση ενός απαιτούμενου αρχείου, επειδή η αρχειοθήκη [2] έχει μη έγκυρη ψηφιακή υπογραφή. Αυτό μπορεί να σημαίνει ότι η αρχειοθήκη είναι κατεστραμμένη.{{ Επιστράφηκε σφάλμα [3] από τη λειτουργία WinVerifyTrust.}} + Αποτυχία σωστής αντιγραφής αρχείου [2]: Σφάλμα CRC. + Αποτυχία σωστής μετακίνησης αρχείου [2]: Σφάλμα CRC. + Αποτυχία σωστής ενημέρωσης αρχείου [2]: Σφάλμα CRC. + Δεν είναι δυνατή η εγκατάσταση του αρχείου "[2]", επειδή δεν είναι δυνατή η εύρεση του αρχείου στην αρχειοθήκη "[3]". Αυτό μπορεί να σημαίνει σφάλμα δικτύου, σφάλμα ανάγνωσης από το CD-ROM ή πρόβλημα του πακέτου. + Η αρχειοθήκη "[2]" που απαιτείται για αυτή την εγκατάσταση έχει καταστραφεί και δεν μπορεί να χρησιμοποιηθεί. Αυτό μπορεί να σημαίνει σφάλμα δικτύου, σφάλμα ανάγνωσης από το CD-ROM ή πρόβλημα του πακέτου. + Παρουσιάστηκε σφάλμα κατά την απόπειρα δημιουργίας ενός προσωρινού αρχείου απαραίτητου για την ολοκλήρωση αυτής της εγκατάστασης.{{ Φάκελος: [3]. Κωδικός σφάλματος συστήματος: [2]}} + Δεν ήταν δυνατή η δημιουργία του κλειδιού: [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατό το άνοιγμα του κλειδιού: [2]. {{Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η διαγραφή της τιμής [2] από το κλειδί [3]. {{ Σφάλμα συστήματος [4].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η διαγραφή του κλειδιού [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η ανάγνωση της τιμής [2] από το κλειδί [3]. {{ Σφάλμα συστήματος [4].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η εγγραφή της τιμής [2] στο κλειδί [3]. {{ Σφάλμα συστήματος [4].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η λήψη ονομάτων τιμών για το κλειδί [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η λήψη ονομάτων δευτερευόντων κλειδιών για το κλειδί [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η ανάγνωση πληροφοριών ασφαλείας για το κλειδί [2]. {{ Σφάλμα συστήματος [3].}} Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα πρόσβασης σε αυτό το κλειδί ή επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η αύξηση του διαθέσιμου χώρου στο μητρώο. Απαιτούνται [2] KB ελεύθερου χώρου στο μητρώο για την εγκατάσταση αυτής της εφαρμογής. + Μια άλλη εγκατάσταση είναι σε εξέλιξη. Ολοκληρώστε την εγκατάσταση που βρίσκεται σε εξέλιξη προτού συνεχίσετε με αυτή την εγκατάσταση. + Παρουσιάστηκε σφάλμα κατά την πρόσβαση σε ασφαλή δεδομένα. Βεβαιωθείτε ότι οι παράμετροι του Windows Installer έχουν ρυθμιστεί σωστά και προσπαθήστε να επαναλάβετε την εγκατάσταση. + Ο χρήστης "[2]" έχει προετοιμάσει ήδη μια εγκατάσταση για το προϊόν "[3]". Αυτός ο χρήστης θα πρέπει να εκτελέσει τη συγκεκριμένη εγκατάσταση ξανά, για να μπορέσει να χρησιμοποιήσει το προϊόν. Η τρέχουσα εγκατάσταση θα συνεχιστεί τώρα. + Ο χρήστης "[2]" έχει προετοιμάσει ήδη μια εγκατάσταση για το προϊόν "[3]". Αυτός ο χρήστης θα πρέπει να εκτελέσει τη συγκεκριμένη εγκατάσταση ξανά, για να μπορέσει να χρησιμοποιήσει το προϊόν. + Δεν επαρκεί ο χώρος στο δίσκο -- Τόμος: "[2]"; απαιτούμενος χώρος: [3] KB, διαθέσιμος χώρος: [4] KB. Αποδεσμεύστε χώρο στο δίσκο και δοκιμάστε ξανά. + Είστε βέβαιοι ότι θέλετε να κάνετε ακύρωση; + Το αρχείο [2][3] χρησιμοποιείται { από την ακόλουθη διεργασία: Όνομα: [4], Αναγνωριστικό: [5], Τίτλος παραθύρου: "[6]"}. Κλείστε αυτή την εφαρμογή και δοκιμάστε ξανά. + Το προϊόν "[2]" είναι ήδη εγκατεστημένο, γεγονός που εμποδίζει την εγκατάσταση αυτού του προϊόντος. Τα δύο προϊόντα δεν είναι συμβατά. + Δεν υπάρχει αρκετός χώρος δίσκου στον τόμο "[2]" για τη συνέχιση της εγκατάστασης με ενεργοποιημένη την ανάκτηση. Απαιτούνται [3] KB, αλλά είναι διαθέσιμα μόνο [4] KB. Κάντε κλικ στο κουμπί "Παράβλεψη", για να συνεχίσετε την εγκατάσταση χωρίς την αποθήκευση πληροφοριών ανάκτησης. Κάντε κλικ στο κουμπί "Επανάληψη" για νέο έλεγχο του διαθέσιμου χώρου ή στο κουμπί "Άκυρο", για να τερματίσετε την εγκατάσταση. + Δεν ήταν δυνατή η πρόσβαση στη θέση δικτύου [2]. + Πρέπει να κλείσετε τις παρακάτω εφαρμογές, για να συνεχίσετε την εγκατάσταση: + Δεν ήταν δυνατή η εύρεση συμβατών προϊόντων που έχουν ήδη εγκατασταθεί στον υπολογιστή για την εγκατάσταση αυτού του προϊόντος. + Παρουσιάστηκε σφάλμα κατά την εφαρμογή των ρυθμίσεων ασφαλείας. Ο χρήστης "[2]" δεν είναι έγκυρος χρήστης ή ομάδα χρηστών. Αυτό θα μπορούσε να σημαίνει πρόβλημα με το πακέτο ή πρόβλημα με τη σύνδεση σε ελεγκτή τομέα στο δίκτυο. Ελέγξτε τη σύνδεση δικτύου σας και κάντε κλικ στο κουμπί "Επανάληψη" ή κάντε στο κουμπί "Άκυρο", για να τερματίσετε την εγκατάσταση. {{Δεν ήταν δυνατός ο εντοπισμός του SID χρήστη, σφάλμα συστήματος [3]}} + Το κλειδί [2] δεν είναι έγκυρο. Βεβαιωθείτε ότι εισαγάγατε το σωστό κλειδί. + Το πρόγραμμα εγκατάστασης πρέπει να επανεκκινήσει το σύστημά σας, για να συνεχιστεί η ρύθμιση των παραμέτρων του [2]. Κάντε κλικ στο κουμπί "Ναι", για να γίνει επανεκκίνηση τώρα ή στο κουμπί "Όχι", εάν θέλετε να κάνετε επανεκκίνηση αργότερα με μη αυτόματο τρόπο. + Πρέπει να κάνετε επανεκκίνηση του συστήματός σας για να ενεργοποιηθούν οι αλλαγές που έγιναν στις ρυθμίσεις των παραμέτρων του [2]. Κάντε κλικ στο κουμπί "Ναι" για να γίνει επανεκκίνηση τώρα ή στο κουμπί "Όχι" εάν θέλετε να κάνετε επανεκκίνηση αργότερα με μη αυτόματο τρόπο. + Αυτήν τη στιγμή έχει ανασταλεί η εγκατάσταση του [2]. Πρέπει να αναιρέσετε τις αλλαγές που έγιναν από αυτή την εγκατάσταση για να συνεχίσετε. Θέλετε να αναιρέσετε αυτές τις αλλαγές; + Μια προηγούμενη εγκατάσταση για αυτό το προϊόν βρίσκεται σε εξέλιξη. Πρέπει να αναιρέσετε τις αλλαγές που έγιναν από αυτή την εγκατάσταση για να συνεχίσετε. Θέλετε να αναιρέσετε αυτές τις αλλαγές; + Δεν ήταν δυνατή η εύρεση ενός πακέτου εγκατάστασης για το προϊόν [2]. Επιχειρήστε εκ νέου εγκατάσταση χρησιμοποιώντας ένα έγκυρο αντίγραφο του πακέτου εγκατάστασης '[3]'. + Η εγκατάσταση ολοκληρώθηκε με επιτυχία. + Η εγκατάσταση απέτυχε. + Προϊόν: [2] -- [3] + Μπορείτε να επαναφέρετε τον υπολογιστή σας στην προηγούμενή του κατάσταση ή να συνεχίσετε την εγκατάσταση αργότερα. Θέλετε να γίνει επαναφορά; + Παρουσιάστηκε σφάλμα κατά την εγγραφή των πληροφοριών εγκατάστασης στο δίσκο. Βεβαιωθείτε ότι υπάρχει αρκετός διαθέσιμος χώρος στο δίσκο και κάντε κλικ στο κουμπί "Επανάληψη" ή στο κουμπί "Άκυρο", για να τερματίσετε την εγκατάσταση. + Δεν ήταν δυνατή η εύρεση ενός ή περισσότερων αρχείων που απαιτούνται για την επαναφορά του υπολογιστή σας στην προηγούμενή του κατάσταση. Δεν θα είναι δυνατή η επαναφορά. + Το πρόγραμμα [2] δεν είναι δυνατό να εγκαταστήσει ένα από τα απαιτούμενα προϊόντα του. Επικοινωνήστε με την ομάδα τεχνικής υποστήριξης. {{Σφάλμα συστήματος: [3].}} + Δεν είναι δυνατή η κατάργηση της παλαιότερης έκδοσης του προγράμματος [2]. Επικοινωνήστε με την ομάδα τεχνικής υποστήριξης. {{Σφάλμα συστήματος [3].}} + Έγινε εγκατάσταση του [2] + Έγινε ρύθμιση παραμέτρων του [2] + Έγινε κατάργηση του [2] + Το αρχείο [2] απορρίφθηκε από την πολιτική ψηφιακής υπογραφής. + Δεν ήταν δυνατή η πρόσβαση στην υπηρεσία του Windows Installer. Αυτό μπορεί να συμβεί, εάν εκτελείτε τα Windows σε κατάσταση ασφαλούς λειτουργίας ή εάν το Windows Installer δεν έχει εγκατασταθεί σωστά. Επικοινωνήστε με το προσωπικό υποστήριξης για βοήθεια. + Υπάρχει ένα πρόβλημα με αυτό το πακέτο του Windows Installer. Μια δέσμη ενεργειών που απαιτείται για να ολοκληρωθεί αυτή η εγκατάσταση δεν μπόρεσε να εκτελεστεί. Επικοινωνήστε με το προσωπικό υποστήριξης ή τον προμηθευτή του πακέτου. {{Προσαρμοσμένη ενέργεια [2] σφάλμα δέσμης ενεργειών [3], [4]: [5] Γραμμή [6], Στήλη [7], [8] }} + Υπάρχει ένα πρόβλημα με αυτό το πακέτο του Windows Installer. Ένα πρόγραμμα που απαιτείται για να ολοκληρωθεί αυτή η εγκατάσταση δεν μπόρεσε να εκτελεστεί. Επικοινωνήστε με το προσωπικό υποστήριξης ή τον προμηθευτή του πακέτου. {{Ενέργεια: [2], θέση: [3], εντολή: [4] }} + Υπάρχει ένα πρόβλημα με αυτό το πακέτο του Windows Installer. Ένα πρόγραμμα που εκτελείται ως μέρος αυτού του προγράμματος εγκατάστασης δεν ολοκληρώθηκε όπως αναμενόταν. Επικοινωνήστε με το προσωπικό υποστήριξης ή τον προμηθευτή του πακέτου. {{Ενέργεια [2], θέση: [3], εντολή: [4] }} + Υπάρχει ένα πρόβλημα με αυτό το πακέτο του Windows Installer. Ένα αρχείο DLL που απαιτείται για να ολοκληρωθεί αυτή η εγκατάσταση δεν μπόρεσε να εκτελεστεί. Επικοινωνήστε με το προσωπικό υποστήριξης ή τον προμηθευτή του πακέτου. {{Ενέργεια [2], καταχώρηση: [3], βιβλιοθήκη: [4] }} + Η κατάργηση ολοκληρώθηκε με επιτυχία. + Η κατάργηση απέτυχε. + Η κοινοποίηση ολοκληρώθηκε με επιτυχία. + Η κοινοποίηση απέτυχε. + Η ρύθμιση παραμέτρων ολοκληρώθηκε με επιτυχία. + Η ρύθμιση παραμέτρων απέτυχε. + Πρέπει να είστε διαχειριστής, για να καταργήσετε αυτή την εφαρμογή. Για την κατάργησή της θα πρέπει να συνδεθείτε στον υπολογιστή ως διαχειριστής ή να ζητήσετε βοήθεια από την ομάδα τεχνικής υποστήριξης. + Το πακέτο εγκατάστασης του αρχείου προέλευσης για το προϊόν [2] είναι εκτός συγχρονισμού με το πακέτο του προγράμματος-πελάτη. Επιχειρήστε εκ νέου εγκατάσταση χρησιμοποιώντας ένα έγκυρο αντίγραφο του πακέτου εγκατάστασης '[3]'. + Για να ολοκληρωθεί η εγκατάσταση του [2], πρέπει να κάνετε επανεκκίνηση του υπολογιστή. Αυτήν τη στιγμή είναι συνδεδεμένοι άλλοι χρήστες σε αυτόν τον υπολογιστή και με την επανεκκίνηση μπορεί να χάσουν τις εργασίες τους. Θέλετε να κάνετε επανεκκίνηση τώρα; + Η διαδρομή [2] δεν είναι έγκυρη. Καθορίστε μια έγκυρη διαδρομή. + Η μνήμη δεν επαρκεί. Τερματίστε τις άλλες εφαρμογές προτού προσπαθήσετε ξανά. + Δεν υπάρχει δίσκος στη μονάδα δίσκου [2]. Τοποθετήστε ένα δίσκο και κάντε κλικ στο κουμπί "Επανάληψη" ή στο κουμπί "Άκυρο" για να επιστρέψετε στον τόμο που είχε επιλεγεί προηγουμένως. + Δεν υπάρχει δίσκος στη μονάδα δίσκου [2]. Τοποθετήστε ένα δίσκο και κάντε κλικ στο κουμπί "Επανάληψη" ή στο κουμπί "Άκυρο" για να επιστρέψετε στο παράθυρο διαλόγου "Αναζήτηση" και να επιλέξετε έναν άλλον τόμο. + Ο φάκελος [2] δεν υπάρχει. Πληκτρολογήστε μια διαδρομή προς ένα φάκελο που υπάρχει. + Δεν έχετε επαρκή δικαιώματα για την ανάγνωση αυτού του φακέλου. + Δεν ήταν δυνατός ο προσδιορισμός έγκυρου φακέλου προορισμού για την εγκατάσταση. + Παρουσιάστηκε σφάλμα κατά την προσπάθεια ανάγνωσης από τη βάση δεδομένων εγκατάστασης προέλευσης: [2]. + Προγραμματισμός λειτουργίας επανεκκίνησης: Μετονομασία αρχείου [2] σε [3]. Πρέπει να γίνει επανεκκίνηση για να ολοκληρωθεί η λειτουργία. + Προγραμματισμός λειτουργίας επανεκκίνησης: Διαγραφή αρχείου [2]. Πρέπει να γίνει επανεκκίνηση για να ολοκληρωθεί η λειτουργία. + Η καταχώρηση της λειτουργικής μονάδας [2] απέτυχε. HRESULT [3]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Η κατάργηση της καταχώρησης της λειτουργικής μονάδας [2] απέτυχε. HRESULT [3]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Η εγγραφή του πακέτου [2] στη μνήμη cache απέτυχε. Σφάλμα: [3]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η καταχώρηση της γραμματοσειράς [2]. Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την εγκατάσταση γραμματοσειρών και ότι το σύστημα υποστηρίζει αυτήν τη γραμματοσειρά. + Δεν ήταν δυνατή η κατάργηση της καταχώρησης της γραμματοσειράς [2]. Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την κατάργηση γραμματοσειρών. + Δεν ήταν δυνατή η δημιουργία της συντόμευσης [2]. Βεβαιωθείτε ότι ο φάκελος προορισμού υπάρχει και ότι έχετε πρόσβαση σε αυτόν. + Δεν ήταν δυνατή η κατάργηση της συντόμευσης [2]. Βεβαιωθείτε ότι το αρχείο συντόμευσης υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Δεν ήταν δυνατή η καταχώρηση βιβλιοθήκης τύπων για το αρχείο [2]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η κατάργηση της καταχώρησης βιβλιοθήκης τύπων για το αρχείο [2]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η ενημέρωση του αρχείου ini [2][3]. Βεβαιωθείτε ότι το αρχείο υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Δεν ήταν δυνατός ο προγραμματισμός του αρχείου [2] ώστε να αντικαταστήσει το αρχείο [3] κατά την επανεκκίνηση. Βεβαιωθείτε ότι έχετε δικαιώματα εγγραφής στο αρχείο [3]. + Παρουσιάστηκε σφάλμα κατά την κατάργηση της διαχείρισης προγραμμάτων οδήγησης ODBC. Σφάλμα ODBC [2]: [3]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση της διαχείρισης προγραμμάτων οδήγησης ODBC. Σφάλμα ODBC [2]: [3]. Επικοινωνήστε με το προσωπικό υποστήριξης. + Παρουσιάστηκε σφάλμα κατά την κατάργηση του προγράμματος οδήγησης ODBC: [4]. Σφάλμα ODBC [2]: [3]. Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την κατάργηση προγραμμάτων οδήγησης ODBC. + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση του προγράμματος οδήγησης ODBC: [4]. Σφάλμα ODBC [2]: [3]. Βεβαιωθείτε ότι το αρχείο [4] υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Παρουσιάστηκε σφάλμα κατά τη ρύθμιση παραμέτρων της προέλευσης δεδομένων ODBC: [4]. Σφάλμα ODBC [2]: [3]. Βεβαιωθείτε ότι το αρχείο [4] υπάρχει και ότι έχετε πρόσβαση σε αυτό. + Η εκκίνηση της υπηρεσίας "[2]" ([3]) απέτυχε. Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την εκκίνηση υπηρεσιών συστήματος. + Δεν ήταν δυνατή η διακοπή της υπηρεσίας "[2]" ([3]). Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για τη διακοπή υπηρεσιών συστήματος. + Δεν ήταν δυνατή η διαγραφή της υπηρεσίας "[2]" ([3]). Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την κατάργηση υπηρεσιών συστήματος. + Δεν ήταν δυνατή η εγκατάσταση της υπηρεσίας "[2]" ([3]). Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την εγκατάσταση υπηρεσιών συστήματος. + Δεν ήταν δυνατή η ενημέρωση της μεταβλητής περιβάλλοντος "[2]". Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την τροποποίηση μεταβλητών περιβάλλοντος. + Δεν έχετε επαρκή δικαιώματα για την ολοκλήρωση αυτής της εγκατάστασης για όλους τους χρήστες του υπολογιστή. Συνδεθείτε ως διαχειριστής και προσπαθήστε ξανά να κάνετε εγκατάσταση. + Δεν ήταν δυνατή η ρύθμιση ασφαλείας αρχείου για το αρχείο "[3]". Σφάλμα: [2]. Βεβαιωθείτε ότι έχετε επαρκή δικαιώματα για την τροποποίηση των δικαιωμάτων ασφαλείας για αυτό το αρχείο. + Οι υπηρεσίες στοιχείων (COM+ 1.0) δεν έχουν εγκατασταθεί σε αυτόν τον υπολογιστή. Αυτή η εγκατάσταση απαιτεί τις υπηρεσίες στοιχείων για να ολοκληρωθεί με επιτυχία. Οι υπηρεσίες στοιχείων είναι διαθέσιμες στα Windows 2000. + Παρουσιάστηκε σφάλμα κατά την καταχώρηση της εφαρμογής COM+. Για περισσότερες πληροφορίες, επικοινωνήστε με το προσωπικό υποστήριξης. + Παρουσιάστηκε σφάλμα κατά την κατάργηση της καταχώρησης της εφαρμογής COM+. Για περισσότερες πληροφορίες, επικοινωνήστε με το προσωπικό υποστήριξης. + Δεν ήταν δυνατή η αλλαγή της περιγραφής για την υπηρεσία "[2]" ([3]). + Δεν είναι δυνατή η ενημέρωση του αρχείου συστήματος [2] από την υπηρεσία Windows Installer, επειδή το αρχείο προστατεύεται από τα Windows. Ίσως χρειαστεί να ενημερώσετε το λειτουργικό σας σύστημα, ώστε να λειτουργεί σωστά αυτό το πρόγραμμα. {{Έκδοση πακέτου: [3], Έκδοση προστατευμένου λειτουργικού συστήματος: [4]}} + Δεν είναι δυνατή η ενημέρωση του προστατευμένου αρχείου των Windows [2] από την υπηρεσία του Windows Installer. {{Έκδοση πακέτου: [3], Έκδοση προστατευμένου λειτουργικού συστήματος: [4], Σφάλμα SFP: [5]}} + Η υπηρεσία Windows Installer δεν μπορεί να ενημερώσει ένα ή περισσότερα προστατευμένα αρχεία των Windows. {{Σφάλμα SFP: [2]. Λίστα προστατευμένων αρχείων:\r\n[3]}} + Οι εγκαταστάσεις χρηστών είναι απενεργοποιημένες μέσω πολιτικής στον υπολογιστή. + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση της συγκρότησης "[6]". Ανατρέξτε στη Βοήθεια και Υποστήριξη για περισσότερες πληροφορίες. HRESULT: [3]. {{διασύνδεση συγκρότησης: [4], λειτουργία: [5], στοιχείο: [2]}} + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση της συγκρότησης "[6]". Η συγκρότηση δεν έχει ισχυρό όνομα ή δεν διαθέτει υπογραφή με το ελάχιστο μήκος κλειδιού. HRESULT: [3]. {{διασύνδεση συγκρότησης: [4], λειτουργία: [5], στοιχείο: [2]}} + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση της συγκρότησης "[6]". Η υπογραφή ή ο κατάλογος δεν ήταν δυνατό να επαληθευτούν ή δεν είναι έγκυρα. HRESULT: [3]. {{διασύνδεση συγκρότησης: [4], λειτουργία: [5], στοιχείο: [2]}} + Παρουσιάστηκε σφάλμα κατά την εγκατάσταση της συγκρότησης "[6]". Μία ή περισσότερες λειτουργικές μονάδες της συγκρότησης δεν ήταν δυνατό να βρεθούν. HRESULT: [3]. {{διασύνδεση συγκρότησης: [4], λειτουργία: [5], στοιχείο: [2]}} + + + Η εφαρμογή "[2]" πρέπει να κλείσει για να συνεχιστεί η εγκατάσταση. + + Επικύρωση εγκατάστασης + Αντιγραφή νέων αρχείων + Αρχείο: [1], Κατάλογος: [9], Μέγεθος: [6] + Αντιγραφή αρχείων εγκατάστασης δικτύου + Αρχείο: [1], Κατάλογος: [9], Μέγεθος: [6] + Υπολογισμός απαιτούμενου χώρου + Υπολογισμός απαιτούμενου χώρου + Υπολογισμός απαιτούμενου χώρου + Δημιουργία συντομεύσεων + Συντόμευση: [1] + Δημοσίευση προσδιορισμένων στοιχείων + Αναγνωριστικό στοιχείου: [1], Προσδιοριστικό: [2] + Δημοσίευση δυνατοτήτων προϊόντος + Δυνατότητα: [1] + Δημοσίευση πληροφοριών προϊόντος + Καταχώρηση διακομιστών κλάσης + Αναγνωριστικό κλάσης: [1] + Καταχώρηση διακομιστών επέκτασης + Επέκταση: [1] + Καταχώρηση πληροφοριών MIME + Τύπος περιεχομένου MIME: [1], Επέκταση: [2] + Καταχώρηση αναγνωριστικών προγράμματος + Αναγνωριστικό προγράμματος: [1] + Εκχώρηση χώρου στο μητρώο + Ελεύθερος χώρος: [1] + Αναζήτηση εγκατεστημένων εφαρμογών + Ιδιότητα: [1], Υπογραφή: [2] + Σύνδεση εκτελέσιμων αρχείων + Αρχείο: [1] + Αναζήτηση για κατάλληλα προϊόντα + Δημιουργία φακέλων + Φάκελος: [1] + Διαγραφή υπηρεσιών + Υπηρεσία: [1] + Δημιουργία διπλότυπων αρχείων + Αρχείο: [1], Κατάλογος: [9], Μέγεθος: [6] + Αναζήτηση σχετικών εφαρμογών + Βρέθηκε η εφαρμογή: [1] + Εγκατάσταση στοιχείων ODBC + Εγκατάσταση νέων υπηρεσιών + Υπηρεσία: [2] + Αξιολόγηση συνθηκών εκκίνησης + Μετεγκατάσταση καταστάσεων δυνατοτήτων από σχετικές εφαρμογές + Εφαρμογή: [1] + Μετακίνηση αρχείων + Αρχείο: [1], Κατάλογος: [9], Μέγεθος: [6] + Ενημέρωση κώδικα αρχείων + Αρχείο: [1], Κατάλογος: [2], Μέγεθος: [3] + Ενημέρωση καταχώρησης στοιχείου + Καταχώρηση εφαρμογών και στοιχείων COM+ + Αναγνωριστικό εφαρμογής: [1]{{, Τύπος εφαρμογής: [2], Χρήστες: [3], RSN: [4]}} + Καταχώρηση γραμματοσειρών + Γραμματοσειρά: [1] + Δήλωση προϊόντος + [1] + Καταχώρηση βιβλιοθηκών τύπων + Αναγνωριστικό βιβλιοθήκης: [1] + Καταχώρηση χρήστη + [1] + Κατάργηση διπλότυπων αρχείων + Αρχείο: [1], Κατάλογος: [9] + Ενημέρωση συμβολοσειρών περιβάλλοντος + Όνομα: [1], Τιμή: [2], Ενέργεια [3] + Κατάργηση εφαρμογών + Εφαρμογή: [1], Γραμμή εντολών: [2] + Κατάργηση αρχείων + Αρχείο: [1], Κατάλογος: [9] + Κατάργηση φακέλων + Φάκελος: [1] + Κατάργηση καταχωρήσεων αρχείων INI + Αρχείο: [1], Ενότητα: [2], Κλειδί: [3], Τιμή: [4] + Κατάργηση στοιχείων ODBC + Κατάργηση τιμών μητρώου συστήματος + Κλειδί: [1], Όνομα: [2] + Κατάργηση συντομεύσεων + Συντόμευση: [1] + Αναζήτηση για κατάλληλα προϊόντα + Καταχώρηση λειτουργικών μονάδων + Αρχείο: [1], Φάκελος: [2] + Κατάργηση καταχώρησης λειτουργικών μονάδων + Αρχείο: [1], Φάκελος: [2] + Προετοιμασία καταλόγων ODBC + Εκκίνηση υπηρεσιών + Υπηρεσία: [1] + Διακοπή υπηρεσιών + Υπηρεσία: [1] + Κατάργηση δημοσίευσης προσδιορισμένων στοιχείων + Αναγνωριστικό στοιχείου: [1], Προσδιοριστικό: [2] + Κατάργηση δημοσίευσης δυνατοτήτων προϊόντος + Δυνατότητα: [1] + Κατάργηση καταχώρησης διακομιστών κλάσης + Αναγνωριστικό κλάσης: [1] + Κατάργηση καταχώρησης εφαρμογών και στοιχείων COM+ + Αναγνωριστικό εφαρμογής: [1]{{, Τύπος εφαρμογής: [2]}} + Κατάργηση καταχώρησης διακομιστών επέκτασης + Επέκταση: [1] + Κατάργηση καταχώρησης γραμματοσειρών + Γραμματοσειρά: [1] + Κατάργηση καταχώρησης πληροφοριών MIME + Τύπος περιεχομένου MIME: [1], Επέκταση: [2] + Κατάργηση καταχώρησης αναγνωριστικών προγράμματος + Αναγνωριστικό προγράμματος: [1] + Κατάργηση καταχώρησης βιβλιοθηκών τύπων + Αναγνωριστικό βιβλιοθήκης: [1] + Ενημέρωση συμβολοσειρών περιβάλλοντος + Όνομα: [1], Τιμή: [2], Ενέργεια [3] + Εγγραφή τιμών αρχείων INI + Αρχείο: [1], Ενότητα: [2], Κλειδί: [3], Τιμή: [4] + Εγγραφή τιμών μητρώου συστήματος + Κλειδί: [1], Όνομα: [2], Τιμή: [3] + Κοινοποίηση εφαρμογής + Δημιουργία ενεργειών δέσμης για την ενέργεια: + [1] + Εγκατάσταση καταλόγου συστήματος + Αρχείο: [1], Εξαρτήσεις: [2] + Δημοσίευση πληροφοριών συγκρότησης + Περιβάλλον εφαρμογής:[1], Όνομα συγκρότησης:[2] + Κατάργηση δημοσίευσης πληροφοριών συγκρότησης + Περιβάλλον εφαρμογής:[1], Όνομα συγκρότησης:[2] + Ενέργεια επαναφοράς: + [1] + Κατάργηση αρχείων αντιγράφων ασφαλείας + Αρχείο: [1] + Κατάργηση αρχείων που μετακινήθηκαν + Αρχείο: [1], Κατάλογος: [9] + Κατάργηση δημοσίευσης πληροφοριών προϊόντος + + bytes + GB + KB + MB + Δεν θα είναι διαθέσιμη η πλήρης δυνατότητα + Η δυνατότητα θα εγκατασταθεί όταν ζητηθεί + Η πλήρης δυνατότητα θα εγκατασταθεί για εκτέλεση από το CD + Η πλήρης δυνατότητα θα εγκατασταθεί στον τοπικό σκληρό δίσκο + Η πλήρης δυνατότητα θα εγκατασταθεί για εκτέλεση από το δίκτυο + Θα εγκατασταθεί για εκτέλεση από το CD + Θα εγκατασταθεί στον τοπικό σκληρό δίσκο + Θα εγκατασταθεί για εκτέλεση από το δίκτυο + Συλλογή απαιτούμενων πληροφοριών... + Αυτή η δυνατότητα δεν θα εγκατασταθεί + Αυτή η δυνατότητα θα ρυθμιστεί έτσι ώστε να εγκατασταθεί όταν θα είναι απαραίτητη + Αυτή η δυνατότητα θα εγκατασταθεί ώστε να εκτελείται από CD + Αυτή η δυνατότητα θα εγκατασταθεί στον τοπικό σκληρό δίσκο + Αυτή η δυνατότητα θα εγκατασταθεί ώστε να εκτελείται από το δίκτυο + Αυτή η δυνατότητα δεν θα είναι πλέον διαθέσιμη + Θα εγκατασταθεί όταν ζητηθεί + Αυτή η δυνατότητα θα είναι διαθέσιμη για εκτέλεση από το CD + Αυτή η δυνατότητα θα εγκατασταθεί στον τοπικό σκληρό δίσκο + Αυτή η δυνατότητα θα είναι διαθέσιμη για εκτέλεση από το δίκτυο + Η εγκατάσταση αυτής της δυνατότητας θα καταργηθεί πλήρως, δεν θα μπορείτε να την εκτελέσετε από CD + Αυτή η δυνατότητα θα αλλάξει από την κατάσταση εκτέλεσης από CD, για να εγκατασταθεί όταν ζητηθεί + Αυτή η δυνατότητα θα εξακολουθήσει να εκτελείται από CD + Αυτή η δυνατότητα θα αλλάξει από την κατάσταση εκτέλεσης από CD, για να εγκατασταθεί στον τοπικό σκληρό δίσκο + Αυτή η δυνατότητα αποδεσμεύει [1] από το σκληρό δίσκο. + Αυτή η δυνατότητα απαιτεί [1] στο σκληρό δίσκο. + Υπολογισμός απαιτούμενου χώρου για αυτήν τη δυνατότητα... + Αυτή η δυνατότητα θα καταργηθεί εντελώς + Αυτή η δυνατότητα θα καταργηθεί από τον τοπικό σκληρό σας δίσκο, αλλά θα ρυθμιστεί για να εγκατασταθεί όταν ζητηθεί + Αυτή η δυνατότητα θα καταργηθεί από τον τοπικό σκληρό δίσκο, αλλά θα είναι ακόμη διαθέσιμη για εκτέλεση από CD + Αυτή η δυνατότητα θα παραμείνει στον τοπικό σκληρό σας δίσκο + Αυτή η δυνατότητα θα καταργηθεί από τον τοπικό σκληρό δίσκο, αλλά θα είναι ακόμη διαθέσιμη για εκτέλεση από το δίκτυο + Η εγκατάσταση αυτής της δυνατότητας θα καταργηθεί πλήρως, δεν θα μπορείτε να την εκτελέσετε από το δίκτυο + Αυτή η δυνατότητα θα αλλάξει από την κατάσταση εκτέλεσης από το δίκτυο, για να εγκατασταθεί όταν ζητηθεί + Αυτή η δυνατότητα θα αλλάξει από την κατάσταση εκτέλεσης από το δίκτυο, για να εγκατασταθεί στον τοπικό σκληρό δίσκο + Αυτή η δυνατότητα θα εξακολουθήσει να εκτελείται από το δίκτυο + Αυτή η δυνατότητα αποδεσμεύει [1] από το σκληρό δίσκο. Οι [2] από τις [3] δευτερεύουσες δυνατότητές της είναι επιλεγμένες. Οι δευτερεύουσες δυνατότητες αποδεσμεύουν έως [4] από το σκληρό δίσκο. + Αυτή η δυνατότητα αποδεσμεύει [1] από το σκληρό δίσκο. Οι [2] από τις [3] δευτερεύουσες δυνατότητές της είναι επιλεγμένες. Οι δευτερεύουσες δυνατότητες απαιτούν [4] στο σκληρό δίσκο. + Αυτή η δυνατότητα απαιτεί [1] στο σκληρό δίσκο. Οι [2] από τις [3] δευτερεύουσες δυνατότητές της είναι επιλεγμένες. Οι δευτερεύουσες δυνατότητες αποδεσμεύουν έως [4] από το σκληρό δίσκο. + Αυτή η δυνατότητα απαιτεί [1] στο σκληρό δίσκο. Οι [2] από τις [3] δευτερεύουσες δυνατότητές της είναι επιλεγμένες. Οι δευτερεύουσες δυνατότητες απαιτούν [4] στο σκληρό δίσκο. + Χρόνος που απομένει: {[1] λεπτά }{[2] δευτερόλεπτα} + Διαθέσιμο + Διαφορά + Απαιτούμενο + Μέγεθος δίσκου + Τόμος + diff --git a/src/VBox/Installer/win/NLS/en_US.wxl b/src/VBox/Installer/win/NLS/en_US.wxl new file mode 100644 index 00000000..8bfc1c6b --- /dev/null +++ b/src/VBox/Installer/win/NLS/en_US.wxl @@ -0,0 +1,620 @@ + + + + + + + 1033 + English + + &No + &Yes + &Cancel + &Next > + < &Back + Br&owse + O&K + &Check + &Install + &Remove + &Finish + &Repair + &Return + Re&try + I&gnore + E&xit + + Custom + Setup + + + + License + User manual + + + + [ProductName] application. + [ProductName] USB device drivers for USB device support. + [ProductName] network device drivers for networking support. + [ProductName] driver for Bridged Networking. + [ProductName] virtual network adapter driver for Host-Only Networking. + [ProductName] driver for NDIS6 Bridged Networking. + [ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + + Python support for VirtualBox. + + + + You need to have administrator rights to (un)install [ProductName]! This setup will abort now. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + This application only runs on Windows XP or above. + This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]! + This application only runs on 64-bit Windows systems. Please install the 32-bit version of [ProductName]! + An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]! + An old innotek VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]! + + + + Are you sure you want to cancel [ProductName] installation? + + + + Welcome to the [ProductName] Setup Wizard + The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard. + + + + End-User License Agreement + Please read the following license agreement carefully. + I &accept the terms in the License Agreement + I &do not accept the terms in the License Agreement + + + + Serial Number + Please enter your serial number in the fields below. You'll find it on the sticker inside the VirtualBox CD case. + When done entering the serial number, press the "Check" button below. + + + + Entered serial number was invalid! + Please go back to enter your serial number again. + Keep in mind that the serial number must be spelled exactly like printed on the sticker. + + + + Warning: + Incompatible Saved States! + When upgrading [ProductName], all saved states from your already existing machines won't work anymore! After the installation, you have to discard them manually. + Proceed with installation now? + + + + Host Interfaces + If you used some host interfaces for your machines in the previous version, you have to recreate them manually after this installation. + + + + The following application should be closed before continuing the install: "[2]" + + + + Location: + Disk &Usage + Select the way you want features to be installed. + Click on the icons in the tree below to change the way features will be installed. + Custom Setup + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + Customize + Please choose from the options below: + Create start menu entries + Create a shortcut on the desktop + Create a shortcut in the Quick Launch Bar + Register file associations + + + + Please choose which type of network drivers you will use: + NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). + NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). + Use NDIS5 network drivers. + Use NDIS6 network drivers. + + + + Warning: + Network Interfaces + Installing the [ProductName] Networking feature will reset your network connection and temporarily disconnect you from the network. + Proceed with installation now? + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + The disk space required for the installation of the selected features. + The highlighted volumes (if any) do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Disk Space Requirements + {120}{70}{70}{70}{70} + + + + Browse to the destination folder + Change current destination folder + Up one level + Create a new folder + &Look in: + &Folder name: + + + + The Setup Wizard is ready to begin the [InstallMode] installation. + Click Install to begin the installation. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + Ready to Install + + + + Click the Finish button to exit the Setup Wizard. + [ProductName] installation is complete. + Start [ProductName] after installation + + + + [ProductName] Setup Wizard ended prematurely + [ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again. + Click the Finish button to exit the Setup Wizard. + + + + The following applications are using files that need to be updated by this setup. Close these applications and then click &Retry to continue the installation or Exit to exit it. + Some files that need to be updated are currently in use. + Files in Use + + + + [ProductName] Setup Wizard was interrupted + [ProductName] setup was interrupted. Your system has not been modified. To install this program at a later time, please run the installation again. + Click the Finish button to exit the Setup Wizard. + + + + Please wait while the Setup Wizard installs [ProductName]. This may take several minutes. + + + + Resuming the [ProductName] Setup Wizard + The Setup Wizard will complete the installation of [ProductName] on your computer. Click Install to continue or Cancel to exit the Setup Wizard. + + + + Modify, Repair or Remove installation + Select the operation you wish to perform. + Re&pair + Repairs errors in the most recent installation state - fixes missing or corrupt files, shortcuts and registry entries. + Repair installation + Repairing + repairs + &Remove + Removes [ProductName] from your computer. + Remove installation + Removing + removes + + + + Welcome to the [ProductName] Setup Wizard + The Setup Wizard will allow you to repair your current installation or remove [ProductName] from your computer. Click Next to continue or Cancel to exit the Setup Wizard. + + + + Disk space required for the installation exceeds available disk space. + The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Out of Disk Space + + + + Disk space required for the installation exceeds available disk space. + The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Out of Disk Space + Alternatively, you may choose to disable the installer's rollback functionality. This allows the installer to restore your computer's original state should the installation be interrupted in any way. Click Yes if you wish to take the risk to disable rollback. + + + + Remove [ProductName] + You have chosen to remove the program from your computer. + Click Remove to remove [ProductName] from your computer. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + + + + Repair [ProductName] + The Setup Wizard is ready to begin the repair of [ProductName]. + Click Repair to repair the installation of [ProductName]. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + + + + Please wait while the installer finishes determining your disk space requirements. + + + + The following applications are using files that need to be updated by this setup. You can let Setup Wizard close them and attempt to restart them or reboot the machine later. + Some files that need to be updated are currently in use. + Files in Use + &Close the applications and attempt to restart them. + &Do not close applications. A reboot will be required. + + + {{Fatal error: }} + {{Error [1]. }} + Warning [1]. + + Info [1]. + The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1]. {{The arguments are: [2], [3], [4]}} + + {{Disk full: }} + Action [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Message type: [1], Argument: [2] + === Logging started: [Date] [Time] === + === Logging stopped: [Date] [Time] === + Action start [Time]: [1]. + Action ended [Time]: [1]. Return value [2]. + Time remaining: {[1] minutes }{[2] seconds} + Out of memory. Shut down other applications before retrying. + Installer is no longer responding. + Installer stopped prematurely. + Please wait while Windows configures [ProductName] + Gathering required information... + Removing older versions of this application... + Preparing to remove older versions of this application... + {[ProductName] }Setup completed successfully. + {[ProductName] }Setup failed. + Error reading from file: [2]. {{ System error [3].}} Verify that the file exists and that you can access it. + Cannot create the file '[2]'. A directory with this name already exists. Cancel the install and try installing to a different location. + Please insert the disk: [2] + The installer has insufficient privileges to access this directory: [2]. The installation cannot continue. Log on as administrator or contact your system administrator. + Error writing to file: [2]. Verify that you have access to that directory. + Error reading from file [2]. {{ System error [3].}} Verify that the file exists and that you can access it. + Another application has exclusive access to the file '[2]'. Please shut down all other applications, then click Retry. + There is not enough disk space to install this file: [2]. Free some disk space and click Retry, or click Cancel to exit. + Source file not found: [2]. Verify that the file exists and that you can access it. + Error reading from file: [3]. {{ System error [2].}} Verify that the file exists and that you can access it. + Error writing to file: [3]. {{ System error [2].}} Verify that you have access to that directory. + Source file not found{{(cabinet)}}: [2]. Verify that the file exists and that you can access it. + Cannot create the directory '[2]'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit. + The volume [2] is currently unavailable. Please select another. + The specified path '[2]' is unavailable. + Unable to write to the specified folder: [2]. + A network error occurred while attempting to read from the file: [2] + An error occurred while attempting to create the directory: [2] + A network error occurred while attempting to create the directory: [2] + A network error occurred while attempting to open the source file cabinet: [2] + The specified path is too long: [2] + The Installer has insufficient privileges to modify this file: [2]. + A portion of the folder path '[2]' is invalid. It is either empty or exceeds the length allowed by the system. + The folder path '[2]' contains words that are not valid in folder paths. + The folder path '[2]' contains an invalid character. + '[2]' is not a valid short file name. + Error getting file security: [3] GetLastString: [2] + Invalid Drive: [2] + Error applying patch to file [2]. It has probably been updated by other means, and can no longer be modified by this patch. For more information contact your patch vendor. {{System Error: [3]}} + A file that is required cannot be installed because the cabinet file [2] is not digitally signed. This may indicate that the cabinet file is corrupt. + A file that is required cannot be installed because the cabinet file [2] has an invalid digital signature. This may indicate that the cabinet file is corrupt.{{ Error [3] was returned by WinVerifyTrust.}} + Failed to correctly copy [2] file: CRC error. + Failed to correctly move [2] file: CRC error. + Failed to correctly patch [2] file: CRC error. + The file '[2]' cannot be installed because the file cannot be found in cabinet file '[3]'. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. + The cabinet file '[2]' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. + There was an error creating a temporary file that is needed to complete this installation.{{ Folder: [3]. System error code: [2]}} + Could not create key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not open key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not delete value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not delete key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not read value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not write value [2] to key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not get value names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not get sub key names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not read security information for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not increase the available registry space. [2] KB of free registry space is required for the installation of this application. + Another installation is in progress. You must complete that installation before continuing this one. + Error accessing secured data. Please make sure the Windows Installer is configured properly and try the install again. + User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. Your current install will now continue. + User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. + Out of disk space -- Volume: '[2]'; required space: [3] KB; available space: [4] KB. Free some disk space and retry. + Are you sure you want to cancel? + The file [2][3] is being held in use{ by the following process: Name: [4], Id: [5], Window Title: '[6]'}. Close that application and retry. + The product '[2]' is already installed, preventing the installation of this product. The two products are incompatible. + There is not enough disk space on the volume '[2]' to continue the install with recovery enabled. [3] KB are required, but only [4] KB are available. Click Ignore to continue the install without saving recovery information, click Retry to check for available space again, or click Cancel to quit the installation. + Could not access network location [2]. + The following applications should be closed before continuing the install: + Could not find any previously installed compliant products on the machine for installing this product. + An error occurred while applying security settings. [2] is not a valid user or group. This could be a problem with the package, or a problem connecting to a domain controller on the network. Check your network connection and click Retry, or Cancel to end the install. {{Unable to locate the user's SID, system error [3]}} + The key [2] is not valid. Verify that you entered the correct key. + The installer must restart your system before configuration of [2] can continue. Click Yes to restart now or No if you plan to manually restart later. + You must restart your system for the configuration changes made to [2] to take effect. Click Yes to restart now or No if you plan to manually restart later. + An installation for [2] is currently suspended. You must undo the changes made by that installation to continue. Do you want to undo those changes? + A previous installation for this product is in progress. You must undo the changes made by that installation to continue. Do you want to undo those changes? + An installation package for the product [2] cannot be found. Try the installation again using a valid copy of the installation package '[3]'. + Installation completed successfully. + Installation failed. + Product: [2] -- [3] + You may either restore your computer to its previous state or continue the install later. Would you like to restore? + An error occurred while writing installation information to disk. Check to make sure enough disk space is available, and click Retry, or Cancel to end the install. + One or more of the files required to restore your computer to its previous state could not be found. Restoration will not be possible. + [2] cannot install one of its required products. Contact your technical support group. {{System String: [3].}} + The older version of [2] cannot be removed. Contact your technical support group. {{System String [3].}} + Installed [2] + Configured [2] + Removed [2] + File [2] was rejected by digital signature policy. + The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance. + There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. {{Custom action [2] script error [3], [4]: [5] Line [6], Column [7], [8] }} + There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action: [2], location: [3], command: [4] }} + There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. {{Action [2], location: [3], command: [4] }} + There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action [2], entry: [3], library: [4] }} + Removal completed successfully. + Removal failed. + Advertisement completed successfully. + Advertisement failed. + Configuration completed successfully. + Configuration failed. + You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance. + The path [2] is not valid. Please specify a valid path. + Out of memory. Shut down other applications before retrying. + There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to go back to the previously selected volume. + There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to return to the browse dialog and select a different volume. + The folder [2] does not exist. Please enter a path to an existing folder. + You have insufficient privileges to read this folder. + A valid destination folder for the install could not be determined. + Error attempting to read from the source install database: [2]. + Scheduling reboot operation: Renaming file [2] to [3]. Must reboot to complete operation. + Scheduling reboot operation: Deleting file [2]. Must reboot to complete operation. + Module [2] failed to register. HRESULT [3]. Contact your support personnel. + Module [2] failed to unregister. HRESULT [3]. Contact your support personnel. + Failed to cache package [2]. Error: [3]. Contact your support personnel. + Could not register font [2]. Verify that you have sufficient permissions to install fonts, and that the system supports this font. + Could not unregister font [2]. Verify that you that you have sufficient permissions to remove fonts. + Could not create Shortcut [2]. Verify that the destination folder exists and that you can access it. + Could not remove Shortcut [2]. Verify that the shortcut file exists and that you can access it. + Could not register type library for file [2]. Contact your support personnel. + Could not unregister type library for file [2]. Contact your support personnel. + Could not update the ini file [2][3]. Verify that the file exists and that you can access it. + Could not schedule file [2] to replace file [3] on reboot. Verify that you have write permissions to file [3]. + Error removing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel. + Error installing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel. + Error removing ODBC driver: [4], ODBC error [2]: [3]. Verify that you have sufficient privileges to remove ODBC drivers. + Error installing ODBC driver: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it. + Error configuring ODBC data source: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it. + Service '[2]' ([3]) failed to start. Verify that you have sufficient privileges to start system services. + Service '[2]' ([3]) could not be stopped. Verify that you have sufficient privileges to stop system services. + Service '[2]' ([3]) could not be deleted. Verify that you have sufficient privileges to remove system services. + Service '[2]' ([3]) could not be installed. Verify that you have sufficient privileges to install system services. + Could not update environment variable '[2]'. Verify that you have sufficient privileges to modify environment variables. + You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation. + Could not set file security for file '[3]'. Error: [2]. Verify that you have sufficient privileges to modify the security permissions for this file. + Component Services (COM+ 1.0) are not installed on this computer. This installation requires Component Services in order to complete successfully. Component Services are available on Windows 2000. + Error registering COM+ Application. Contact your support personnel for more information. + Error unregistering COM+ Application. Contact your support personnel for more information. + The description for service '[2]' ([3]) could not be changed. + The Windows Installer service cannot update the system file [2] because the file is protected by Windows. You may need to update your operating system for this program to work correctly. {{Package version: [3], OS Protected version: [4]}} + The Windows Installer service cannot update the protected Windows file [2]. {{Package version: [3], OS Protected version: [4], SFP Error: [5]}} + The Windows Installer service cannot update one or more protected Windows files. {{SFP String: [2]. List of protected files:\r\n[3]}} + User installations are disabled via policy on the machine. + An error occured during the installation of assembly component [2]. HRESULT: [3]. {{assembly interface: [4], function: [5], assembly name: [6]}} + + + The application "[2]" needs to be closed for the installation to continue. + + Validating install + Copying new files + File: [1], Directory: [9], Size: [6] + Copying network install files + File: [1], Directory: [9], Size: [6] + Computing space requirements + Computing space requirements + Computing space requirements + Creating shortcuts + Shortcut: [1] + Publishing Qualified Components + Component ID: [1], Qualifier: [2] + Publishing Product Features + Feature: [1] + Publishing product information + Registering Class servers + Class Id: [1] + Registering extension servers + Extension: [1] + Registering MIME info + MIME Content Type: [1], Extension: [2] + Registering program identifiers + ProgId: [1] + Allocating registry space + Free space: [1] + Searching for installed applications + Property: [1], Signature: [2] + Binding executables + File: [1] + Searching for qualifying products + Creating folders + Folder: [1] + Deleting services + Service: [1] + Creating duplicate files + File: [1], Directory: [9], Size: [6] + Searching for related applications + Found application: [1] + Installing ODBC components + Installing new services + Service: [2] + Evaluating launch conditions + Migrating feature states from related applications + Application: [1] + Moving files + File: [1], Directory: [9], Size: [6] + Patching files + File: [1], Directory: [2], Size: [3] + Updating component registration + Registering COM+ Applications and Components + AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}} + Registering fonts + Font: [1] + Registering product + [1] + Registering type libraries + LibID: [1] + Registering user + [1] + Removing duplicated files + File: [1], Directory: [9] + Updating environment strings + Name: [1], Value: [2], Action [3] + Removing applications + Application: [1], Command line: [2] + Removing files + File: [1], Directory: [9] + Removing folders + Folder: [1] + Removing INI files entries + File: [1], Section: [2], Key: [3], Value: [4] + Removing ODBC components + Removing system registry values + Key: [1], Name: [2] + Removing shortcuts + Shortcut: [1] + Searching for qualifying products + Registering modules + File: [1], Folder: [2] + Unregistering modules + File: [1], Folder: [2] + Initializing ODBC directories + Starting services + Service: [1] + Stopping services + Service: [1] + Unpublishing Qualified Components + Component ID: [1], Qualifier: [2] + Unpublishing Product Features + Feature: [1] + Unregister Class servers + Class Id: [1] + Unregistering COM+ Applications and Components + AppId: [1]{{, AppType: [2]}} + Unregistering extension servers + Extension: [1] + Unregistering fonts + Font: [1] + Unregistering MIME info + MIME Content Type: [1], Extension: [2] + Unregistering program identifiers + ProgId: [1] + Unregistering type libraries + LibID: [1] + Updating environment strings + Name: [1], Value: [2], Action [3] + Writing INI files values + File: [1], Section: [2], Key: [3], Value: [4] + Writing system registry values + Key: [1], Name: [2], Value: [3] + Advertising application + Generating script operations for action: + [1] + Installing system catalog + File: [1], Dependencies: [2] + Publishing assembly information + Application Context:[1], Assembly Name:[2] + Unpublishing assembly information + Application Context:[1], Assembly Name:[2] + Rolling back action: + [1] + Removing backup files + File: [1] + Removing moved files + File: [1], Directory: [9] + Unpublishing product information + + bytes + GB + KB + MB + Entire feature will be unavailable + Feature will be installed when required + Entire feature will be installed to run from CD + Entire feature will be installed on local hard drive + Entire feature will be installed to run from network + Will be installed to run from CD + Will be installed on local hard drive + Will be installed to run from network + Gathering required information... + This feature will remain uninstalled + This feature will be set to be installed when required + This feature will be installed to run from CD + This feature will be installed on the local hard drive + This feature will be installed to run from the network + This feature will become unavailable + Will be installed when required + This feature will be available to run from CD + This feature will be installed on your local hard drive + This feature will be available to run from the network + This feature will be uninstalled completely, you won't be able to run it from CD + This feature will change from run from CD state to set to be installed when required + This feature will remain to be run from CD + This feature will change from run from CD state to be installed on the local hard drive + This feature frees up [1] on your hard drive. + This feature requires [1] on your hard drive. + Compiling cost for this feature... + This feature will be completely removed + This feature will be removed from your local hard drive, but will be set to be installed when required + This feature will be removed from your local hard drive, but will be still available to run from CD + This feature will remain on you local hard drive + This feature will be removed from your local hard drive, but will be still available to run from the network + This feature will be uninstalled completely, you won't be able to run it from the network + This feature will change from run from network state to set to be installed when required + This feature will change from run from network state to be installed on the local hard drive + This feature will remain to be run from the network + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + Time remaining: {[1] minutes }{[2] seconds} + Available + Difference + Required + Disk Size + Volume + + diff --git a/src/VBox/Installer/win/NLS/fa_IR.wxl b/src/VBox/Installer/win/NLS/fa_IR.wxl new file mode 100644 index 00000000..1b7fef03 --- /dev/null +++ b/src/VBox/Installer/win/NLS/fa_IR.wxl @@ -0,0 +1,548 @@ + + + + + + + 1065 + Farsi + + &خير + &بله + &انصراف + &بعدی > + < &قبلی + &جستجو + تأ&یید + &بررسی + &نصب + &حذف + پ&ايان + &تعمیر + &بازگشت + &دوباره + &چشمپوشی + خ&روج + دستی + نصب + + مجوز + راهنمای کاربر + + برنامه [ProductName] . + درایور دستگاه یو اِس بی [ProductName] برای پشتیبانی از دستگاه یو اِس بی. + درایور دستگاه شبکه [ProductName] برای پشتیبانی از شبکه. + درایور [ProductName] برای شبکه پل شده. + درایور آداپتور شبکه مجازی [ProductName] برای شبکه فقط-میزبان. + [ProductName] driver for NDIS6 Bridged Networking. + [ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + + پشتیبانی از پایتون برای ویرچوال باکس. + + برای حذف [ProductName] شما نیاز به اجازه مدیر دارید! این راه انداز حالا لغو میشود. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + این برنامه فقط در ویندوز ایکس پی یا بالاتر اِجرا میشود. + این برنامه فقط روی ویندوز 32 بیتی اِجرا میشود. لطفا نسخه 64 بیتی [ProductName] را نصب کنید! + این برنامه فقط روی ویندوز 64 بیتی اِجرا میشود. لطفا نسخه 32 بیتی [ProductName] را نصب کنید! + یک نصب قدیمی ویرچوال باکس روی این رایانه یافت شد. لطفا اول این بسته را حذف سپس [ProductName] را نصب کنید! + یک نسخه قدیمی نصب ویرچوال باکس در این ماشین یافت شد. لطفا اول این بسته را حذف و سپس [ProductName] را نصب کنید! + + آیا میخواهید نصب [ProductName] را لغو کنید؟ + + به برنامه نصب [ProductName] خوش آمدید + این ویزارد [ProductName] را روی رایانه شما نصب میکند. روی بعدی برای ادامه یا روی لغو برای خروج از این ویزارد کلیک کنید. + + توافقنامه مجوز کاربر نهایی + لطفا توافقنامه مجوز زیرا را بادقت بخوانید. + &من ضوابط را در توافقنامه مجوز می پذیرم + &من ضوابط را در توافقنامه مجوز نمی پذیرم + + شماره سریال + لطفا شماره سریال را در فیلد زیر وارد کنید.آن را روی برچسب روی جلد سی دی ویرچوال باکس می یابید. + وقتی که وارد کردن شماره سریال انجام شد،دکمه "بررسی" را در زیر فشار دهید. + + شماره سریال وارد شده غیرمعتبر است! + لطفا برگردید و شماره سریال خود را دوباره وارد کنید. + بخاطر داشته باشید که شماره سریال باید دقیقا همانطور که دریافت شده وارد شود. + + هشدار: + وضعیت ذخیره شده ناسازگار! + هنگام ارتقاء [ProductName]، همه وضعیت های ذخیره شده ای که از قبل برای ماشین ها وجود دارد کار نمیکند! بعد از نصب،باید آنها را دستی لغو کنید. + حالا با نصب اقدام کند؟ + + رابط های میزبان + اگر در نسخه قبلی برخی رابط میزبان برای ماشین خود استفاده کرده اید،شما باید آنها را دستی بعد از این نصب مجددا ایجاد کنید. + + قبل از ادامه نصب برنامه زیر باید بسته شود: "[2]" + + مكان: + &مصرف دیسک + روشی را که میخواهید ویژگی ها نصب شود انتخاب کنید. + روی آیکون درختی در زیر برای انتخاب اینکه کدام ویژگی ها نصب شود کلیک کنید. + نصب دستی + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + سفارشی + لطفاً از گزینه های زیر انتخاب کنید: + Create start menu entries + ایجاد یک میانبر روی دسکتاپ + ایجاد یک میانبر در اِجرای سریع + ثبت نام انجمن فایل + + Please choose which type of network drivers you will use: + NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). + NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). + Use NDIS5 network drivers. + Use NDIS6 network drivers. + + هشدار: + رابط های شبکه + نصب ویژگی شبکه [ProductName] ارتباط شبکه شما را ریست خواهد کرد و موقتا ارتباط شما قطع خواهد شد. + حالا با نصب اقدام کند؟ + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + فضای دیسک موردنیاز برای نصب ویژگی های انتخاب شده. + درایوهای برجسته شده(اگر وجود دارد) فضای دیسک کافی برای ویژگی های انتخاب شده ندارد.شما میتوانید تعدادی فایل از درایو برجسته شده حذف کنید، یا ویژگی های کمتری برای نصب در درایو محلی انتخاب کنید یا درایو مقصد متفاوتی انتخاب کنید. + فضای دیسک موردنیاز + {120}{70}{70}{70}{70} + + پوشه مقصد را انتخاب کنید + تغییر پوشه نصب فعلی + یک مرحله قبل + ایجاد یک پوشه جدید + &نصب در: + &نام پوشه: + + برنامه راه انداز آماده شروع نصب [InstallMode] هست. + برای شروع "نصب" را کلیک کنید. اگر میخواهید هرگونه از تنظیمات نصب را بازبینی یا تغییر دهید، روی "قبلی" کلیک کنید. روی "لغو" برای خروج از ویزارد کلیک کنید + آماده براي نصب + + روی دکمه پایان برای خروج از ویزارد نصب کلیک کنید. + نصب [ProductName] کامل شد. + بعداز نصب، [ProductName] اِجرا شود + + نصب [ProductName] نابهنگام پایان یافت + نصب [ProductName] نابهنگام به علت خطا پایان یافت. سیستم شما تغییر نکرده است. برای نصب این برنامه در زمانی دیگر، لطفا برنامه راه انداز را دوباره اجرا کنید. + روی دکمه پایان برای خروج از ویزارد نصب کلیک کنید. + + برنامه های زیر از فایل هایی که نیاز به بروزرسانی دارند استفاده میکنند. شما میتوانید برنامه را ببندید و روی "دوباره" کلیک کنید، با روی "لغو" برای خروج از آن کلیک کنید. + بعضی از فایل هایی که نیاز به بروزرسانی دارند اکنون درحال استفاده است. + فایل در حال استفاده + + نصب [ProductName] قطع شده است + نصب [ProductName] قطع شده است. سیستم شما تغییرنیافته است. برای نصب دوباره این برنامه،لطفا فایل راه اندازی را دوباره اجرا کنید. + روی دکمه پایان برای خروج از ویزارد نصب کلیک کنید. + + لطفا تا زمانیکه [ProductName] نصب میشود،منتظر بمانید. شاید چنددقیقه طول بکشد. + + ادامه ویزارد نصب [ProductName] + ویزارد، نصب [ProductName] را در رایانه شما کامل خواهد کرد. روی نصب برای ادامه یا روی لغو برای خروج از ویزارد کلیک کنید. + + تغییر، تعمیر یا حذف نصب + عملکردی را که میخواهید اجرا کنید انتخاب کنید. + &تعمیر + تعمیر خطاها در حالت نصب های اخیر - تعمیر فایل های گم شده یا خراب،میانبرها و وردی ریجیستری. + نصب نصب + تعمیر + تعمیر + &حذف + حذف [ProductName] از رایانه. + حذف نصب + حذف + حذف + + به برنامه نصب [ProductName] خوش آمدید + ویزارد راه انداز به شما اجازه تعمیر نصب فعلی یا حذف [ProductName] را از رایانه میدهد. روی بعدی برای ادامه یا روی لغو برای خروج از ویزارد راه انداز کلیک کنید. + + فضای دیسک موردنیاز برای نصب از فضای دیسک موجود تجاوز کرده است. + درایوهای برجسته شده فضای دیسک کافی برای ویژگی های انتخاب شده ندارد.شما میتوانید تعدادی فایل از درایو برجسته شده حذف کنید، یا ویژگی های کمتری برای نصب در درایو محلی انتخاب کنید یا درایو مقصد متفاوتی انتخاب کنید. + فضای دیسک کم است + + فضای دیسک موردنیاز برای نصب از فضای دیسک موجود تجاوز کرده است. + درایوهای برجسته شده فضای دیسک کافی برای ویژگی های انتخاب شده ندارد.شما میتوانید تعدادی فایل از درایو برجسته شده حذف کنید، یا ویژگی های کمتری برای نصب در درایو محلی انتخاب کنید یا درایو مقصد متفاوتی انتخاب کنید. + فضای دیسک کم است + متناوبا، شما میتوانید قابلیت بازگشت به عقب ایستالر را غیر فعال کنید. این به شما اجازه بازگرداندن رایانه به حالت اصلی در هر جا که نصب قطع شده را میدهد. اگر این ریسک را قبول میکنید روی بله کلیک کنید. + + حذف [ProductName] + شما حذف برنامه از رایانه را انتخاب کرده اید. + روی "حذف" برای حذف [ProductName] از رایانه کلیک کنید. اگر میخواهید هرگونه از تنظیمات نصب را بازبینی یا تغییر دهید، روی "قبلی" کلیک کنید. روی "لغو" برای خروج از ویزارد کلیک کنید. + + تعمیر [ProductName] + ویزارد آماده شروع تعمیر [ProductName] هست. + روی "تعمیر" برای تعمیر نصب [ProductName] کلیک کنید. اگر میخواهید هرگونه از تنظیمات نصب را بازبینی یا تغییر دهید، روی "قبلی" کلیک کنید. روی "لغو" برای خروج از ویزارد کلیک کنید. + + لطفا تا زمانیکه اینستالر فضای دیسک موردنیاز را تشخیص دهد منتظر بمانید. + + برنامه های زیر از فایل هایی که نیاز به بروزرسانی دارند استفاده میکنند. شما میتوانید بگذارید برنامه آنها را ببندد و سعی کند آنها را ریستارت کند یا این ماشین را در بعد ریستارت کند. + بعضی از فایل هایی که نیاز به بروزرسانی دارند اکنون درحال استفاده است. + فایل در حال استفاده + &برنامه ها را ببندید و سعی کنید آنها را ریستارت کنید + &برنامه ها را نبندید.یک ریستارت نیاز است. + + {{خطای مهلک: }} + {{خطا [1]. }} + هشدار [1]. + + اطلاعات [1]. + اینستالر با یک خطای غیرمنتظره در نصب این بسته مواجه شده است. این یک مشکل با این برنامه را نشان میدهد. کد خطا [1]هست. {{نشانوند هست: [2], [3], [4]}} + + {{ديسك پر است: }} + اقدام [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + نوع پیام: [1], نشانوند: [2] + === وقایع نگاری شروه شده: [Date] [Time] === + === وقایع نگاری متوقف شده: [Date] [Time] === + شروع اقدام [Time]: [1]. + اقدام پایان یافته است [Time]: [1]. مقدار بازگشت [2]. + زمان باقیمانده: {[1] دقیقه }{[2] ثانیه} + حافظه کم است.قبل از سعی دوباره سایر برنامه ها را ببندید. + اینستالر بیش از این پاسخ نمیدهد. + اینستالر نابهنگام متوقف شده است. + لطفا تا زمانیکه ویندوز [ProductName] را پیکربندی میکند منتظر بمانید + گردآوری اطلاعات موردنیاز... + حذف نسخه های قدیمی این برنامه... + آماده سازی برای حذف نسخه های قدیمی این برنامه... + نصب {[ProductName] }با موفقیت کامل شد. + موفق به نصب {[ProductName] }نشد. + خطای خواندن از فایل: [2]. {{ خطای سیستم [3].}} بازبینی کنید فایل موجود است و میتوانید به آن دسترسی داشته باشید. + فایل '[2]' را نمیتوان ایجاد کرد. یک دایرکتوری با این نام موجود است. لغو نصب و سعی در نصب در پوشه متفاوت + لطفا دیسک را قرار دهید: [2] + نصب کننده اجازه ناکافی برای دسترسی به این دایرکتوری دارد: [2]. نصب را نمیتوان ادامه داد. بعنوان آدمین وارد شوید یا با مدیر سیستم تماس بگیرید. + خطای نوشتن در فایل: [2]. بازبینی کنید به این دایرکتوری دسترسی دارید. + خطای خواندن از فایل [2]. {{ خطای سیستم [3].}} بازبینی کنید فایل موجود است و اجازه دسترسی به آن دارید. + برنامه دیگری دسترسی انحصاری به فایل '[2]' را دارد. لطف سایر برنامه ها را بسته،و دوباره سعی کنید. + فضای دیسک کافی برای نصب این فایل موجود نیست: [2]. مقداری از فضای دیسک را خالی کنید و روی "دوباره"، کلیک کنید یا روی "لغو" برای خروج کلیک کنید. + فایل منبع یافت نشد: [2]. بازبینی کنید فایل موجود است و به آن دسترسی دارید. + خطای خواندن از فایل: [3]. {{ خطای سیستم [2].}} بازبینی کنید فایل موجود است و اجازه دسترسی دارید. + خطای نوشتن در فایل: [3]. {{ خطای سیستم [2].}} بازبینی کنید شما اجازه دسترسی به این فایل دارید. + فایل منبع یافت نشد{{(cabinet)}}: [2]. بازبینی کنید فایل وجود دارد و به آن دسترسی دارید. + دایرکتوری '[2]' را نمیتوان ایجاد کرد. یک فایل با این نام از قبل موجود است. لطفا فایل را حذف یا تغییرنام دهید و روی "دوباره"، یا "لغو" برای خروج کلیک کنید. + درایو [2] اکنون موجود نیست. لطفا یکی دیگر انتخاب کنید. + مسیر مشخص شده '[2]' غیرقابل دسترسی است. + قادر به نوشتن در پوشه مشخص شده نیست: [2]. + یک خطای شبکه حین سعی در خواندن از فایل رخ داد: [2] + یک خطا حین سعی در ایجاد دایرکتوری رخ داد: [2] + یک خطای شبکه حین ایجاد دایرکتوری رخ داده است: [2] + یک خطای شبکه حین سعی در بازکردن فایل منبع کابینت رخ داده است: [2] + مسیر مشخص شده خیلی بلند است: [2] + اینستالر اجازه کافی برای تغییر این فایل ندارد: [2]. + یک بخش از مسیر پوشه '[2]' نامعتبر است. آن یا خالی هست یا از مقدار اجازه داده شده سیستم بیشتر است. + مسیر پوشه '[2]' محتوی لغاتی هست که در مسیر پوشه ها معتبر نیست. + مسیر پوشه '[2]' محتوی کاراکتر نامعتبر است. + '[2]' نام فایل کوتاه صحیح نیست. + خطای گرفتن فایل امنیتی: [3] گرفتن آخرین استرینگ: [2] + درایو نامعتبر: [2] + خطای اِعمال وصله به فایل [2]. آن بروزسانی شده با روشی دیگر، و بیش از این نمیتواند با این وصله ویرایش شود. برای اطلاعات بیشتر با فروشده وصله تمای بگیرید. {{خطای سیستم: [3]}} + یک فایل موردنیاز نمیتواند نصب شود زیرا کابینت فایل [2] امضای دیجیتالی نشده است. این ممکن است نشان دهنده فایل کابینت خراب است. + یک فایل که موردنیاز است نمیتواند نصب شود زیرا فایل کابینت [2] امضای دیجیتالی نامعتبر دارد. این ممکن است نشان دهنده این است که فایل کابینت خراب است.{{ خطا [3] بازگشت خورده با WinVerifyTrust.}} + موفق به کپی صحیح فایل [2] نشد: خطای سی آر سی. + موفق به انتقال صحیح فایل [2] نشد: خطای سی آر سی. + موفق به وصله صحیح فایل [2] نشد: خطای سی آر سی. + فایل '[2]' نمیتواند نصب شود زیرا فایل را در کابینت فایل '[3]' نیافت. این شاید نشان دهنده خطای شبکه باشد، یک خطای خواندن از سی دی رام، یا یک مشکل با این بسته. + فایل کابینت '[2]' که موردنیاز برای این نصب است خراب است و نمیتوان استفاده کرد. این شاید نشان دهنده خطای شبکه باشد، یک خطای خواندن از سی دی رام، یا یک مشکل با این بسته. + یک خطای ایجاد فایل موقتی هست که آن برای کامل شدن نصب نیاز است.{{ پوشه: [3]. کد خطای سیستم: [2]}} + کلید را نمیتوان ایجاد کرد: [2]. {{ خطای سیستم [3].}} بازبینی کید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید + کلید را نمیتوان باز کرد: [2]. {{ خطای سیستمی [3].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید + مقدار [2] از کلید [3] نمیتوان حذف کرد. {{ خطای سیستم [4].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید + کلید [2] را نمیتوان حذف کرد. {{ خطای سیستم [3].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید + مقدار [2] از کلید [3] نمیتوان خواند. {{ خطای سیستم [4].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید + مقدار [2] در کلید [3] نمیتواند بنویسد. {{ خطای سیستم [4].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید. + نام مقدار را برای کلید [2] میتوان گرفت. {{ خطای سیستم [3].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید. + نام زیرکلید را برای کلید [2] نمیتوان گرفت. {{ خطای سیستم [3].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید. + اطلاعات امنیتی را برای کلید [2] نمیتوان خواند. {{ خطای سیستم [3].}} بازبینی کنید اجازه کافی در این کلید دارید،یا با پشتیبانی شخصی تماس بگیرید. + فضای ریجیستری موجود را نمیتوان افزایش داد. [2] کیلوبایت از فضای آزاد ریجیستری برای نصب این برنامه نیاز است. + نصب دیگری درحال پیشرفت است.باید آن نصب را قبل از ادامه نصب جدید کامل کنید. + خطای دسترسی به داده ایمن شده. لطفا مطمئن شوید ویندوز اینستالر بدرسی پیکربندی شده و دوباره سعی کنید. + کاربر '[2]' قبلا سعی در نصب محصول '[3]' داشته است. آن کاربر نیاز خواهد بود دوباره این نصب را اجرا کند قبل از اینکه آنها بتوانند از آن استفاده کنند. نصب فعلی شما حالا ادامه خواهد یافت + کاربر '[2]' قبلا سعی در نصب محصول '[3]' داشته است. آن کاربر نیاز خواهد بود دوباره این نصب را اجرا کند قبل از اینکه آنها بتوانند از آن استفاده کنند. + فضای دیسک کم است -- درایو: '[2]'; فضای موردنیاز: [3] کیلوبایت; فضای موجود: [4] کیلوبایت. فضایی از دیسک را خالی و دوباره سعی کنید. + آیا میخواهید لغو کنید؟ + فایل [2][3] درحال استفاده نگه داشته شده است{ با فرآیند زیر: نام: [4], شناسه: [5], عنوان پنجره: '[6]'}. آن برنامه را بسته و دوباره سعی کنید. + محصول '[2]' از قبل نصب شده است، جلوگیری از نصب این محصول. دو محصول ناسازگار هستند. + فضای دیسک کافی در درایو '[2]' برای ادامه نصب با بازگردانی فعال شده موجود نیست. [3] کیلوبایت نیاز است، اما فقط [4] کیلوبایت موجود است. روی "چشمپوشی" برای ادامه نصب بدون ذخیره سازی اطلاعات بازگردانی کلیک کنید، روی "دوباره" برای بررسی دوباره فضای موجود کلیک کنید، یا روی "لغو" برای خروج از نصب کلیک کنید. + به مکان شبکه [2] نمیتوان دسترسی داشت. + برنامه های زیر باید قبل از ادامه نصب بسته شود: + نمیتواند هیچگونه محصول مشابه که قبلا در این ماشین نصب شده باشد را برای نصب این محصول بیابد. + یک خطا حین اِعمال تنظیمات امنیتی رخ داد. [2] گروه یا کاربر معتبر نیست. این مشکل میتواند از بسته باشد، یا مشکل اتصال به کنترلگر دامین در شبکه باشد. ارتباط شبکه را بررسی و روی دوباره کلیک کنید، یا روی لغو برای پایان نصب کلیک کنید. {{قادر به مکان یابی اِس ای دی کاربر نیست، خطای سیستم [3]}} + کلید [2] صحیح نیست. بازبینی کنید کلید صحیح را وارد کرده اید. + اینستالر قبل از پیکربندی [2] برای ادامه،باید ریستارت شود. روی "بله" برای ریستارت یا "خیر" برای ریستارت در زمانی دیگر کلیک کنید. + برای اعمال اثرگذاری تغییرات پیکربندی اعمال شده در [2] سیستم را باید ریستارت کنید. روی بله برای ریستارت و روی خیر برای ریستارت در بعد کلیک کنید. + یک نصب برای [2] اکنون معلق شده است. برای ادامه شما باید تغییرات ایجاد شده با آن نصب را آندو کنید. میخواهید تغییرات را آندو کنید؟ + یک نصب قبلی برای این محصول در پیشرفت است.باید تغییراتی که با آن نصب ایجاد شده را آندو کرده و سپس ادامه دهید.آیا تغییرات را آندو می کنید؟ + یک بسته نصب برای محصول [2] را نمیتوان یافت. نصب را دوباره توسط نسخه معتبر بسته نصب '[3]' اجرا کنید. + نصب باموفقیت کامل شد. + موفق به نصب نشد. + محصول: [2] -- [3] + میتوانید رایانه را به حالت قبل برگردانید یا نصب را در زمان دیگری ادامه دهید.میخواهید بازگردانی کنید؟ + یک خطا حین نوشتن اطلاعات نصب روی دیسک رخ داد.مطمئن شوید فضای آزاد دیسک کافی است،و روی دوباره یا لغو برای پایان دادن به نصب کلیک کنید. + یک یا تعداد بیشتری از فایلهایی موردنیاز برای بازگردانی رایانه به حالت قبل یافت نشد.بازگردانی غیرممکن است. + [2] نمیتواند یکی از محصولات موردنیاز را نصب کنید. با گروه پشتیبانی شخصی تماس بگیرید. {{استرینگ سیستم: [3].}} + نسخه قدیمی [2] را نمیتواند حذف کرد. باگروه پشتیبانی فنی تماس بگیرید. {{استرینگ سیستم [3].}} + نصب شده [2] + پیکربندی شده [2] + حذف شده [2] + فایل [2] با سیاست امضای دیجیتالی پذیرفته نشده است. + نمیتوان به ویندوز اینستالر دسترسی داشت.اگر در سیف مد ویندوز باشید این رخ میدهد، یا ویندوز اینستالر بدرستی نصب نشده است.برای راهنمایی با پشتیبانی شخصی خود تماس بگیرید. + این یک مشکل با بسته ویندوز اینستالر هست. یک اسکریپت موردنیاز برای کامل شدن این نصب را نمیتوان اجرا کرد. با فروشنده بسته یا پشتیبانی شخصی تماس بگیرید.. {{اقدام دستی [2] خطای اسکریپت [3], [4]: [5] خط [6], ستون [7], [8] }} + این یک مشکل با بسته ویندوز اینستالر هست. یک برنامه موردنیاز برای کامل شدن این نصب را نمیتوان اجرا کرد. با فروشنده بسته یا پشتیبانی شخصی تماس بگیرید.. {{اقدام: [2], مکان: [3], فرمان: [4] }} + این مشکل با بسته ویندوز اینستالر هست. برنامه اجرا شده بعنوان بخشی از نصب همانطور که انتظار میرفت به پایان نرسیده است. با پشتیبانی شخصی یا فروشنده محصول تماس بگیرید. {{اقدام [2], مکان: [3], فرمان: [4] }} + این یک مشکل با بسته ویندوز اینستالر هست. یک دی اِل اِل موردنیاز برای کامل شدن این نصب را نمیتوان اجرا کرد. با فروشنده بسته یا پشتیبانی شخصی تماس بگیرید.. {{اقدام [2], ورودی: [3], کتابخانه: [4] }} + حذف باموفقیت انجام شد. + موفق به حذف نشد. + آگهی با موفقیت کامل شد. + آگهی موفق نشد. + پیکربندی باموفقیت کامل شد. + موفق به پیکربندی نشد. + شما باید برای حذف این برنامه آدمین باشید.برای حذف این برنامه،وارد اکانت آدمین شوید،یا برای راهنمایی با گروه پشتیبانی تماس بگیرید. + مسیر [2] نامعتبر است. لطفا یک مسیر معتبر مشخص کنید. + حافظه کم است.قبل از سعی دوباره سایر برنامه ها را ببندید. + دیسکی در درایو [2] موجود نیست. لطفا دیسک را قرار داده و روی "دوباره"، یا روی "لغو" برای رفتن به درایو انتخاب شده قبلی کلیک کنید. + دیسکی در درایو [2] موجود نیست. لطفا دیسک را قرار داده و روی "دوباره"، یا روی "لغو" برای بازگشت به دیالوگ جستجو و انتخاب درایو متفاوت کلیک کنید. + پوشه [2] وجود ندارد. لطفا یک مسیر در پوشه موجود وارد کنید. + شما اجازه کافی برای خواندن این پوشه را ندارید. + یک پوشه مقصد معتبر برای نصب را نمیتواند تشخیص دهد. + خطا سعی در خواندن از منبع نصب پایگاه داده: [2]. + زمان بندی عملکرد ریستارت: تغییرنام فایل [2] به [3]. برای کامل شدن عملکرد باید ریستارت شود. + زمان بندی عملکرد ریستارت: حذف فایل [2]. برای کامل شدن عملکرد باید ریستارت شود. + مدل [2] موفق به ثبت نشد. HRESULT [3]. با پشتیبانی شخصی تماس بگیرید. + مدل [2] موفق به حذف نشد. HRESULT [3]. با پشتیبانی شخصی تماس بگیرید. + موفق به کش یا ذخیره بسته [2] نشد. خطا: [3]. با پشتیبانی شخصی تماس بگیرید. + قادر به ثبت فونت [2] نیست. بازبینی کنید اجازه کافی برای نصب فونت ها را دارید، و آن سیستم از این فونت پشتیبانی میکند. + فونت [2] را نمیتوان حذف کرد. بازبینی کنید اجازه کافی برای حذف فونت را دارید. + میانبر [2] را نمیتوان ایجاد کرد.بازبینی کنید پوشه مقصد وجود دارد و میتوانید به آن دسترسی داشته باشید. + میانبر [2] را نمیتوان حذف کرد.بازبینی کنید فایل میانبر وجود دارد و میتوانید به آن دسترسی داشته باشید. + نوع کتابخانه را برای فایل [2] نمیتوان ثبت کرد. با پشتیبانی شخصی تماس بگیرید. + قادر به حذف نوع کتابخانه ای برای فایل [2] نیست. با پشتیبانی شخصی تماس بگیرید. + نمیتوان بروزرسانی کرد فایل ini [2][3]. بازبینی کنید فایل وجود دارد و به آن دسترسی دارید. + فایل [2] برای جایگزینی با فایل [3] در ریستارت را نمیتوان زمان بندی کرد. بازبینی کنید اجازه نوشتن در فایل [3] را دارید. + خطای حذف مدیریت درایور ODBC ، ODBC خطای [2]: [3]. با پشتیبانی شخصی تماس بگیرید. + خطای نصب مدیریت درایو ODBC، ODBC خطا [2]: [3]. با پشتیبانی شخصی تماس بگیرید. + خطای حذف درایور ODBC : [4], ODBC خطا [2]: [3]. بازبینی اجازه کافی برای حذف درایورای ODBC را دارید. + خطای نصب درایور ODBC : [4], ODBC خطا [2]: [3]. بازبینی کنید فایل [4] موجود است و به آن دسترسی دارید. + خطای پیکربندی داده ODBC : [4], ODBC خطا [2]: [3]. بازبینی کنید فایل [4] موجود است و به آن دسترسی دارید. + سرویس '[2]' ([3]) موفق به شروع نشد. بازبینی کنید اجازه کافی برای شروع سرویس سیستم را دارید. + سرویس '[2]' ([3]) نمیتواند متوقف شود. بازبینی کنید اجازه کافی برای توقف سرویس سیستمی دارید. + سرویس '[2]' ([3]) را نمیتوان حذف کرد. بازبینی کنید اجازه کافی برای حذف سرویس سیستمی را دارید. + سرویس '[2]' ([3]) نمیتواند نصب شود. بازبینی کنید اجازه کافی برای نصب سرویس سیستمی دارید. + نمیتوان متغییرهای محیطی '[2]' را بروزرسانی کرد. بازبینی کنید اجازه کافی برای ویرایش متغییرهای محیطی را دارید. + شما اجازه کافی برای کامل کردن این نصب برای همه کاربران این ماشین را ندارید.وارد اکانت آدمی شوید و مجددا سعی کنید. + نمیتواند فایل امنیتی را برای فایل '[3]' تنظیم کند. خطا: [2]. بازبینی کنید اجازه کافی برای ویرایش امنیت برای این فایل را دارید. + مولفه سرویس (COM+ 1.0) در این رایانه نصب نشده است. این نب نیاز به مولفه سرویس بمنظور کامل شدن موفقیت آمیز دارد. مولفه سرویس در ویندوز 2000 موجود است. + خطای ثبت برنامه کام پلاس.برای اطلاعات بیشتر با پشتیبانی شخصی تماس بگیرید. + خطای حذف برنامه کام پلاس.برای اطلاعات بیشتر با پشتیبانی شخصی تماس بگیرید. + توضیح برای سرویس '[2]' ([3]) را نمیتوان تغییر داد. + سرویس ویندوز اینستالر نمیتواند فایل سیستمی [2] را بروزرسانی کند زیرا توسط ویندوز حفاظت میشود. ممکن است شما نیاز به بروزرسانی سیستم برای صحیح کارکردن این برامه دارید. {{نسخه بسته: [3], نسخه حفاظت شده سیستم عامل: [4]}} + سرویس ویندوز اینستالر فایل ویندوزی حفاظت شده [2] را نمیتواند بروزرسانی کند. {{نسخه بسته: [3], نسخه حفاظت شده سیستم عامل: [4], SFP خطای: [5]}} + سرویس ویندوز اینستالر نمیتواند یک یا تعداد بیشتری از فایل های حافظت شده را بروزرسانی کند. {{SFP استرینگ: [2]. لیست فایل های حافظت شده:\r\n[3]}} + نصب کاربر در این ماشین توسط سیاست غیرفعال شده است. + یک خطا حین نصب مولفه اسمبلی [2] رخ داد. HRESULT: [3]. {{رابط اسمبلی: [4], تابع: [5], نام اسمبلی: [6]}} + + برنامه "[2]" برای ادامه نصب باید بسته شود. + معتبرسازی نصب + کپی فایل های جدید + فایل: [1], دایرکتوری: [9], حجم: [6] + کپی فایل های نصب شبکه + فایل: [1], دایرکتوری: [9], حجم: [6] + محاسبه فضای موردنیاز + محاسبه فضای موردنیاز + محاسبه فضای موردنیاز + ایبجاد میانبرها + میانبر: [1] + نشر مولفه های بررسی صلاحت شده + شناسه مولفه: [1], صلاحیت کننده: [2] + نشر ویژگی های محصول + ویژگی: [1] + نشر اطلاعات محصول + ثبت کرد کلاس سرورها + شناسه کلاس: [1] + ثبت کردن پسوند های سرور + پسوند: [1] + ثبت کردن اطلاعات MIME + و محتوای MIME: [1], پسوند: [2] + ثبت تعیین کننده هویت برنامه + شناسه برنامه: [1] + تخصیص فضای ریجیستری + فضای آزاد: [1] + جستجوی برای برنامه های نصب شده + مشخصه: [1], امضاء: [2] + فایل قابل اجرای الزامی + فایل: [1] + جستجو برای صلاحیت محصول + ایجاد پوشه ها + پوشه: [1] + حذف سرویس + سرویس: [1] + ایجاد فایل المثنی + فایل: [1], دایرکتوری: [9], حجم: [6] + جستجوی برای برنامه مربوطه + برنامه یافت: [1] + نصب مولفه های ODBC + نصب سرویس جدید + سرویس: [2] + بررسی شرایط اِجرا + انتقال یافتن حالت ویژگی از برنامه مرتبط + برنامه: [1] + انتقال فایل ها + فایل: [1], دایرکتوری: [9], حجم: [6] + وصله کردن فایل ها + فایل: [1], دایرکتوری: [2], حجم: [3] + بروزرسانی ثبت مولفه + ثبت کردن موفه ها و برنامه های کام پلاس + شناسه برنامه: [1]{{, نوع برنامه: [2], کاربران: [3], آر اِس اِن: [4]}} + ثبت کردن فونت ها + فونت: [1] + ثبت کردن محصول + [1] + ثبت نوع کتابخانه + شناسه لیب: [1] + ثبت کردن کاربر + [1] + حذف فایل های تکراری + فایل: [1], دایرکتوری: [9] + بروزرسانی استرینگ های محیطی + نام: [1], مقدار: [2], اقدام [3] + حذف برنامه + برنامه: [1], فرمان خطی: [2] + حذف فایل ها + فایل: [1], دایرکتوری: [9] + حذف پوشه ها + پوشه: [1] + حذف ورودی های فایل INI + فایل: [1], قسمت: [2], کلید: [3], مقدار: [4] + حذف مولفه های ODBC + حذف مقادیر سیستم ریجیستری + کلید: [1], نام: [2] + حذف میانبرها + میانبر: [1] + جستجو برای صلاحیت محصول + ثبت کردن مدل ها + فایل: [1], پوشه: [2] + حذف مدل ها + فایل: [1], پوشه: [2] + بارگیری دایرکتوری های ODBC + شروع سرویس + سرویس: [1] + توقف سرویس + سرویس: [1] + حذف مولفه هی صلاحیت شده + شناسه مولفه: [1], صلاحیت کننده: [2] + حذف ویژگی های محصول + ویژگی: [1] + حذف کلاس سرورها + شناسه کلاس: [1] + حذف مولفه و برنامه های کام پلاس + شناسه برنامه: [1]{{, نوع برنامه: [2]}} + حذف پسوند سرورها + پسوند: [1] + حذف فونت ها + فونت: [1] + حذف اطلاعات MIME + و محتوای MIME: [1], پسوند: [2] + حذف تعیین کننده هویت برامه + شناسه برنامه: [1] + حذف نوع کتابخانه ای + شناسه لیب: [1] + بروزرسانی استرینگ های محیطی + نام: [1], مقدار: [2], اقدام [3] + نوشتن مقادیر فایل INI + فایل: [1], قسمت: [2], کلید: [3], مقدار: [4] + نوشتن مقادیر سیستم ریجیستری + کلید: [1], نام: [2], مقدار: [3] + برنامه آگهی + تولید اسکریپت عملکرد برای اقدام: + [1] + نصب پرونده شاخص + فایل: [1], وابسته ها: [2] + نشر اطلاعات اسمبلی + زمینه برنامه:[1], نام اسمبلی:[2] + حذف اطلاعات اسمبلی + زمینه برنامه:[1], نام اسمبلی:[2] + اقدام برگرداندن به عقب: + [1] + حذف فایل های پشتیبان + فایل: [1] + حذف فایل ها انتقال داده شده + فایل: [1], دایرکتوری: [9] + حذف اطلاعات محصول + بايت + گيگابايت + کيلوبايت + مگابايت + کل ویژگی ها دردسترس نمیباشد + ویژگی زمانیکه نیاز باشد نصب خواهد شد + کل ویژگی ها برای اجرا از سی دی نصب خواهد شد + کل ویژگی ها روی درایو محلی نصب خواهد شد + کل ویژگی ها برای اجرا از شبکه نصب خواهد شد + برای اجرا از روی سی دی نصب خواهد شد + روی درایو محلی نصب خواهد شد + برای اجرا از شبکه نصب خواهد شد + گردآوری اطلاعات موردنیاز... + این ویژگی حذف شده باقی میماند + این ویژگی تنظیم خواهد شد تا هنگامیکه نیازبود نصب شود + این ویژگی نصب خواهد شد تا از روی سی دی اِجرا شود + این ویژگی روی درایو محلی نصب خواهد شد + این ویژگی برای اجرا از شبکه نصب خواهد شد + این ویژگی خارج از دسترس میباشد + زمانیکه نیازباشد نصب خواهد شد + این ویژگی برای اجرا از سی دی موجود خواهد بود + این ویژگی از درایو محلی نصب خواهد شد + این ویژگی برای اجرا از شبکه موجود خواهد بود + این ویژگی کاملا حذف خواهد شد،شما قادر به اجرا از سی دی نخواهید بود + این ویژگی از حالت اجرا از سی دی به حالت زمانیکه نیازباشد نصب شود تغییر خواهد کرد + این ویژگی برای اجرا از سی دی باقی میماند + این ویژگی از حالت اجرا از سی دی به حالت نصب شده در درایو محلی تغییر خواهد کرد + این ویژگی [1] از فضای دیسک را آزاد میکند. + این ویژگی نیاز به [1] در درایو محلی دارد. + کامپایل بها برای این ویژگی... + این ویژگی کاملا حذف خواهد شد + این ویژگی از درایو محلی حذف خواهد شد،اما تنظیم میشود زمانیکه نیاز بود نصب شود + این ویژگی از درایو محلی حذف خواهد شد،اما هنوز برای اجرا از سی دی موجود خواهد بود + این ویژگی در درایو محلی باقی میماند + این ویژگی از درایو محلی حذف خواهد شد،اما هنوز برای اجرا از شبکه موجود خواهد بود + این ویژگی کاملا حذف خواهد شد،شما قادر به اجرا از شبکه نخواهید بود + این ویژگی از حالت اجرا از شبکه به حالت زمانیکه نیازباشد نصب شود تغییر خواهد کرد + این ویژگی از حالت اجرا از شبکه به حالت نصب شده در درایو محلی تغییر خواهد کرد + این ویژگی برای اجرا از شبکه باقی میماند + این ویژگی [1] از درایو محلی را آزاد خواهد کرد. آن [2] از [3] زیر ویژگی های انتخاب شده را دارد. زیرویژگی ها [4] از درایو محلی را آزاد میکند. + این ویژگی [1] از درایو محلی را آزاد خواهد کرد. آن [2] از [3] زیر ویژگی های انتخاب شده را دارد. زیرویژگی ها نیاز به [4] از درایو محلی دارد. + این ویژگی نیاز به [1] از درایو محلی دارد. آن [2] از [3] زیرویژگی های انتخاب شده را دارد. زیرویژگی ها [4] از درایو محلی را ازاد میکند. + این ویژگی نیاز به [1] از درایو محلی دارد. آن [2] از [3] زیرویژگی های انتخاب شده را دارد. زیرویژگی ها نیازبه [4] از درایو محلی دارد. + زمان باقیمانده: {[1] دقیقه }{[2] ثانیه} + دردسترس + اختلاف + موردنیاز + حجم دیسک + درایو + diff --git a/src/VBox/Installer/win/NLS/fr_FR.wxl b/src/VBox/Installer/win/NLS/fr_FR.wxl new file mode 100644 index 00000000..6954bb4f --- /dev/null +++ b/src/VBox/Installer/win/NLS/fr_FR.wxl @@ -0,0 +1,618 @@ + + + + + + + 1036 + Francais + + &Non + &Oui + &Annuler + &Suivant > + < &Précédent + Parco&urir + O&K + &Vérifier + &Installer + &Enlever + &Terminer + &Réparer + &Précédent + &Réessayer + &Ignorer + Q&uitter + + Personalisé + Installation + + + + Licence + Manuel d'utilisation + + + + Application [ProductName]. + Pilotes USB [ProductName] pour le support de périphériques USB. + Pilotes [ProductName] pour le support réseau. + Pilote [ProductName] pour l'accès réseau par pont. + Pilote de carte réseau virtuelle [ProductName] pour l'accès réseau privé hôte. + [ProductName] driver for NDIS6 Bridged Networking. + [ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + + Python support for VirtualBox. + + + + Vous ne pouvez pas (dés)installer [ProductName] sans droits d'administrateur! Ce programme d'installation terminera maintenant. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + Cette application nécéssite Windows XP ou plus récent. + Cette application ne marche que sur des systèmes Windows 32-bit. Veuillez installer la version 64-bit de [ProductName]! + Cette application ne marche que sur des systèmes Windows 64-bit. Veuillez installer la version 32-bit de [ProductName]! + Vous avez une ancienne installation de innotek VirtualBox sur cette machine. Il vous faudra la désinstaller avant de pouvoir installer [ProductName]. + + + + Voulez vous vraiment abondonner l'installation de [ProductName]? + + + + Bienvenue dans l'assistant d'installation de [ProductName] + Cet assistant installera [ProductName] sur votre ordinateur. Appuyez sur Suivant pour continuer ou sur Annuler pour abondonner l'installation. + + + + Contrat de licence de logiciel + Veuillez lire attentivement le Contrat de licence suivant. + J'&accepte les termes du Contrat de licence + Je &n'accepte pas les termes du Contrat de licence + + + + Numéro de série + Veulliez entrer votre numéro de série dans les champs ci-dessous. Vous le trouverez sur l'autocollant à l'intérieur du boîtier du CD de VirtualBox. + Quand vous avez fini d'entrer le numéro de série, appuyez sur le bouton Vérifier ci-dessous. + + + + Le numéro de série que vous avez entré n'est pas valide! + Veulliez retourner pour réentrer votre numéro de série. + N'oubliez pas que le numéro de série doit être entré exactement comme il est imprimé sur l'autocollant. + + + + Avertissement: + Etat sauvegardé incompatible! + Quand vous mettez à jour [ProductName], les états sauvegardés de vos machines existants ne fonctionneront plus! Après l'installation, il vous faudra les rejeter manuellement. + Poursuivre avec l'installation? + + + + Interfaces réseau hôte + Si vous avez utilisé des interfaces réseau hôte sur votre système avec la version précédente, il vous faudra les recréer manuellement après cette installation. + + + + Location: + &Espace disque + Choisissez les fonctionnalités que vous souhaiter installer. + Cliquez sur les icônes dans l'arborescence ci-dessous pour choisir les fonctionnalités qui seront installés. + Installation personalisée + Description de l'entrée sélectionnée en plusieurs lignes. + La taille de l'entrée sélectionnée. + <Chemin de l'entrée sélectionnée> + + + + Personaliser + Veuillez choisir une des options suivantes: + Créer des éléments dans le menu démarrer + Créer un raccourci sur le bureau + Créer un raccourci dans la barre de lancement rapide + Inscription des associations de fichiers + + + + Veuillez choisir le type de pilotes réseau à utiliser : + NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). + NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). + Utiliser pilotes réseau NDIS5. + Utiliser pilotes réseau NDIS6. + + + + Avertissement + Interfaces réseau + L'installation de la fonctionnalité réseau de [ProductName] réinitialisera votre connection réseau et vous déconnectera temporairement du réseau. + Désirez-vous poursuivre l'installation maintenant? + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + L'espace disque requise pour l'installation des fonctionnalités sélectionnées. + Les supports mises en relief n'ont pas assez d'espace disque disponible pour les fonctionnalités sélectionnées. Vous pouvez soit supprimer des fichiers sur les supports, soit choisir d'installer moins de fonctionnalités sur les supports locals, soit choisir des supports differents pour l'installation. + Espace disque requise + {120}{70}{70}{70}{70} + + + + Choisissez un dossier pour l'installation + Changer le dossier d'installation + Dossier parent + Créer un nouveau dossier + &Chercher dans: + &Nom du dossier: + + + + L'assistant est prêt à commencer l'installation [InstallMode]. + Appuyez sur Installer pour commencer l'installation. Si vous désirez revoir ou modifier vos paramètres d'installation, appuyez sur Précédent. Appuyez sur Annuler pour abondoner l'installation. + Prêt à installer + + + + Veuillez appuyez sur Terminer pour quitter l'assistant d'installation. + L'installation de [ProductName] est terminé. + Démarrer [ProductName] après l'installation + + + + L'assistant d'installation [ProductName] a terminé anormalement + L'installation de [ProductName] a été terminé en raison d'une erreur. Votre système n'a pas été modifié. Pour installer ce programme plus tard, veuillez relancer l'assistant. + Appuyez sur Terminer pour quitter l'assistant d'installation. + + + + Les applications suivantes utilisent des fichiers qui doivent être mis à jour dans le cadre de cette installation. Fermez ces applications puis cliquez sur Réessayer pour poursuivre l'installation ou sur Quitter pour quitter l'installation. + Certains fichiers devant être mis à jour sont en cours d'utilisation. + Fichiers en cours d'utilisation + + + + L'assistant d'installation [ProductName] a été interrompu + L'installation de [ProductName] a été interrompu. Votre système n'a pas été modifié. Pour installer ce programme ultérieurement, veuillez relancer l'assistant. + Appuyez sur Terminer pour quitter l'assistant d'installation. + + + + Veuillez patienter pendant que l'assistant installe [ProductName]. Ceci peut durer plusieurs minutes. + + + + Continuant l'assistant d'installation [ProductName] + L'assistant d'installation completera l'installation de [ProductName] sur votre ordinateur. Appuyez sur Installer pour continuer ou sur Annuler pour abondonner l'assistant. + + + + Modifier, réparer ou supprimer une installation + Choisissez l'opération que vous désirer effectuer. + Ré&parer + Répare des erreurs dans l'état de l'installation la plus récente - répare des fichiers, racourcis et entrées dans la base de registre manquants ou corrompus. + Reparer installation + Repare + repare + &Désinstaller + Supprime [ProductName] de votre ordinateur. + Suprimer installation + Suprime + suprime + + + + Bienvenue dans l'assistant d'installation [ProductName] + L'assistant d'installation vous permettra de réparer ou de supprimer de votre ordinateur l'installation actuelle de [ProductName]. Appuyez sur Suivant pour continuer ou sur Annuler pour abondonner l'assistant. + + + + L'espace disque disponible est insuffisant pour l'installation. + Les supports mises en relief n'ont pas assez d'espace disque disponible pour les fonctionnalités sélectionnées. Vous pouvez soit supprimer des fichiers sur les supports, soit choisir d'installer moins de fonctionnalités sur les supports locals, soit choisir des supports différents pour l'installation. + Espace disque insuffisant + + + + L'espace disque disponible est insuffisant pour l'installation. + Les supports mises en relief n'ont pas assez d'espace disque disponible pour les fonctionnalités sélectionnées. Vous pouvez soit supprimer des fichiers sur les supports, soit choisir d'installer moins de fonctionnalités sur les supports locals, soit choisir des supports différents pour l'installation. + Espace disque épuisé + En alternative, vous pouvez choisir de désactiver la fonctionnalité «rollback», qui permet de réstaurer l'état d'origine de votre ordinateur en cas d'interruption de l'installation. Appuyez sur Oui si vous désirer courir le risque de désactiver le rollback. + + + + Supprimer [ProductName] + Vous avez choisi de supprimer l'application de votre ordinateur. + Appuyez sur Désinstaller pour supprimer [ProductName] de votre ordinateur. Si vous désirez revoir ou modifier vos paramètres d'installation, appuyez sur Précédent. Appuyez sur Annuler pour quitter l'assistant. + + + + Réparer [ProductName] + L'assistant d'installation est prêt à commencer la réparation de [ProductName]. + Appuyez sur Réparer pour réparer l'installation de [ProductName]. Si vous désirez revoir ou modifier vos paramètres d'installation, appuyez sur Précédent. Appuyez sur Annuler pour quitter l'assistant. + + + + Veuillez patienter pendant que le programme d'installation découvre l'espace disque requis. + + + + Les applications suivantes utilisent des fichiers qui doivent être mis à jour dans le cadre de cette installation. Vous pouvez laisser l'assistant d'installation les fermer puis essayer de les redémarrer ou redémarrer l'ordinateur ultérieurement. + Certains fichiers devant être mis à jour sont en cours d'utilisation. + Fichiers en cours d'utilisation + &Fermer les applications et essayer de les redémarrer. + &Ne pas fermer les applications. Un redémarrage sera nécessaire. + + + {{Erreur irrécupérable : }} + {{Erreur [1]. }} + Avertissement [1]. + Informations [1]. + Le programme d'installation a rencontré une erreur inattendue lors de l'installation de ce package. Il s'agit peut-être d'un problème lié au package. Le code d'erreur est [1]. {{Les arguments sont : [2], [3], [4]}} + {{Disque plein : }} + Action [Time] : [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Type de message : [1], Argument : [2] + === Début de l'écriture dans le journal : [Date] [Time] === + === Fin de l'écriture dans le journal : [Date] [Time] === + Début de l'action [Time] : [1]. + Fin de l'action [Time] : [1]. Valeur renvoyée : [2]. + Durée restante : {[1] minute(s) }{[2] secondes} + Mémoire insuffisante. Fermez les autres applications avant de recommencer. + Le programme d'installation ne répond plus. + L'exécution du programme d'installation a pris fin prématurément. + Veuillez patienter pendant que Windows configure le logiciel "[ProductName]" + Collecte des informations nécessaires en cours... + Suppression des versions précédentes de cette application... + Préparation de la suppression des versions précédentes de cette application... + L'installation du logiciel "[ProductName]" s'est terminée correctement. + Échec de l'installation du logiciel "[ProductName]". + Erreur lors de la lecture du fichier [2]. {{ Erreur système [3].}} Vérifiez que ce fichier existe et que vous êtes autorisé à y accéder. + Impossible de créer le fichier '[2]'. Un répertoire portant ce nom existe déjà. Annulez l'installation et essayez de l'effectuer à un autre emplacement. + Insérez le disque : [2] + Le programme d'installation ne dispose pas des privilèges suffisants pour accéder à ce répertoire : [2]. Impossible de poursuivre l'installation. Ouvrez une session en tant qu'administrateur ou contactez votre administrateur système. + Erreur lors de l'écriture dans le fichier : [2]. Vérifiez que vous êtes autorisé à accéder à ce répertoire. + Erreur lors de la lecture du fichier [2]. {{ Erreur système [3].}} Vérifiez que ce fichier existe et que vous êtes autorisé à y accéder. + Une autre application dispose d'un droit d'accès exclusif au fichier '[2]'. Fermez toutes les autres applications, puis cliquez sur Réessayer. + L'espace disque est insuffisant pour installer ce fichier : [2]. Libérez de l'espace disque et cliquez sur Réessayer ou cliquez sur Annuler pour quitter. + Fichier source introuvable : [2]. Vérifiez que le fichier existe et que vous êtes autorisé à y accéder. + Erreur lors de la lecture du fichier [3].{{ Erreur système [2].}} Vérifiez que ce fichier existe et que vous êtes autorisé à y accéder. + Erreur lors de l'écriture dans le fichier : [3]. {{ Erreur système [2].}} Vérifiez que vous êtes autorisé à accéder à ce répertoire. + Fichier source introuvable {{(cabinet)}} : [2]. Vérifiez que le fichier existe et que vous êtes autorisé à y accéder. + Impossible de créer le répertoire '[2]'. Un fichier portant ce nom existe déjà. Renommez le fichier et cliquez sur Réessayer ou cliquez sur Annuler pour quitter. + Le volume [2] est actuellement indisponible. Veuillez en sélectionner un autre. + Le chemin d'accès spécifié '[2]' n'est pas disponible. + Impossible d'écrire dans le dossier spécifié : [2]. + Une erreur réseau s'est produite lors de la tentative de lecture à partir du fichier : [2] + Erreur lors de la tentative de création du répertoire : [2] + Une erreur réseau s'est produite lors de la tentative de création du répertoire : [2] + Une erreur réseau s'est produite lors de la tentative d'ouverture du fichier CAB du fichier source : [2]. + Le chemin d'accès spécifié est trop long : [2] + Le programme d'installation ne dispose pas des privilèges nécessaires pour modifier ce fichier : [2]. + Une partie du chemin d'accès au dossier '[2]' n'est pas valide. Il est peut-être vide ou dépasse la longueur autorisée par le système. + Le chemin d'accès au dossier '[2]' contient des mots non valides. + Le chemin d'accès au dossier '[2]' contient un caractère non valide. + Le nom de fichier court '[2]' n'est pas valide. + Erreur lors de l'obtention des informations sur la sécurité du fichier [3] GetLastError : [2] + Lecteur non valide : [2] + Erreur lors de l'application du correctif au fichier [2]. Celui-ci a probablement été mis à jour par d'autres moyens et ne peut plus être modifié par ce correctif. Pour plus d'informations, consultez le fournisseur de votre correctif. {{Erreur système : [3]}} + Un fichier requis ne peut pas être installé, car le fichier CAB [2] n'est pas signé numériquement. Cela indique peut-être que le fichier CAB est endommagé. + Un fichier requis ne peut pas être installé, car le fichier CAB [2] contient une signature numérique non valide. Cela indique peut-être que le fichier est endommagé.{{ L'erreur [3] a été renvoyée par WinVerifyTrust.}} + Échec de la copie du fichier [2] : erreur CRC. + Échec du déplacement du fichier [2] : erreur CRC. + Échec de la modification du fichier [2] : erreur CRC. + Impossible d'installer le fichier '[2]', car il est introuvable dans le fichier CAB '[3]'. Cela indique peut-être une erreur au niveau du réseau, une erreur de lecture à partir du CD-ROM ou un problème inhérent au package. + Le fichier CAB '[2]' requis pour l'installation est endommagé et ne peut pas être utilisé. Cela indique peut-être une erreur au niveau du réseau, une erreur de lecture à partir du CD-ROM ou un problème inhérent au package. + Une erreur s'est produite lors de la création d'un fichier temporaire nécessaire à l'installation.{{ Dossier : [3]. Code d'erreur système : [2]}} + Impossible de créer la clé : [2]. {{ Erreur système [3].}} Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible d'ouvrir la clé [2]. Erreur système [3]. Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible de supprimer la valeur [2] de la clé [3]. {{ Erreur système [4].}} Vérifiez que vous disposez des droits suffisants pour cette clé ou contactez votre service de support technique. + Impossible de supprimer la clé [2]. Erreur système [3]. Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible de lire la valeur [2] de la clé [3]. {{ Erreur système [4].}} Vérifiez que vous disposez des droits suffisants pour cette clé ou contactez votre service de support technique. + Impossible d'écrire la valeur [2] dans la clé [3].{{ Erreur système [4].}} Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible d'obtenir le nom des valeurs de la clé [2]. {{ Erreur système [3].}} Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible d'obtenir le nom des sous-clés de la clé [2]. {{ Erreur système [3].}} Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible de lire les informations sur la sécurité de la clé [2]. {{ Erreur système [3].}} Vérifiez que vous disposez des droits d'accès nécessaires pour cette clé ou contactez votre service de support technique. + Impossible d'augmenter l'espace disponible dans le Registre. [2] Ko d'espace doivent être libres dans le Registre pour permettre l'installation de cette application. + Une autre installation est en cours d'exécution. Vous devez la terminer avant de poursuivre cette installation. + Erreur lors de l'accès aux données protégées. Vérifiez que Windows Installer est correctement configuré, puis recommencez l'installation. + L'utilisateur '[2]' a déjà lancé l'installation du produit '[3]'. Il devra réexécuter cette installation avant de pouvoir utiliser le produit. L'installation en cours va se poursuivre. + L'utilisateur '[2]' a déjà lancé l'installation du produit '[3]'. Il devra réexécuter cette installation avant de pouvoir utiliser le produit. + Espace disque insuffisant -- Volume : '[2]' ; espace nécessaire : [3] Ko ; espace disponible : [4] Ko. Libérez de l'espace sur le disque, puis recommencez. + Voulez-vous vraiment annuler ? + Le fichier [2][3] est en cours d'utilisation{ par l'opération suivante : nom : [4], identifiant : [5], titre de la fenêtre : '[6]'}. Fermez cette application et réessayez. + Le produit '[2]' est déjà installé. Impossible d'installer ce produit, car il est incompatible avec celui déjà installé. + Espace insuffisant sur le volume '[2]' pour continuer l'installation avec l'option de récupération. [3] Ko sont requis, alors que seuls [4] Ko sont disponibles. Cliquez sur Ignorer pour poursuivre l'installation sans enregistrer les informations de récupération, cliquez sur Recommencer pour revérifier l'espace libre, ou cliquez sur Annuler pour arrêter. + Impossible d'accéder à l'emplacement réseau [2]. + Fermez les applications suivantes avant de poursuivre l'installation : + Impossible de trouver un produit compatible précédemment installé permettant l'installation de ce produit sur cet ordinateur. + Erreur lors de l'application des paramètres de sécurité. [2] n'est pas un utilisateur ou un groupe valide. Cela indique peut-être une erreur au niveau du package ou de la connexion à un contrôleur de domaine sur le réseau. Vérifiez votre connexion réseau et cliquez sur Réessayer ou cliquez sur Annuler pour mettre fin à l'installation. {{Impossible de localiser l'ID de sécurité de l'utilisateur, erreur système [3]}} + La clé [2] n'est pas valide. Vérifiez que vous avez entré la clé correcte. + Le programme d'installation doit redémarrer votre système avant que la configuration de [2] puisse continuer. Cliquez sur Oui pour redémarrer maintenant ou sur Non si vous voulez redémarrer ultérieurement. + Vous devez redémarrer votre système pour que les modifications apportées à la configuration de [2] prennent effet. Cliquez sur Oui pour redémarrer maintenant, ou sur Non si vous voulez redémarrer manuellement ultérieurement. + L'installation de [2] est interrompue. Vous devez annuler les modifications apportées par cette installation pour continuer. Voulez-vous annuler les modifications ? + Une installation de ce produit est déjà en cours. Vous devez annuler les modifications apportées par cette installation pour continuer. Voulez-vous annuler les modifications ? + Aucun package d'installation pour le produit [2] n'a été trouvé. Recommencez l'installation en utilisant une copie valide du package d'installation '[3]'. + Installation terminée. + Échec de l'installation. + Produit : [2] -- [3] + Vous pouvez restaurer l'état antérieur de votre ordinateur ou poursuivre l'installation ultérieurement. Voulez-vous restaurer votre ordinateur ? + Une erreur s'est produite lors de l'écriture des informations concernant l'installation sur le disque. Vérifiez que l'espace disponible sur le disque est suffisant, puis cliquez sur Réessayer ou cliquez sur Annuler pour mettre fin à l'installation. + Impossible de trouver un ou plusieurs des fichiers requis pour restaurer l'état antérieur de votre ordinateur. Impossible de procéder à la restauration. + [2] ne peut pas installer un des produits nécessaires. Contactez votre service de support technique. {{Erreur système : [3].}} + Impossible de supprimer la version antérieure de [2]. Contactez votre service de support technique. {{Erreur système [3].}} + [2] installé + [2] configuré + [2] supprimé + Le fichier [2] a été rejeté par la stratégie de signature numérique. + Impossible d'accéder au service Windows Installer. Ceci peut se produire si Windows est en mode Sans échec, ou si le programme d'installation de Windows n'est pas correctement installé. Contactez votre service de support technique pour assistance. + Il y a un problème au niveau du package Windows Installer. Un script requis pour cette installation n'a pas pu être exécuté. Contactez votre service de support technique ou l'éditeur du package. {{Action personnalisée [2] erreur de script [3], [4] : [5] ligne [6], colonne [7], [8] }} + Il y a un problème au niveau du package Windows Installer. Un programme requis pour cette installation n'a pas pu être exécuté. Contactez votre service de support technique ou l'éditeur du package. {Action : [2], emplacement : [3], commande : [4] }} + Il y a un problème au niveau du package Windows Installer. Un programme nécessaire à l'installation ne s'est pas correctement exécuté. Contactez votre service de support technique ou l'éditeur du package. {{Action [2], emplacement : [3], commande : [4] }} + Il y a un problème au niveau du package Windows Installer. Une DLL requise pour cette installation n'a pas pu être exécutée. Contactez votre service de support technique ou l'éditeur du package. {{Action [2], entrée : [3], bibliothèque : [4] }} + Suppression effectuée. + Échec de la suppression. + Annonce effectuée. + Échec de l'annonce. + Configuration effectuée. + Échec de la configuration. + Vous devez être administrateur pour supprimer cette application. Pour la supprimer, ouvrez une session en tant qu'administrateur ou contactez votre service de support technique pour assistance. + Le package d'installation source pour le produit [2] n'est pas synchronisé avec le package client. Réessayez l'installation en utilisant une copie valide du package d'installation '[3]'. + Vous devez redémarrer l'ordinateur afin de terminer l'installation du produit [2]. D'autres utilisateurs sont actuellement connectés à cet ordinateur et le redémarrer pourrait causer la perte de leurs données. Voulez-vous redémarrer maintenant ? + Le chemin d'accès [2] n'est pas valide. Spécifiez un chemin d'accès valide. + Mémoire insuffisante. Fermez les autres applications avant de recommencer. + Le lecteur [2] est vide. Insérez un disque et cliquez sur Réessayer, ou cliquez sur Annuler pour revenir au volume sélectionné précédemment. + Le lecteur [2] est vide. Insérez un disque et cliquez sur Recommencer, ou cliquez sur Annuler pour revenir dans la boîte de dialogue Sélection de l'emplacement et sélectionner un autre volume. + Le dossier [2] n'existe pas. Entrez un chemin d'accès à un dossier existant. + Vous ne disposez pas des privilèges nécessaires pour lire le contenu de ce dossier. + Impossible de trouver un dossier de destination valide pour l'installation. + Une erreur s'est produite lors de la tentative de lecture de la base de données d'installation source : [2]. + Planification du redémarrage : Le fichier [2] est renommé [3]. Pour terminer l'opération, votre système doit être redémarré. + Planification du redémarrage : Suppression du fichier [2]. Pour terminer l'opération, votre système doit être redémarré. + Impossible d'inscrire le module [2]. HRESULT [3]. Contactez votre service de support technique. + Impossible d'annuler l'inscription du module [2]. HRESULT [3]. Contactez votre service de support technique. + Impossible de placer le package [2] dans le cache. Erreur : [3]. Contactez votre Support technique. + Impossible d'inscrire la police [2]. Vérifiez que vous disposez des autorisations nécessaires pour l'installation des polices et que le système prend en charge cette police. + Impossible d'annuler l'inscription de la police [2]. Vérifiez que vous disposez des autorisations requises pour supprimer des polices. + Impossible de créer le raccourci [2]. Vérifiez que le dossier de destination existe et que vous êtes autorisé à y accéder. + Impossible de supprimer le raccourci [2]. Vérifiez que le fichier de raccourcis existe et que vous êtes autorisé à y accéder. + Impossible d'inscrire la bibliothèque de types pour le fichier [2]. Contactez votre service de support technique. + Impossible d'annuler l'inscription de la bibliothèque de types pour le fichier [2]. Contactez votre service de support technique. + Impossible de mettre à jour le fichier ini [2][3]. Vérifiez que ce fichier existe et que vous êtes autorisé à y accéder. + Impossible de planifier le remplacement du fichier [3] par le fichier [2] au redémarrage. Vérifiez que vous êtes autorisé à accéder en écriture au fichier [3]. + Erreur lors de la suppression du gestionnaire de pilotes ODBC. Erreur ODBC [2] : [3]. Contactez votre Support technique. + Erreur lors de l'installation du gestionnaire de pilotes ODBC. Erreur ODBC [2] : [3]. Contactez votre Support technique. + Erreur lors de la suppression du pilote ODBC [4]. Erreur ODBC [2] : [3]. Vérifiez que vous disposez des privilèges nécessaires pour supprimer des pilotes ODBC. + Erreur lors de l'installation du pilote ODBC [4]. Erreur ODBC [2] : [3]. Vérifiez que le fichier [4] existe et que vous êtes autorisé à y accéder. + Erreur lors de la configuration de la source de données ODBC [4]. Erreur ODBC [2] : [3]. Vérifiez que le fichier [4] existe et que vous êtes autorisé à y accéder. + Échec du démarrage du service '[2]' ([3]). Vérifiez que vous disposez des privilèges nécessaires pour démarrer les services système. + Impossible d'arrêter le service '[2]' ([3]). Vérifiez que vous disposez des privilèges nécessaires pour arrêter les services système. + Impossible de supprimer le service '[2]' ([3]). Vérifiez que vous disposez des privilèges nécessaires pour supprimer les services système. + Impossible d'installer le service'[2]' ([3]). Vérifiez que vous disposez des privilèges nécessaires pour installer des services système. + Impossible de mettre à jour la variable d'environnement '[2]'. Vérifiez que vous disposez des privilèges nécessaires pour modifier les variables d'environnement. + Vous ne disposez pas des privilèges nécessaires pour exécuter cette installation pour tous les utilisateurs de cet ordinateur. Ouvrez une session en tant qu'administrateur, puis relancez cette installation. + Impossible de définir la sécurité de fichier pour le fichier '[3]'. Erreur : [2]. Vérifiez que vous disposez des privilèges nécessaires pour modifier les autorisations de sécurité pour ce fichier. + Les services de composants (COM+ 1.0) ne sont pas installés sur cet ordinateur. Cette installation nécessite les services de composants afin de se terminer correctement. Les services de composants sont disponibles sur Windows 2000. + Erreur lors de l'inscription de l'application COM+. Contactez votre service de support technique pour plus d'informations. + Erreur lors de l'annulation de l'inscription de l'application COM+. Contactez votre service de support technique pour plus d'informations. + La description du service '[2]' ([3]) n'a pas pu être modifiée. + Le service Windows Installer ne peut pas mettre à jour le fichier système [2], car le fichier est protégé par Windows. Vous devrez peut-être mettre à jour votre système d'exploitation pour que ce programme fonctionne correctement. {{Version du package : [3], version protégée du système d'exploitation : [4]}} + Le service Windows Installer ne peut pas mettre à jour le fichier Windows protégé [2]. {{Version du package : [3], Version protégée du système d'exploitation : [4], Erreur SFP : [5]}} + Le service Windows Installer ne peut pas mettre à jour certains fichiers Windows protégés. {{Erreur SFP : [2]. Liste des fichiers protégés :\r\n[3]}} + Les installations utilisateurs sont désactivées par la stratégie en vigueur sur cet ordinateur. + Une erreur s'est produite lors de l'installation de l'assembly '[6]'. Reportez-vous à l'aide et au support pour plus d'informations. HRESULT : [3]. {{interface d'assembly : [4], fonction : [5], composant : [2]}} + Une erreur s'est produite lors de l'installation de l'assembly '[6]'. L'assembly n'a pas un nom fort et n'est pas signé avec une longueur de clé minimale. HRESULT : [3]. {{interface de l'assembly : [4], fonction : [5], composant: [2]}} + Une erreur s'est produite lors de l'installation de l'assembly '[6]'. La signature ou le catalogue n'a pas pu être vérifié ou n'est pas valide. HRESULT : [3]. {{interface d'assembly : [4], fonction : [5], composant : [2]}} + Une erreur s'est produite lors de l'installation de l'assembly '[6]'. Un ou plusieurs des modules de l'assembly sont introuvables. HRESULT : [3]. {{interface d'assembly : [4], fonction : [5], composant : [2]}} + + + L'application "[2]" doit être fermée pour que l'installation puisse continuer. + + Validation de l'installation + Copie des nouveaux fichiers + Fichier : [1], Répertoire : [9], Taille : [6] + Copie des fichiers d'installation réseau + Fichier : [1], Répertoire : [9], Taille : [6] + Calcul de l'espace nécessaire + Calcul de l'espace nécessaire + Calcul de l'espace nécessaire + Création des raccourcis + Raccourci : [1] + Publication des composants qualifiés + Identificateur du composant : [1], qualificateur : [2] + Publication des composants du produit + Composant : [1] + Publication des informations sur le produit + Inscription des serveurs de classes + Identificateur de classe : [1] + Inscription des extensions serveur + Extension : [1] + Inscription des informations MIME + Type de contenu MIME : [1], extension : [2] + Inscription des identificateurs de programmes + Identificateur du programme : [1] + Allocation de l'espace du Registre + Espace libre : [1] + Recherche des applications déjà installées + Propriété : [1], Signature : [2] + Liaison des exécutables + Fichier : [1] + Recherche des produits éligibles + Création des dossiers + Dossier : [1] + Suppression des services + Service : [1] + Création de fichiers dupliqués + Fichier : [1], Répertoire : [9], Taille : [6] + Recherche des applications associées + Application trouvée : [1] + Installation des composants ODBC + Installation des nouveaux services + Service : [2] + Évaluation des conditions de lancement + Migration de l'état des composants à partir des applications associées + Application : [1] + Déplacement des fichiers + Fichier : [1], Répertoire : [9], Taille : [6] + Fichiers de correction + Fichier : [1], Répertoire : [2], Taille : [3] + Mise à jour de l'inscription des composants + Inscription des composants et applications COM+ + Id application : [1]{{, Type application : [2], Utilisateurs : [3], RSN : [4]}} + Inscription des polices + Police : [1] + Inscription du produit + [1] + Inscription des bibliothèques de type + Identificateur de la bibliothèque : [1] + Inscription de l'utilisateur + [1] + Suppression des fichiers dupliqués + Fichier : [1], Répertoire : [9] + Mise à jour des chaînes d'environnement + Nom : [1], valeur : [2], action : [3] + Suppression des applications + Application : [1], Ligne de commande : [2] + Suppression des fichiers + Fichier : [1], Répertoire : [9] + Suppression des dossiers + Dossier : [1] + Suppression des entrées des fichiers INI + Fichier : [1] ; section : [2] ; clé : [3] ; valeur : [4] + Suppression des composants ODBC + Suppression des valeurs du Registre système + Clé : [1], Nom : [2] + Suppression des raccourcis + Raccourci : [1] + Recherche des produits éligibles + Inscription des modules + Fichier : [1] ; dossier : [2] + Annulation de l'inscription des modules + Fichier : [1] ; dossier : [2] + Initialisation des répertoires ODBC en cours + Démarrage des services + Service : [1] + Arrêt des services + Service : [1] + Annulation de la publication des composants qualifiés + Identificateur du composant : [1], qualificateur : [2] + Annulation de la publication des composants du produit + Composant : [1] + Annulation de l'inscription des serveurs de classes + Identificateur de classe : [1] + Annulation de l'inscription des composants et applications COM+ + Id application : [1]{{, AppType : [2]}} + Annulation de l'inscription des extensions serveur + Extension : [1] + Annulation de l'inscription des polices + Police : [1] + Annulation de l'inscription des informations MIME + Type de contenu MIME : [1], extension : [2] + Annulation de l'inscription des identificateurs de programmes + Identificateur du programme : [1] + Annulation de l'inscription des bibliothèques de type + Identificateur de la bibliothèque : [1] + Mise à jour des chaînes d'environnement + Nom : [1], valeur : [2], action : [3] + Écriture des valeurs des fichiers INI + Fichier : [1] ; section : [2] ; clé : [3] ; valeur : [4] + Écriture des valeurs du Registre système + Clé : [1], Nom : [2], Valeur : [3] + Publication d'informations sur l'application + Génération de scripts pour l'action : + [1] + Installation du catalogue système + Fichier : [1], dépendances : [2] + Publication des informations de modules + Contexte de l'application : [1], nom de l'assembly : [2] + Dépublication des informations sur l'assembly + Contexte de l'application : [1], nom de l'assembly : [2] + Annulation de l'action : + [1] + Suppression des fichiers de sauvegarde + Fichier : [1] + Suppression des fichiers déplacés + Fichier : [1], Répertoire : [9] + Annulation de la publication des informations sur le produit + + octets + Go + Ko + Mo + Ce composant ne sera pas disponible. + Ce composant sera installé à la demande. + Ce composant sera installé en totalité pour être exécuté à partir du CD + Ce composant sera installé en totalité sur le disque dur local + Ce composant sera installé en totalité pour être exécuté à partir du réseau + Installation pour une exécution à partir du CD + Installation sur le disque dur local + Installation pour une exécution à partir du réseau + Collecte des informations nécessaires en cours... + Ce composant ne sera pas installé + Ce composant sera configuré pour être installé à la demande + Ce composant sera installé pour être exécuté à partir du CD + Ce composant sera installé sur le disque dur local + Ce composant sera installé pour être exécuté à partir du réseau + Ce composant ne sera plus disponible + Installation à la demande + Ce composant sera disponible pour être exécuté à partir du CD + Ce composant sera installé sur votre disque dur local + Ce composant sera disponible pour être exécuté à partir du réseau + Ce composant sera désinstallé en totalité et ne pourra plus être exécuté à partir du CD + Ce composant ne pourra plus être exécuté à partir du CD et sera configuré pour être installé à la demande + Ce composant sera conservé pour être exécuté à partir du CD + Ce composant ne pourra plus être exécuté à partir du CD et sera installé sur le disque dur local + Ce composant libère [1] sur votre disque dur. + Ce composant nécessite la présence de [1] sur votre disque dur. + Calcul de l'espace nécessaire pour ce composant... + Ce composant sera supprimé en totalité + Ce composant sera supprimé du disque dur local, mais sera configuré pour être installé à la demande + Ce composant sera supprimé du disque dur local, mais pourra encore être exécuté à partir du CD + Ce composant sera conservé sur le disque dur local + Ce composant sera supprimé de votre disque dur local, mais sera toujours disponible pour être exécuté à partir du réseau + Ce composant sera désinstallé en totalité et ne pourra plus être exécuté à partir du réseau + Ce composant ne pourra plus être exécuté à partir du réseau et sera configuré pour être installé à la demande + Ce composant ne pourra plus être exécuté à partir du réseau et sera installé sur le disque dur local + Ce composant sera conservé pour être exécuté à partir du réseau + Ce composant libère [1] sur votre disque dur. [2] sous-composants sur [3] sont sélectionnés. Les sous-composants libèrent [4] sur votre disque dur. + Ce composant libère [1] sur votre disque dur. [2] sous-composants sur [3] sont sélectionnés. Les sous-composants nécessitent la présence de [4] sur votre disque dur. + Ce composant nécessite la présence de [1] sur votre disque dur. [2] sous-composants sur [3] sont sélectionnés. Les sous-composants libèrent [4] sur votre disque dur. + Ce composant nécessite la présence de [1] sur votre disque dur. [2] sous-composants sur [3] sont sélectionnés. Les sous-composants nécessitent la présence de [4] sur votre disque dur. + Durée restante : {[1] minute(s) }{[2] secondes} + Disponible + Différences + Nécessaire + Taille du disque + Volume + + diff --git a/src/VBox/Installer/win/NLS/it_IT.wxl b/src/VBox/Installer/win/NLS/it_IT.wxl new file mode 100644 index 00000000..ae038651 --- /dev/null +++ b/src/VBox/Installer/win/NLS/it_IT.wxl @@ -0,0 +1,548 @@ + + + + + + + 1040 + Italiano + + &No + &Sì + A&nnulla + &Avanti > + < &Indietro + S&foglia + O&K + &Controlla + &Installa + &Rimuovi + &Fine + &Ripara + &Ritorna + Ri&prova + I&gnora + E&sci + Personalizzato + Installazione + + Licenza + Manuale utente + + Applicazione [ProductName]. + Driver di [ProductName] per il supporto di dispositivi USB. + Driver di [ProductName] per il supporto di rete. + Driver di [ProductName] per la rete con bridge. + Driver di [ProductName] per la scheda di rete virtuale per la rete solo host. + Driver di [ProductName] per la rete con bridge NDIS6. + Driver di [ProductName] per la scheda di rete virtuale per la rete solo host NDIS6. + + Supporto Python per VirtualBox. + + Devi avere diritti di amministrazione per (dis)installare [ProductName]! L'installazione sarà interrotta immediatamente. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + Questa applicazione può essere eseguita solo su Windows XP o superiori. + Questa applicazione può essere eseguita solo su sistemi Windows a 32 bit. Installa la versione a 64 bit di [ProductName]! + Questa applicazione può essere eseguita solo su sistemi Windows a 64 bit. Installa la versione a 32 bit di [ProductName]! + Una vecchia installazione di Sun VirtualBox è stata trovata su questa macchina. Disinstalla prima questo pacchetto e poi installa [ProductName]! + Una vecchia installazione di innotek VirtualBox è stata trovata su questa macchina. Disinstalla prima questo pacchetto e poi installa [ProductName]! + + Sei sicuro di voler annullare l'installazione di [ProductName]? + + Benvenuti nella procedura guidata di installazione di [ProductName] + La procedura guidata installerà [ProductName] sul tuo computer. Fai clic su Avanti per continuare o su Annulla per uscire dalla procedura guidata. + + Accordo di licenza con l'utente finale + Leggi attentamente il seguente accordo di licenza. + &Accetto i termini dell'accordo di licenza + &Non accetto i termini dell'accordo di licenza + + Numero di serie + Digita il numero di serie nel campo seguente. Troverai il numero sull'adesivo all'interno della custodia del CD di VirtualBox. + Una volta digitato il numero di serie, premi il pulsante "Controlla" in basso. + + Il numero di serie digitato non era valido! + Torna indietro per digitare nuovamente il numero di serie. + Ricorda che il numero seriale deve essere scritto esattamente come è stampato sull'adesivo. + + Avviso: + Stati salvati non compatibili! + Quando aggiorni [ProductName], tutti gli stati salvati dalle macchine già esistenti non funzioneranno più! Dopo l'installazione, dovrai scartarli manualmente. + Procedere subito con l'installazione? + + Interfacce host + Se hai utilizzato interfacce host per le tue macchine nella versione precedente, devi ricrearle manualmente dopo questa installazione. + + La seguente applicazione dovrebbe essere chiusa prima di procedere con l'installazione: "[2]" + + Posizione: + &Utilizzo del disco + Seleziona la modalità di installazione delle funzionalità. + Fai clic sulle icone dell'albero seguente per cambiare la modalità di installazione delle funzionalità. + Installazione personalizzata + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + Personalizza + Scegli dalle opzioni seguenti: + Crea voci del menu di avvio + Crea una scorciatoia sul desktop + Crea una scorciatoia nella barra di avvio veloce + Registrati associazioni di file + + Scegli quale tipo di driver di rete utilizzerai: + Driver di rete NDIS5. +Questo è il tipo predefinito per le vecchie versioni di Windows (pre-Vista). + Driver di rete NDIS6. +Questo è il tipo predefinito per le nuove versioni di Windows (Vista e successivi). + Usa driver di rete NDIS5. + Usa driver di rete NDIS6. + + Avviso: + Interfacce di rete + L'installazione delle funzionalità di rete di [ProductName] ripristinerà la connessione di rete causando una disconnessione temporanea dalla rete. + Vuoi procedere subito con l'installazione? + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + Lo spazio su disco richiesto per l'installazione delle funzionalità selezionate. + I volumi evidenziati non hanno spazio disponibile sufficiente per le funzionalità attualmente selezionate. Puoi rimuovere alcuni file dai volumi evidenziati, scegliere di installare meno funzionalità sul disco locale o selezionare un disco di destinazione diverso. + Requisiti di spazio disco + {120}{70}{70}{70}{70} + + Spostati nella cartella di destinazione + Cambia la cartella di destinazione attuale + Livello superiore + Crea una nuova cartella + &Cerca in: + &Nome della cartella: + + La procedura guidata è pronta per iniziare l'installazione di [InstallMode]. + Fai clic su Installa per iniziare l'installazione. Se vuoi rivedere o cambiare una qualsiasi impostazione di installazione, fai clic su Indietro. Fai clic su Annulla per uscire dalla procedura guidata. + Pronto per l'installazione + + Fai clic sul pulsante Fine per uscire dalla procedura guidata. + L'installazione di [ProductName] è completa. + Avvia [ProductName] dopo l'installazione + + La procedura guidata di [ProductName] è stata terminata in anticipo + L'installazione di [ProductName] è stata terminata in anticipo a causa di un errore. Il sistema non è stato modificato. Per installare questo programma successivamente, esegui nuovamente l'installazione. + Fai clic sul pulsante Fine per uscire dalla procedura guidata. + + Le seguenti applicazioni stanno utilizzando file che devono essere aggiornati da questa installazione. Chiudi queste applicazioni e poi fai clic su &Riprova per continuare l'installazione o Esci per abbandonarla. + Alcuni file che devono essere aggiornati sono attualmente utilizzati. + File in uso + + La procedura guidata di [ProductName] è stata interrotta + L'installazione di [ProductName] è stata interrotta. Il sistema non è stato modificato. Per installare questo programma successivamente, esegui nuovamente questa installazione. + Fai clic sul pulsante Fine per uscire dalla procedura guidata. + + Attendi che la procedura guidata installi [ProductName]. Potrebbe richiedere qualche minuto. + + Ripristino della procedura guidata di installazione di [ProductName] + La procedura guidata completerà l'installazione di [ProductName] sul tuo computer. Fai clic su Installa per continuare o Annulla per uscire dalla procedura guidata. + + Modifica, ripara o rimuovi l'installazione + Seleziona l'operazione che desideri eseguire. + Ri&para + Ripara gli errori nello stato di installazione più recente - corregge i file, le scorciatoie e le voci di registro mancanti o danneggiate. + Ripara l'installazione + Riparazione + ripara + &Rimuovi + Rimuove [ProductName] dal tuo computer. + Rimuovi l'installazione + Rimozione + rimuove + + Benvenuti nella procedura guidata di installazione di [ProductName] + La procedura guidata di installazione ti consentirà di riparare la tua installazione attuale o rimuovere [ProductName] dal tuo computer. Fai clic su Avanti per continuare o Annulla per uscire dalla procedura guidata. + + Lo spazio su disco richiesto per l'installazione supera lo spazio disponibile. + I volumi evidenziati non hanno spazio disco sufficiente per le funzionalità attualmente selezionate. Puoi rimuovere alcuni file dai volumi evidenziati, scegliere di installare meno funzionalità sul disco locale o seleziona un disco di destinazione diverso. + Spazio su disco insufficiente + + Lo spazio su disco richiesto per l'installazione supera lo spazio disponibile. + I volumi evidenziati non hanno spazio disco sufficiente per le funzionalità attualmente selezionate. Puoi rimuovere alcuni file dai volumi evidenziati, scegliere di installare meno funzionalità sul disco locale o seleziona un disco di destinazione diverso. + Spazio su disco insufficiente + In alternativa, puoi scegliere di disabilitare la funzionalità di rollback dell'installatore. Questo consente all'installatore di ripristinare lo stato originale del tuo computer qualore l'installazione venisse interrotta in qualsiasi modo. Fai clic su Sì se desideri rischiare di disabilitare il rollback. + + Rimuovi [ProductName] + Hai scelto di rimuovere il programma dal tuo computer. + Fai clic su Rimuovi per rimuovere [ProductName] dal tuo computer. Se vuoi rivedere o cambiare una qualsiasi impostazione di installazione, fai clic su Indietro. Fai clic su Annulla per uscire dalla procedura guidata. + + Ripara [ProductName] + La procedura guidata di installazione è pronta per iniziare la riparazione di [ProductName]. + Fai clic su Ripara per riparare l'installazione di [ProductName]. Se vuoi rivedere o cambiare le impostazioni di installazione, fai clic su Indietro. Fai clic su Annulla per uscire dalla procedura guidata. + + Attendi che l'installatore termini il calcolo dei requisiti di spazio sul disco. + + Le seguenti applicazioni stanno utilizzando file che devono essere aggiornati da questa installazione. Puoi permette alla procedura guidata di chiuderle e tentare di riavviarle o riavviare successivamente la macchina. + Alcuni file che devono essere aggiornati sono attualmente utilizzati. + File in uso + &Chiudi le applicazioni e prova a riavviarle. + &Non chiudere le applicazioni. Sarà necessario un riavvio. + + {{Errore grave: }} + {{Errore [1]. }} + Avviso [1]. + + Info [1]. + L'installatore ha riscontrato un errore inatteso durante l'installazione di questo pacchetto. Questo potrebbe indicare un problema con questo pacchetto. Il codice di errore è [1]. {{Gli argomenti sono: [2], [3], [4]}} + + {{Disco pieno: }} + Azione [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Tipo di messaggio: [1], Argomento: [2] + === Registrazione iniziata: [Date] [Time] === + === Registrazione fermata: [Date] [Time] === + Avvio azione [Time]: [1]. + Azione terminata [Time]: [1]. Valore restituito [2]. + Tempo rimanente: {[1] minuti }{[2] secondi} + Memoria insufficiente. Chiudi le altre applicazione prima di riprovare. + L'installazione non risponde più. + L'installatore si è fermato prematuramente. + Attendi mentre Windows configura [ProductName] + Raccolta delle informazioni necessarie in corso... + Rimozione delle vecchie versioni di questa applicazione... + Preparazione della rimozione delle vecchie versioni di questa applicazione... + {[ProductName] }Installazione completata correttamente. + {[ProductName] }Installazione non riuscita. + Errore durante la lettura dal file: [2]. {{ Errore di sistema [3].}} Verifica che il file esista e che sia accessibile. + Impossibile creare il file '[2]'. Una cartella con questo nome esiste già. Annulla l'installazione o prova ad installare in una posizione diversa. + Inserisci il disco: [2] + L'installatore ha privilegi insufficienti per accedere a questa cartella: [2]. L'installazione non può continuare. Accedi come amministratore o contatta il tuo amministratore di sistema. + Errore durante la scrittura del file: [2]. Verifica di avere l'accesso a tale cartella. + Errore durante la lettura del file [2]. {{ Errore di sistema [3].}} Verifica che il file esista e sia accessibile. + Un'altra applicazione ha accesso esclusivo al file '[2]'. Termina le altre applicazioni e fai clic su Riprova. + Non c'è spazio su disco sufficiente per installare questo file: [2]. Libera spazio su disco e fai clic su Riprova, o fai clic su Annulla per uscire. + File di origine non trovato: [2]. Verifica che il file esista e che sia accessibile. + Errore durante la lettura del file: [3]. {{ Errore di sistema [2].}} Verifica che il file esista e sia accessibile. + Errore durante la scrittura del file: [3]. {{ Errore di sistema [2].}} Verifica di avere l'accesso a tale cartella. + File di origine non trovato{{(cabinet)}}: [2]. Verifica che il file esista e sia accessibile. + Impossibile creare la cartella '[2]'. Un file con questo nome esiste già. Rinomina o rimuovi il file e fai clic su Riprova, o fai clic su Annulla per uscire. + Il volume [2] è attualmente indisponibile. Selezionane un altro. + Il percorso specificato '[2]' non è disponibile. + Impossibile scrivere nella cartella specificata: [2]. + Si è verificato un errore di rete durante il tentativo di leggere dal file: [2] + Si è verificato un errore durante il tentativo di creare la cartella: [2] + Si è verificato un errore di rete durante il tentativo di creare la cartella: [2] + Si è verificato un errore di rete durante il tentativo di aprire il cabinet del file sorgente: [2] + Il percorso specificato è troppo lungo: [2] + L'installatore ha privilegi insufficienti per modificare questo file: [2]. + Una parte del percorso della cartella '[2]' non è valida. È vuota o eccede la lunghezza consentita dal sistema. + Il percorso '[2]' contiene parole non valide nei percorsi delle cartelle. + Il percorso della cartella '[2]' contiene un carattere non valido. + '[2]' non è un nome breve valido. + Errore durante il recupero della protezione del file: [3] GetLastString: [2] + Disco non valido: [2] + Errore durante l'applicazione della patch al file [2]. È stato probabilmente aggiornato in altro modo, e non può essere più modificato da questa patch. Per ulteriori informazioni contatta il fornitore della patch. {{Errore di sistema: [3]}} + Un file richiesto non può essere installato poiché il file cabinet [2] non è firmato digitalmente. Questo potrebbe indicare che il file cabinet è danneggiato. + Un file richiesto non può essere installato poiché il file cabinet [2] non è firmato digitalmente. Questo potrebbe indicare che il file cabinet è danneggiato.{{ L'errore [3] è stato restituito da WinVerifyTrust.}} + Impossibile copiare correttamente il file [2]: errore CRC. + Impossibile spostare correttamente il file [2]: errore CRC. + Impossibile applicare correttamente il file di patch [2]: errore CRC. + Il file '[2]' non può essere installato poiché il file non può essere trovato nel file cabinet '[3]'. Questo potrebbe indicare un errore di rete, un errore di lettura dal CD-ROM o un problema con questo pacchetto. + Il file cabinet '[2]' richiesto da questa installazione è danneggiato e non può essere utilizzato. Questo potrebbe indicare un errore di rete, un errore di lettura dal CD-ROM o un problema con questo pacchetto. + Si è verificato un errore durante la creazione di un file temporaneo che è necessario per completare questa installazione.{{ Cartella: [3]. Codice dell'errore di sistema: [2]}} + Impossibile creare la chiave: [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile aprire la chiave: [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile eliminare il valore [2] dalla chiave [3]. {{ Errore di sistema [4].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile eliminare la chiave [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile leggere il valore [2] dalla chiave [3]. {{ Errore di sistema [4].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile scrivere il valore [2] nella chiave [3]. {{ Errore di sistema [4].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile ottenere i nomi dei valori per la chiave [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile ottenere i nomi delle sotto-chiavi per la chiave [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile leggere le informazioni di sicurezza per la chiave [2]. {{ Errore di sistema [3].}} Verifica di avere accesso alla chiave, o contatta il tuo personale di supporto. + Impossibile incrementare lo spazio disponibile per il registro. [2] KB di spazio libero per il registro sono richiesti per l'installazione di questa applicazione. + Un'altra installazione è in corso. Devi completare quella installazione prima di continuare con questa. + Errore durante l'accesso ai dati protetti. Assicurati che Windows Installer sia installato correttamente e prova nuovamente l'installazione. + L'utente '[2]' ha iniziato precedentemente un'installazione del prodotto '[3]'. Quell'utente dovrà eseguire nuovamente l'installazione prima che possa utilizzare il prodotto. La tua installazione attuale continuerà subito. + L'utente '[2]' ha iniziato precedentemente un'installazione del prodotto '[3]'. Quell'utente dovrà eseguire nuovamente l'installazione prima che possa utilizzare il prodotto. + Spazio su disco insufficiente -- Volume: '[2]'; spazio richiesto: [3] KB; spazio disponibile: [4] KB. Libera spazio sul disco e riprova. + Sei sicuro di voler annullare? + Il file [2][3] è in uso { dal processo seguente: Nome: [4], Id: [5], Titolo finestra: '[6]'}. Chiudi l'applicazione e riprova. + Il prodotto '[2]' è già installato, e impedisce l'installazione di questo prodotto. I due prodotti sono incompatibili. + Non c'è spazio su disco sufficiente sul volume '[2]' per continuare l'installazione con il ripristino abilitato. [3] KB sono richiesti, ma solo [4] KB sono disponibili. Fai clic su Ignora per continuare l'installazione senza salvare le informazioni di ripristino, fai clic su Riprova per controllare nuovamente lo spazio disponibile o fai clic su Annulla per uscire dall'installazione. + Impossibile accedere al percorso di rete [2]. + Le seguenti applicazioni dovrebbero essere chiuse prima di continuare l'installazione: + Impossibile trovare alcun prodotto compatibile precedentemente installato sulla macchina per l'installazione di questo prodotto. + Si è verificato un errore durante l'applicazione delle impostazioni di sicurezza. [2] non è un utente o gruppo valido. Questo potrebbe essere un problema del pacchetto o un problema di connessione a un controller di dominio sulla rete. Controlla la tua connessione di rete e fai clic su Riprova o su Annulla per terminare l'installazione. {{Impossibile trovare il SID dell'utente, errore di sistema [3]}} + La chiave [2] non è valida. Verifica di aver digitato la chiave corretta. + L'installatore deve riavviare il tuo sistema prima che la Configurazione di [2] possa continuare. Fai clic su Sì per riavviare subito o No se preferisci riavviare manualmente più tardi. + Devi riavviare il tuo sistema affinché le modifiche di Configurazione apportare da [2] abbiano effetto. Fai clic su Sì per riavviare subito o No se preferisci riavviare manualmente più tardi. + Un'installazione di [2] è attualmente sospesa. Devi annullare le modifiche fatte da quell'installazione per continuare. Vuoi annullare tali modifiche? + Una precedente installazione di questo prodotto è in corso. Devi annullare le modifiche fatte da quell'installazione per continuare. Vuoi annullare tali modifiche? + Un pacchetto di installazione per il prodotto [2] non è disponibile. Prova nuovamente l'installazione utilizzando una copia valida del pacchetto di installazione '[3]'. + Installazione completata correttamente. + Installazione non riuscita. + Prodotto: [2] -- [3] + Puoi sia ripristinare il tuo computer al suo stato precedente, sia continuare l'installazione successivamente. Vuoi ripristinare? + Si è verificato un errore durante la scrittura delle informazioni di installazione su disco. Controlla per assicurarti che sia disponibile lo spazio su disco necessario, e fai clic su Riprova, o Annulla per terminare l'installazione. + Uno o più file richiesti per ripristinare il tuo computer al suo stato precedente non possono essere trovati. Il ripristino non sarà possibile. + [2] non è in grado di installare uno dei prodotti richiesti. Contatta il tuo supporto tecnico. {{Stringa di sistema: [3].}} + La vecchia versione di [2] non può essere rimossa. Contatta il tuo supporto tecnico. {{Stringa di sistema [3].}} + Installato [2] + Configurato [2] + Rimosso [2] + Il file [2] è stato rifiutata dal criterio di firma digitale. + Il servizio Windows Installer non è accessibile. Ciò può accadere se Windows viene eseguito in modalità provvisoria o se Windows Installer non è installato correttamente. Contatta il tuo supporto tecnico per richiedere assistenza. + C'è un problema con questa versione del pacchetto Windows Installer. Uno script richiesto per completare questa installazione non può essere eseguito. Contatta il tuo supporto tecnico o il fornitore del pacchetto. {{Azione personalizzata [2] errore script [3], [4]: [5] Riga [6], Colonna [7], [8] }} + C'è un problema con questa versione del pacchetto Windows Installer. Un programma richiesto per completare questa installazione non può essere eseguito. Contatta il tuo supporto tecnico o il fornitore del pacchetto. {{Azione: [2], posizione: [3], comando: [4] }} + C'è un problema con questa versione del pacchetto Windows Installer. L'esecuzione di un programma parte dell'installazione non è terminata come previsto. Contatta il tuo supporto tecnico o il fornitore del pacchetto. {{Azione [2], posizione: [3], comando: [4] }} + C'è un problema con questa versione del pacchetto Windows Installer. Una DLL richiesta per completare questa installazione non può essere eseguita. Contatta il tuo supporto tecnico o il fornitore del pacchetto. {{Azione [2], voce: [3], libreria: [4] }} + Rimozione completata correttamente. + Rimozione non riuscita. + Pubblicazione completata correttamente. + Pubblicazione non riuscita. + Configurazione completata correttamente. + Configurazione non riuscita. + Devi essere un amministratore per rimuovere questa applicazione. Per rimuovere questa applicazione, puoi accedere come amministratore o contattare il tuo supporto tecnico per ricevere assistenza. + Il percorso [2] non è valido. Specifica un percorso valido. + Memoria insufficiente. Chiudi le altre applicazioni prima di riprovare. + Non c'è alcun disco nel lettore [2]. Inseriscine uno e fai clic su Riprova, o fai clic su Annulla per tornare al volume selezionato in precedenza. + Non c'è alcun disco nel lettore [2]. Inseriscine uno e fai clic su Riprova, o fai clic su Annulla per tornare alla finestra di navigazione e selezionare un volume differente. + La cartella [2] non esiste. Digita un percorso a una cartella esistente. + Non hai i permessi di lettura su questa cartella. + Non è possibile determinare una cartella di destinazione valida per l'installazione. + Errore durante il tentativo di leggere dal database di installazione di origine: [2]. + Pianificazione dell'operazione di riavvio: rinomina del file [2] in [3]. Necessario il riavvio per completare l'operazione. + Pianificazione dell'operazione di riavvio: eliminazione del file [2]. È necessario il riavvio per completare l'operazione. + La registrazione del modulo [2] non è riuscita. HRESULT [3]. Contatta il tuo personale di supporto. + La de-registrazione del modulo [2] non è riuscita. HRESULT [3]. Contatta il tuo personale di supporto. + Memorizzazione in cache del pacchetto [2] non riuscita. Errore: [3]. Contatta il tuo personale di supporto. + Impossibile registrare il carattere [2]. Verifica di avere permessi sufficienti per installare i caratteri, e che il sistema supporti questo carattere. + Impossibile de-registrare il carattere [2]. Verifica di avere permessi sufficienti per rimuovere i caratteri. + Impossibile creare la scorciatoia [2]. Verifica che la cartella di destinazione esista e che sia accessibile. + Impossibile rimuovere la scorciatoia [2]. Verifica che il file della scorciatoia esista e che sia accessibile. + Impossibile registrare la libreria dei tipi per il file [2]. Contatta il tuo personale di supporto. + Impossibile de-registrare la libreria dei tipi per il file [2]. Contatta il tuo personale di supporto. + Impossibile aggiornare il file ini [2][3]. Verifica che il file esista e che sia accessibile. + Impossibile pianificare la sostituzione del file [3] con il file [2] all riavvio. Verifica di avere i permessi di scrittura sul file [3]. + Errore durante la rimozione del gestore dei driver ODBC, errore ODBC [2]: [3]. Contatta il tuo personale di supporto. + Errore durante l'installazione del gestore dei driver ODBC, errore ODBC [2]: [3]. Contatta il tuo personale di supporto. + Errore durante la rimozione del driver ODBC: [4], errore ODBC [2]: [3]. Verifica di aver privilegi sufficienti per rimuovere i driver ODBC. + Errore durante l'installazione del driver ODBC: [4], errore ODBC [2]: [3]. Verifica che il file [4] esista e che sia accessibile. + Errore durante la Configurazione dell'origine dati ODBC: [4], errore ODBC [2]: [3]. Verifica che il file [4] esista e che sia accessibile. + Il servizio '[2]' ([3]) non può essere avviato. Verifica di aver privilegi sufficienti per avviare i servizi di sistema. + Il servizio '[2]' ([3]) non può essere fermato. Verifica di aver privilegi sufficienti per fermare i servizi di sistema. + Il servizio '[2]' ([3]) non può essere eliminato. Verifica di aver privilegi sufficienti per rimuovere i servizi di sistema. + Il servizio '[2]' ([3]) non può essere installato. Verifica di aver privilegi sufficienti per installare i servizi di sistema. + Impossibile aggiornare la variabile d'ambiente '[2]'. Verifica di avere privilegi sufficienti per modificare le variabili d'ambiente. + Non hai privilegi sufficienti per completare questa installazione per tutti gli utenti sulla macchina. Accedi come amministratore e riprova questa installazione. + Impossibile impostare la sicurezza del file '[3]'. Errore: [2]. Verifica di avere privilegi sufficienti per modificare i permessi di protezione per questo file. + I Component Services (COM+ 1.0) non sono installati su questo computer. Questa installazione richiede i Component Services per essere completata correttamente. Component Services sono disponibili su Windows 2000. + Errore durante la registrazione dell'applicazione COM+. Contatta il tuo personale di supporto per ulteriori informazioni. + Errore durante la de-registrazione dell'applicazione COM+. Contatta il tuo personale di supporto per ulteriori informazioni. + La descrizione del servizio '[2]' ([3]) non può essere cambiata. + Il servizio Windows Installer non può aggiornare il file di sistema [2] poiché il file è protetto da Windows. Potresti dover aggiornare il tuo sistema operativo affinché questo programma funzioni correttamente. {{Versione pacchetto: [3], Versione protetta OS: [4]}} + Il servizio Windows Installer non può aggiornare il file protetto di Windows [2]. {{Versione pacchetto: [3], Versione protetta OS: [4], Errore SFP: [5]}} + Il servizio Windows Installer non può aggiornare uno o più file protetti di Windows. {{Stringa SFP: [2]. Elenco dei file protetti:\r\n[3]}} + Le installazioni utente sono disabilitate tramite policy sulla macchina. + Si è verificato un errore durante l'installazione del componente assembly [2]. HRESULT: [3]. {{interfaccia assembly: [4], funzione: [5], nome assembly: [6]}} + + L'applicazione "[2]" deve essere chiusa affinché l'installazione possa continuare. + Convalida dell'installazione + Copia dei nuovi file + File: [1], Cartella: [9], Dimensione: [6] + Copia dei file di installazione da rete + File: [1], Cartella: [9], Dimensione: [6] + Calcolo dei requisiti di spazio + Calcolo dei requisiti di spazio + Calcolo dei requisiti di spazio + Creazione delle scorciatoie + Scorciatoia: [1] + Pubblicazione componenti qualificate + ID componente: [1], Qualificatore: [2] + Pubblicazione funzionalità del prodotto + Funzionalità: [1] + Pubblicazione delle informazioni sul prodotto + Registrazione dei server delle classi + ID classe: [1] + Registrazione dei server delle estensioni + Estensione: [1] + Registrazione informazioni MIME + Tipo di contenuto MIME: [1], Estensione: [2] + Registrazione degli identificatori di programma + ProgId: [1] + Allocazione spazio di registro + Spazio disponibile: [1] + Ricerca delle applicazioni installate + Proprietà: [1], Firma: [2] + Associazione eseguibili + File: [1] + Ricerca dei prodotti qualificanti + Creazione delle cartelle + Cartella: [1] + Eliminazione dei servizi + Servizio: [1] + Creazione dei file duplicati + File: [1], Cartella: [9], Dimensione: [6] + Ricerca della applicazioni correlate + Trovata applicazione: [1] + Installazione dei componenti ODBC + Installazione dei nuovi servizi + Servizio: [2] + Valutazione delle condizioni di avvio + Migrazione degli stati delle funzionalità dalle applicazioni correlate + Applicazione: [1] + Spostamento dei file + File: [1], Cartella: [9], Dimensione: [6] + Applicazione patch ai file + File: [1], Cartella: [2], Dimensione: [3] + Aggiornamento registrazione dei componenti + Registrazione applicazioni COM+ e componenti + AppId: [1]{{, AppType: [2], Utenti: [3], RSN: [4]}} + Registrazione dei caratteri + Carattere: [1] + Registrazione del prodotto + [1] + Registrazione delle librerie dei tipi + LibID: [1] + Registrazione utente + [1] + Rimozione dei file duplicati + File: [1], Cartella: [9] + Aggiornamento stringhe d'ambiente + Nome: [1], Valore: [2], Azione [3] + Rimozione delle applicazioni + Applicazione: [1], Riga di comando: [2] + Rimozione dei file + File: [1], Cartella: [9] + Rimozione delle cartelle + Cartella: [1] + Rimozione voci dei file INI + File: [1], Sezione: [2], Chiave: [3], Valore: [4] + Rimozione componenti ODBC + Rimozione dei valori del registro di sistema + Chiave: [1], Nome: [2] + Rimozione delle scorciatoie + Scorciatoia: [1] + Ricerca dei prodotti qualificanti + Registrazione dei moduli + File: [1], Cartella: [2] + De-registrazione dei moduli + File: [1], Cartella: [2] + Inizializzazione delle cartelle ODBC + Avvio dei servizi + Servizio: [1] + Interruzione dei servizi + Servizio: [1] + Rimozione pubblicazione dei componenti qualificati + ID componente: [1], Qualificatore: [2] + Rimozione della pubblicazione delle funzionalità di prodotto + Funzionalità: [1] + De-registrazione server delle classi + ID classe: [1] + De-registrazione applicazioni COM+ e componenti + AppId: [1]{{, AppType: [2]}} + De-registrazione server delle estensioni + Estensione: [1] + De-registrazione dei caratteri + Carattere: [1] + De-registrazione informazioni MIME + Tipi di contenuto MIME: [1], Estensione: [2] + De-registrazione degli identificatori di programma + ProgId: [1] + De-registrazione delle librerie dei tipi + LibID: [1] + Aggiornamento stringhe d'ambiente + Nome: [1], Valore: [2], Azione [3] + Scrittura valori dei file INI + File: [1], Sezione: [2], Chiave: [3], Valore: [4] + Scrittura valori registro di sistema + Chiave: [1], Nome: [2], Valore: [3] + Pubblicazione dell'applicazione + Generazione di operazioni di script per l'azione: + [1] + Installazione del catalogo di sistema + File: [1], Dipendenze: [2] + Pubblicazione informazioni assembly + Contesto dell'applicazione:[1], Nome assembly:[2] + Rimozione pubblicazione informazioni assembly + Contesto dell'applicazione:[1], Nome assembly:[2] + Azione di rollback: + [1] + Rimozione dei file di backup + File: [1] + Rimozione dei file spostati + File: [1], Cartella: [9] + Rimozione della pubblicazione delle informazioni sul prodotto + byte + GB + KB + MB + La funzionalità completa non sarà disponibile + La funzionalità sarà installata quando richiesto + La funzionalità completa sarà installata per essere eseguita da CD + La funzionalità completa sarà installata sul disco fisso locale + La funzionalità completa sarà installata per essere eseguita dalla rete + Sarà installata per essere eseguita da CD + Sarà installata sul disco fisso locale + Sarà installata per essere eseguita dalla rete + Raccolta delle informazioni necessarie in corso... + Questa funzionalità rimarrà disinstallata + Questa funzionalità sarà impostata per essere installata quando necessario + Questa funzionalità sarà installata per essere eseguita da CD + Questa funzionalità sarà installata sul disco fisso locale + Questa funzionalità sarà installata per essere eseguita dalla rete + Questa funzionalità diventerà indisponibile + Sarà installata quando richiesto + Questa funzionalità sarà disponibile per essere eseguita da CD + Questa funzionalità sarà installata sul disco fisso locale + Questa funzionalità sarà disponibile per essere eseguita dalla rete + Questa funzionalità sarà disinstallata completamente, non potrai eseguirla da CD + Questa funzionalità cambierà dallo stato di esecuzione da CD a impostazione per essere installata quando necessario + Questa funzionalità continuerà ad essere eseguibile da CD + Questa funzionalità cambierà dallo stato di esecuzione da CD a impostazione per essere installata sul disco fisso locale + Questa funzionalità libera [1] sul tuo disco fisso. + Questa funzionalità richiede [1] del tuo disco fisso. + Costo di compilazione per questa funzionalità... + Questa funzionalità sarà rimossa completamente + Questa funzionalità sarà rimossa dal tuo disco fisso locale, ma sarà impostata per essere installata quando necessario + Questa funzionalità sarà rimossa dal tuo disco fisso locale, ma sarà ancora disponibile per l'esecuzione da CD + Questa funzionalità rimarrà sul tuo disco fisso locale + Questa funzionalità sarà rimossa dal tuo disco fisso locale, ma sarà ancora disponibile per essere eseguita dalla rete + Questa funzionalità sarà disinstallata completamente, non potrai eseguirla dalla rete + Questa funzionalità cambierà dallo stato di esecuzione da rete a impostazione per essere installata quando necessario + Questa funzionalità cambierà dallo stato di esecuzione da rete a essere installata sul disco fisso locale + Questa funzionalità continuerà ad essere eseguibile dalla rete + Questa funzionalità libera [1] sul tuo disco fisso. Ha [2] di [3] sotto-funzionalità selezionate. Le sotto-funzionalità liberano [4] sul tuo disco fisso.. + Questa funzionalità libera [1] sul tuo disco fisso. Ha [2] di [3] sotto-funzionalità selezionate. Le sotto-funzionalità richiedono [4] sul tuo disco fisso. + Questa funzionalità richiede [1] sul tuo disco fisso. Ha [2] di [3] sotto-funzionalità selezionate. Le sotto-funzionalità liberano [4] sul tuo disco fisso. + Questa funzionalità richiede [1] sul tuo disco fisso. Ha [2] di [3] sotto-funzionalità selezionate. Le sotto-funzionalità richiedono [4] sul tuo disco fisso. + Tempo rimanente: {[1] minuti }{[2] secondi} + Disponibile + Differenza + Richiesto + Dimensione disco + Volume + diff --git a/src/VBox/Installer/win/NLS/ru_RU.wxl b/src/VBox/Installer/win/NLS/ru_RU.wxl new file mode 100644 index 00000000..8bfc1c6b --- /dev/null +++ b/src/VBox/Installer/win/NLS/ru_RU.wxl @@ -0,0 +1,620 @@ + + + + + + + 1033 + English + + &No + &Yes + &Cancel + &Next > + < &Back + Br&owse + O&K + &Check + &Install + &Remove + &Finish + &Repair + &Return + Re&try + I&gnore + E&xit + + Custom + Setup + + + + License + User manual + + + + [ProductName] application. + [ProductName] USB device drivers for USB device support. + [ProductName] network device drivers for networking support. + [ProductName] driver for Bridged Networking. + [ProductName] virtual network adapter driver for Host-Only Networking. + [ProductName] driver for NDIS6 Bridged Networking. + [ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + + Python support for VirtualBox. + + + + You need to have administrator rights to (un)install [ProductName]! This setup will abort now. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + This application only runs on Windows XP or above. + This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]! + This application only runs on 64-bit Windows systems. Please install the 32-bit version of [ProductName]! + An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]! + An old innotek VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]! + + + + Are you sure you want to cancel [ProductName] installation? + + + + Welcome to the [ProductName] Setup Wizard + The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard. + + + + End-User License Agreement + Please read the following license agreement carefully. + I &accept the terms in the License Agreement + I &do not accept the terms in the License Agreement + + + + Serial Number + Please enter your serial number in the fields below. You'll find it on the sticker inside the VirtualBox CD case. + When done entering the serial number, press the "Check" button below. + + + + Entered serial number was invalid! + Please go back to enter your serial number again. + Keep in mind that the serial number must be spelled exactly like printed on the sticker. + + + + Warning: + Incompatible Saved States! + When upgrading [ProductName], all saved states from your already existing machines won't work anymore! After the installation, you have to discard them manually. + Proceed with installation now? + + + + Host Interfaces + If you used some host interfaces for your machines in the previous version, you have to recreate them manually after this installation. + + + + The following application should be closed before continuing the install: "[2]" + + + + Location: + Disk &Usage + Select the way you want features to be installed. + Click on the icons in the tree below to change the way features will be installed. + Custom Setup + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + Customize + Please choose from the options below: + Create start menu entries + Create a shortcut on the desktop + Create a shortcut in the Quick Launch Bar + Register file associations + + + + Please choose which type of network drivers you will use: + NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). + NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). + Use NDIS5 network drivers. + Use NDIS6 network drivers. + + + + Warning: + Network Interfaces + Installing the [ProductName] Networking feature will reset your network connection and temporarily disconnect you from the network. + Proceed with installation now? + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + The disk space required for the installation of the selected features. + The highlighted volumes (if any) do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Disk Space Requirements + {120}{70}{70}{70}{70} + + + + Browse to the destination folder + Change current destination folder + Up one level + Create a new folder + &Look in: + &Folder name: + + + + The Setup Wizard is ready to begin the [InstallMode] installation. + Click Install to begin the installation. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + Ready to Install + + + + Click the Finish button to exit the Setup Wizard. + [ProductName] installation is complete. + Start [ProductName] after installation + + + + [ProductName] Setup Wizard ended prematurely + [ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again. + Click the Finish button to exit the Setup Wizard. + + + + The following applications are using files that need to be updated by this setup. Close these applications and then click &Retry to continue the installation or Exit to exit it. + Some files that need to be updated are currently in use. + Files in Use + + + + [ProductName] Setup Wizard was interrupted + [ProductName] setup was interrupted. Your system has not been modified. To install this program at a later time, please run the installation again. + Click the Finish button to exit the Setup Wizard. + + + + Please wait while the Setup Wizard installs [ProductName]. This may take several minutes. + + + + Resuming the [ProductName] Setup Wizard + The Setup Wizard will complete the installation of [ProductName] on your computer. Click Install to continue or Cancel to exit the Setup Wizard. + + + + Modify, Repair or Remove installation + Select the operation you wish to perform. + Re&pair + Repairs errors in the most recent installation state - fixes missing or corrupt files, shortcuts and registry entries. + Repair installation + Repairing + repairs + &Remove + Removes [ProductName] from your computer. + Remove installation + Removing + removes + + + + Welcome to the [ProductName] Setup Wizard + The Setup Wizard will allow you to repair your current installation or remove [ProductName] from your computer. Click Next to continue or Cancel to exit the Setup Wizard. + + + + Disk space required for the installation exceeds available disk space. + The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Out of Disk Space + + + + Disk space required for the installation exceeds available disk space. + The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s). + Out of Disk Space + Alternatively, you may choose to disable the installer's rollback functionality. This allows the installer to restore your computer's original state should the installation be interrupted in any way. Click Yes if you wish to take the risk to disable rollback. + + + + Remove [ProductName] + You have chosen to remove the program from your computer. + Click Remove to remove [ProductName] from your computer. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + + + + Repair [ProductName] + The Setup Wizard is ready to begin the repair of [ProductName]. + Click Repair to repair the installation of [ProductName]. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard. + + + + Please wait while the installer finishes determining your disk space requirements. + + + + The following applications are using files that need to be updated by this setup. You can let Setup Wizard close them and attempt to restart them or reboot the machine later. + Some files that need to be updated are currently in use. + Files in Use + &Close the applications and attempt to restart them. + &Do not close applications. A reboot will be required. + + + {{Fatal error: }} + {{Error [1]. }} + Warning [1]. + + Info [1]. + The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1]. {{The arguments are: [2], [3], [4]}} + + {{Disk full: }} + Action [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + Message type: [1], Argument: [2] + === Logging started: [Date] [Time] === + === Logging stopped: [Date] [Time] === + Action start [Time]: [1]. + Action ended [Time]: [1]. Return value [2]. + Time remaining: {[1] minutes }{[2] seconds} + Out of memory. Shut down other applications before retrying. + Installer is no longer responding. + Installer stopped prematurely. + Please wait while Windows configures [ProductName] + Gathering required information... + Removing older versions of this application... + Preparing to remove older versions of this application... + {[ProductName] }Setup completed successfully. + {[ProductName] }Setup failed. + Error reading from file: [2]. {{ System error [3].}} Verify that the file exists and that you can access it. + Cannot create the file '[2]'. A directory with this name already exists. Cancel the install and try installing to a different location. + Please insert the disk: [2] + The installer has insufficient privileges to access this directory: [2]. The installation cannot continue. Log on as administrator or contact your system administrator. + Error writing to file: [2]. Verify that you have access to that directory. + Error reading from file [2]. {{ System error [3].}} Verify that the file exists and that you can access it. + Another application has exclusive access to the file '[2]'. Please shut down all other applications, then click Retry. + There is not enough disk space to install this file: [2]. Free some disk space and click Retry, or click Cancel to exit. + Source file not found: [2]. Verify that the file exists and that you can access it. + Error reading from file: [3]. {{ System error [2].}} Verify that the file exists and that you can access it. + Error writing to file: [3]. {{ System error [2].}} Verify that you have access to that directory. + Source file not found{{(cabinet)}}: [2]. Verify that the file exists and that you can access it. + Cannot create the directory '[2]'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit. + The volume [2] is currently unavailable. Please select another. + The specified path '[2]' is unavailable. + Unable to write to the specified folder: [2]. + A network error occurred while attempting to read from the file: [2] + An error occurred while attempting to create the directory: [2] + A network error occurred while attempting to create the directory: [2] + A network error occurred while attempting to open the source file cabinet: [2] + The specified path is too long: [2] + The Installer has insufficient privileges to modify this file: [2]. + A portion of the folder path '[2]' is invalid. It is either empty or exceeds the length allowed by the system. + The folder path '[2]' contains words that are not valid in folder paths. + The folder path '[2]' contains an invalid character. + '[2]' is not a valid short file name. + Error getting file security: [3] GetLastString: [2] + Invalid Drive: [2] + Error applying patch to file [2]. It has probably been updated by other means, and can no longer be modified by this patch. For more information contact your patch vendor. {{System Error: [3]}} + A file that is required cannot be installed because the cabinet file [2] is not digitally signed. This may indicate that the cabinet file is corrupt. + A file that is required cannot be installed because the cabinet file [2] has an invalid digital signature. This may indicate that the cabinet file is corrupt.{{ Error [3] was returned by WinVerifyTrust.}} + Failed to correctly copy [2] file: CRC error. + Failed to correctly move [2] file: CRC error. + Failed to correctly patch [2] file: CRC error. + The file '[2]' cannot be installed because the file cannot be found in cabinet file '[3]'. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. + The cabinet file '[2]' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package. + There was an error creating a temporary file that is needed to complete this installation.{{ Folder: [3]. System error code: [2]}} + Could not create key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not open key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not delete value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not delete key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not read value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not write value [2] to key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not get value names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not get sub key names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not read security information for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. + Could not increase the available registry space. [2] KB of free registry space is required for the installation of this application. + Another installation is in progress. You must complete that installation before continuing this one. + Error accessing secured data. Please make sure the Windows Installer is configured properly and try the install again. + User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. Your current install will now continue. + User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. + Out of disk space -- Volume: '[2]'; required space: [3] KB; available space: [4] KB. Free some disk space and retry. + Are you sure you want to cancel? + The file [2][3] is being held in use{ by the following process: Name: [4], Id: [5], Window Title: '[6]'}. Close that application and retry. + The product '[2]' is already installed, preventing the installation of this product. The two products are incompatible. + There is not enough disk space on the volume '[2]' to continue the install with recovery enabled. [3] KB are required, but only [4] KB are available. Click Ignore to continue the install without saving recovery information, click Retry to check for available space again, or click Cancel to quit the installation. + Could not access network location [2]. + The following applications should be closed before continuing the install: + Could not find any previously installed compliant products on the machine for installing this product. + An error occurred while applying security settings. [2] is not a valid user or group. This could be a problem with the package, or a problem connecting to a domain controller on the network. Check your network connection and click Retry, or Cancel to end the install. {{Unable to locate the user's SID, system error [3]}} + The key [2] is not valid. Verify that you entered the correct key. + The installer must restart your system before configuration of [2] can continue. Click Yes to restart now or No if you plan to manually restart later. + You must restart your system for the configuration changes made to [2] to take effect. Click Yes to restart now or No if you plan to manually restart later. + An installation for [2] is currently suspended. You must undo the changes made by that installation to continue. Do you want to undo those changes? + A previous installation for this product is in progress. You must undo the changes made by that installation to continue. Do you want to undo those changes? + An installation package for the product [2] cannot be found. Try the installation again using a valid copy of the installation package '[3]'. + Installation completed successfully. + Installation failed. + Product: [2] -- [3] + You may either restore your computer to its previous state or continue the install later. Would you like to restore? + An error occurred while writing installation information to disk. Check to make sure enough disk space is available, and click Retry, or Cancel to end the install. + One or more of the files required to restore your computer to its previous state could not be found. Restoration will not be possible. + [2] cannot install one of its required products. Contact your technical support group. {{System String: [3].}} + The older version of [2] cannot be removed. Contact your technical support group. {{System String [3].}} + Installed [2] + Configured [2] + Removed [2] + File [2] was rejected by digital signature policy. + The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance. + There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. {{Custom action [2] script error [3], [4]: [5] Line [6], Column [7], [8] }} + There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action: [2], location: [3], command: [4] }} + There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. {{Action [2], location: [3], command: [4] }} + There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action [2], entry: [3], library: [4] }} + Removal completed successfully. + Removal failed. + Advertisement completed successfully. + Advertisement failed. + Configuration completed successfully. + Configuration failed. + You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance. + The path [2] is not valid. Please specify a valid path. + Out of memory. Shut down other applications before retrying. + There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to go back to the previously selected volume. + There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to return to the browse dialog and select a different volume. + The folder [2] does not exist. Please enter a path to an existing folder. + You have insufficient privileges to read this folder. + A valid destination folder for the install could not be determined. + Error attempting to read from the source install database: [2]. + Scheduling reboot operation: Renaming file [2] to [3]. Must reboot to complete operation. + Scheduling reboot operation: Deleting file [2]. Must reboot to complete operation. + Module [2] failed to register. HRESULT [3]. Contact your support personnel. + Module [2] failed to unregister. HRESULT [3]. Contact your support personnel. + Failed to cache package [2]. Error: [3]. Contact your support personnel. + Could not register font [2]. Verify that you have sufficient permissions to install fonts, and that the system supports this font. + Could not unregister font [2]. Verify that you that you have sufficient permissions to remove fonts. + Could not create Shortcut [2]. Verify that the destination folder exists and that you can access it. + Could not remove Shortcut [2]. Verify that the shortcut file exists and that you can access it. + Could not register type library for file [2]. Contact your support personnel. + Could not unregister type library for file [2]. Contact your support personnel. + Could not update the ini file [2][3]. Verify that the file exists and that you can access it. + Could not schedule file [2] to replace file [3] on reboot. Verify that you have write permissions to file [3]. + Error removing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel. + Error installing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel. + Error removing ODBC driver: [4], ODBC error [2]: [3]. Verify that you have sufficient privileges to remove ODBC drivers. + Error installing ODBC driver: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it. + Error configuring ODBC data source: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it. + Service '[2]' ([3]) failed to start. Verify that you have sufficient privileges to start system services. + Service '[2]' ([3]) could not be stopped. Verify that you have sufficient privileges to stop system services. + Service '[2]' ([3]) could not be deleted. Verify that you have sufficient privileges to remove system services. + Service '[2]' ([3]) could not be installed. Verify that you have sufficient privileges to install system services. + Could not update environment variable '[2]'. Verify that you have sufficient privileges to modify environment variables. + You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation. + Could not set file security for file '[3]'. Error: [2]. Verify that you have sufficient privileges to modify the security permissions for this file. + Component Services (COM+ 1.0) are not installed on this computer. This installation requires Component Services in order to complete successfully. Component Services are available on Windows 2000. + Error registering COM+ Application. Contact your support personnel for more information. + Error unregistering COM+ Application. Contact your support personnel for more information. + The description for service '[2]' ([3]) could not be changed. + The Windows Installer service cannot update the system file [2] because the file is protected by Windows. You may need to update your operating system for this program to work correctly. {{Package version: [3], OS Protected version: [4]}} + The Windows Installer service cannot update the protected Windows file [2]. {{Package version: [3], OS Protected version: [4], SFP Error: [5]}} + The Windows Installer service cannot update one or more protected Windows files. {{SFP String: [2]. List of protected files:\r\n[3]}} + User installations are disabled via policy on the machine. + An error occured during the installation of assembly component [2]. HRESULT: [3]. {{assembly interface: [4], function: [5], assembly name: [6]}} + + + The application "[2]" needs to be closed for the installation to continue. + + Validating install + Copying new files + File: [1], Directory: [9], Size: [6] + Copying network install files + File: [1], Directory: [9], Size: [6] + Computing space requirements + Computing space requirements + Computing space requirements + Creating shortcuts + Shortcut: [1] + Publishing Qualified Components + Component ID: [1], Qualifier: [2] + Publishing Product Features + Feature: [1] + Publishing product information + Registering Class servers + Class Id: [1] + Registering extension servers + Extension: [1] + Registering MIME info + MIME Content Type: [1], Extension: [2] + Registering program identifiers + ProgId: [1] + Allocating registry space + Free space: [1] + Searching for installed applications + Property: [1], Signature: [2] + Binding executables + File: [1] + Searching for qualifying products + Creating folders + Folder: [1] + Deleting services + Service: [1] + Creating duplicate files + File: [1], Directory: [9], Size: [6] + Searching for related applications + Found application: [1] + Installing ODBC components + Installing new services + Service: [2] + Evaluating launch conditions + Migrating feature states from related applications + Application: [1] + Moving files + File: [1], Directory: [9], Size: [6] + Patching files + File: [1], Directory: [2], Size: [3] + Updating component registration + Registering COM+ Applications and Components + AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}} + Registering fonts + Font: [1] + Registering product + [1] + Registering type libraries + LibID: [1] + Registering user + [1] + Removing duplicated files + File: [1], Directory: [9] + Updating environment strings + Name: [1], Value: [2], Action [3] + Removing applications + Application: [1], Command line: [2] + Removing files + File: [1], Directory: [9] + Removing folders + Folder: [1] + Removing INI files entries + File: [1], Section: [2], Key: [3], Value: [4] + Removing ODBC components + Removing system registry values + Key: [1], Name: [2] + Removing shortcuts + Shortcut: [1] + Searching for qualifying products + Registering modules + File: [1], Folder: [2] + Unregistering modules + File: [1], Folder: [2] + Initializing ODBC directories + Starting services + Service: [1] + Stopping services + Service: [1] + Unpublishing Qualified Components + Component ID: [1], Qualifier: [2] + Unpublishing Product Features + Feature: [1] + Unregister Class servers + Class Id: [1] + Unregistering COM+ Applications and Components + AppId: [1]{{, AppType: [2]}} + Unregistering extension servers + Extension: [1] + Unregistering fonts + Font: [1] + Unregistering MIME info + MIME Content Type: [1], Extension: [2] + Unregistering program identifiers + ProgId: [1] + Unregistering type libraries + LibID: [1] + Updating environment strings + Name: [1], Value: [2], Action [3] + Writing INI files values + File: [1], Section: [2], Key: [3], Value: [4] + Writing system registry values + Key: [1], Name: [2], Value: [3] + Advertising application + Generating script operations for action: + [1] + Installing system catalog + File: [1], Dependencies: [2] + Publishing assembly information + Application Context:[1], Assembly Name:[2] + Unpublishing assembly information + Application Context:[1], Assembly Name:[2] + Rolling back action: + [1] + Removing backup files + File: [1] + Removing moved files + File: [1], Directory: [9] + Unpublishing product information + + bytes + GB + KB + MB + Entire feature will be unavailable + Feature will be installed when required + Entire feature will be installed to run from CD + Entire feature will be installed on local hard drive + Entire feature will be installed to run from network + Will be installed to run from CD + Will be installed on local hard drive + Will be installed to run from network + Gathering required information... + This feature will remain uninstalled + This feature will be set to be installed when required + This feature will be installed to run from CD + This feature will be installed on the local hard drive + This feature will be installed to run from the network + This feature will become unavailable + Will be installed when required + This feature will be available to run from CD + This feature will be installed on your local hard drive + This feature will be available to run from the network + This feature will be uninstalled completely, you won't be able to run it from CD + This feature will change from run from CD state to set to be installed when required + This feature will remain to be run from CD + This feature will change from run from CD state to be installed on the local hard drive + This feature frees up [1] on your hard drive. + This feature requires [1] on your hard drive. + Compiling cost for this feature... + This feature will be completely removed + This feature will be removed from your local hard drive, but will be set to be installed when required + This feature will be removed from your local hard drive, but will be still available to run from CD + This feature will remain on you local hard drive + This feature will be removed from your local hard drive, but will be still available to run from the network + This feature will be uninstalled completely, you won't be able to run it from the network + This feature will change from run from network state to set to be installed when required + This feature will change from run from network state to be installed on the local hard drive + This feature will remain to be run from the network + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + Time remaining: {[1] minutes }{[2] seconds} + Available + Difference + Required + Disk Size + Volume + + diff --git a/src/VBox/Installer/win/NLS/tr_TR.wxl b/src/VBox/Installer/win/NLS/tr_TR.wxl new file mode 100644 index 00000000..e53c37f7 --- /dev/null +++ b/src/VBox/Installer/win/NLS/tr_TR.wxl @@ -0,0 +1,620 @@ + + + + + + + 1055 + Türkçe + + &Hayır + &Evet + İ&ptal + İ&leri > + < &Geri + &Gözat + &TAMAM + &Denetle + &Yükle + K&aldır + &Bitir + &Onar + Geri &Dön + Yeniden De&ne + Yok&say + Çı&kış + + Özel + Kur + + + + Lisans + Kullanım kılavuzu + + + + [ProductName] uygulaması. + USB aygıtı desteği için [ProductName] USB aygıtı sürücüleri. + Ağ oluşturma desteği için [ProductName] ağ aygıtı sürücüleri. + Köprü Ağı Oluşturma için [ProductName] sürücüsü. + Yalnızca-Anamakine Ağı Oluşturma için [ProductName] sanal ağ bağdaştırıcısı sürücüsü. + NDIS6 Köprü Ağı Oluşturma için [ProductName] sürücüsü. + NDIS6 Yalnızca-Anamakine Ağı Oluşturma için [ProductName] sanal ağ bağdaştırıcısı sürücüsü. + + VirtualBox için Python desteği. + + + + [ProductName] uygulamasını yüklemek(kaldırmak) için yönetici haklarına sahip olmanız gerekir! Bu kur şimdi iptal edilecek. + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + Bu uygulama yalnızca Windows XP veya üzerinde çalışır. + Bu uygulama yalnızca 32-bit Windows sistemlerinde çalışır. Lütfen [ProductName] 64-bit sürümünü yükleyin! + Bu uygulama yalnızca 64-bit Windows sistemlerinde çalışır. Lütfen [ProductName] 32-bit sürümünü yükleyin! + Bu makinede eski bir Sun VirtualBox kurulumu bulundu. Lütfen önce bu paketi kaldırın ve sonra [ProductName] yükleyin! + Bu makinede eski bir innotek VirtualBox kurulumu bulundu. Lütfen önce bu paketi kaldırın ve sonra [ProductName] yükleyin! + + + + [ProductName] kurulumunu iptal etmek istediğinize emin misiniz? + + + + [ProductName] Kur Sihirbazına Hoş Geldiniz + Kur Sihirbazı, bilgisayarınıza [ProductName] uygulamasını yükleyecek. Devam etmek için İleri'ye veya Kur Sihirbazından çıkmak için İptal'e tıklayın. + + + + Son Kullanıcı Lisans Sözleşmesi + Lütfen aşağıdaki lisans sözleşmesini dikkatlice okuyun. + Lisans Sözleşmesi içindeki şartları kabul e&diyorum + Lisans Sözleşmesi içindeki şartları kabul e&tmiyorum + + + + Seri Numarası + Lütfen aşağıdaki alana seri numaranızı girin. VirtualBox CD kutusu içerisindeki etikette bulacaksınız. + Seri numarasını girmeniz bittiğinde, aşağıdaki "Denetle" düğmesine basın". + + + + Girilen seri numarası geçersiz! + Seri numaranızı tekrar girmek için lütfen geri gidin. + Seri numarasını etiket üzerine basıldığı gibi aynen hecesi hecesine yazılmak zorunda olduğunu aklınızdan çıkarmayın. + + + + Uyarı: + Uyumsuz Kaydedildi Durumları! + [ProductName] yükseltildiğinde, zaten varolan makinelerinizden gelen tüm kaydedildi durumları bundan böyle çalışmayacaktır! Kurulumdan sonra, bunlardan el ile vazgeçmek zorundasınız. + Şimdi kuruluma devam edilsin mi? + + + + Anamakine Arayüzleri + Önceki sürümdeki makineleriniz için bazı anamakine arayüzleri kullandıysanız, bu kurulumdan sonra bunları el ile yeniden oluşturmak zorundasınız. + + + + Şurada belirtilen uygulama yüklemeye devam etmeden önce kapatılmalıdır: "[2]" + + + + Konum: + Disk &Kullanımı + Yüklenmesini istediğiniz özellikler için yolu seçin. + Yüklenecek özelliklerin yolunu değiştirmek için aşağıda ağaçtaki simgelere tıklayın. + Özel Kurulum + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + Özelleştir + Lütfen aşağıdaki seçeneklerden seçin: + Başlangıç menüsü girişlerini oluştur + Masaüstünde kısayol oluştur + Hızlı Başlat Çubuğunda kısayol oluştur + Dosya ilişkilendirmelerini kaydettir + + + + Lütfen hangi tür ağ sürücülerini kullanacağınızı seçin: + NDIS5 ağ sürücüleri. +Bu, Windows'un (Vista öncesi) daha eski sürümleri için varsayılandır. + NDIS6 ağ sürücüleri. +Bu, Windows'un (Vista ve daha yenisi) daha yeni sürümleri için varsayılandır. + NDIS5 ağ sürücülerini kullan. + NDIS6 ağ sürücülerini kullan. + + + + Uyarı: + Ağ Arayüzleri + [ProductName] Ağ Oluşturma özelliğini yüklemek ağ bağlantınızı sıfırlayacak ve geçici olarak ağdan bağlantınızı kesecektir. + Şimdi kuruluma devam edilsin mi? + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + Seçilen özelliklerin kurulumu için gereken disk alanı. + Vurgulanan birimler (eğer varsa) şu anki seçilen özellikler için kullanılabilir yeterli disk alanına sahip değil. Ya vurgulanan birimlerden bazı dosyaları kaldırabilir ya da yerel sürücü(lere)ye daha az özellik yüklemeyi seçebilirsiniz veya farklı hedef sürücü(leri) seçebilirsiniz. + Disk Alanı Gereksinimleri + {120}{70}{70}{70}{70} + + + + Hedef klasöre gözatın + Şu anki hedef klasörü değiştirin + Bir seviye yukarı + Yeni bir klasör oluştur + &Bakılan yer: + &Klasör adı: + + + + Kur Sihirbazı, [InstallMode] kuruluma başlamak için hazır. + Kuruluma başlamak için Yükle'ye tıklayın. Eğer herhangi bir kurulum ayarınızı gözden geçirmek veya değiştirmek istiyorsanız, Geri'ye tıklayın. Sihirbazdan çıkmak için İptal'e tıklayın. + Yüklemek için hazır + + + + Kur Sihirbazından çıkmak için Bitir düğmesine tıklayın. + [ProductName] kurulumu tamamlandı. + Kurulumdan sonra [ProductName] uygulamasını başlat + + + + [ProductName] Kur Sihirbazı zamansız sonlandı + [ProductName] kur bir hata yüzünden zamansız sonlandı. Sisteminiz değiştirilmedi. Bu programı daha sonraki bir zamanda yüklemek için lütfen kurulumu tekrar çalıştırın. + Kur Sihirbazından çıkmak için Bitir düğmesine tıklayın. + + + + Bu kur tarafından güncellenmesi gereken dosyaları aşağıdaki uygulamalar kullanıyor. Bu uygulamaları kapatın ve sonra kuruluma devam etmek için &Yeniden Dene'ye veya çıkmak için İptal'e tıklayın. + Şu anda kullanımda olan bazı dosyaların güncellenmesi gerek. + Kullanımda olan Dosyalar + + + + [ProductName] Kur Sihirbazı yarıda kesildi + [ProductName] kur yarıda kesildi. Sisteminiz değiştirilmedi. Bu programı daha sonraki bir zamanda yüklemek için lütfen kurulumu tekrar çalıştırın. + Kur Sihirbazından çıkmak için Bitir düğmesine tıklayın. + + + + Kur Sihirbazı, [ProductName] uygulamasını yüklerken lütfen bekleyin. Bu birkaç dakika alabilir. + + + + [ProductName] Kur Sihirbazına Devam Ediliyor + Kur Sihirbazı [ProductName] uygulamasının bilgisayarınıza kurulumunu tamamlayacak. Devam etmek için Yükle'ye veya Kur Sihirbazından çıkmak için İptal'e tıklayın. + + + + Kurulumu Değiştir, Onar veya Kaldır + Uygulanmasını istediğiniz işlemi seçin. + &Onar + En son kurulum durumundaki hataları onarır - eksik veya bozuk dosyaları, kısayolları ve kayıt defteri girişlerini düzeltir. + Kurulumu onar + Onarılıyor + onarma + &Kaldır + [ProductName] uygulamasını bilgisayarınızdan kaldırır. + Kurulumu kaldır + Kaldırılıyor + kaldırma + + + + [ProductName] Kur Sihirbazına Hoş Geldiniz + Kur Sihirbazı şu anki kurulumunuzu onarmanıza veya [ProductName] uygulamasını bilgisayarınızdan kaldırmanıza izin verecektir. Devam etmek için İleri'ye veya Kur Sihirbazından çıkmak için İptal'e tıklayın. + + + + Kurulum için gereken disk alanı mevcut disk alanını aşıyor. + Vurgulanan birimler şu anki seçilen özellikler için kullanılabilir yeterli disk alanına sahip değil. Ya vurgulanan birimlerden bazı dosyaları kaldırabilir ya da yerel sürücü(lere)ye daha az özellik yüklemeyi seçebilirsiniz veya farklı hedef sürücü(leri) seçebilirsiniz. + Yetersiz Disk Alanı + + + + Kurulum için gereken disk alanı mevcut disk alanını aşıyor. + Vurgulanan birimler şu anki seçilen özellikler için kullanılabilir yeterli disk alanına sahip değil. Ya vurgulanan birimlerden bazı dosyaları kaldırabilir ya da yerel sürücü(lere)ye daha az özellik yüklemeyi seçebilirsiniz veya farklı hedef sürücü(leri) seçebilirsiniz. + Yetersiz Disk Alanı + Alternatif olarak, yükleyicinin geriye alma işlevselliğini etkisizleştirmeyi seçebilirsiniz. Bu, herhangi bir şekilde kurulumun yarıda kesilmesiyle yükleyicinin bilgisayarınızın orijinal durumuna geri yüklenmesi için izin verir. Geri almayı etkisizleştirme riskini almak isterseniz Evet'e tıklayın. + + + + [ProductName] Kaldır + Programı bilgisayarınızdan kaldırmayı seçmektesiniz. + [ProductName] uygulamasını bilgisayarınızdan kaldırmak için Kaldır'a tıklayın. Eğer herhangi bir kurulum ayarınızı gözden geçirmek veya değiştirmek istiyorsanız, Geri'ye tıklayın. Sihirbazdan çıkmak için İptal'e tıklayın. + + + + [ProductName] Onar + Kur Sihirbazı [ProductName] uygulamasının onarılmasına başlamak için hazır. + [ProductName] kurulumunu onarmak için Onar'a tıklayın. Eğer herhangi bir kurulum ayarınızı gözden geçirmek veya değiştirmek istiyorsanız, Geri'ye tıklayın. Sihirbazdan çıkmak için İptal'e tıklayın. + + + + Yükleyici disk alanı gereksinimlerinizi belirlemeyi tamamlarken lütfen bekleyin. + + + + Bu kur tarafından güncellenmesi gereken dosyaları aşağıdaki uygulamalar kullanıyor. Kur Sihirbazına bunları kapatması ve yeniden başlatmayı denemesi veya daha sonra makineyi yeniden başlatması için izin verebilirsiniz. + Şu anda kullanımda olan bazı dosyaların güncellenmesi gerek. + Kullanımda olan Dosyalar + Uygulamaları &kapat ve bunları yeniden başlatmayı dene. + Uygulamaları kapat&ma. Yeniden başlatma gerekecektir. + + + {{Önemli hata: }} + {{Hata [1]. }} + Uyarı [1]. + + Bilgi [1]. + Yükleyici bu paketi yüklerken beklenmeyen bir hatayla karşılaştı. Bu, bu paketle bir sorun olduğunu gösterebilir. Hata kodu [1]. {{Bağımsız değişkenler: [2], [3], [4]}} + + {{Disk dolu: }} + Eylem [Time]: [1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + İleti türü: [1], Bağımsız değişken: [2] + === Günlükleme başlama: [Date] [Time] === + === Günlükleme durma: [Date] [Time] === + Eylem başlama [Time]: [1]. + Eylem bitiş [Time]: [1]. Dönen değer [2]. + Kalan süre: {[1] dakika }{[2] saniye} + Yetersiz bellek. Yeniden denemeden önce diğer uygulamaları kapatın. + Yükleyici artık yanıt vermiyor. + Yükleyici zamansız durdu. + Windows, [ProductName] uygulamasını yapılandırırken lütfen bekleyin + Gereken bilgiler toplanıyor... + Bu uygulamanın eski sürümleri kaldırılıyor... + Bu uygulamanın eski sürümleri kaldırmak için hazırlanıyor... + {[ProductName] }Kur başarılı olarak tamamlandı. + {[ProductName] }Kur başarısız oldu. + Dosyadan okurken hata oldu: [2]. {{ Sistem hatası [3].}} Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + '[2]' dosyası oluşturulamıyor. Bu isimle bir dizin zaten mevcut. Yüklemeyi iptal edin ve farklı bir yere yüklemeyi deneyin. + Lütfen şu diski takın: [2] + Yükleyici şu dizine erişmek için yetersiz yetkilere sahip: [2]. Kurulum devam edemiyor. Yönetici olarak oturum açın ya da sistem yöneticinize başvurun. + Dosyaya yazarken hata oldu: [2]. Bu dizine erişebildiğinizi doğrulayın. + [2] dosyasından okurken hata oldu. {{ Sistem hatası [3].}} Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + Başka bir uygulama '[2]' dosyasına ayrıcalıklı erişime sahip. Lütfen tüm diğer uygulamaları kapatın, sonra Yeniden Dene'ye tıklayın. + Şu dosyayı yüklemek için yeterli disk alanı yok: [2]. Biraz disk alanı açın ve Yeniden Dene'ye tıklayın ya da çıkmak için İptal'e tıklayın. + Kaynak dosya bulunamadı: [2]. Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + Dosyadan okurken hata oldu: [3]. {{ Sistem hatası [2].}} Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + Dosyaya yazarken hata oldu: [3]. {{ Sistem hatası [2].}} Bu dizine erişebildiğinizi doğrulayın. + Kaynak dosya bulunamadı{{(kabin)}}: [2]. Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + '[2]' dizini oluşturulamıyor. Bu isimde bir dosya zaten mevcut. Lütfen dosyayı yeniden adlandırın ya da kaldırın ve yeniden deneye tıklayın veya çıkmak için İptal'e tıklayın. + Birim [2] şu anda kullanılamaz. Lütfen başka birini seçin. + Belirtilen yol '[2]' kullanılamaz. + Belirtilen klasöre yazılamıyor: [2]. + Şu dosyadan okuma denenirken bir ağ hatası meydana geldi: [2] + Şu dizinin oluşturulması denenirken bir hata meydana geldi: [2] + Şu dizinin oluşturulması denenirken bir ağ hatası meydana geldi: [2] + Şu kaynak dosya kabininin açılması denenirken bir ağ hatası meydana geldi: [2] + Belirtilen yol çok uzun: [2] + Yükleyici şu dosyayı değiştirmek için yetersiz yetkilere sahip: [2]. + '[2]' klasör yolunun bir kısmı geçersiz. Ya boş ya da sistem tarafından izin verilen uzunluğu aşıyor. + '[2]' klasör yolu, klasör yollarında geçerli olmayan kelimeler içeriyor. + '[2]' klasör yolu geçersiz bir karakter içeriyor. + '[2]' geçerli bir kısa dosya adı değil. + Dosya güvenliği sağlanırken hata oldu: [3] SonDizeyiAl: [2] + Geçersiz Sürücü: [2] + [2] dosyasına yama uygulanırken hata oldu. Muhtemelen diğer araçlar tarafından güncellenmiştir ve artık bu yamayla değiştirilemez. Daha fazla bilgi için yama satıcınızla temasa geçin. {{Sistem Hatası: [3]}} + [2] kabin dosyası sayısal olarak imzalanmadığından gereken dosya yüklenemez. Bu kabin dosyasının bozuk olduğunu gösterebilir. + [2] kabin dosyası geçersiz bir sayısal imzaya sahip olduğundan gereken dosya yüklenemez. Bu kabin dosyasının bozuk olduğunu gösterebilir.{{ Hata [3], WinVerifyTrust tarafından döndürüldü.}} + Doğru olarak [2] dosyasını kopyalama başarısız oldu: CRC hatası. + Doğru olarak [2] dosyasını taşıma başarısız oldu: CRC hatası. + Doğru olarak [2] dosyasını yamalama başarısız oldu: CRC hatası. + Dosya '[3]' kabin dosyasında bulunamadığından '[2]' dosyası yüklenemez. Bu bir ağ hatasını, CD-ROM'dan okuma hatasını veya bu paketle ilgili bir sorunu gösterebilir. + Bu kurulum için gereken '[2]' kabin dosyası bozuk ve kullanılamaz. Bu bir ağ hatasını, CD-ROM'dan okuma hatasını veya bu paketle ilgili bir sorunu gösterebilir. + Bu kurulumu tamamlamak için gereken bir geçici dosya oluşturulurken bir hata oldu.{{ Klasör: [3]. Sistem hatası kodu: [2]}} + Anahtar oluşturulamadı: [2]. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + Anahtar açılamadı: [2]. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [3] anahtarından [2] değeri silinemedi. {{ Sistem hatası [4].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [2] anahtarı silinemedi. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [3] anahtarından [2] değeri okunamadı. {{ Sistem hatası [4].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [3] anahtarına [2] değeri yazılamadı. {{ Sistem hatası [4].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [2] anahtarı için değer adları alınamadı. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [2] anahtarı için alt anahtar adları alınamadı. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + [2] anahtarı için güvenlik bilgisi okunamadı. {{ Sistem hatası [3].}} Bu anahtara yeterli erişiminiz olduğunu doğrulayın ya da destek personelinize başvurun. + Mevcut kayıt defteri alanı attırılamadı. Bu uygulamanın kurulumu için [2] KB boş kayıt defteri alanı gerekli. + Başka bir kurulum sürmekte. Buna devam etmeden önce bu kurulumu tamamlamak zorundasınız. + Güvenli veriye erişilirken hata oldu. Lütfen Windows Yükleyicinin doğru bir şekilde yapılandırıldığından emin olun ve tekrar yüklemeyi deneyin. + Kullanıcı '[2]', '[3]' ürünü için önceden başlatılmış bir yüklemeye sahip. Bu kullanıcının bu yüklemeyi ürünü kullanmadan önce tekrar çalıştırması gerekecek. Şu anki yüklemeniz şimdi devam edecek. + Kullanıcı '[2]', '[3]' ürünü için önceden başlatılmış bir yüklemeye sahip. Bu kullanıcının bu yüklemeyi ürünü kullanmadan önce tekrar çalıştırması gerekecek. + Yetersiz disk alanı -- Birim: '[2]'; gereken alan: [3] KB; kullanılabilir alan: [4] KB. Biraz disk alanı açın ve yeniden deneyin. + İptal etmek istediğinize emin misiniz? + [2][3] dosyası kullanımda tutulmakta{ belirtilen işleme göre: Adı: [4], Kimliği: [5], Pencere Başlığı: '[6]'}. Bu uygulamayı kapatın ve yeniden deneyin. + '[2]' ürünü zaten yüklü, bu ürünün kurulumu önleniyor. İki ürün uyumsuz. + Kurtarma etkinleştirilmiş yüklemeye devam etmek için '[2]' biriminde yeterli disk alanı yok. [3] KB gerekli, ancak yalnızca [4] KB mevcut. Kurtarma bilgisini kaydetmeden yüklemeye devam etmek için Yoksay'a tıklayın, kullanılabilir alanı tekrar denetlemek için Yeniden Dene'ye tıklayın ya da kurulumdan çıkmak için İptal'e tıklayın. + [2] ağ konumuna erişilemedi. + Aşağıdaki uygulamalar yüklemeye devam etmeden önce kapatılmalıdır: + Bu ürünün yüklenmesi için makinede önceden yüklenmiş herhangi bir uyumlu ürün bulunamadı. + Güvenlik ayarları uygulanırken bir hata meydana geldi. [2] geçerli bir kullanıcı veya grup değil. Bu, paketle ilgili bir sorun veya ağdaki bir etki alanı denetleyicisine bağlanma sorunu olabilir. Ağ bağlantılarınızı denetleyin ve Yeniden Dene'ye veya yüklemeyi sonlandırmak için İptal'e tıklayın. {{Kullanıcının SID konumu belirlenemiyor, sistem hatası [3]}} + Anahtar [2] geçerli değil. Doğru anahtarı girdiğinizi doğrulayın. + Yükleyici, [2] yapılandırmasına devam edebilmek için önce sisteminizi yeniden başlatmak zorunda. Hemen yeniden başlatmak için Evet'e veya sonra el ile yeniden başlatmak için Hayır'a tıklayın. + [2] için yapılan yapılandırma değişikliklerinin etkili olması için sisteminizi yeniden başlatmak zorundasınız. Hemen yeniden başlatmak için Evet'e veya sonra el ile yeniden başlatmak için Hayır'a tıklayın. + [2] için kurulum şu anda askıya alındı. Devam etmek için bu kurulum tarafından yapılan değişiklikleri geri almak zorundasınız. Bu değişikleri geri almak istiyor musunuz? + Bu ürün için önceki bir kurulum sürmekte. Devam etmek için bu kurulum tarafından yapılan değişiklikleri geri almak zorundasınız. Bu değişikleri geri almak istiyor musunuz? + [2] ürünü için bir kurulum paketi bulunamaz. '[3]' kurulum paketinin geçerli bir kopyasını kullanarak tekrar kurulumu deneyin. + Kurulum başarılı olarak tamamlandı. + Kurulum başarısız oldu. + Ürün: [2] -- [3] + Ya bilgisayarınızı önceki durumuna geri yükleyebilir ya da daha sonra yüklemeye devam edebilirsiniz. Geri yüklemek ister misiniz? + Diske kurulum bilgisi yazılırken bir hata meydana geldi. Yeterli disk alanının mevcut olduğundan emin olmak için denetleyin ve Yeniden Dene'ye veya yüklemeyi sonlandırmak için İptal'e tıklayın. + Bilgisayarınızı önceki durumuna geri yüklemek için gereken dosyaların bir veya daha fazlası bulunamadı. Geri yüklemek mümkün olmayacaktır. + [2] gerektirdiği ürünlerden birini yükleyemiyor. Teknik destek grubunuza başvurun. {{Sistem Dizesi: [3].}} + [2] uygulamasının eski sürümü kaldırılamaz. Teknik destek grubunuza başvurun. {{Sistem Dizesi [3].}} + [2] Yüklendi + [2] Yapılandırıldı + [2] Kaldırıldı + Dosya [2], sayısal imza ilkesi tarafından reddedildi. + Windows Yükleyici Hizmetine erişilemedi. Bu, Windows'u güvenli kipte çalıştırıyorsanız ya da Windows Yükleyici doğru olarak yüklenmediyse olur. Yardım için destek personelinize başvurun. + Bu Windows Yükleyici paketiyle ilgili bir sorun var. Bu yüklemeyi tamamlamak için gereken bir betik çalıştırılamadı. Destek personelinize veya paket satıcınıza başvurun. {{Özel eylem [2] betik hatası [3], [4]: [5] Satır [6], Sütun [7], [8] }} + Bu Windows Yükleyici paketiyle ilgili bir sorun var. Bu yüklemeyi tamamlamak için gereken bir program çalıştırılamadı. Destek personelinize veya paket satıcınıza başvurun. {{Eylem: [2], konum: [3], komut: [4] }} + Bu Windows Yükleyici paketiyle ilgili bir sorun var. Kur'un parçası olarak çalışan bir program beklendiği gibi tamamlanmadı. Destek personelinize veya paket satıcınıza başvurun. {{Eylem [2], konum: [3], komut: [4] }} + Bu Windows Yükleyici paketiyle ilgili bir sorun var. Bu yüklemeyi tamamlamak için gereken bir DLL çalıştırılamadı. Destek personelinize veya paket satıcınıza başvurun. {{Eylem [2], giriş: [3], kütüphane: [4] }} + Kaldırma başarılı olarak tamamlandı. + Kaldırma başarısız oldu. + Duyurma başarılı olarak tamamlandı. + Duyurma başarısız oldu. + Yapılandırma başarılı olarak tamamlandı. + Yapılandırma başarısız oldu. + Bu uygulamayı kaldırmak için Yönetici olmak zorundasınız. Bu uygulamayı kaldırmak için Yönetici olarak oturum açabilirsiniz veya yardım için teknik destek grubunuza başvurun. + Yol [2] geçerli değil. Lütfen geçerli bir yol belirleyin. + Yetersiz bellek. Yeniden denemeden önce diğer uygulamaları kapatın. + [2] sürücüsünde disk yok. Lütfen bir tane yerleştirin ve Yeniden Dene'ye tıklayın ya da önceki seçilen birime geri gitmek için İptal'e tıklayın. + [2] sürücüsünde disk yok. Lütfen bir tane yerleştirin ve Yeniden Dene'ye tıklayın ya da gözat iletisine dönmek ve farklı bir birim seçmek için İptal'e tıklayın. + Klasör [2] mevcut değil. Lütfen mevcut bir klasör için yol girin. + Bu klasörü okumak için yeterli yetkilere sahip değilsiniz. + Yükleme için geçerli bir hedef klasör belirlenemedi. + Kaynak yükleme veritabanından okumaya çalışırken hata oldu: [2]. + Yeniden başlatma işlemi zamanlanıyor: [2] dosyası [3] adına yeniden adlandırılıyor. İşlemi tamamlamak için yeniden başlatmak zorundasınız. + Yeniden başlatma işlemi zamanlanıyor: [2] dosyası siliniyor. İşlemi tamamlamak için yeniden başlatmak zorundasınız. + Kaydettirmek için [2] modülü başarısız oldu. HRESULT [3]. Destek personelinize başvurun. + Kaydını kaldırmak için [2] modülü başarısız oldu. HRESULT [3]. Destek personelinize başvurun. + [2] paketini önbellekleme başarısız oldu. Hata: [3]. Destek personelinize başvurun. + [2] yazı tipi kaydettirilemedi. Yazı tiplerini yüklemek için yeterli izinlere sahip olduğunuzu ve sistemin bu yazı tipini desteklediğini doğrulayın. + [2] yazı tipi kaydı kaldırılamadı. Yazı tiplerini kaldırmak için yeterli izinlere sahip olduğunuzu doğrulayın. + [2] Kısayolu oluşturulamadı. Hedef klasörün mevcut olduğunu ve erişebildiğinizi doğrulayın. + [2] Kısayolu kaldırılamadı. Kısayol dosyasının mevcut olduğunu ve erişebildiğinizi doğrulayın. + [2] dosyası için tür kütüphanesi kaydettirilemedi. Destek personelinize başvurun. + [2] dosyası için tür kütüphanesi kaydı kaldırılamadı. Destek personelinize başvurun. + [2][3] ini dosyası güncellenemedi. Dosyanın mevcut olduğunu ve erişebildiğinizi doğrulayın. + Yeniden başlatmada [3] dosyasının değiştirilmesi için [2] dosyası zamanlanamadı. [3] dosyasına yazma izinlerine sahip olduğunuzu doğrulayın. + ODBC sürücü yöneticisi kaldırılırken hata oldu, ODBC hatası [2]: [3]. Destek personelinize başvurun. + ODBC sürücü yöneticisi yüklenirken hata oldu, ODBC hatası [2]: [3]. Destek personelinize başvurun. + ODBC sürücüsü kaldırılırken hata oldu: [4], ODBC hatası [2]: [3]. ODBC sürücülerini kaldırmak için yeterli yetkilere sahip olduğunuzu doğrulayın. + ODBC sürücüsü yüklenirken hata oldu: [4], ODBC hatası [2]: [3]. [4] dosyasının mevcut olduğunu ve erişebildiğinizi doğrulayın. + ODBC veri kaynağı yapılandırılırken hata oldu: [4], ODBC hatası [2]: [3]. [4] dosyasının mevcut olduğunu ve erişebildiğinizi doğrulayın. + Başlatmak için '[2]' ([3]) hizmeti başarısız oldu. Sistem hizmetlerini başlatmak için yeterli yetkilere sahip olduğunuzu doğrulayın. + '[2]' ([3]) hizmeti durdurulamadı. Sistem hizmetlerini durdurmak için yeterli yetkilere sahip olduğunuzu doğrulayın. + '[2]' ([3]) hizmeti silinemedi. Sistem hizmetlerini kaldırmak için yeterli yetkilere sahip olduğunuzu doğrulayın. + '[2]' ([3]) hizmeti yüklenemedi. Sistem hizmetlerini yüklemek için yeterli yetkilere sahip olduğunuzu doğrulayın. + '[2]' ortam değişkeni güncellenemedi. Ortam değişkenlerini değiştirmek için yeterli yetkilere sahip olduğunuzu doğrulayın. + Makinenin tüm kullanıcılarının bu kurulumunu tamamlamak için yeterli yetkilere sahip değilsiniz. Yönetici olarak oturum açın ve sonra bu kurulumu yeniden deneyin. + '[3]' dosyası için dosya güvenliği ayarlanamadı. Hata: [2]. Bu dosyanın güvenlik izinlerini değiştirmek için yeterli yetkilere sahip olduğunuzu doğrulayın. + Bileşen Hizmetleri (COM+ 1.0) bu bilgisayara yüklenmedi. Bu kurulumun başarılı olarak tamamlanması Bileşen Hizmetlerini gerektirir. Bileşen Hizmetleri Windows 2000'de mevcuttur. + COM+ Uygulaması kaydettirilirken hata oldu. Daha fazla bilgi için destek personelinize başvurun. + COM+ Uygulamasının kaydı kaldırılırken hata oldu. Daha fazla bilgi için destek personelinize başvurun. + '[2]' ([3]) hizmeti tanımı değiştirilemedi. + Windows Yükleyici hizmeti, [2] sistem dosyasını güncelleyemiyor çünkü dosya Windows tarafından korunuyor. Bu programın doğru olarak çalışması için işletim sisteminizi güncellemeniz gerekebilir. {{Paket sürümü: [3], İS Korunan sürüm: [4]}} + Windows Yükleyici hizmeti, korunan [2] Windows dosyasını güncelleyemiyor. {{Paket sürümü: [3], İS Korunan sürüm: [4], SFP Hatası: [5]}} + Windows Yükleyici hizmeti, bir ya da daha fazla korunan Windows dosyasını güncelleyemiyor. {{SFP Dizesi: [2]. Korunan dosyaların listesi:\r\n[3]}} + Kullanıcı kurulumları makinedeki ilke yoluyla etkisizleştirildi. + [2] derleme bileşeninin kurulumu sırasında bir hata meydana geldi. HRESULT: [3]. {{derleme arayüzü: [4], işlev: [5], derleme adı: [6]}} + + + "[2]" uygulamasının kuruluma devam etmesi için kapatılması gerekiyor. + + Yükleme doğrulanıyor + Yeni dosyalar kopyalanıyor + Dosya: [1], Dizin: [9], Boyut: [6] + Ağ yükleme dosyaları kopyalanıyor + Dosya: [1], Dizin: [9], Boyut: [6] + Alan gereksinimleri hesaplanıyor + Alan gereksinimleri hesaplanıyor + Alan gereksinimleri hesaplanıyor + Kısayollar oluşturuluyor + Kısayol: [1] + Nitelikli Bileşenler yayınlanıyor + Bileşen Kimliği: [1], Niteleyici: [2] + Ürün Özellikleri yayınlanıyor + Özellik: [1] + Ürün bilgisi yayınlanıyor + Sınıf sunucuları kaydettiriliyor + Sınıf Kimliği: [1] + Uzantı sunucuları kaydettiriliyor + Uzantı: [1] + MIME bilgisi kaydettiriliyor + MIME İçerik Türü: [1], Uzantı: [2] + Program tanımlayıcıları kaydettiriliyor + ProgKimliği: [1] + Kayıt defteri alanı ayrılıyor + Boş alan: [1] + Yüklü uygulamalar aranıyor + Özellik: [1], İmza: [2] + Çalıştırılabilirler bağlanıyor + Dosya: [1] + Niteleyici ürünler aranıyor + Klasörler oluşturuluyor + Klasör: [1] + Hizmetler siliniyor + Hizmet: [1] + Kopya dosyalar oluşturuluyor + Dosya: [1], Dizin: [9], Boyut: [6] + İlgili uygulamalar aranıyor + Bulunan uygulama: [1] + ODBC bileşenleri yükleniyor + Yeni hizmetler yükleniyor + Hizmet: [2] + Başlatma şartları değerlendiriliyor + İlgili uygulamalardan özellik durumları geçiriliyor + Uygulama: [1] + Dosyalar taşınıyor + Dosya: [1], Dizin: [9], Boyut: [6] + Dosyalar yamalanıyor + Dosya: [1], Dizin: [2], Boyut: [3] + Bileşen kaydı güncelleniyor + COM+ Uygulamaları ve Bileşenleri kaydettiriliyor + UygKimliği: [1]{{, UygTürü: [2], Kullanıcı: [3], RSN: [4]}} + Yazı tipleri kaydettiriliyor + Yazı Tipi: [1] + Ürün kaydettiriliyor + [1] + Tür kütüphaneleri kaydettiriliyor + KtphKimliği: [1] + Kullanıcı kaydettiriliyor + [1] + Çoğaltılmış dosyalar kaldırılıyor + Dosya: [1], Dizin: [9] + Ortam dizeleri güncelleniyor + Adı: [1], Değer: [2], Eylem [3] + Uygulamalar kaldırılıyor + Uygulama: [1], Komut satırı: [2] + Dosyalar kaldırılıyor + Dosya: [1], Dizin: [9] + Klasörler kaldırılıyor + Klasör: [1] + INI dosyaları girişleri kaldırılıyor + Dosya: [1], Bölüm: [2], Anahtar: [3], Değer: [4] + ODBC bileşenleri kaldırılıyor + Sistem kayıt defteri değerleri kaldırılıyor + Anahtar: [1], Adı: [2] + Kısayollar kaldırılıyor + Kısayol: [1] + Niteleyici ürünler aranıyor + Modüller kaydettiriliyor + Dosya: [1], Klasör: [2] + Modüllerin kaydı kaldırılıyor + Dosya: [1], Klasör: [2] + ODBC dizinleri başlatılıyor + Hizmetler başlatılıyor + Hizmet: [1] + Hizmetler durduruluyor + Hizmet: [1] + Nitelikli Bileşenler yayından kaldırılıyor + Bileşen Kimliği: [1], Niteleyici: [2] + Ürün Özellikleri yayından kaldırılıyor + Özellik: [1] + Sınıf sunucularının kaydını kaldır + Sınıf Kimliği: [1] + COM+ Uygulamalarının ve Bileşenlerinin kaydı kaldırılıyor + UygKimliği: [1]{{, UygTürü: [2]}} + Uzantı sunucularının kaydı kaldırılıyor + Uzantı: [1] + Yazı tiplerinin kaydı kaldırılıyor + Yazı Tipi: [1] + MIME bilgisinin kaydı kaldırılıyor + MIME İçerik Türü: [1], Uzantı: [2] + Program tanımlayıcılarının kaydı kaldırılıyor + ProgKimliği: [1] + Tür kütüphanelerinin kaydı kaldırılıyor + KtphKimliği: [1] + Ortam dizeleri güncelleniyor + Adı: [1], Değer: [2], Eylem [3] + INI dosyaları değerleri yazılıyor + Dosya: [1], Bölüm: [2], Anahtar: [3], Değer: [4] + Sistem kayıt defteri değerleri yazılıyor + Anahtar: [1], Adı: [2], Değer: [3] + Uygulama duyuruluyor + Şu eylem için betik işlemleri üretiliyor: + [1] + Sistem kataloğu yükleniyor + Dosya: [1], Bağımlılar: [2] + Derleme bilgisi yayınlanıyor + Uygulama Bağlamı:[1], Derleme Adı:[2] + Derleme bilgisi yayından kaldırılıyor + Uygulama Bağlamı:[1], Derleme Adı:[2] + Geri alma eylemi: + [1] + Yedekleme dosyaları kaldırılıyor + Dosya: [1] + Taşınan dosyalar kaldırılıyor + Dosya: [1], Dizin: [9] + Ürün bilgisi yayından kaldırılıyor + + bayt + GB + KB + MB + Bütün özellik kullanılamaz olacaktır + Özellik gerektiğinde yüklenecektir + Bütün özellik CD'den çalıştırmak için yüklenecektir + Bütün özellik yerel sabit sürücüye yüklenecektir + Bütün özellik ağdan çalıştırmak için yüklenecektir + CD'den çalıştırmak için yüklenecektir + Yerel sabit sürücüye yüklenecektir + Ağdan çalıştırmak için yüklenecektir + Gereken bilgiler toplanıyor... + Bu özellik kaldırıldı olarak kalacaktır + Bu özellik gerektiğinde yüklenmesi için ayarlanacaktır + Bu özellik CD'den çalıştırmak için yüklenecektir + Bu özellik yerel sabit sürücüye yüklenecektir + Bu özellik ağdan çalıştırmak için yüklenecektir + Bu özellik kullanılamaz olacaktır + Gerektiğinde yüklenecektir + Bu özellik CD'den çalıştırmak için kullanılabilir olacaktır + Bu özellik yerel sabit sürücünüze yüklenecektir + Bu özellik ağdan çalıştırmak için kullanılabilir olacaktır + Bu özellik tamamen kaldırılacaktır, CD'den çalıştıramayacaksınız + Bu özellik CD'den çalıştır durumundan, gerektiğinde yüklenecek durumuna değiştirilecektir + Bu özellik CD'den çalıştır olarak kalacaktır + Bu özellik CD'den çalıştır durumundan, yerel sabit sürücüye yüklenecek durumuna değiştirilecektir + Bu özellik sabit sürücünüzde [1] yer kazandırır. + Bu özellik sabit sürücünüzde [1] gerektirir. + Bu özellik için gerekenler belirleniyor... + Bu özellik tamamen kaldırılacaktır + Bu özellik yerel sabit sürücünüzden kaldırılacaktır, ancak gerektiğinde yüklenecek durumuna ayarlanacaktır + Bu özellik yerel sabit sürücünüzden kaldırılacaktır, ancak hala CD'den çalıştırmak için kullanılabilir olacaktır + Bu özellik yerel sabit sürücünüzde kalacaktır + Bu özellik yerel sabit sürücünüzden kaldırılacaktır, ancak hala ağdan çalıştırmak için kullanılabilir olacaktır + Bu özellik tamamen kaldırılacaktır, ağdan çalıştıramayacaksınız + Bu özellik ağdan çalıştır durumundan, gerektiğinde yüklenecek durumuna değiştirilecektir + Bu özellik ağdan çalıştır durumundan, yerel sabit sürücüye yüklenecek durumuna değiştirilecektir + Bu özellik ağdan çalıştır olarak kalacaktır + Bu özellik sabit sürücünüzde [1] yer kazandırır. Seçili [2] / [3] alt özelliğe sahiptir. Alt özellikler sabit sürücünüzde [4] yer kazandırır. + Bu özellik sabit sürücünüzde [1] yer kazandırır. Seçili [2] / [3] alt özelliğe sahiptir. Alt özellikler sabit sürücünüzde [4] gerektirir. + Bu özellik sabit sürücünüzde [1] gerektirir. Seçili [2] / [3] alt özelliğe sahiptir. Alt özellikler sabit sürücünüzde [4] yer kazandırır. + Bu özellik sabit sürücünüzde [1] gerektirir. Seçili [2] / [3] alt özelliğe sahiptir. Alt özellikler sabit sürücünüzde [4] gerektirir. + Kalan süre: {[1] dakika }{[2] saniye} + Kullanılabilir + Fark + Gereken + Disk Boyutu + Birim + + diff --git a/src/VBox/Installer/win/NLS/zh_CN.wxl b/src/VBox/Installer/win/NLS/zh_CN.wxl new file mode 100644 index 00000000..2dd3f3d6 --- /dev/null +++ b/src/VBox/Installer/win/NLS/zh_CN.wxl @@ -0,0 +1,620 @@ + + + + + + +2052 +简体中文 + +否(&N) +是(&Y) +取消(&C) +下一步(&N) > +< 上一步(&B) +浏览(&O) +确定(&K) +检查(&C) +安装(&I) +删除(&R) +完成(&F) +修复(&R) +返回(&R) +重试(&T) +忽略(&G) +结束(&X) + +自定 +设置 + + + +软件许可 +用户手册 + + + +[ProductName] 应用程序。 +[ProductName] USB 设备驱动程序针对 USB 设备支持。 +[ProductName] 网络设备驱动程序针对网络支持。 +[ProductName] 驱动程序针对桥接网络。 +[ProductName] 虚拟网络界面卡针对“仅主机”网络。 +[ProductName] driver for NDIS6 Bridged Networking. +[ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + +VirtualBox 的 Python 支持。 + + + +需要系统管理员权限安装 (或卸载)[ProductName]!此安装程序现在将中止。 +[ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. +此应用程序只能运行在 Windows XP 或以上。 +此应用程序只能运行在 32 位 Windows 系统。 请安装 [ProductName] 的 64 位版本! +此应用程序只能运行在 64 位 Windows 系统。 请安装 [ProductName] 的 32 位版本! +在此计算机发现旧的 Sun VirtualBox 安装。 请先卸载此组件然后安装 [ProductName]! +在此计算机发现旧的 innotek VirtualBox 安装。 请先卸载此组件然后安装 [ProductName]! + + + +确定要取消 [ProductName] 安装吗? + + + +欢迎使用 [ProductName] 安装向导 +安装向导将在你的计算机安装 [ProductName]。 单击"下一步"继续或"取消"结束安装向导。 + + + +最终用户授权协议 +请仔细阅读以下授权协议。 +我接受授权协议中条款(&A) +我不接受授权协议中条款(&D) + + + +序号 +请在以下字段输入你的序号。 你可以在 VirtualBox CD 盒内的贴纸找到。 +序号输入完成时,单击以下"检查"按钮。 + + + +输入的序号无效! +请返回再次输入你的序号。 +请记得,序号必须和印在贴纸上的拼写完全一样。 + + + +警告: +已经的存储状态不兼容! +升级 [ProductName] 时,所有来自已经存在机器的存储状态不再能动作!安装后,你必须手动舍弃。 +立即进行安装吗? + + + +主机界面 +如果你的机器在先前版本使用某些主机界面。 在此安装后你必须重新创建它们。 + + + +继续安装前,必须关闭以下应用程序:"[2]" + + + +位置: +磁盘空间(&U) +选择你要安装的功能。 +单击以下树状中图示选择安装的功能。 +自定安装 +CustomizeDlgItemDescription-CustomizeDlgItemDescription +CustomizeDlgItemSize-CustomizeDlgItemSize +CustomizeDlgLocation-CustomizeDlgLocation + + + +自定 +请选择以下选项: +添加系统菜单条目 +在桌面创建快捷方式 +在快速启动栏创建快捷方式 +注册文件关联 + + + +Please choose which type of network drivers you will use: +NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). +NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). +Use NDIS5 network drivers. +Use NDIS6 network drivers. + + + +警告: +网络界面 +安装 [ProductName] 网络功能将重置网络连接并暂时中断网络连接。 +立即安装吗? + + + +Missing Dependencies +Python Core / win32api +Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. +When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. +Proceed with installation now? + + + +安装选择功能所需的磁盘空间。 +高亮的磁盘区(如果有)对于当前选择的功能没有足够的磁盘空间可以使用。 可以从高亮的磁盘区删除一些文件,或选择安装较少功能在本机磁盘,或选择其他磁盘。 +磁盘空间需求 +{120}{70}{70}{70}{70} + + + +浏览目的地文件夹 +更改当前目的文件夹 +上一层 +创建新文件夹 +浏览(&L): +文件夹名称(&F): + + + +安装向导准备好进行 [InstallMode] 安装。 +单击"安装"开始安装。 如果你要检查或更改任何安装设置,单击"上一步"。 单击"取消"结束向导。 +准备好安装 + + + +单击"完成"按钮结束安装向导。 +[ProductName] 安装完成。 +安装后运行 [ProductName] + + + +[ProductName] 安装向导太早结束 +[ProductName] 安装因为错误太早结束。 你的系统未做修改。 若要稍后安装此程序,请再次执行安装。 +单击"完成"按钮结束安装向导。 + + + +以下应用程序使用此安装需要更新的文件。 关闭这些应用程序接著单击"重试(&R)"以继续安装或"取消"结束向导。 +某些需要更新的文件当前使用中。 +文件使用中 + + + +[ProductName] 安装向导中断 +[ProductName] 安装中断。 你的系统未做修改。 若要稍后安装此程序,请再次执行安装。 +单击"完成"按钮结束安装向导。 + + + +在安装向导安装 [ProductName] 时请稍候。 这需要几分钟时间。 + + + +正在继续 [ProductName] 安装向导 +安装向导将在你的计算机完成 [ProductName] 的安装。 单击"安装"以继续或"取消"结束安装向导。 + + + +修改、修复或删除安装 +选择你希望执行的操作。 +修复(&P) +修复在最近安装状态的错误 - 修复缺少或毁坏的文件、快捷方式和注册档项目。 +修复安装 +正在修复 +repairs +删除(&R) +从计算机删除 [ProductName]。 +删除安装 +正在删除 +removes + + + +欢迎使用 [ProductName] 安装向导 +安装向导将允许你修复当前的安装或从你的计算机删除 [ProductName]。 单击"下一步"以继续或"取消"结束安装向导。 + + + +安装所需的磁盘空间超过可用的磁盘空间。 +高亮的磁盘区对于当前选择的功能没有足够的磁盘空间可以使用。 你可以从高亮的磁盘区删除一些文件,或选择安装较少功能在本机磁盘机,或选择不同目的地磁盘机。 +磁盘空间不足 + + + +安装所需的磁盘空间超过可用的磁盘空间。 +高亮的磁盘区对于当前选择的功能没有足够的磁盘空间可以使用。 你可以从高亮的磁盘区删除一些文件,或选择安装较少功能在本机磁盘机,或选择不同目的地磁盘机。 +磁盘空间不足 +或者,你可以选择停用安装程序的恢复功能。 这允许安装程序在任何方式中断安装时撤消你计算机的原始状态。 单击"是"如果你希望承担停用恢复功能的风险。 + + + +删除 [ProductName] +你已经选择从你的计算机删除程序。 +单击"删除"以从你的计算机删除 [ProductName]。 如果你要检查或更改任何安装设置,单击"上一步"。 单击"取消"结束向导。 + + + +修复 [ProductName] +安装向导准备好开始修复 [ProductName]。 +单击"修复"以修复 [ProductName] 的安装。 如果你要检查或更改任何安装设置,单击"上一步"。 单击"取消"结束向导。 + + + +在安装程序完成判断你的磁盘空间需求时请稍候。 + + + +以下应用程序使用此安装需要更新的文件。 你可以让安装向导关闭并尝试重新引导这些应用程序或稍后重新引导计算机。 +某些需要更新的文件当前使用中。 +文件使用中 +关闭应用程序并尝试重新引导它们。 (&C) +不要关闭应用程序,将需要重新开机。 (&D) + + +{{严重错误:}} +{{错误 [1]。}} +警告 [1]。 + +信息 [1]。 +安装程序安装这个封装时发生未预期的错误。 这可能表示这个封装的问题。 错误码 [1]。 {{引数:[2], [3], [4]}} + +{{磁盘已满:}} +动作 [Time]:[1]. [2] +[ProductName] +{[2]}{, [3]}{, [4]} +消息类型:[1], 引数:[2] +=== 打开记录时间:[Date] [Time] === +=== 停止记录时间:[Date] [Time] === +动作开始 [Time]:[1]。 +动作结束 [Time]:[1]。 返回值 [2]。 +剩下时间:{[1] 分 }{[2] 秒} +内存不足,重试之前先关闭其它应用程序。 +安装程序不再有响应。 +安装程序已经永久中止。 +在 Windows 组态 [ProductName] 时请稍候 +正在收集所需的信息... +正在删除此应用程序的旧版本... +正在准备删除此应用程序的旧版本... +{[ProductName] } 安装成功完成。 +{[ProductName] } 安装失败。 +读入文件错误:[2]。{{ 系统错误 [3]。}} 检查文件是否存在,并且可以访问。 +不能创建目录 '[2]'。 同名的目录已经存在。 取消安装并尝试安装到不同位置。 +请插入磁盘:[2] +安装程序的权限不足,不能访问这个目录:[2],安装不能继续,以系统管理员的身份登录或是连络你的系统管理员。 +写入至文件时发生错误:[2]。请检查你可以访问那个目录。 +读入文件时发生错误:[2]。{{ 系统错误 [3]。}} 请检查文件是否存在,并且可以访问。 +另一个应用程序独占访问文件 '[2]'。 请关闭所有其它应用程序,然后单击"重试"。 +磁盘空间不足,不能安装这个文件:[2]。释放一些磁盘空间然后单击"重试",或单击"取消"结束。 +找不到源文件案:[2]。 请验证文件存在并且你可以访问它。 +读入文件错误:[3]。{{ 系统错误 [2]。}} 请检查文件是否存在,并且可以访问。 +写入至文件时发生错误:[3]。{{ 系统错误 [2]。}} 请检查你可以访问那个目录。 +找不到源文件案 {{(cabinet)}}:[2]。 请检查文件存在并且可以访问。 +不能创建目录 '[2]'。 同名的文件已经存在。 请重新命名或删除文件并单击"重试",或单击"取消"结束。 +磁盘区 [2] 当前不可使用。 请选择另一个。 +指定的路径 '[2]' 不可使用。 +不能写入指定的文件夹:[2]。 +尝试从文件读入时发生网络错误:[2] +尝试创建目录时发生错误:[2] +尝试创建目录时发生网络错误:[2] +尝试打开源文件案时发生网络错误:[2] +指定的路径太长:[2] +Installer 的权限不足以修改这个文件:[2]。 +文件夹路径的部份 '[2]' 无效。其为空或超过系统允许的长度。 +文件夹路径 '[2]' 包含无效的字在文件夹路径。 +文件夹路径 '[2]' 包含无效字符。 +'[2]' 不是有效的短文件名。 +取得文件安全性错误:[3] GetLastString:[2] +无效的磁盘机:[2] +套用修正档到文件 [2] 错误。 可能已由其它主机更新,且这个修正档不再能修改。 更多信息请联络你的修正档供应商。 {{系统错误:[3]}} +不能安装所需的文件,因为 cabinet 文件 [2] 没有数字签名。 这表示 cabinet 文件已经毁坏。 +不能安装所需的文件,因为 cabinet 文件 [2] 有无效的数字签名。 这表示 cabinet 文件已经毁坏。 {{ WinVerifyTrust 返回错误 [3]。}} +修正复制 [2] 文件失败:CRC 错误。 +修正移动 [2] 文件失败:CRC 错误。 +修正路径 [2] 文件失败:CRC 错误。 +不能安装 '[2]' 因为在 cainet 文件 '[3]' 中找不到文件。 这表示网络错误、从 CD-ROM 读入错误、或此安装包问题。 +此安装所需的 cabinet 文件 '[2]' 已经毁坏且不能使用。 这表示网络错误、从 CD-ROM 读入错误、或此安装包问题。 +完成这个安装所需的临时文件案创建错误。 {{ 文件夹:[3]。 系统错误码:[2]}} +不能创建机码:[2]。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能打开机码:[2]。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能从机码 [3] 删除值:[2]。{{ 系统错误 [4]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能删除机码:[2]。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能从机码 [3] 读入值 [2]。{{ 系统错误 [4]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能写入值 [2] 至机码 [3]。{{ 系统错误 [4]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能取得机码 [2] 的值名称。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能取得机码 [2] 的子机码名称。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能读入机码 [2] 的安全信息。{{ 系统错误 [3]。}} 检查你是有足够的权限访问该机码,或是连络你的支持人员。 +不能增加可用的注册空间。 此应用程序须要 [2] KB 以上的空间。 +其它的安装正在进行中,你必须完成该项安装之后才能继续。 +访问保全数据时发生错误,请确定 Windows Installer 是否正确组态,然后再试一次。 +用户 '[2]' 先前已经引导产品 '[3]' 的安装。 该用户在可以使用该产品前需要再次执行安装。你当前的安装现在将继续。 +用户 '[2]' 先前已经引导产品 '[3]' 的安装。 该用户在可以使用该产品前需要再次执行安装。 +磁盘空间不足 -- 磁盘区:'[2]',所需空间:[3] KB; 可用空间:[4] KB。 释放一些磁盘空间并重试。 +你确定要取消吗? +文件 [2][3] 正在由 { 以下处理程序:名称:[4],Id:[5],窗口标题:'[6]'} 使用中。 关闭该应用程序并重试。 +已经安装产品 '[2]',此产品防止安装。 两个产品不兼容。 +磁盘区 '[2]' 没有足够的磁盘空间以启用恢复的安装继续。 需要 [3] KB,但只有 [4] KB 可以使用。 单击"忽略"以不存储恢复信息继续安装,单击"重试"以再次检查可用空间,或单击"取消"以离开安装。 +不能访问网络位置 [2]。 +继续安装前应该关闭以下应用程序: +不能在本机中找到任何先前已安装的合格版本。 +套用安全性设置时发生错误。 [2] 不是有效的用户或群组。 这会是安装包的问题或连接到网络上网域控制站的问题。 检查你的网络连接并单击"重试",或"取消"以结束安装。 {{找不到用户的 SID,系统错误 [3]}} +金钥 [2] 是无效的,检查你输入的金钥是否正确。 +要继续设置 [2] 之前,Installer 必须重新引导你的系统,按"是"将立即重新引导;如果你想要稍后手动重新引导请按"否"。 +你必须重新引导你的系统,对 [2] 所做的组态更改才会生效,按"是"立即重新引导;如果你想要稍后手动重新引导请按"否"。 +安装 [2] 当前已经暂停,你必须恢复该安装所做的更改才能继续,你要恢复这些更改吗? +另一个安装这个产品的程序正在进行中,你必须恢复该安装所做的更改才能继续,你要恢复这些更改吗? +找不到产品 [2] 的安装包。 尝试使用安装包 '[3]' 的有效副本尝试再次安装。 +安装成功完成。 +安装失败。 +产品:[2] -- [3] +你可以将计算机撤消成先前的状态或稍后继续安装,你希望撤消吗? +写入安装信息至磁盘时发生错误,确定磁盘的空间足够,并按"重试",或按"取消"来结束安装。 +撤消你的计算机成之前的状态所需的一个或数个文件找不到。 不能撤消。 +[2] 不能安装其所需的产品之一。 请联络你的技术支持小组。 {{系统符串:[3]。}} +不能删除 [2] 的旧版本。 请联络你的技术支持小组。 {{系统符串 [3]。}} +已经安装 [2] +已经组态 [2] +已经删除 [2] +数字签名原则拒绝文件 [2] 。 +不能访问 Windows Installer 服务。 如果你正执行在 Windows 安全模式,这将会发生。 请联络你的技术支持人员以取得协助。 +这个 Windows Installer 封装有问题。 完成这个安装需要的指令码不能执行。 联络你的支持人员或封装供应商。 {{自定动作 [2] 指令码错误 [3],[4]:[5] 行 [6],栏 [7],[8] }} +这个 Windows Installer 封装有问题。 完成这个安装需要的程序不能执行。 联络你的支持人员或封装供应商。 {{动作 [2],位置:[3],命令:[4] }} +这个 Windows Installer 封装有问题。 以 setup 部分执行的程序不能如预期完成。 联络你的支持人员或封装供应商。 {{动作 [2],位置:[3],命令:[4] }} +这个 Windows Installer 封装有问题。 完成这个安装需要的 DLL 不能执行。 联络你的支持人员或封装供应商。 {{动作 [2],项目:[3],库:[4] }} +删除成功完成。 +删除失败。 +宣告成功完成。 +宣告失败。 +组态成功完成。 +组态失败。 +你必须是管理器以删除这个应用程序。 要删除这个应用程序,你可以使用系统管理员登录或联络你的技术支持群组取得协助。 +路径 [2] 无效。 请指定有效的路径。 +内存不足,重试之前先关闭其它应用程序。 +磁盘机 [2] 中没有磁片,请插入磁片然后重试,或按"取消"回到上次选择的磁盘区。 +磁盘机 [2] 中没有磁片,请插入磁片然后按"重试",或按"取消"回到浏览对话框,并选择不同的磁盘区。 +文件夹 [2] 不存在,请输入一个现有的文件夹路径。 +你的权限不足,不能读入这个文件夹。 +不能决定合法的目的文件夹。 +尝试读入来源安装数据库时发生错误:[2]。 +正在排定重新开机作业:正在更改文件名称 [2] 成 [3],必须重新开机才能完成作业。 +正在排定重新开机作业:正在删除文件 [2],必须重新开机才能完成作业。 +注册模块 [2] 失败。HRESULT [3]。连络你的支持人员。 +取消注册模块 [2] 失败。HRESULT [3]。连络你的支持人员。 +不能预存封装 [2]。错误:[3]。请连络支持人员。 +不能注册字体 [2]。 请确认是否有足够的权限及系统支持。 +不能解除注册字体 [2]。 请确认你有足够的权限来删除字体。 +不能创建快捷方式 [2]。 请确认目地文件夹是否存在及你的访问权。 +不能删除快捷方式 [2]。 请确认目地文件夹是否存在及你的访问权。 +不能注册文件 [2] 的类型库。 请连络系统支持人员。 +不能解除注册文件 [2] 的 type library。 请连络系统支持人员。 +不能更新 ini 档 [2][3]。 请确认文件是否存在及你的访问权。 +不能预定在重开机时将文件 [2] 取代 [3]。 请确认你有 [3] 的访问权。 +删除 ODBC 驱动程序管理员错误,ODBC 错误 [2]:[3]。请连络系统支持人员。 +安装 ODBC 驱动程序管理员错误,ODBC 错误 [2]:[3]。请连络系统支持人员。 +删除 ODBC 驱动程序管理员错误:[4],ODBC 错误 [2]:[3]。请确认你有足够权限。 +安装 ODBC 驱动程序管理员错误:[4],ODBC 错误 [2]:[3]。请确认文件[4]存在并可访问。 +设置 ODBC 数据来源错误:[4],ODBC 错误 [2]:[3]。请确认文件[4]存在并可访问。 +引导服务 '[2]' ([3]) 失败。 请确认你有权限以引导系统服务。 +停止服务 '[2]' ([3]) 失败。 请确认你有权限以引导系统服务。 +删除服务 '[2]' ([3]) 失败。 请确认你有权限以引导系统服务。 +不能安装服务 '[2]' ([3]) 。 请确认你有权限以引导系统服务。 +不能更新环境变量 '[2]'。 请确认你有权限以修改环境变量。 +你没有权限使计算机的所有用户都完成此安装。请以系统管理员权限登录,接著再重试此安装。 +不能配置文件案 '[3]' 的文件安全性。 错误:[2]。 请确认你有权限以修改此文件的安全性权限。 +这台计算机并未安装 Component Services (COM+ 1.0)。这项安装需要有 Component Services 才能进行。Component Services 包含在 Windows XP 中。 +注册 COM+ 应用程序时发生错误。请联络你的支持人员以取得其它信息。 +解除 COM+ 应用程序注册时发生错误。请联络你的支持人员以取得其它信息。 +不能更改服务 '[2]' ([3]) 的描述。 +Windows Installer 服务不能更新系统文件 [2] 因为文件受 Windows 保护。 你可能需要更新你的作业系统使这个程序正确动作。 {{{封装版本:[3],受 OS 保护的版本:[4]}} +Windows Installer 服务不能更新受保护的 Windows 文件 [2]。 {{封装版本:[3],受 OS 保护的版本:[4],SFP 错误:[5]}} +Windows Installer 服务不能更新一个或数个受保护的 Windows 文件。 {{SFP 符串:[2]。 受保护的文件清单:\r\n[3]}} +计算机的原则停用用户安装。 +组件组件 [2] 的安装期间发生错误。 HRESULT:[3]。 {{组件界面:[4],函数:[5],组件名称:[6]}} + + +需要关闭应用程序 "[2]" 以继续关闭。 + +正在验证安装 +正在复制新文件 +文件:[1], 目录:[9], 尺寸:[6] +正在复制网络安装文件 +文件:[1], 目录:[9], 尺寸:[6] +正在计算空间需求 +正在计算空间需求 +正在计算空间需求 +正在创建快捷方式 +快捷方式:[1] +正在发布合格的组件 +组件 ID:[1], 公布者:[2] +正在发布产品功能 +功能:[1] +正在发布产品信息 +正在注册类型服务器 +类型 Id:[1] +正在注册扩展服务器 +扩展名 [1] +正在注册 MIME 信息 +MIME 内容类型:[1],扩展名:[2] +正在注册程序辨识字符 +ProgId: [1] +正在分配注册空间 +可用空间:[1] +正在寻找已安装的应用程序 +内容:[1], 签章:[2] +正在系结执行档 +文件:[1] +正在寻找查询产品 +正在创建文件夹 +文件夹:[1] +正在删除服务 +服务:[1] +正在创建重复文件 +文件:[1], 目录:[9], 尺寸:[6] +正在寻找相关的应用程序 +找到应用程序:[1] +正在安装 ODBC 组件 +正在安装新服务 +服务:[2] +正在评估引导条件 +正在从相关的应用程序迁移功能状态 +应用程序:[1] +正在移动文件 +文件:[1], 目录:[9], 尺寸:[6] +正在修补文件 +文件:[1], 目录:[2], 尺寸:[3] +正在更新组件注册 +正在注册 COM+ 应用程序和组件 +AppId:[1]{{, AppType:[2],用户:[3],RSN:[4]}} +正在注册字体 +字体:[1] +正在注册产品 +[1] +正在注册类型库 +LibID: [1] +正在注册用户 +[1] +正在删除重复的文件 +文件:[1], 目录:[9] +正在更新环境符串 +名称:[1], 数值:[2], 动作:[3] +正在删除应用程序 +应用程序:[1], 命令列:[2] +正在删除文件 +文件:[1], 目录:[9] +正在删除文件夹 +文件夹:[1] +正在删除 INI 文件项目 +文件:[1], 区段:[2], 机码:[3], 数值:[4] +正在删除 ODBC 组件 +正在删除系统注册档数值 +机码:[1], 名称:[2] +正在删除快捷方式 +快捷方式:[1] +正在寻找查询产品 +正在注册模块 +文件:[1], 文件夹:[2] +正在解除模块注册 +文件:[1], 文件夹:[2] +正在初始化 ODBC 目录 +正在引导服务 +服务:[1] +正在停止服务 +服务:[1] +正在取消组件公布 +组件 ID:[1], 公布者:[2] +正在取消功能公布 +功能:[1] +解除类型服务器注册 +类型 Id:[1] +正在解除 COM+ 应用程序和组件注册 +AppId: [1]{{, AppType: [2]}} +正在解除扩充服务器注册 +扩展名 [1] +正在解除字体注册 +字体:[1] +正在解除 MIME 信息注册 +MIME 内容类型:[1],扩展名:[2] +正在解除程序标识码注册 +ProgId: [1] +正在解除类型库注册 +LibID: [1] +正在更新环境符串 +名称:[1], 数值:[2], 动作:[3] +正在写入 INI 文件数值 +文件:[1], 区段:[2], 机码:[3], 数值:[4] +正在写入系统注册表 +机码:[1],名称:[2],值:[3] +正在宣告应用程序 +正在产生动作的 script 操作: +[1] +正在安装系统目录 +文件:[1],依存关系:[2] +正在发布组件信息 +应用程序内容:[1],组件名称:[2] +正在取消信息公布 +应用程序内容:[1],组件名称:[2] +恢复动作: +[1] +正在删除备份文件 +文件:[1] +正在删除移动的文件 +文件:[1], 目录:[9] +正在取消发布产品信息 + +字节 +GB +KB +MB +整个功能将不可用 +需要时将安装的功能 +整个功能将会安装成从 CD 上执行 +整个功能将会安装到本机硬盘 +整个功能将会安装成从网络上执行 +将会安装成从 CD 上执行 +将会安装到本机硬盘 +将会安装成从网络执行 +正在收集所需的信息... +这个功能将保持未安装的状态 +这个功能会设置成视需要进行安装 +这个功能将会安装成从 CD 执行 +这个功能将会安装在本机硬盘中 +这个功能将会安装成从网络执行 +这个功能将不能使用 +将会视需要进行安装 +这个功能可以从 CD 上执行 +这个功能将安装在你的本机硬盘 +这个功能可以从网络执行 +这个功能将完整卸载,你将不能从 CD 执行 +这个功能会从 CD 执行更改成视需要进行安装 +这个功能仍将从 CD 执行 +这个功能将会从 CD 执行更改为安装在本机硬盘中 +这个功能会在你的硬盘释放 [1] 。 +这个功能要求 [1] 在你的硬盘上。 +正在编译这个功能的花费... +这个功能将会完整删除 +这个功能会从你的本机硬盘上删除,但是会设置成视需要进行安装 +这个功能将会从你的本机硬盘中删除,但是仍然可以从 CD 执行 +这个功能将会保留在你的本机硬盘中 +这个功能将会从你的本机硬盘中删除,但是仍然可从网络上执行 +这个功能将完整卸载,你将不能从网络执行 +这个功能将会从网络执行更改成视需要进行安装 +这个功能将会从网络执行更改为安装在本机硬盘中。 +这个功能仍将保留成从网络执行 +这个功能在你的硬盘释放 [1]。 它已选择 [2] 之 [3] 子功能。 子功能在你的硬盘释放 [4] 。 +这个功能在你的硬盘释放 [1]。 它已选择 [2] 之 [3] 子功能。 子功能在你的硬盘需要 [4] 。 +这个功能在你的硬盘需要 [1]。 它已选择 [2] 之 [3] 子功能。 子功能在你的硬盘释放 [4] 。 +这个功能在你的硬盘需要 [1]。 它已选择 [2] 之 [3] 子功能。 子功能在你的硬盘需要 [4] 。 +剩下时间:{[1] 分 }{[2] 秒} +可用 +差异 +需求 +磁盘空间 +分区 + + diff --git a/src/VBox/Installer/win/NLS/zh_TW.wxl b/src/VBox/Installer/win/NLS/zh_TW.wxl new file mode 100644 index 00000000..7fc65b85 --- /dev/null +++ b/src/VBox/Installer/win/NLS/zh_TW.wxl @@ -0,0 +1,620 @@ + + + + + + + 1024 + 正體中文 + + 否(&N) + 是(&Y) + 取消(&C) + 下一步(&N) > + < 上一步(&B) + 瀏覽(&O) + 確定(&K) + 檢查(&C) + 安裝(&I) + 移除(&R) + 完成(&F) + 修理(&R) + 返回(&R) + 重試(&T) + 忽略(&G) + 結束(&X) + + 自訂 + 設定 + + + + 授權 + 使用者手冊 + + + + [ProductName] 應用程式。 + [ProductName] USB 裝置驅動程式針對 USB 裝置支援。 + [ProductName] 網路裝置驅動程式針對網路支援。 + [ProductName] 驅動程式針對橋接網路。 + [ProductName] 虛擬網路介面卡針對「僅限主機」網路。 + [ProductName] driver for NDIS6 Bridged Networking. + [ProductName] virtual network adapter driver for NDIS6 Host-Only Networking. + + VirtualBox 的 Python 支援。 + + + + 您需要有系統管理員特殊權限以安裝 (或解除安裝)[ProductName]!此安裝程式現在將中止。 + [ProductName] needs the Microsoft Visual C++ 2019 Redistributable Package being installed first. Please install and restart the installation of [ProductName]. + 此應用程式只能執行在 Windows XP 或以上。 + 此應用程式只能執行在 32 位元的 Windows 系統。 請安裝 [ProductName] 的 64 位元版本! + 此應用程式只能執行在 64 位元的 Windows 系統。 請安裝 [ProductName] 的 32 位元版本! + 在此電腦發現舊的 Sun VirtualBox 安裝。 請先解除安裝此套件然後安裝 [ProductName]! + 在此電腦發現舊的 innotek VirtualBox 安裝。 請先解除安裝此套件然後安裝 [ProductName]! + + + + 您確定要取消 [ProductName] 安裝嗎? + + + + 歡迎使用 [ProductName] 安裝精靈 + 安裝精靈將在您的電腦安裝 [ProductName]。 按一下「下一步」繼續或「取消」結束安裝精靈。 + + + + 最終使用者授權協議 + 請仔細閱讀以下授權協議。 + 我接受授權協議中條款(&A) + 我不接受授權協議中條款(&D) + + + + 序號 + 請在以下欄位輸入您的序號。 您可以在 VirtualBox CD 盒內的貼紙找到。 + 序號輸入完成時,按一下以下「檢查」按鈕。 + + + + 輸入的序號無效! + 請返回再次輸入您的序號。 + 請記得,序號必須和印在貼紙上的拼字完全一樣。 + + + + 警告: + 已經的儲存狀態不相容! + 升級 [ProductName] 時,所有來自已經存在機器的儲存狀態不再能動作!安裝後,您必須手動捨棄。 + 立即進行安裝嗎? + + + + 主機介面 + 如果您的機器在先前版本使用某些主機介面。 在此安裝後您必須重新建立它們。 + + + + 繼續安裝前,必須關閉以下應用程式:"[2]" + + + + 位置: + 磁碟使用量(&U) + 選取您要安裝功能的方式。 + 按一下以下樹狀中圖示以變更安裝功能的方式。 + 自訂安裝 + CustomizeDlgItemDescription-CustomizeDlgItemDescription + CustomizeDlgItemSize-CustomizeDlgItemSize + CustomizeDlgLocation-CustomizeDlgLocation + + + + 自訂 + 請選擇以下選項: + Create start menu entries + 在桌面建立捷徑 + 在快速啟動列建立捷徑 + 註冊文件關聯 + + + + Please choose which type of network drivers you will use: + NDIS5 network drivers. +This is default for older versions of Windows (pre-Vista). + NDIS6 network drivers. +This is default for newer versions of Windows (Vista and newer). + Use NDIS5 network drivers. + Use NDIS6 network drivers. + + + + 警告: + 網路介面 + 安裝 [ProductName] 網路功能將重設您的網路連線並暫時中斷網路連線。 + 立即進行安裝嗎? + + + + Missing Dependencies + Python Core / win32api + Installing the [ProductName] Python bindings requires the Python Core package and the win32api bindings to be installed first. + When continuing the installation of the [ProductName] Python bindings now, those need to be set up manually later. Refer to the [ProductName] SDK manual for more information. + Proceed with installation now? + + + + 安裝選取功能所需的磁碟空間。 + 反白的磁碟區(如果有)對於目前選取的功能沒有足夠的磁碟空間可以使用。 您可以從反白的磁碟區移除一些檔案,或選擇安裝較少功能在本機磁碟機,或選取不同目的地磁碟機。 + 磁碟空間需求 + {120}{70}{70}{70}{70} + + + + 瀏覽目的地資料夾 + 變更目前目的地資料夾 + 上一層 + 建立新的資料夾 + 瀏覽(&L): + 資料夾名稱(&F): + + + + 安裝精靈準備好進行 [InstallMode] 安裝。 + 按一下「安裝」開始安裝。 如果您要檢閱或變更任何安裝設定,按一下「上一步」。 按一下「取消」結束精靈。 + 準備好安裝 + + + + 按一下「完成」按鈕結束安裝精靈。 + [ProductName] 安裝完成。 + 安裝後啟動 [ProductName] + + + + [ProductName] 安裝精靈太早結束 + [ProductName] 安裝因為錯誤太早結束。 您的系統未做修改。 若要稍後安裝此程式,請再次執行安裝。 + 按一下「完成」按鈕結束安裝精靈。 + + + + 以下應用程式使用此安裝需要更新的檔案。 關閉這些應用程式接著按一下「重試(&R)」以繼續安裝或「取消」結束精靈。 + 某些需要更新的檔案目前使用中。 + 檔案使用中 + + + + [ProductName] 安裝精靈中斷 + [ProductName] 安裝中斷。 您的系統未做修改。 若要稍後安裝此程式,請再次執行安裝。 + 按一下「完成」按鈕結束安裝精靈。 + + + + 在安裝精靈安裝 [ProductName] 時請稍候。 這需要幾分鐘時間。 + + + + 正在繼續 [ProductName] 安裝精靈 + 安裝精靈將在您的電腦完成 [ProductName] 的安裝。 按一下「安裝」以繼續或「取消」結束安裝精靈。 + + + + 修改、修復或移除安裝 + 選取您希望執行的操作。 + 修復(&P) + 修復在最近安裝狀態的錯誤 - 修復缺少或損毀的檔案、捷徑和登錄檔項目。 + 修復安裝 + 正在修復 + repairs + 移除(&R) + 從電腦移除 [ProductName]。 + 移除安裝 + 正在移除 + removes + + + + 歡迎使用 [ProductName] 安裝精靈 + 安裝精靈將允許您修復目前的安裝或從您的電腦移除 [ProductName]。 按一下「下一步」以繼續或「取消」結束安裝精靈。 + + + + 安裝所需的磁碟空間超過可用的磁碟空間。 + 反白的磁碟區對於目前選取的功能沒有足夠的磁碟空間可以使用。 您可以從反白的磁碟區移除一些檔案,或選擇安裝較少功能在本機磁碟機,或選取不同目的地磁碟機。 + 磁碟空間不足 + + + + 安裝所需的磁碟空間超過可用的磁碟空間。 + 反白的磁碟區對於目前選取的功能沒有足夠的磁碟空間可以使用。 您可以從反白的磁碟區移除一些檔案,或選擇安裝較少功能在本機磁碟機,或選取不同目的地磁碟機。 + 磁碟空間不足 + 或者,您可以選擇停用安裝程式的回復功能。 這允許安裝程式在任何方式中斷安裝時還原您電腦的原始狀態。 按一下「是」如果您希望承擔停用回復功能的風險。 + + + + 移除 [ProductName] + 您已經選擇從您的電腦移除程式。 + 按一下「移除」以從您的電腦移除 [ProductName]。 如果您要檢閱或變更任何安裝設定,按一下「上一步」。 按一下「取消」結束精靈。 + + + + 修復 [ProductName] + 安裝精靈準備好開始修復 [ProductName]。 + 按一下「修復」以修復 [ProductName] 的安裝。 如果您要檢閱或變更任何安裝設定,按一下「上一步」。 按一下「取消」結束精靈。 + + + + 在安裝程式完成判斷您的磁碟空間需求時請稍候。 + + + + 以下應用程式使用此安裝需要更新的檔案。 您可以讓安裝精靈關閉並嘗試重新啟動這些應用程式或稍後重新啟動電腦。 + 某些需要更新的檔案目前使用中。 + 檔案使用中 + 關閉應用程式並嘗試重新啟動它們。 (&C) + 不要關閉應用程式,將需要重新開機。 (&D) + + + {{嚴重錯誤:}} + {{錯誤 [1]。}} + 警告 [1]。 + + 資訊 [1]。 + 安裝程式安裝這個封裝時發生未預期的錯誤。 這可能表示這個封裝的問題。 錯誤碼 [1]。 {{引數:[2], [3], [4]}} + + {{磁碟已滿:}} + 動作 [Time]:[1]. [2] + [ProductName] + {[2]}{, [3]}{, [4]} + 訊息類型:[1], 引數:[2] + === 開啟記錄時間:[Date] [Time] === + === 停止記錄時間:[Date] [Time] === + 動作開始 [Time]:[1]。 + 動作結束 [Time]:[1]。 傳回值 [2]。 + 剩餘時間:{[1] 分 }{[2] 秒} + 記憶體不足,重試之前先關閉其它應用程式。 + 安裝程式不再有回應。 + 安裝程式已經永久中止。 + 在 Windows 組態 [ProductName] 時請稍候 + 正在收集所需的資訊... + 正在移除此應用程式的舊版本... + 正在準備移除此應用程式的舊版本... + {[ProductName] } 安裝成功完成。 + {[ProductName] } 安裝失敗。 + 讀取檔案錯誤:[2]。{{ 系統錯誤 [3]。}} 檢查檔案是否存在,並且可以存取。 + 無法建立目錄 '[2]'。 同名的目錄已經存在。 取消安裝並嘗試安裝到不同位置。 + 請插入磁碟:[2] + 安裝程式的權限不足,無法存取這個目錄:[2],安裝無法繼續,以系統管理員的身份登入或是連絡您的系統管理員。 + 寫入至檔案時發生錯誤:[2]。請檢查您可以存取那個目錄。 + 讀取檔案時發生錯誤:[2]。{{ 系統錯誤 [3]。}} 請檢查檔案是否存在,並且可以存取。 + 另一個應用程序獨占存取檔案 '[2]'。 請關閉所有其它應用程式,然後按一下「重試」。 + 磁碟空間不足,無法安裝這個檔案:[2]。釋放一些磁碟空間然後按一下「重試」,或按一下「取消」結束。 + 找不到來源檔案:[2]。 請驗證檔案存在並且您可以存取它。 + 讀取檔案錯誤:[3]。{{ 系統錯誤 [2]。}} 請檢查檔案是否存在,並且可以存取。 + 寫入至檔案時發生錯誤:[3]。{{ 系統錯誤 [2]。}} 請檢查您可以存取那個目錄。 + 找不到來源檔案 {{(cabinet)}}:[2]。 請檢查檔案存在並且可以存取。 + 無法建立目錄 '[2]'。 同名的檔案已經存在。 請重新命名或移除檔案並按一下「重試」,或按一下「取消」結束。 + 磁碟區 [2] 目前不可使用。 請選取另一個。 + 指定的路徑 '[2]' 不可使用。 + 無法寫入指定的資料夾:[2]。 + 嘗試從檔案讀取時發生網路錯誤:[2] + 嘗試建立目錄時發生錯誤:[2] + 嘗試建立目錄時發生網路錯誤:[2] + 嘗試開啟來源檔案時發生網路錯誤:[2] + 指定的路徑太長:[2] + Installer 的權限不足以修改這個檔案:[2]。 + 資料夾路徑的部份 '[2]' 無效。其為空或超過系統允許的長度。 + 資料夾路徑 '[2]' 包含無效的字在資料夾路徑。 + 資料夾路徑 '[2]' 包含無效字元。 + '[2]' 不是有效的短檔名。 + 取得檔案安全性錯誤:[3] GetLastString:[2] + 無效的磁碟機:[2] + 套用修正檔到檔案 [2] 錯誤。 可能已由其他主機更新,且這個修正檔不再能修改。 更多資訊請聯絡您的修正檔供應商。 {{系統錯誤:[3]}} + 無法安裝所需的檔案,因為 cabinet 檔案 [2] 沒有數位簽章。 這表示 cabinet 檔案已經損毀。 + 無法安裝所需的檔案,因為 cabinet 檔案 [2] 有無效的數位簽章。 這表示 cabinet 檔案已經損毀。 {{ WinVerifyTrust 返回錯誤 [3]。}} + 修正複製 [2] 檔案失敗:CRC 錯誤。 + 修正移動 [2] 檔案失敗:CRC 錯誤。 + 修正路徑 [2] 檔案失敗:CRC 錯誤。 + 無法安裝 '[2]' 因為在 cainet 檔案 '[3]' 中找不到檔案。 這表示網路錯誤、從 CD-ROM 讀取錯誤、或此安裝包問題。 + 此安裝所需的 cabinet 檔案 '[2]' 已經損毀且無法使用。 這表示網路錯誤、從 CD-ROM 讀取錯誤、或此安裝包問題。 + 完成這個安裝所需的暫存檔案建立錯誤。 {{ 資料夾:[3]。 系統錯誤碼:[2]}} + 無法建立機碼:[2]。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法開啟機碼:[2]。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法從機碼 [3] 刪除值:[2]。{{ 系統錯誤 [4]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法刪除機碼:[2]。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法從機碼 [3] 讀取值 [2]。{{ 系統錯誤 [4]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法寫入值 [2] 至機碼 [3]。{{ 系統錯誤 [4]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法取得機碼 [2] 的值名稱。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法取得機碼 [2] 的子機碼名稱。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法讀取機碼 [2] 的安全資訊。{{ 系統錯誤 [3]。}} 檢查您是有足夠的權限存取該機碼,或是連絡您的支援人員。 + 無法增加可用的登錄空間。 此應用程式須要 [2] KB 以上的空間。 + 其它的安裝正在進行中,您必須完成該項安裝之後才能繼續。 + 存取保全資料時發生錯誤,請確定 Windows Installer 是否正確組態,然後再試一次。 + 使用者 '[2]' 先前已經啟動產品 '[3]' 的安裝。 該使用者在可以使用該產品前需要再次執行安裝。您目前的安裝現在將繼續。 + 使用者 '[2]' 先前已經啟動產品 '[3]' 的安裝。 該使用者在可以使用該產品前需要再次執行安裝。 + 磁碟空間不足 -- 磁碟區:'[2]',所需空間:[3] KB; 可用空間:[4] KB。 釋放一些磁碟空間並重試。 + 您確定要取消嗎? + 檔案 [2][3] 正在由 { 以下處理程序:名稱:[4],Id:[5],視窗標題:'[6]'} 使用中。 關閉該應用程式並重試。 + 已經安裝產品 '[2]',此產品防止安裝。 兩個產品不相容。 + 磁碟區 '[2]' 沒有足夠的磁碟空間以啟用復原的安裝繼續。 需要 [3] KB,但只有 [4] KB 可以使用。 按一下「忽略」以不儲存復原資訊繼續安裝,按一下「重試」以再次檢查可用空間,或按一下「取消」以離開安裝。 + 無法存取網路位置 [2]。 + 繼續安裝前應該關閉以下應用程式: + 無法在本機中找到任何先前已安裝的合格版本。 + 套用安全性設定時發生錯誤。 [2] 不是有效的使用者或群組。 這會是安裝包的問題或連線到網路上網域控制站的問題。 檢查您的網路連線並按一下「重試」,或「取消」以結束安裝。 {{找不到使用者的 SID,系統錯誤 [3]}} + 金鑰 [2] 是無效的,檢查您輸入的金鑰是否正確。 + 要繼續設定 [2] 之前,Installer 必須重新啟動您的系統,按「是」將立即重新啟動;如果您想要稍後手動重新啟動請按「否」。 + 您必須重新啟動您的系統,對 [2] 所做的組態變更才會生效,按「是」立即重新啟動;如果您想要稍後手動重新啟動請按「否」。 + 安裝 [2] 目前已經暫停,您必須復原該安裝所做的變更才能繼續,您要復原這些變更嗎? + 另一個安裝這個產品的程式正在進行中,您必須復原該安裝所做的變更才能繼續,您要復原這些變更嗎? + 找不到產品 [2] 的安裝包。 嘗試使用安裝包 '[3]' 的有效副本嘗試再次安裝。 + 安裝成功完成。 + 安裝失敗。 + 產品:[2] -- [3] + 您可以將電腦還原成先前的狀態或稍後繼續安裝,您希望還原嗎? + 寫入安裝資訊至磁碟時發生錯誤,確定磁碟的空間足夠,並按「重試」,或按「取消」來結束安裝。 + 還原您的電腦成之前的狀態所需的一個或數個檔案找不到。 無法還原。 + [2] 無法安裝其所需的產品之一。 請聯絡您的技術支援小組。 {{系統字串:[3]。}} + 無法移除 [2] 的舊版本。 請聯絡您的技術支援小組。 {{系統字串 [3]。}} + 已經安裝 [2] + 已經組態 [2] + 已經移除 [2] + 數位簽章原則拒絕檔案 [2] 。 + 無法存取 Windows Installer 服務。 如果您正執行在 Windows 安全模式,這將會發生。 請聯絡您的技術支援人員以取得協助。 + 這個 Windows Installer 封裝有問題。 完成這個安裝需要的指令碼無法執行。 聯絡您的支援人員或封裝供應商。 {{自訂動作 [2] 指令碼錯誤 [3],[4]:[5] 行 [6],欄 [7],[8] }} + 這個 Windows Installer 封裝有問題。 完成這個安裝需要的程式無法執行。 聯絡您的支援人員或封裝供應商。 {{動作 [2],位置:[3],命令:[4] }} + 這個 Windows Installer 封裝有問題。 以 setup 部分執行的程式無法如預期完成。 聯絡您的支援人員或封裝供應商。 {{動作 [2],位置:[3],命令:[4] }} + 這個 Windows Installer 封裝有問題。 完成這個安裝需要的 DLL 無法執行。 聯絡您的支援人員或封裝供應商。 {{動作 [2],項目:[3],程式庫:[4] }} + 移除成功完成。 + 移除失敗。 + 宣告成功完成。 + 宣告失敗。 + 組態成功完成。 + 組態失敗。 + 您必須是管理者以移除這個應用程式。 要移除這個應用程式,您可以使用系統管理員登入或聯絡您的技術支援群組取得協助。 + 路徑 [2] 無效。 請指定有效的路徑。 + 記憶體不足,重試之前先關閉其它應用程式。 + 磁碟機 [2] 中沒有磁片,請插入磁片然後重試,或按「取消」回到上次選取的磁碟區。 + 磁碟機 [2] 中沒有磁片,請插入磁片然後按「重試」,或按「取消」回到瀏覽對話方塊,並選取不同的磁碟區。 + 資料夾 [2] 不存在,請輸入一個現有的資料夾路徑。 + 您的權限不足,無法讀取這個資料夾。 + 無法決定合法的目的資料夾。 + 嘗試讀取來源安裝資料庫時發生錯誤:[2]。 + 正在排定重新開機作業:正在更改檔案名稱 [2] 成 [3],必須重新開機才能完成作業。 + 正在排定重新開機作業:正在刪除檔案 [2],必須重新開機才能完成作業。 + 註冊模組 [2] 失敗。HRESULT [3]。連絡您的支援人員。 + 取消註冊模組 [2] 失敗。HRESULT [3]。連絡您的支援人員。 + 無法預存封裝 [2]。錯誤:[3]。請連絡支援人員。 + 無法註冊字型 [2]。 請確認是否有足夠的權限及系統支援。 + 無法解除註冊字型 [2]。 請確認您有足夠的權限來移除字型。 + 無法建立捷徑 [2]。 請確認目地資料夾是否存在及您的存取權。 + 無法移除捷徑 [2]。 請確認目地資料夾是否存在及您的存取權。 + 無法註冊檔案 [2] 的類型程式庫。 請連絡系統支援人員。 + 無法解除註冊檔案 [2] 的 type library。 請連絡系統支援人員。 + 無法更新 ini 檔 [2][3]。 請確認檔案是否存在及您的存取權。 + 無法預定在重開機時將檔案 [2] 取代 [3]。 請確認您有 [3] 的存取權。 + 移除 ODBC 驅動程式管理員錯誤,ODBC 錯誤 [2]:[3]。請連絡系統支援人員。 + 安裝 ODBC 驅動程式管理員錯誤,ODBC 錯誤 [2]:[3]。請連絡系統支援人員。 + 移除 ODBC 驅動程式管理員錯誤:[4],ODBC 錯誤 [2]:[3]。請確認您有足夠權限。 + 安裝 ODBC 驅動程式管理員錯誤:[4],ODBC 錯誤 [2]:[3]。請確認檔案[4]存在並可存取。 + 設定 ODBC 資料來源錯誤:[4],ODBC 錯誤 [2]:[3]。請確認檔案[4]存在並可存取。 + 啟動服務 '[2]' ([3]) 失敗。 請確認您有足夠的特殊權限以啟動系統服務。 + 停止服務 '[2]' ([3]) 失敗。 請確認您有足夠的特殊權限以啟動系統服務。 + 刪除服務 '[2]' ([3]) 失敗。 請確認您有足夠的特殊權限以啟動系統服務。 + 無法安裝服務 '[2]' ([3]) 。 請確認您有足夠的特殊權限以啟動系統服務。 + 無法更新環境變數 '[2]'。 請確認您有足夠的特殊權限以修改環境變數。 + 您沒有足夠的特殊權限使電腦的所有使用者都完成此安裝。請以系統管理員權限登入,接著再重試此安裝。 + 無法設定檔案 '[3]' 的檔案安全性。 錯誤:[2]。 請確認您有足夠的特殊權限以修改此檔案的安全性權限。 + 這台電腦並未安裝 Component Services (COM+ 1.0)。這項安裝需要有 Component Services 才能進行。Component Services 包含在 Windows XP 中。 + 登錄 COM+ 應用程式時發生錯誤。請聯絡您的支援人員以取得其他資訊。 + 解除 COM+ 應用程式登錄時發生錯誤。請聯絡您的支援人員以取得其他資訊。 + 無法變更服務 '[2]' ([3]) 的描述。 + Windows Installer 服務無法更新系統檔案 [2] 因為檔案受 Windows 保護。 您可能需要更新您的作業系統使這個程式正確動作。 {{{封裝版本:[3],受 OS 保護的版本:[4]}} + Windows Installer 服務無法更新受保護的 Windows 檔案 [2]。 {{封裝版本:[3],受 OS 保護的版本:[4],SFP 錯誤:[5]}} + Windows Installer 服務無法更新一個或數個受保護的 Windows 檔案。 {{SFP 字串:[2]。 受保護的檔案清單:\r\n[3]}} + 電腦的原則停用使用者安裝。 + 組件元件 [2] 的安裝期間發生錯誤。 HRESULT:[3]。 {{組件介面:[4],函數:[5],組件名稱:[6]}} + + + 需要關閉應用程式 "[2]" 以繼續關閉。 + + 正在驗證安裝 + 正在複製新檔案 + 檔案:[1], 目錄:[9], 大小:[6] + 正在複製網路安裝檔案 + 檔案:[1], 目錄:[9], 大小:[6] + 正在計算空間需求 + 正在計算空間需求 + 正在計算空間需求 + 正在建立捷徑 + 捷徑:[1] + 正在發佈合格的元件 + 元件 ID:[1], 公佈者:[2] + 正在發佈產品功能 + 功能:[1] + 正在發佈產品資訊 + 正在登錄類別伺服器 + 類別 Id:[1] + 正在登錄擴充伺服器 + 副檔名 [1] + 正在登錄 MIME 資訊 + MIME 內容類型:[1],副檔名:[2] + 正在登錄程式辨識字元 + ProgId: [1] + 正在配置登錄空間 + 可用空間:[1] + 正在搜尋已安裝的應用程式 + 內容:[1], 簽章:[2] + 正在繫結執行檔 + 檔案:[1] + 正在搜尋查詢產品 + 正在建立資料夾 + 資料夾:[1] + 正在刪除服務 + 服務:[1] + 正在建立重複檔案 + 檔案:[1], 目錄:[9], 大小:[6] + 正在搜尋相關的應用程式 + 找到應用程式:[1] + 正在安裝 ODBC 元件 + 正在安裝新服務 + 服務:[2] + 正在評估啟動條件 + 正在從相關的應用程式遷移功能狀態 + 應用程式:[1] + 正在移動檔案 + 檔案:[1], 目錄:[9], 大小:[6] + 正在修補檔案 + 檔案:[1], 目錄:[2], 大小:[3] + 正在更新元件註冊 + 正在註冊 COM+ 應用程式和元件 + AppId:[1]{{, AppType:[2],使用者:[3],RSN:[4]}} + 正在註冊字型 + 字型:[1] + 正在註冊產品 + [1] + 正在登錄類別程式庫 + LibID: [1] + 正在登錄使用者 + [1] + 正在移除重複的檔案 + 檔案:[1], 目錄:[9] + 正在更新環境字串 + 名稱:[1], 數值:[2], 動作:[3] + 正在移除應用程式 + 應用程式:[1], 命令列:[2] + 正在移除檔案 + 檔案:[1], 目錄:[9] + 正在移除資料夾 + 資料夾:[1] + 正在移除 INI 檔案項目 + 檔案:[1], 區段:[2], 機碼:[3], 數值:[4] + 正在移除 ODBC 元件 + 正在移除系統登錄檔數值 + 機碼:[1], 名稱:[2] + 正在移除捷徑 + 捷徑:[1] + 正在搜尋查詢產品 + 正在註冊模組 + 檔案:[1], 資料夾:[2] + 正在解除模組登錄 + 檔案:[1], 資料夾:[2] + 正在初始化 ODBC 目錄 + 正在啟動服務 + 服務:[1] + 正在停止服務 + 服務:[1] + 正在取消元件公佈 + 元件 ID:[1], 公佈者:[2] + 正在取消功能公佈 + 功能:[1] + 解除類別伺服器登錄 + 類別 Id:[1] + 正在解除 COM+ 應用程式和元件登錄 + AppId: [1]{{, AppType: [2]}} + 正在解除擴充伺服器登錄 + 副檔名 [1] + 正在解除字型登錄 + 字型:[1] + 正在解除 MIME 資訊登錄 + MIME 內容類型:[1],副檔名:[2] + 正在解除程式識別碼登錄 + ProgId: [1] + 正在解除類別程式庫登錄 + LibID: [1] + 正在更新環境字串 + 名稱:[1], 數值:[2], 動作:[3] + 正在寫入 INI 檔案數值 + 檔案:[1], 區段:[2], 機碼:[3], 數值:[4] + 正在寫入系統登錄檔數值 + 機碼:[1],名稱:[2],值:[3] + 正在宣告應用程式 + 正在產生動作的 script 操作: + [1] + 正在安裝系統目錄 + 檔案:[1],依存關係:[2] + 正在發佈組件資訊 + 應用程式內容:[1],組件名稱:[2] + 正在取消資訊公佈 + 應用程式內容:[1],組件名稱:[2] + 回復動作: + [1] + 正在移除備份檔案 + 檔案:[1] + 正在移除移動的檔案 + 檔案:[1], 目錄:[9] + 正在取消發佈產品資訊 + + 位元組 + GB + KB + MB + 整個功能將不可用 + 需要時將安裝的功能 + 整個功能將會安裝成從 CD 上執行 + 整個功能將會安裝到本機硬碟 + 整個功能將會安裝成從網路上執行 + 將會安裝成從 CD 上執行 + 將會安裝到本機硬碟 + 將會安裝成從網路執行 + 正在收集所需的資訊... + 這個功能將保持未安裝的狀態 + 這個功能會設定成視需要進行安裝 + 這個功能將會安裝成從 CD 執行 + 這個功能將會安裝在本機硬碟中 + 這個功能將會安裝成從網路執行 + 這個功能將無法使用 + 將會視需要進行安裝 + 這個功能可以從 CD 上執行 + 這個功能將安裝在您的本機硬碟 + 這個功能可以從網路執行 + 這個功能將完整解除安裝,您將不能從 CD 執行 + 這個功能會從 CD 執行變更成視需要進行安裝 + 這個功能仍將從 CD 執行 + 這個功能將會從 CD 執行變更為安裝在本機硬碟中 + 這個功能會在您的硬碟釋放 [1] 。 + 這個功能要求 [1] 在您的硬碟上。 + 正在編譯這個功能的花費... + 這個功能將會完整移除 + 這個功能會從您的本機硬碟上移除,但是會設定成視需要進行安裝 + 這個功能將會從您的本機硬碟中移除,但是仍然可以從 CD 執行 + 這個功能將會保留在您的本機硬碟中 + 這個功能將會從您的本機硬碟中移除,但是仍然可從網路上執行 + 這個功能將完整解除安裝,您將不能從網路執行 + 這個功能將會從網路執行變更成視需要進行安裝 + 這個功能將會從網路執行變更為安裝在本機硬碟中。 + 這個功能仍將保留成從網路執行 + 這個功能在您的硬碟釋放 [1]。 它已選取 [2] 之 [3] 子功能。 子功能在您的硬碟釋放 [4] 。 + 這個功能在您的硬碟釋放 [1]。 它已選取 [2] 之 [3] 子功能。 子功能在您的硬碟需要 [4] 。 + 這個功能在您的硬碟需要 [1]。 它已選取 [2] 之 [3] 子功能。 子功能在您的硬碟釋放 [4] 。 + 這個功能在您的硬碟需要 [1]。 它已選取 [2] 之 [3] 子功能。 子功能在您的硬碟需要 [4] 。 + 剩餘時間:{[1] 分 }{[2] 秒} + 可用 + 差異 + 需求 + 磁碟大小 + 分割區 + + diff --git a/src/VBox/Installer/win/Permissions.wxi b/src/VBox/Installer/win/Permissions.wxi new file mode 100644 index 00000000..9ea43429 --- /dev/null +++ b/src/VBox/Installer/win/Permissions.wxi @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/src/VBox/Installer/win/PublicProperties.wxi b/src/VBox/Installer/win/PublicProperties.wxi new file mode 100644 index 00000000..b8afd73e --- /dev/null +++ b/src/VBox/Installer/win/PublicProperties.wxi @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/Resources/Makefile.kmk b/src/VBox/Installer/win/Resources/Makefile.kmk new file mode 100644 index 00000000..380ff535 --- /dev/null +++ b/src/VBox/Installer/win/Resources/Makefile.kmk @@ -0,0 +1,96 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for VBoxRes.dll. +# + +# +# Copyright (C) 2010-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + +DLLS += VBoxRes +VBoxRes_TEMPLATE = VBoxR3StaticNoCrt +VBoxRes_DEPS = $(VBOX_SVN_REV_KMK) +VBoxRes_LDFLAGS = -NoEntry +VBoxRes_SOURCES = \ + dummy.cpp \ + VBoxRes.rc +VBoxRes_CLEAN = \ + $(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc + +# The icon location is configurable. +VBoxRes.rc_INCS += $(VBoxRes_0_OUTDIR) +VBoxRes.rc_DEPS += $(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc + +# The resource path. +VBOX_ARTWORK_PATH_WIN := $(subst /,\\,$(PATH_ROOT))/src/VBox/Artwork/win + +# Icon include file. +# @todo Put this into Config.kmk? +ifdef VBOX_OSE + # Hack: rc.exe on OSE build boxes don't support Vista icons; so + # use a special icon version (without the 256x256 size) instead. + VBOX_WINDOWS_ICON_EXT_VBOX := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-vbox.ico + VBOX_WINDOWS_ICON_EXT_EXTPACK := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-vbox-extpack.ico + VBOX_WINDOWS_ICON_EXT_OVA := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-ova.ico + VBOX_WINDOWS_ICON_EXT_OVF := $(VBOX_ARTWORK_PATH_WIN)/OSE/virtualbox-ovf.ico + VBOX_WINDOWS_ICON_EXT_VDI := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vdi.ico + VBOX_WINDOWS_ICON_EXT_VMDK := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vmdk.ico + VBOX_WINDOWS_ICON_EXT_VHD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vhd.ico + VBOX_WINDOWS_ICON_EXT_HDD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-hdd.ico +else + VBOX_WINDOWS_ICON_EXT_VBOX := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-vbox.ico + VBOX_WINDOWS_ICON_EXT_EXTPACK := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-vbox-extpack.ico + VBOX_WINDOWS_ICON_EXT_OVA := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-ova.ico + VBOX_WINDOWS_ICON_EXT_OVF := $(VBOX_ARTWORK_PATH_WIN)/NonOSE/virtualbox-ovf.ico + VBOX_WINDOWS_ICON_EXT_VDI := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vdi.ico + VBOX_WINDOWS_ICON_EXT_VMDK := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vmdk.ico + VBOX_WINDOWS_ICON_EXT_VHD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-vhd.ico + VBOX_WINDOWS_ICON_EXT_HDD := $(VBOX_ARTWORK_PATH_WIN)/virtualbox-hdd.ico +endif + +VBOX_RESOURCES_WIN := \ + $(VBOX_WINDOWS_ICON_FILE) \ + $(VBOX_WINDOWS_ICON_EXT_VBOX) \ + $(VBOX_WINDOWS_ICON_EXT_EXTPACK) \ + $(VBOX_WINDOWS_ICON_EXT_OVA) \ + $(VBOX_WINDOWS_ICON_EXT_OVF) \ + $(VBOX_WINDOWS_ICON_EXT_VDI) \ + $(VBOX_WINDOWS_ICON_EXT_VMDK) \ + $(VBOX_WINDOWS_ICON_EXT_VHD) \ + $(VBOX_WINDOWS_ICON_EXT_HDD) + +$$(VBoxRes_0_OUTDIR)/VBoxRes-icons.rc: \ + $$(VBOX_RESOURCES_WIN) $(MAKEFILE_CURRENT) | $$(dir $$@) + $(RM) -f $@ + $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VBOX))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_EXTPACK ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_EXTPACK))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_OVA ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_OVA))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_OVF ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_OVF))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_VDI ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VDI))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_VMDK ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VMDK))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_VHD ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_VHD))"' + $(APPEND) $@ 'IDI_FILETYPE_VBOX_HDD ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_EXT_HDD))"' + +include $(FILE_KBUILD_SUB_FOOTER) diff --git a/src/VBox/Installer/win/Resources/VBoxRes.rc b/src/VBox/Installer/win/Resources/VBoxRes.rc new file mode 100644 index 00000000..4d188553 --- /dev/null +++ b/src/VBox/Installer/win/Resources/VBoxRes.rc @@ -0,0 +1,64 @@ +/* $Id: VBoxRes.rc $ */ +/** @file + * VBoxRes - Resource file for VirtualBox binaries. + */ + +/* + * Copyright (C) 2010-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include +#include +#include "resource.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VBOX_RC_FILE_VERSION + PRODUCTVERSION VBOX_RC_FILE_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS VBOX_RC_FILE_FLAGS + FILEOS VBOX_RC_FILE_OS + FILETYPE VBOX_RC_TYPE_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "VirtualBox Resources\0" + VALUE "InternalName", "VBoxRes\0" + VALUE "OriginalFilename", "VBoxRes.dll\0" + VALUE "CompanyName", VBOX_RC_COMPANY_NAME + VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR + VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT + VALUE "ProductName", VBOX_RC_PRODUCT_NAME_STR + VALUE "ProductVersion", VBOX_RC_PRODUCT_VERSION_STR + VBOX_RC_MORE_STRINGS + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#include "VBoxRes-icons.rc" diff --git a/src/VBox/Installer/win/Resources/dummy.cpp b/src/VBox/Installer/win/Resources/dummy.cpp new file mode 100644 index 00000000..d2a4c7e5 --- /dev/null +++ b/src/VBox/Installer/win/Resources/dummy.cpp @@ -0,0 +1,36 @@ +/* $Id: dummy.cpp $ */ +/** @file + * dummy.cpp - file to make kBuild happy when building a resource only DLL. + */ + +/* + * Copyright (C) 2011-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include + +RT_C_DECLS_BEGIN + +DECLEXPORT(void) VBoxResDummy(void) +{ +} + +RT_C_DECLS_END diff --git a/src/VBox/Installer/win/Resources/resource.h b/src/VBox/Installer/win/Resources/resource.h new file mode 100644 index 00000000..386f8ad1 --- /dev/null +++ b/src/VBox/Installer/win/Resources/resource.h @@ -0,0 +1,46 @@ +/* $Id: resource.h $ */ +/** @file + * resource.h - resource header file. + */ + +/* + * Copyright (C) 2010-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_Resources_resource_h +#define VBOX_INCLUDED_SRC_Resources_resource_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +#define IDI_VIRTUALBOX 101 + +#define IDI_FILETYPE_VBOX 201 +#define IDI_FILETYPE_VBOX_EXTPACK 202 + +#define IDI_FILETYPE_VBOX_OVF 301 +#define IDI_FILETYPE_VBOX_OVA 302 +#define IDI_FILETYPE_VBOX_VDI 303 +#define IDI_FILETYPE_VBOX_VMDK 304 +#define IDI_FILETYPE_VBOX_VHD 305 +#define IDI_FILETYPE_VBOX_HDD 306 + +#endif /* !VBOX_INCLUDED_SRC_Resources_resource_h */ diff --git a/src/VBox/Installer/win/Scripts/Combined-1-Prepare.cmd b/src/VBox/Installer/win/Scripts/Combined-1-Prepare.cmd new file mode 100644 index 00000000..aad4174f --- /dev/null +++ b/src/VBox/Installer/win/Scripts/Combined-1-Prepare.cmd @@ -0,0 +1,314 @@ +@echo off +rem $Id: Combined-1-Prepare.cmd $ +rem rem @file +rem Windows NT batch script for preparing both amd64 and x86 for signing submission. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and checks for required enviornment variables. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) +set _MY_SCRIPT_DIR=%~dp0 +set _MY_SAVED_CD=%CD% +set _MY_VER_REV=@VBOX_VERSION_STRING@r@VBOX_SVN_REV@ +set _MY_PACK_EXTPACK=1 +set _MY_PACK_ADDITIONS=0 + +rem +rem Parse arguments. +rem +set _MY_OPT_UNTAR_DIR=%_MY_SCRIPT_DIR%\..\..\.. +for %%i in (%_MY_OPT_UNTAR_DIR%) do set _MY_OPT_UNTAR_DIR=%%~fi +set _MY_OPT_EXTPACK=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%.vbox-extpack +set _MY_OPT_EXTPACK_ENTERPRISE=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%-ENTERPRISE.vbox-extpack +set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@ +set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-g" goto opt_g +if ".%1" == ".--additions" goto opt_g +if ".%1" == ".-e" goto opt_e +if ".%1" == ".--extpack" goto opt_e +if ".%1" == ".--no-extpack" goto opt_ne +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--outdir" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--extpack-enterprise" goto opt_s +if ".%1" == ".-t" goto opt_t +if ".%1" == ".--build-type" goto opt_t +if ".%1" == ".-u" goto opt_u +if ".%1" == ".--vboxall-untar-dir" goto opt_u +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_g +set _MY_PACK_ADDITIONS=1 +shift +goto argument_loop + +:opt_e +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK=%~f2 +goto argument_loop_next_with_value + +:opt_ne +set _MY_PACK_EXTPACK=0 +shift +goto argument_loop + +:opt_h +echo Toplevel combined package: Prepare both x86 and amd64 for submission. +echo . +echo Usage: Combined-1-Prepare.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack] +echo [-s/--extpack-enterprise puel-enterprise.vbox-extpack] +echo [--no-extpack] [-g/--additions] +echo [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type] +echo . +echo Default -e/--extpack value: %_MY_OPT_EXTPACK% +echo Default -s/--extpack-enterprise value: %_MY_OPT_EXTPACK_ENTERPRISE% +echo Default -u/--vboxall-untar-dir value: %_MY_OPT_UNTAR_DIR% +echo Default -o/--outdir value: %_MY_OPT_OUTDIR% +echo Default -t/--build-type value: %_MY_OPT_BUILD_TYPE% +echo . +goto end_failed + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTDIR=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK_ENTERPRISE=%~f2 +goto argument_loop_next_with_value + +:opt_t +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BUILD_TYPE=%~2 +goto argument_loop_next_with_value + +:opt_u +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_UNTAR_DIR=%~f2 +goto argument_loop_next_with_value + + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + + +:error_vboxall_untar_dir_not_found +echo syntax error: The VBoxAll untar directory was not found: "%_MY_OPT_UNTAR_DIR%" +goto end_failed + +:error_amd64_bindir_not_found +echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_AMD64%" +goto end_failed + +:error_x86_bindir_not_found +echo syntax error: The X86 bin directory was not found: "%_MY_BINDIR_X86%" +goto end_failed + +:error_amd64_repack_dir_not_found +echo syntax error: The AMD64 repack directory was not found: "%_MY_REPACK_DIR_AMD64%" +goto end_failed + +:error_x86_repack_dir_not_found +echo syntax error: The X86 repack directory was not found: "%_MY_REPACK_DIR_X86%" +goto end_failed + +:error_extpack_not_found +echo syntax error: Specified extension pack not found: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_enterprise_extpack_not_found +echo syntax error: Specified enterprise extension pack not found: "%_MY_OPT_EXTPACK_ENTERPRISE%" +goto end_failed + +:error_extpack_and_additions_together +echo usage error: You can't prepare extPack and GuestAdditions in one call +goto end_failed + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem + +if not exist "%_MY_OPT_UNTAR_DIR%" goto error_vboxall_untar_dir_not_found + +set _MY_BINDIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\bin +set _MY_BINDIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\bin +if not exist "%_MY_BINDIR_AMD64%" goto error_amd64_bindir_not_found +if not exist "%_MY_BINDIR_X86%" goto error_x86_bindir_not_found + +if ".%_MY_PACK_EXTPACK%" == ".%_MY_PACK_ADDITIONS%" goto error_extpack_and_additions_together + +set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repack +set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repack +if ".%_MY_PACK_ADDITIONS%" == ".0" goto skip_additions_packing_options +set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repackadd +set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repackadd +:skip_additions_packing_options +if not exist "%_MY_REPACK_DIR_AMD64%" goto error_amd64_repack_dir_not_found +if not exist "%_MY_REPACK_DIR_X86%" goto error_x86_repack_dir_not_found + +rem Make sure the output dir exists. +if not exist "%_MY_OPT_OUTDIR%" (mkdir "%_MY_OPT_OUTDIR%" || goto end_failed) + +rem +rem ExtPack section +rem +if ".%_MY_PACK_EXTPACK%" == ".0" goto skip_extpack_packing + +if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_not_found +if not ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." if not exist "%_MY_OPT_EXTPACK_ENTERPRISE%" goto error_enterprise_extpack_not_found + +rem +rem Install the extpack in the bin directories. +rem Note! Not really necessary, but whatever. +rem +echo on +copy /y "%_MY_OPT_EXTPACK%" "%_MY_BINDIR_AMD64%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed +copy /y "%_MY_OPT_EXTPACK%" "%_MY_BINDIR_X86%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed +@echo off + +rem +rem Do the packing of ExtPack +rem +echo ************************************************************************** +echo Packing AMD64 drivers +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +call "%_MY_REPACK_DIR_AMD64%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_AMD64%" -a amd64 -e "%_MY_OPT_EXTPACK%" ^ + -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-amd64.cab" || goto end_failed +echo . +echo ************************************************************************** +echo Packing X86 drivers +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +call "%_MY_REPACK_DIR_X86%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_X86%" -a x86 -e "%_MY_OPT_EXTPACK%" ^ + -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-x86.cab" || goto end_failed +echo . +cd /d "%_MY_SAVED_CD%" +:skip_extpack_packing + +rem +rem GuestAdditions section +rem +if ".%_MY_PACK_ADDITIONS%" == ".0" goto skip_additions_packing + +rem +rem Do the packing of GuestAdditions +rem +echo ************************************************************************** +echo Packing AMD64 additions +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +call "%_MY_REPACK_DIR_AMD64%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_AMD64%" -a amd64 -x -n --no-main --ga ^ + -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-amd64.cab" || goto end_failed +echo . +echo ************************************************************************** +echo Packing X86 drivers +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +call "%_MY_REPACK_DIR_X86%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR_X86%" -a x86 -x -n --no-main --ga ^ + -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-x86.cab" || goto end_failed +echo . +cd /d "%_MY_SAVED_CD%" +:skip_additions_packing + +rem +rem Generate script for taking the next step. +rem +set _MY_NEXT_SCRIPT_SHORT_NAME=Combined-3-Repack.cmd +set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\%_MY_NEXT_SCRIPT_SHORT_NAME% +if ".%_MY_PACK_ADDITIONS%" == ".0" goto generate_legacy_script +set _MY_NEXT_SCRIPT_SHORT_NAME=Combined-3-RepackAdditions.cmd +set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\%_MY_NEXT_SCRIPT_SHORT_NAME% +echo cd /d "%cd%" > "%_MY_NEXT_SCRIPT%" +echo call "%_MY_SCRIPT_DIR%%_MY_NEXT_SCRIPT_SHORT_NAME%" ^ + --vboxall-untar-dir "%_MY_OPT_UNTAR_DIR%" ^ + --outdir "%_MY_OPT_OUTDIR%" ^ + --build-type "%_MY_OPT_BUILD_TYPE%" %%* >> "%_MY_NEXT_SCRIPT%" +goto show_next_steps +:generate_legacy_script +echo cd /d "%cd%" > "%_MY_NEXT_SCRIPT%" +echo call "%_MY_SCRIPT_DIR%%_MY_NEXT_SCRIPT_SHORT_NAME%" --extpack "%_MY_OPT_EXTPACK%" ^ + --extpack-enterprise "%_MY_OPT_EXTPACK_ENTERPRISE%" ^ + --vboxall-untar-dir "%_MY_OPT_UNTAR_DIR%" ^ + --outdir "%_MY_OPT_OUTDIR%" ^ + %_MY_OPT_SCRIPT_SKIPEXTPACK_PARAM% %_MY_OPT_SCRIPT_ADDITIONS_PARAM% ^ + --build-type "%_MY_OPT_BUILD_TYPE%" %%* >> "%_MY_NEXT_SCRIPT%" + +:show_next_steps +rem +rem Instructions on what to do next. +rem +echo ************************************************************************** +echo * First step is done. +echo * +echo * Created: +echo * %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-amd64.cab +echo * %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-x86.cab +echo * +echo * Next steps: +echo * 1. Submit the files to Microsoft for attestation signing. +echo * 2. Download the signed result. +echo * 3. "%_MY_NEXT_SCRIPT%" --signed-x86 {zip} --signed-amd64 {zip} %_MY_OPT_SCRIPT_SKIPEXTPACK_PARAM% %_MY_OPT_SCRIPT_ADDITIONAL_PARAMS% +goto end +:end_failed +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal + diff --git a/src/VBox/Installer/win/Scripts/Combined-3-Repack.cmd b/src/VBox/Installer/win/Scripts/Combined-3-Repack.cmd new file mode 100644 index 00000000..473a5d8c --- /dev/null +++ b/src/VBox/Installer/win/Scripts/Combined-3-Repack.cmd @@ -0,0 +1,338 @@ +@echo off +rem $Id: Combined-3-Repack.cmd $ +rem rem @file +rem Windows NT batch script for repacking signed amd64 and x86 drivers. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and checks for required enviornment variables. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) +set _MY_SCRIPT_DIR=%~dp0 +set _MY_SAVED_CD=%CD% +set _MY_VER_REV=@VBOX_VERSION_STRING@r@VBOX_SVN_REV@ + +rem +rem Parse arguments. +rem +set _MY_OPT_UNTAR_DIR=%_MY_SCRIPT_DIR%\..\..\..\ +for %%i in (%_MY_OPT_UNTAR_DIR%) do set _MY_OPT_UNTAR_DIR=%%~fi +set _MY_OPT_EXTPACK=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%.vbox-extpack +set _MY_OPT_EXTPACK_ENTERPRISE=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%-ENTERPRISE.vbox-extpack +set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@ +set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output +set _MY_OPT_SIGNED_AMD64= +set _MY_OPT_SIGNED_X86= + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-e" goto opt_e +if ".%1" == ".--extpack" goto opt_e +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--outdir" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--extpack-enterprise" goto opt_s +if ".%1" == ".--signed-amd64" goto opt_signed_amd64 +if ".%1" == ".--signed-x86" goto opt_signed_x86 +if ".%1" == ".-t" goto opt_t +if ".%1" == ".--build-type" goto opt_t +if ".%1" == ".-u" goto opt_u +if ".%1" == ".--vboxall-untar-dir" goto opt_u +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_e +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK=%~f2 +goto argument_loop_next_with_value + +:opt_h +echo Toplevel combined package: Repack the installer and extpacks. +echo . +echo Usage: Combined-3-Repack.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack] +echo [-s/--extpack-enterprise puel-enterprise.vbox-extpack] +echo [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type] +echo [--signed-amd64 signed-amd64.zip] +echo [--signed-x86 signed-x86.zip] +echo +echo . +echo Default -e/--extpack value: %_MY_OPT_EXTPACK% +echo Default -s/--extpack-enterprise value: %_MY_OPT_EXTPACK_ENTERPRISE% +echo Default -u/--vboxall-untar-dir value: %_MY_OPT_UNTAR_DIR% +echo Default -o/--outdir value: %_MY_OPT_OUTDIR% +echo Default -t/--build-type value: %_MY_OPT_BUILD_TYPE% +echo . +goto end_failed + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTDIR=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK_ENTERPRISE=%~f2 +goto argument_loop_next_with_value + +:opt_signed_amd64 +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SIGNED_AMD64=%~f2 +goto argument_loop_next_with_value + +:opt_signed_x86 +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SIGNED_X86=%~f2 +goto argument_loop_next_with_value + +:opt_t +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BUILD_TYPE=%~2 +goto argument_loop_next_with_value + +:opt_u +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_UNTAR_DIR=%~f2 +goto argument_loop_next_with_value + + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + + +:error_vboxall_untar_dir_not_found +echo syntax error: The VBoxAll untar directory was not found: "%_MY_OPT_UNTAR_DIR%" +goto end_failed + +:error_amd64_bindir_not_found +echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_AMD64%" +goto end_failed + +:error_x86_bindir_not_found +echo syntax error: The X86 bin directory was not found: "%_MY_BINDIR_X86%" +goto end_failed + +:error_amd64_repack_dir_not_found +echo syntax error: The AMD64 repack directory was not found: "%_MY_REPACK_DIR_AMD64%" +goto end_failed + +:error_x86_repack_dir_not_found +echo syntax error: The X86 repack directory was not found: "%_MY_REPACK_DIR_X86%" +goto end_failed + +:error_extpack_not_found +echo syntax error: Specified extension pack not found: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_enterprise_extpack_not_found +echo syntax error: Specified enterprise extension pack not found: "%_MY_OPT_EXTPACK_ENTERPRISE%" +goto end_failed + +:error_signed_amd64_not_found +echo syntax error: Zip with signed AMD64 drivers not found: "%_MY_OPT_SIGNED_AMD64%" +goto end_failed + +:error_signed_x86_not_found +echo syntax error: Zip with signed X86 drivers not found: "%_MY_OPT_SIGNED_X86%" +goto end_failed + + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem + +if not exist "%_MY_OPT_UNTAR_DIR%" goto error_vboxall_untar_dir_not_found + +set _MY_BINDIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\bin +set _MY_BINDIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\bin +if not exist "%_MY_BINDIR_AMD64%" goto error_amd64_bindir_not_found +if not exist "%_MY_BINDIR_X86%" goto error_x86_bindir_not_found + +set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repack +set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repack +if not exist "%_MY_REPACK_DIR_AMD64%" goto error_amd64_repack_dir_not_found +if not exist "%_MY_REPACK_DIR_X86%" goto error_x86_repack_dir_not_found + +if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_not_found +if not ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." if not exist "%_MY_OPT_EXTPACK_ENTERPRISE%" goto error_enterprise_extpack_not_found + +if not exist "%_MY_OPT_SIGNED_AMD64%" goto error_signed_amd64_not_found +if not exist "%_MY_OPT_SIGNED_X86%" goto error_signed_x86_not_found + +rem Make sure the output dir exists. +if not exist "%_MY_OPT_OUTDIR%" (mkdir "%_MY_OPT_OUTDIR%" || goto end_failed) + +rem +rem Unpacking the two driver zips. +rem +echo ************************************************************************** +echo * AMD64: Unpacking signed drivers... +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +call "%_MY_REPACK_DIR_AMD64%\UnpackBlessedDrivers.cmd" -n -b "%_MY_BINDIR_AMD64%" -i "%_MY_OPT_SIGNED_AMD64%" || goto end_failed +echo . + +echo ************************************************************************** +echo * X86: Unpacking signed drivers... +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +call "%_MY_REPACK_DIR_X86%\UnpackBlessedDrivers.cmd" -n -b "%_MY_BINDIR_X86%" -i "%_MY_OPT_SIGNED_X86%" || goto end_failed +echo . + + +rem +rem Do the AMD64 work. +rem +echo ************************************************************************** +echo * AMD64: Repackaging installers +echo ************************************************************************** +echo * AMD64: Compiling WIX... +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +for %%i in (1-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * AMD64: Linking WIX... +for %%i in (2-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * AMD64: Applying language patches to MSI... +for %%i in (3-*.cmd) do (call %%i || goto end_failed) +echo . + + +rem +rem Do the X86 work. +rem +echo ************************************************************************** +echo * X86: Repackaging installers +echo ************************************************************************** +echo * X86: Compiling WIX... +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +for %%i in (1-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * X86: Linking WIX... +for %%i in (2-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * X86: Applying language patches to MSI... +for %%i in (3-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * X86: Creating multi arch installer... +for %%i in (4-*.cmd) do (call %%i || goto end_failed) +echo . + +set _MY_OUT_FILES= +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +for %%i in (VBoxMerge*msm) do ( + copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +for %%i in (VBoxMerge*msm) do ( + copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +for %%i in (VirtualBox-*MultiArch*exe) do ( + copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) + + +rem +rem Repack the extension packs. +rem +echo ************************************************************************** +echo * Repacking extension packs. +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed + +echo * Regular PUEL... +set _MY_TMP_OUT=%_MY_OPT_EXTPACK% +for %%i in (%_MY_TMP_OUT%) do ( + set _MY_TMP_OUT=%_MY_OPT_OUTDIR%\%%~nxi + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +call "%_MY_REPACK_DIR_X86%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR_AMD64%" --bindir-x86 "%_MY_BINDIR_X86%" ^ + --input "%_MY_OPT_EXTPACK%" --output "%_MY_TMP_OUT%" || goto end_failed + +if ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." goto no_enterprise_repacking +echo * Enterprise PUEL... +set _MY_TMP_OUT=%_MY_OPT_EXTPACK_ENTERPRISE% +for %%i in (%_MY_TMP_OUT%) do ( + set _MY_TMP_OUT=%_MY_OPT_OUTDIR%\%%~nxi + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +call "%_MY_REPACK_DIR_X86%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR_AMD64%" --bindir-x86 "%_MY_BINDIR_X86%" ^ + --input "%_MY_OPT_EXTPACK_ENTERPRISE%" --output "%_MY_TMP_OUT%" || goto end_failed +:no_enterprise_repacking +@cd /d "%_MY_SAVED_CD%" + +rem +rem That's that. +rem +echo ************************************************************************** +echo * The third and final step is done. +echo * +echo * Successfully created: +for %%i in (%_MY_OUT_FILES%) do echo * "%_MY_OPT_OUTDIR%\%%i" +goto end + + +:end_failed +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal + + diff --git a/src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd b/src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd new file mode 100644 index 00000000..97060f44 --- /dev/null +++ b/src/VBox/Installer/win/Scripts/Combined-3-RepackAdditions.cmd @@ -0,0 +1,370 @@ +@echo off +rem $Id: Combined-3-RepackAdditions.cmd $ +rem rem @file +rem Windows NT batch script for repacking signed amd64 and x86 drivers. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and checks for required enviornment variables. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) +set _MY_SCRIPT_DIR=%~dp0 +set _MY_SAVED_CD=%CD% +set _MY_VER_REV=@VBOX_VERSION_STRING@r@VBOX_SVN_REV@ + +rem +rem Parse arguments. +rem +set _MY_OPT_UNTAR_DIR=%_MY_SCRIPT_DIR%\..\..\..\ +for %%i in (%_MY_OPT_UNTAR_DIR%) do set _MY_OPT_UNTAR_DIR=%%~fi +set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@ +set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output +set _MY_OPT_SRC_DIR=%_MY_SCRIPT_DIR%\resources\ + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--outdir" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--source" goto opt_s +if ".%1" == ".--signed-amd64" goto opt_signed_amd64 +if ".%1" == ".--signed-x86" goto opt_signed_x86 +if ".%1" == ".-t" goto opt_t +if ".%1" == ".--build-type" goto opt_t +if ".%1" == ".-u" goto opt_u +if ".%1" == ".--vboxall-untar-dir" goto opt_u +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_h +echo Toplevel combined package: Repack the guest additions. +echo . +echo Usage: Combined-3-RepackAdditions.cmd [-o output-dir] +echo [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type] +echo [--signed-amd64 signed-amd64.zip] +echo [--signed-x86 signed-x86.zip] +echo +echo . +echo Default -u/--vboxall-untar-dir value: %_MY_OPT_UNTAR_DIR% +echo Default -o/--outdir value: %_MY_OPT_OUTDIR% +echo Default -t/--build-type value: %_MY_OPT_BUILD_TYPE% +echo . +goto end_failed + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTDIR=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SRC_DIR=%~f2 +goto argument_loop_next_with_value + +:opt_signed_amd64 +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SIGNED_AMD64=%~f2 +goto argument_loop_next_with_value + +:opt_signed_x86 +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SIGNED_X86=%~f2 +goto argument_loop_next_with_value + +:opt_t +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BUILD_TYPE=%~2 +goto argument_loop_next_with_value + +:opt_u +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_UNTAR_DIR=%~f2 +goto argument_loop_next_with_value + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + +:error_vboxall_untar_dir_not_found +echo syntax error: The VBoxAll untar directory was not found: "%_MY_OPT_UNTAR_DIR%" +goto end_failed + +:error_amd64_bindir_not_found +echo syntax error: The AMD64 bin directory was not found: "%_MY_BINDIR_AMD64%" +goto end_failed + +:error_x86_bindir_not_found +echo syntax error: The X86 bin directory was not found: "%_MY_BINDIR_X86%" +goto end_failed + +:error_amd64_repack_dir_not_found +echo syntax error: The AMD64 repack directory was not found: "%_MY_REPACK_DIR_AMD64%" +goto end_failed + +:error_x86_repack_dir_not_found +echo syntax error: The X86 repack directory was not found: "%_MY_REPACK_DIR_X86%" +goto end_failed + +:error_extpack_not_found +echo syntax error: Specified extension pack not found: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_enterprise_extpack_not_found +echo syntax error: Specified enterprise extension pack not found: "%_MY_OPT_EXTPACK_ENTERPRISE%" +goto end_failed + +:error_signed_amd64_not_found +echo syntax error: Zip with signed AMD64 drivers not found: "%_MY_OPT_SIGNED_AMD64%" +goto end_failed + +:error_signed_x86_not_found +echo syntax error: Zip with signed X86 drivers not found: "%_MY_OPT_SIGNED_X86%" +goto end_failed + +:error_src_dir_not_found +echo syntax error: src directory not found: "%_MY_OPT_SRC_DIR%" +goto end_failed + + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem + +if not exist "%_MY_OPT_UNTAR_DIR%" goto error_vboxall_untar_dir_not_found + +set _MY_BINDIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\bin\additions +set _MY_BINDIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\bin\additions +if not exist "%_MY_BINDIR_AMD64%" goto error_amd64_bindir_not_found +if not exist "%_MY_BINDIR_X86%" goto error_x86_bindir_not_found + +set _MY_REPACK_DIR_AMD64=%_MY_OPT_UNTAR_DIR%\win.amd64\%_MY_OPT_BUILD_TYPE%\repackadd +set _MY_REPACK_DIR_X86=%_MY_OPT_UNTAR_DIR%\win.x86\%_MY_OPT_BUILD_TYPE%\repackadd +if not exist "%_MY_REPACK_DIR_AMD64%" goto error_amd64_repack_dir_not_found +if not exist "%_MY_REPACK_DIR_X86%" goto error_x86_repack_dir_not_found + +if not ".%_MY_OPT_SIGNED_AMD64%" == "." goto skip_set_default_amd64_signed +set _MY_OPT_SIGNED_AMD64="%_MY_OPT_OUTDIR%/VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-amd64.cab.Signed.zip" +:skip_set_default_amd64_signed + +if not ".%_MY_OPT_SIGNED_X86%" == "." goto skip_set_default_x86_signed +set _MY_OPT_SIGNED_X86="%_MY_OPT_OUTDIR%/VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-x86.cab.Signed.zip" +:skip_set_default_x86_signed + +if not exist "%_MY_OPT_SIGNED_AMD64%" goto error_signed_amd64_not_found +if not exist "%_MY_OPT_SIGNED_X86%" goto error_signed_x86_not_found + +rem Make sure the output dir exists. +if not exist "%_MY_OPT_OUTDIR%" (mkdir "%_MY_OPT_OUTDIR%" || goto end_failed) + +if not exist "%_MY_OPT_SRC_DIR%" goto error_src_dir_not_found + +rem +rem Unpacking the two driver zips. +rem +echo ************************************************************************** +echo * AMD64: Unpacking signed drivers... +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_AMD64%" || goto end_failed +call "%_MY_REPACK_DIR_AMD64%\UnpackBlessedDrivers.cmd" -n -b "%_MY_BINDIR_AMD64%" -i "%_MY_OPT_SIGNED_AMD64%" --guest-additions || goto end_failed +echo . + +echo ************************************************************************** +echo * X86: Unpacking signed drivers... +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR_X86%" || goto end_failed +call "%_MY_REPACK_DIR_X86%\UnpackBlessedDrivers.cmd" -n -b "%_MY_BINDIR_X86%" -i "%_MY_OPT_SIGNED_X86%" --guest-additions || goto end_failed +echo . + + +rem +rem Building amd64 installer +rem +echo ************************************************************************** +echo * Building amd64 installer +echo ************************************************************************** + +del %_MY_OPT_UNTAR_DIR%\win.amd64\release\bin\additions\VBoxWindowsAdditions-amd64.exe +cp %_MY_REPACK_DIR_AMD64%\..\obj\uninst.exe %_MY_REPACK_DIR_AMD64% + +rem TBD: that has to be converted to invoke auto-generated .cmd + +%KBUILD_BIN_PATH%\kmk_redirect.exe -C %_MY_OPT_SRC_DIR% ^ + -E "PATH_OUT=%_MY_REPACK_DIR_AMD64%\.." ^ + -E "PATH_TARGET=%_MY_REPACK_DIR_AMD64%" ^ + -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^ + -E "VBOX_PATH_ADDITIONS_WIN_X86=%_MY_REPACK_DIR_AMD64%\..\bin\additions" ^ + -E "VBOX_PATH_DIFX=%KBUILD_DEVTOOLS%\win.amd64\DIFx\v2.1-r3" ^ + -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VM VirtualBox" ^ + -E "VBOX_C_YEAR=@VBOX_C_YEAR@" -E "VBOX_VERSION_STRING=@VBOX_VERSION_STRING@" -E "VBOX_VERSION_STRING_RAW=@VBOX_VERSION_STRING_RAW@" ^ + -E "VBOX_VERSION_MAJOR=@VBOX_VERSION_MAJOR@" -E "VBOX_VERSION_MINOR=@VBOX_VERSION_MINOR@" -E "VBOX_VERSION_BUILD=@VBOX_VERSION_BUILD@" -E "VBOX_SVN_REV=@VBOX_SVN_REV@" ^ + -E "VBOX_WINDOWS_ADDITIONS_ICON_FILE=%_MY_OPT_SRC_DIR%\VirtualBoxGA-vista.ico" ^ + -E "VBOX_NSIS_ICON_FILE=%_MY_OPT_SRC_DIR%\VirtualBoxGA-nsis.ico" ^ + -E "VBOX_WITH_GUEST_INSTALL_HELPER=1" -E "VBOX_WITH_GUEST_INSTALLER_UNICODE=1" -E "VBOX_WITH_LICENSE_INSTALL_RTF=1" ^ + -E "VBOX_WITH_WDDM=1" -E "VBOX_WITH_MESA3D=1" -E "VBOX_BRAND_WIN_ADD_INST_DLGBMP=%_MY_OPT_SRC_DIR%\welcome.bmp" ^ + -E "VBOX_BRAND_LICENSE_RTF=%_MY_OPT_SRC_DIR%\License-gpl-3.0.rtf" -E "KBUILD_TYPE=%_MY_OPT_BUILD_TYPE%" -E "KBUILD_TARGET_ARCH=amd64" ^ + -- %KBUILD_DEVTOOLS%/win.x86/nsis/v3.04-log/makensis.exe /NOCD /V2 ^ + "/DVBOX_SIGN_ADDITIONS=1" ^ + "/DEXTERNAL_UNINSTALLER=1" ^ + "%_MY_OPT_SRC_DIR%\VBoxGuestAdditions.nsi" + +rem +rem Building amd64 installer +rem +echo ************************************************************************** +echo * Building x86 installer +echo ************************************************************************** + +del %_MY_OPT_UNTAR_DIR%\win.x86\release\bin\additions\VBoxWindowsAdditions-x86.exe +cp %_MY_REPACK_DIR_X86%\..\obj\uninst.exe %_MY_REPACK_DIR_X86%\ + +rem TBD: that has to be converted to invoke auto-generated .cmd + +%KBUILD_BIN_PATH%\kmk_redirect.exe -C %_MY_OPT_SRC_DIR% ^ + -E "PATH_OUT=%_MY_REPACK_DIR_X86%\.." ^ + -E "PATH_TARGET=%_MY_REPACK_DIR_X86%" ^ + -E "PATH_TARGET_X86=%_MY_REPACK_DIR_X86%\resources" ^ + -E "VBOX_PATH_ADDITIONS_WIN_X86=%_MY_REPACK_DIR_X86%\..\bin\additions" ^ + -E "VBOX_PATH_DIFX=%KBUILD_DEVTOOLS%\win.x86\DIFx\v2.1-r3" ^ + -E "VBOX_VENDOR=Oracle Corporation" -E "VBOX_VENDOR_SHORT=Oracle" -E "VBOX_PRODUCT=Oracle VM VirtualBox" ^ + -E "VBOX_C_YEAR=@VBOX_C_YEAR@" -E "VBOX_VERSION_STRING=@VBOX_VERSION_STRING@" -E "VBOX_VERSION_STRING_RAW=@VBOX_VERSION_STRING_RAW@" ^ + -E "VBOX_VERSION_MAJOR=@VBOX_VERSION_MAJOR@" -E "VBOX_VERSION_MINOR=@VBOX_VERSION_MINOR@" -E "VBOX_VERSION_BUILD=@VBOX_VERSION_BUILD@" -E "VBOX_SVN_REV=@VBOX_SVN_REV@" ^ + -E "VBOX_WINDOWS_ADDITIONS_ICON_FILE=%_MY_OPT_SRC_DIR%\VirtualBoxGA-vista.ico" ^ + -E "VBOX_NSIS_ICON_FILE=%_MY_OPT_SRC_DIR%\VirtualBoxGA-nsis.ico" ^ + -E "VBOX_WITH_GUEST_INSTALL_HELPER=1" -E "VBOX_WITH_GUEST_INSTALLER_UNICODE=1" -E "VBOX_WITH_LICENSE_INSTALL_RTF=1" ^ + -E "VBOX_WITH_WDDM=1" -E "VBOX_WITH_MESA3D=1" -E "VBOX_BRAND_WIN_ADD_INST_DLGBMP=%_MY_OPT_SRC_DIR%\welcome.bmp" ^ + -E "VBOX_BRAND_LICENSE_RTF=%_MY_OPT_SRC_DIR%\License-gpl-3.0.rtf" -E "KBUILD_TYPE=%_MY_OPT_BUILD_TYPE%" -E "KBUILD_TARGET_ARCH=x86" ^ + -- %KBUILD_DEVTOOLS%/win.x86/nsis/v3.04-log/makensis.exe /NOCD /V2 ^ + "/DVBOX_SIGN_ADDITIONS=1" ^ + "/DEXTERNAL_UNINSTALLER=1" ^ + "%_MY_OPT_SRC_DIR%\VBoxGuestAdditions.nsi" + +rem +rem Making .iso +rem +echo ************************************************************************** +echo * Making VBoxGuestAdditions.iso +echo ************************************************************************** + +del %_MY_OPT_OUTDIR%/VBoxGuestAdditions.iso + +rem TBD: that has to be converted to invoke auto-generated .cmd + +%_MY_SCRIPT_DIR%/../bin/bldRTIsoMaker.exe ^ + --output %_MY_OPT_OUTDIR%/VBoxGuestAdditions.iso ^ + --iso-level 3 ^ + --rock-ridge ^ + --joliet ^ + --rational-attribs ^ + --random-order-verification 2048 ^ + /cert/vbox-sha1.cer=%_MY_SCRIPT_DIR%/../bin/additions/vbox-sha1.cer ^ + /cert/vbox-sha256.cer=%_MY_SCRIPT_DIR%/../bin/additions/vbox-sha256.cer ^ + /windows11-bypass.reg=%_MY_SCRIPT_DIR%/../bin/additions/windows11-bypass.reg ^ + /VBoxWindowsAdditions-x86.exe=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxWindowsAdditions-x86.exe ^ + /VBoxWindowsAdditions.exe=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxWindowsAdditions.exe ^ + /AUTORUN.INF=%_MY_OPT_SRC_DIR%/AUTORUN.INF ^ + /cert/VBoxCertUtil.exe=%_MY_SCRIPT_DIR%/../bin/additions/VBoxCertUtil.exe ^ + /NT3x/Readme.txt=%_MY_OPT_SRC_DIR%/NT3xReadme.txt ^ + /NT3x/VBoxGuest.sys=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxGuest.sys ^ + /NT3x/VBoxGuest.cat=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxGuest.cat ^ + /NT3x/VBoxGuest.inf=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxGuest.inf ^ + /NT3x/VBoxMouseNT.sys=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxMouseNT.sys ^ + /NT3x/VBoxMouse.inf=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxMouse.inf ^ + /NT3x/VBoxMouse.cat=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxMouse.cat ^ + /NT3x/VBoxMouse.sys=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxMouse.sys ^ + /NT3x/VBoxControl.exe=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxControl.exe ^ + /NT3x/VBoxService.exe=%_MY_OPT_UNTAR_DIR%/win.x86/release/bin/additions/VBoxService.exe ^ + /VBoxWindowsAdditions-amd64.exe=%_MY_OPT_UNTAR_DIR%/win.amd64/release/bin/additions/VBoxWindowsAdditions-amd64.exe ^ + /VBoxSolarisAdditions.pkg=%_MY_OPT_UNTAR_DIR%/solaris.x86/release/bin/additions/VBoxSolarisAdditions.pkg ^ + /OS2/VBoxGuest.sys=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/VBoxGuest.sys ^ + /OS2/VBoxSF.ifs=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/VBoxSF.ifs ^ + /OS2/VBoxService.exe=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/VBoxService.exe ^ + /OS2/VBoxControl.exe=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/VBoxControl.exe ^ + /OS2/VBoxReplaceDll.exe=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/VBoxReplaceDll.exe ^ + /OS2/libc06.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc06.dll ^ + /OS2/libc061.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc061.dll ^ + /OS2/libc062.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc062.dll ^ + /OS2/libc063.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc063.dll ^ + /OS2/libc064.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc064.dll ^ + /OS2/libc065.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc065.dll ^ + /OS2/libc066.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/libc066.dll ^ + /OS2/readme.txt=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/readme.txt ^ + /OS2/gengradd.dll=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/gengradd.dll ^ + /OS2/vboxmouse.sys=%_MY_OPT_UNTAR_DIR%/os2.x86/release/bin/additions/vboxmouse.sys ^ + /VBoxLinuxAdditions.run=%_MY_OPT_UNTAR_DIR%/linux.x86/release/bin/additions/VBoxLinuxAdditions.run ^ + /runasroot.sh=%_MY_OPT_UNTAR_DIR%/linux.x86/release/bin/additions/runasroot.sh ^ + /autorun.sh=%_MY_OPT_UNTAR_DIR%/linux.x86/release/bin/additions/autorun.sh ^ + /VBoxDarwinAdditions.pkg=%_MY_OPT_UNTAR_DIR%/darwin.amd64/release/dist/additions/VBoxGuestAdditions.pkg ^ + /VBoxDarwinAdditionsUninstall.tool=%_MY_OPT_UNTAR_DIR%/darwin.amd64/release/dist/additions/VBoxDarwinAdditionsUninstall.tool ^ + --chmod a+x:/VBoxLinuxAdditions.run --chmod a+x:/runasroot.sh --chmod a+x:/autorun.sh --chmod a+x:/VBoxDarwinAdditionsUninstall.tool ^ + --volume-id="VBOXADDITIONS_@VBOX_VERSION_STRING@_@VBOX_SVN_REV@" ^ + --name-setup=joliet ^ + --volume-id="VBox_GAs_@VBOX_VERSION_STRING@" + +if not exist %_MY_OPT_OUTDIR%/VBoxGuestAdditions.iso goto end_failed +call set _MY_OUT_FILES=%%VBoxGuestAdditions.iso + +rem +rem That's that. +rem +echo ************************************************************************** +echo * The third and final step is done. +echo * +echo * Successfully created: +for %%i in (%_MY_OUT_FILES%) do echo * "%_MY_OPT_OUTDIR%\%%i" +goto end + + +:end_failed +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal diff --git a/src/VBox/Installer/win/Scripts/Makefile.kup b/src/VBox/Installer/win/Scripts/Makefile.kup new file mode 100644 index 00000000..e69de29b diff --git a/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd b/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd new file mode 100644 index 00000000..0b897e05 --- /dev/null +++ b/src/VBox/Installer/win/Scripts/PackDriversForSubmission.cmd @@ -0,0 +1,338 @@ +@echo off +rem $Id: PackDriversForSubmission.cmd $ +rem rem @file +rem Windows NT batch script for preparing for signing submission. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Parse arguments. +rem +set _MY_OPT_BINDIR=..\bin +set _MY_OPT_PDBDIR= +set _MY_OPT_GADIR= +set _MY_OPT_WITH_MAIN=1 +set _MY_OPT_WITH_PDB=1 +set _MY_OPT_EXTPACK= +set _MY_OPT_WITH_EXTPACK=1 +set _MY_OPT_WITH_GA=0 +set _MY_OPT_OUTPUT= +set _MY_OPT_DDF_FILE= +set _MY_OPT_ARCH=amd64 + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-a" goto opt_a +if ".%1" == ".--arch" goto opt_a +if ".%1" == ".-b" goto opt_b +if ".%1" == ".--bindir" goto opt_b +if ".%1" == ".-d" goto opt_d +if ".%1" == ".--ddf" goto opt_d +if ".%1" == ".-e" goto opt_e +if ".%1" == ".--extpack" goto opt_e +if ".%1" == ".--no-main" goto opt_m +if ".%1" == ".-n" goto opt_n +if ".%1" == ".--no-pdb" goto opt_n +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--output" goto opt_o +if ".%1" == ".-p" goto opt_p +if ".%1" == ".--pdb" goto opt_p +if ".%1" == ".-x" goto opt_x +if ".%1" == ".--no-extpack" goto opt_x +if ".%1" == ".-g" goto opt_g +if ".%1" == ".--ga" goto opt_g +if ".%1" == ".--additions" goto opt_g +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_a +if ".%~2" == "." goto syntax_error_missing_value +if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch +set _MY_OPT_ARCH=%~2 +goto argument_loop_next_with_value + +:opt_b +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BINDIR=%~2 +goto argument_loop_next_with_value + +:opt_d +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_DDF_FILE=%~2 +goto argument_loop_next_with_value + +:opt_e +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK=%~2 +goto argument_loop_next_with_value + +:opt_h +echo This script creates a .cab file containing all drivers needing blessing from +echo Microsoft to run on recent Windows 10 installations. +echo . +echo Usage: PackDriversForSubmission.cmd [-b bindir] [-p pdbdir] [--no-main] [-n/--no-pdb] [-e expack] +echo [-x/--no-extpack] [-g/--ga/--additions] [-o output.cab] [-p output.ddf] [-a x86/amd64] +echo . +echo Warning! This script should normally be invoked from the repack directory w/o any parameters. +goto end_failed + +:opt_m +set _MY_OPT_WITH_MAIN=0 +shift +goto argument_loop + +:opt_n +set _MY_OPT_WITH_PDB=0 +shift +goto argument_loop + +:opt_p +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_PDBDIR=%~2 +goto argument_loop_next_with_value + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTPUT=%~2 +goto argument_loop_next_with_value + +:opt_x +set _MY_OPT_WITH_EXTPACK=0 +shift +goto argument_loop + +:opt_g +set _MY_OPT_WITH_GA=1 +shift +goto argument_loop + + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + +:syntax_error_unknown_arch +echo syntax error: Unknown architecture: %2 +goto end_failed + +:error_bindir_does_not_exist +echo syntax error: Specified BIN directory does not exist: "%_MY_OPT_BINDIR%" +goto end_failed + +:error_pdbdir_does_not_exist +echo syntax error: Specified PDB directory does not exist: "%_MY_OPT_PDBDIR%" +goto end_failed + +:error_extpack_does_not_exist +echo syntax error: Specified extension pack does not exist: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_additions_does_not_exist +echo syntax error: Specified guest additions does not exist: "%_MY_OPT_GADIR%" +goto end_failed + + +:error_output_exists +echo error: The output file already exist: "%_MY_OPT_OUTPUT%" +goto end_failed + +:error_ddf_exists +echo error: The DDF file already exist: "%_MY_OPT_DDF_FILE%" +goto end_failed + +:no_more_arguments +rem validate specified options +if not exist "%_MY_OPT_BINDIR%" goto error_bindir_does_not_exist + +if "%_MY_OPT_WITH_PDB%" == "0" goto no_pdbdir_validation +if ".%_MY_OPT_PDBDIR%" == "." set _MY_OPT_PDBDIR=%_MY_OPT_BINDIR%\..\stage\debug\bin +if not exist "%_MY_OPT_PDBDIR%" goto error_pdbdir_does_not_exist +:no_pdbdir_validation + +if "%_MY_OPT_WITH_EXTPACK%" == "0" goto no_extpack_validation +if ".%_MY_OPT_EXTPACK%" == "." set _MY_OPT_EXTPACK=%_MY_OPT_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack +if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_does_not_exist +:no_extpack_validation + +if "%_MY_OPT_WITH_GA%" == "0" goto no_additions_validation +if ".%_MY_OPT_GADIR%" == "." set _MY_OPT_GADIR=%_MY_OPT_BINDIR%\additions +if not exist "%_MY_OPT_GADIR%" goto error_additions_does_not_exist +:no_additions_validation + +if ".%_MY_OPT_OUTPUT%" == "." set _MY_OPT_OUTPUT=VBoxDrivers-@VBOX_VERSION_STRING@r@VBOX_SVN_REV@-%_MY_OPT_ARCH%.cab +if exist "%_MY_OPT_OUTPUT%" goto error_output_exists + +if ".%_MY_OPT_DDF_FILE%" == "." set _MY_OPT_DDF_FILE=%_MY_OPT_OUTPUT%.ddf +if exist "%_MY_OPT_DDF_FILE%" goto error_ddf_exists + + +rem +rem Unpack the extension pack. +rem We unpack it into the bin directory in the usual location. +rem +rem Note! Modify the path a little to ensure windows utilities are used before +rem cygwin ones, and that we can use stuff from bin\tools if we like. +rem +set PATH=%SystemRoot%\System32;%PATH%;%_MY_OPT_BINDIR% +if "%_MY_OPT_WITH_EXTPACK%" == "0" goto no_extpack_unpack +set _MY_EXTPACK_DIR=%_MY_OPT_BINDIR%\ExtensionPacks\Oracle_VM_VirtualBox_Extension_Pack +if not exist "%_MY_OPT_BINDIR%\ExtensionPacks" ( mkdir "%_MY_OPT_BINDIR%\ExtensionPacks" || goto end_failed ) +if not exist "%_MY_EXTPACK_DIR%" ( mkdir "%_MY_EXTPACK_DIR%" || goto end_failed ) +"%_MY_OPT_BINDIR%\tools\RTTar.exe" -xzf "%_MY_OPT_EXTPACK%" -C "%_MY_EXTPACK_DIR%" || goto end_failed +:no_extpack_unpack + +rem +rem Create the DDF file for makecab. +rem +echo .OPTION EXPLICIT> "%_MY_OPT_DDF_FILE%" || goto end_failed +echo .Set CabinetFileCountThreshold=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set FolderFileCountThreshold=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set FolderSizeThreshold=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set MaxCabinetSize=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set MaxDiskFileCount=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set MaxDiskSize=0 >> "%_MY_OPT_DDF_FILE%" +echo .Set Cabinet=on>> "%_MY_OPT_DDF_FILE%" +echo .Set CompressionType=MSZIP>> "%_MY_OPT_DDF_FILE%" +echo .Set Compress=on>> "%_MY_OPT_DDF_FILE%" +echo .Set DiskDirectoryTemplate= >> "%_MY_OPT_DDF_FILE%" +echo .Set CabinetNameTemplate=%_MY_OPT_OUTPUT%>> "%_MY_OPT_DDF_FILE%" +echo .Set InfFileName=%_MY_OPT_OUTPUT%.inf>> "%_MY_OPT_DDF_FILE%" +echo .Set RptFileName=%_MY_OPT_OUTPUT%.rpt>> "%_MY_OPT_DDF_FILE%" + +if %_MY_OPT_WITH_MAIN% == 0 goto skip_main_package +echo .Set DestinationDir=VBoxSup>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxSup.inf VBoxSup.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxSup.sys VBoxSup.sys>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxSup.pdb VBoxSup.pdb>> "%_MY_OPT_DDF_FILE%" + +echo .Set DestinationDir=VBoxNetAdp6>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxNetAdp6.inf VBoxNetAdp6.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxNetAdp6.sys VBoxNetAdp6.sys>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxNetAdp6.pdb VBoxNetAdp6.pdb>> "%_MY_OPT_DDF_FILE%" + +echo .Set DestinationDir=VBoxNetLwf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxNetLwf.inf VBoxNetLwf.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxNetLwf.sys VBoxNetLwf.sys>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxNetLwf.pdb VBoxNetLwf.pdb>> "%_MY_OPT_DDF_FILE%" + +echo .Set DestinationDir=VBoxUSB>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxUSB.inf VBoxUSB.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxUSB.sys VBoxUSB.sys>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxUSB.pdb VBoxUSB.pdb>> "%_MY_OPT_DDF_FILE%" + +echo .Set DestinationDir=VBoxUSBMon>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxUSBMon.inf VBoxUSBMon.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxUSBMon.sys VBoxUSBMon.sys>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxUSBMon.pdb VBoxUSBMon.pdb>> "%_MY_OPT_DDF_FILE%" + +echo .Set DestinationDir=VMMR0>> "%_MY_OPT_DDF_FILE%" +echo .\VMMR0.inf VMMR0.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VMMR0.r0 VMMR0.r0>> "%_MY_OPT_DDF_FILE%" +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VMMR0.pdb VMMR0.pdb>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_BINDIR%\VBoxDDR0.r0 VBoxDDR0.r0>> "%_MY_OPT_DDF_FILE%" +:skip_main_package + +if "%_MY_OPT_WITH_PDB%" == "1" echo %_MY_OPT_PDBDIR%\VBoxDDR0.pdb VBoxDDR0.pdb>> "%_MY_OPT_DDF_FILE%" + +if "%_MY_OPT_WITH_EXTPACK%" == "0" goto no_extpack_ddf +echo .Set DestinationDir=VBoxExtPackPuel>> "%_MY_OPT_DDF_FILE%" +echo .\VBoxExtPackPuel.inf VBoxExtPackPuel.inf>> "%_MY_OPT_DDF_FILE%" +rem echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxEhciR0.r0 VBoxEhciR0.r0>> "%_MY_OPT_DDF_FILE%" +echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxNvmeR0.r0 VBoxNvmeR0.r0>> "%_MY_OPT_DDF_FILE%" +rem echo %_MY_EXTPACK_DIR%\win.%_MY_OPT_ARCH%\VBoxPciRawR0.r0 VBoxPciRawR0.r0>> "%_MY_OPT_DDF_FILE%" +:no_extpack_ddf + +if "%_MY_OPT_WITH_GA%" == "0" goto no_additions_ddf +echo .Set DestinationDir=VBoxGuestAdditions>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxGuest.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxGuest.sys>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxTray.exe>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxControl.exe>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxMouse.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxMouse.sys>> "%_MY_OPT_DDF_FILE%" +rem VBoxVideo files are excluded from attestation signing. +rem echo %_MY_OPT_GADIR%\VBoxVideo.inf>> "%_MY_OPT_DDF_FILE%" +rem echo %_MY_OPT_GADIR%\VBoxVideo.sys>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxWddm.inf>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxWddm.sys>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxDX.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxDisp.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxDispD3D.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxNine.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxSVGA.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxGL.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxMRXNP.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxSF.sys>> "%_MY_OPT_DDF_FILE%" +if ".%_MY_OPT_ARCH%" == ".x86" goto skip_amd64_files +echo %_MY_OPT_GADIR%\VBoxDX-x86.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxDispD3D-x86.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxNine-x86.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxSVGA-x86.dll>> "%_MY_OPT_DDF_FILE%" +echo %_MY_OPT_GADIR%\VBoxGL-x86.dll>> "%_MY_OPT_DDF_FILE%" +:skip_amd64_files + +:no_additions_ddf + +rem +rem Create the cabient file. +rem Note! MakeCab is shipped on W10, so we ASSUME it's in the PATH. +rem +MakeCab.exe /v2 /F "%_MY_OPT_DDF_FILE%" || goto end_failed + +rem +rem EV sign the cabient file. +rem +if not exist "sign-ev.cmd" goto end +echo info: Now signing the created CAB file. Can take a few minutes... +call sign-ev.cmd "%_MY_OPT_OUTPUT%" || goto end_failed + +goto end + +:end_failed +@endlocal +@endlocal +@exit /b 1 + +:end +@endlocal +@endlocal diff --git a/src/VBox/Installer/win/Scripts/RepackExtPack.cmd b/src/VBox/Installer/win/Scripts/RepackExtPack.cmd new file mode 100644 index 00000000..6e4d0a0f --- /dev/null +++ b/src/VBox/Installer/win/Scripts/RepackExtPack.cmd @@ -0,0 +1,240 @@ +@echo off +rem $Id: RepackExtPack.cmd $ +rem rem @file +rem Windows NT batch script for repacking an extension pack with blessed .r0 files. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Check for environment variables we need. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +rem if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) + +rem +rem Parse arguments. +rem +set _MY_OPT_BINDIR_X86=..\..\..\win.x86\@KBUILD_TYPE@\bin +set _MY_OPT_BINDIR_AMD64=..\..\..\win.amd64\@KBUILD_TYPE@\bin +set _MY_OPT_INPUT= +set _MY_OPT_OUTPUT= +set _MY_OPT_STAGE_DIR=.\repack-extpack-%RANDOM% +for %%i in (%_MY_OPT_STAGE_DIR%) do set _MY_OPT_STAGE_DIR=%%~fi +set _MY_OPT_SIGN_CAT=1 + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-a" goto opt_a +if ".%1" == ".--bindir-amd64" goto opt_a +if ".%1" == ".-b" goto opt_b +if ".%1" == ".--bindir-x86" goto opt_b +if ".%1" == ".-i" goto opt_i +if ".%1" == ".--input" goto opt_i +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--output" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--stage-dir" goto opt_s +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_a +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BINDIR_AMD64=%~f2 +goto argument_loop_next_with_value + +:opt_b +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BINDIR_X86=%~f2 +goto argument_loop_next_with_value + +:opt_h +echo This script repacks an extension pack replacing windows .r0 files with +echo blessed copies from the bin directory. The ASSUMPTION here is that prior +echo to invoking this script, the UnpackBlessedDrivers.cmd script was executed +echo both for win.amd64 and win.x86. +echo . +echo Usage: RepackExtPack.cmd [-b bindir-x86] [-a bindir-amd64] [-s staging-dir] +echo -i input.vbox-extpack -o output.vbox-extpack +echo . +echo Warning! This script should normally be invoked from the win.x86 repack directory. +goto end_failed + +:opt_i +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_INPUT=%~f2 +goto argument_loop_next_with_value + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTPUT=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_STAGE_DIR=%~f2 +goto argument_loop_next_with_value + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + +:error_bindir_amd64_does_not_exist +echo syntax error: Specified AMD64 BIN directory does not exist: "%_MY_OPT_BINDIR_AMD64%" +goto end_failed + +:error_bindir_x86_does_not_exist +echo syntax error: Specified x86 BIN directory does not exist: "%_MY_OPT_BINDIR_X86%" +goto end_failed + +:error_input_not_found +echo error: Input file does not exist: "%_MY_OPT_INPUT%" +goto end_failed + +:error_stage_dir_exists +echo error: Temporary staging directory exists: "%_MY_OPT_STAGE_DIR%" +goto end_failed + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem +if not exist "%_MY_OPT_BINDIR_X86%" goto error_bindir_x86_does_not_exist +if not exist "%_MY_OPT_BINDIR_AMD64%" goto error_bindir_amd64_does_not_exist + +if ".%_MY_OPT_INPUT%" == "." set _MY_OPT_INPUT=%_MY_OPT_BINDIR_X86%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack +if not exist "%_MY_OPT_INPUT%" goto error_input_not_found + +if ".%_MY_OPT_OUTPUT%" == "." for %%i in ("%_MY_OPT_INPUT%") do set _MY_OPT_OUTPUT=.\%%~nxi + +rem Make _MY_OPT_STAGE_DIR absolute. +if exist "%_MY_OPT_STAGE_DIR%" goto error_stage_dir_exists + +rem +rem Modify PATH to facilitate using our zip, gzip and manifest tools +rem +rem TODO: Use RTTar for creation too. +rem TODO: Not sure how well the bsdtar output actually work with 5.1... +rem TODO: Check whether we need stupid cygwin to get the right execute bits (x) on unix. +rem +set PATH=%PATH%;%_MY_OPT_BINDIR_AMD64% +set _MY_TOOL_TAR_EXPAND="%_MY_OPT_BINDIR_AMD64%\tools\RTTar.exe" -x +set _MY_TOOL_TAR_CREATE="%KBUILD_DEVTOOLS%\win.x86\gnuwin32\r1\bin\bsdtar.exe" -c --format ustar +set _MY_TOOL_GZIP=%_MY_OPT_BINDIR_AMD64%\tools\RTGzip.exe +set _MY_TOOL_MANIFEST=%_MY_OPT_BINDIR_AMD64%\tools\RTManifest.exe + +rem +rem Unpack the extension pack. +rem +echo * Unpacking "%_MY_OPT_INPUT" to "%_MY_OPT_STAGE_DIR%"... +mkdir "%_MY_OPT_STAGE_DIR%" || goto end_failed +%_MY_TOOL_TAR_EXPAND% -vzf "%_MY_OPT_INPUT%" -C "%_MY_OPT_STAGE_DIR%" || goto end_failed_cleanup + +rem +rem Copy over the blessed .r0 files. +rem +echo * Copying over blessed .r0 binaries... +if not exist "%_MY_OPT_STAGE_DIR%\win.x86" goto no_win_x86 +for %%i in ("%_MY_OPT_STAGE_DIR%\win.x86\*.r0") do ( + echo -=- %%i + copy /y "%_MY_OPT_BINDIR_X86%\%%~nxi" "%_MY_OPT_STAGE_DIR%\win.x86" || goto end_failed_cleanup +) +:no_win_x86 + +for %%i in ("%_MY_OPT_STAGE_DIR%\win.amd64\*.r0") do ( + echo -=- %%i + copy /y "%_MY_OPT_BINDIR_AMD64%\%%~nxi" "%_MY_OPT_STAGE_DIR%\win.amd64" || goto end_failed_cleanup +) + +rem +rem Recreate the manifest. +rem +echo * Collecting files for manifest... +set _MY_MANIFEST_FILES= +for /D %%d in ("%_MY_OPT_STAGE_DIR%\*") do ( + for %%f in ("%%d\*") do call set _MY_MANIFEST_FILES=%%_MY_MANIFEST_FILES%% %%~nxd/%%~nxf +) +for %%f in ("%_MY_OPT_STAGE_DIR%\*") do ( + if not "%%~nxf" == "ExtPack.manifest" if not "%%~nxf" == "ExtPack.signature" call set _MY_MANIFEST_FILES=%%_MY_MANIFEST_FILES%% %%~nxf +) +rem echo _MY_MANIFEST_FILES=%_MY_MANIFEST_FILES% + +echo * Creating manifest... +echo on +"%_MY_TOOL_MANIFEST%" --manifest "%_MY_OPT_STAGE_DIR%\ExtPack.manifest" --chdir "%_MY_OPT_STAGE_DIR%" %_MY_MANIFEST_FILES% || goto end_failed_cleanup +@echo off + +rem +rem Repackage the damn thing. +rem +@echo * Packing extension pack... + +echo on +%_MY_TOOL_TAR_CREATE% -vf "%_MY_OPT_OUTPUT%.tmp" -C "%_MY_OPT_STAGE_DIR%" . || goto end_failed_cleanup +"%_MY_TOOL_GZIP%" -9 -n "%_MY_OPT_OUTPUT%.tmp" || goto end_failed_cleanup +move /Y "%_MY_OPT_OUTPUT%.tmp.gz" "%_MY_OPT_OUTPUT%" || goto end_failed_cleanup +echo off + +rem +rem Cleanup and we're good. +rem +echo * Cleaning up... +rmdir /s /q "%_MY_OPT_STAGE_DIR%" + +echo * Successfully created: "%_MY_OPT_OUTPUT% +goto end + +:end_failed_cleanup +@rmdir /s /q "%_MY_OPT_STAGE_DIR%" +@if exist "%_MY_OPT_OUTPUT%.tmp" del "%_MY_OPT_OUTPUT%.tmp" +@if exist "%_MY_OPT_OUTPUT%.tmp.gz" del "%_MY_OPT_OUTPUT%.tmp.gz" + +:end_failed +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@endlocal +@endlocal + diff --git a/src/VBox/Installer/win/Scripts/Single-1-Prepare.cmd b/src/VBox/Installer/win/Scripts/Single-1-Prepare.cmd new file mode 100644 index 00000000..652f8547 --- /dev/null +++ b/src/VBox/Installer/win/Scripts/Single-1-Prepare.cmd @@ -0,0 +1,248 @@ +@echo off +rem $Id: Single-1-Prepare.cmd $ +rem rem @file +rem Windows NT batch script for preparing single build (either amd64 and x86) for signing submission. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and checks for required enviornment variables. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) +set _MY_SCRIPT_DIR=%~dp0 +set _MY_SAVED_CD=%CD% +set _MY_VER_REV=@VBOX_VERSION_STRING@r@VBOX_SVN_REV@ + +rem +rem Parse arguments. +rem +set _MY_OPT_UNTAR_DIR=%_MY_SCRIPT_DIR%\..\ +for %%i in (%_MY_OPT_UNTAR_DIR%) do set _MY_OPT_UNTAR_DIR=%%~fi +set _MY_OPT_EXTPACK=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%.vbox-extpack +set _MY_OPT_EXTPACK_ENTERPRISE=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%-ENTERPRISE.vbox-extpack +set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@ +set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output +set _MY_OPT_ARCH=@KBUILD_TARGET_ARCH@ + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-a" goto opt_a +if ".%1" == ".--arch" goto opt_a +if ".%1" == ".-e" goto opt_e +if ".%1" == ".--extpack" goto opt_e +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--outdir" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--extpack-enterprise" goto opt_s +if ".%1" == ".-t" goto opt_t +if ".%1" == ".--build-type" goto opt_t +if ".%1" == ".-u" goto opt_u +if ".%1" == ".--vboxall-untar-dir" goto opt_u +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_a +if ".%~2" == "." goto syntax_error_missing_value +if not "%2" == "x86" if not "%2" == "amd64" goto syntax_error_unknown_arch +set _MY_OPT_ARCH=%~2 +goto argument_loop_next_with_value + +:opt_e +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK=%~f2 +goto argument_loop_next_with_value + +:opt_h +echo Toplevel single package: Prepare either x86 and amd64 for submission. +echo . +echo Usage: Single-1-Prepare.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack] +echo [-s/--extpack-enterprise puel-enterprise.vbox-extpack] +echo [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type] +echo [-a x86/amd64] +echo . +echo Default -a/--arch value: %_MY_OPT_ARCH% +echo Default -e/--extpack value: %_MY_OPT_EXTPACK% +echo Default -s/--extpack-enterprise value: %_MY_OPT_EXTPACK_ENTERPRISE% +echo Default -u/--vboxall-untar-dir value: %_MY_OPT_UNTAR_DIR% +echo Default -o/--outdir value: %_MY_OPT_OUTDIR% +echo Default -t/--build-type value: %_MY_OPT_BUILD_TYPE% +echo . +goto end_failed + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTDIR=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK_ENTERPRISE=%~f2 +goto argument_loop_next_with_value + +:opt_t +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BUILD_TYPE=%~2 +goto argument_loop_next_with_value + +:opt_u +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_UNTAR_DIR=%~f2 +goto argument_loop_next_with_value + + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + +:syntax_error_unknown_arch +echo syntax error: Unknown architecture: %2 +goto end_failed + + +:error_vboxall_untar_dir_not_found +echo syntax error: The VBoxAll untar directory was not found: "%_MY_OPT_UNTAR_DIR%" +goto end_failed + +:error_bindir_not_found +echo syntax error: The bin directory was not found: "%_MY_BINDIR%" +goto end_failed + +:error_repack_dir_not_found +echo syntax error: The repack directory was not found: "%_MY_REPACK_DIR%" +goto end_failed + +:error_extpack_not_found +echo syntax error: Specified extension pack not found: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_enterprise_extpack_not_found +echo syntax error: Specified enterprise extension pack not found: "%_MY_OPT_EXTPACK_ENTERPRISE%" +goto end_failed + + + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem + +if not exist "%_MY_OPT_UNTAR_DIR%" goto error_vboxall_untar_dir_not_found + +set _MY_BINDIR=%_MY_OPT_UNTAR_DIR%\bin +if not exist "%_MY_BINDIR%" goto error_bindir_not_found + +set _MY_REPACK_DIR=%_MY_OPT_UNTAR_DIR%\repack +if not exist "%_MY_REPACK_DIR%" goto error_repack_dir_not_found + +if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_not_found +if not ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." if not exist "%_MY_OPT_EXTPACK_ENTERPRISE%" goto error_enterprise_extpack_not_found + + +rem Make sure the output dir exists. +if not exist "%_MY_OPT_OUTDIR%" (mkdir "%_MY_OPT_OUTDIR%" || goto end_failed) + +rem +rem Install the extpack in the bin directories. +rem Note! Not really necessary, but whatever. +rem +echo on +copy /y "%_MY_OPT_EXTPACK%" "%_MY_BINDIR%\Oracle_VM_VirtualBox_Extension_Pack.vbox-extpack" || goto end_failed +@echo off + +rem +rem Do the packing. +rem +echo ************************************************************************** +echo Packing drivers +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR%" || goto end_failed +call "%_MY_REPACK_DIR%\PackDriversForSubmission.cmd" -b "%_MY_BINDIR%" -a %_MY_OPT_ARCH% -e "%_MY_OPT_EXTPACK%" ^ + -o "%_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-%_MY_OPT_ARCH%.cab" || goto end_failed +echo . +cd /d "%_MY_SAVED_CD%" + +rem +rem Generate script for taking the next step. +rem +set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\Single-3-Repack.cmd +rem If out dir is the same as repack dir this would erase original repack script +if not exist "%_MY_NEXT_SCRIPT%" goto generate_next_script +set _MY_NEXT_SCRIPT=%_MY_OPT_OUTDIR%\Single-3-Repack-Gen.cmd +:generate_next_script +echo cd /d "%cd%" > "%_MY_NEXT_SCRIPT%" +echo call "%_MY_SCRIPT_DIR%\Single-3-Repack.cmd" --extpack "%_MY_OPT_EXTPACK%" ^ + --extpack-enterprise "%_MY_OPT_EXTPACK_ENTERPRISE%" ^ + --vboxall-untar-dir "%_MY_OPT_UNTAR_DIR%" ^ + --outdir "%_MY_OPT_OUTDIR%" ^ + --build-type "%_MY_OPT_BUILD_TYPE%" %%* >> "%_MY_NEXT_SCRIPT%" + +rem +rem Instructions on what to do next. +rem +echo ************************************************************************** +echo * First step is done. +echo * +echo * Created: +echo * %_MY_OPT_OUTDIR%\VBoxDrivers-%_MY_VER_REV%-%_MY_OPT_ARCH%.cab +echo * +echo * Next steps: +echo * 1. Submit the files to Microsoft for attestation signing. +echo * 2. Download the signed result. +echo * 3. "%_MY_NEXT_SCRIPT%" --signed {zip} + +goto end + + +:end_failed +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal + diff --git a/src/VBox/Installer/win/Scripts/Single-3-Repack.cmd b/src/VBox/Installer/win/Scripts/Single-3-Repack.cmd new file mode 100644 index 00000000..5646292e --- /dev/null +++ b/src/VBox/Installer/win/Scripts/Single-3-Repack.cmd @@ -0,0 +1,282 @@ +@echo off +rem $Id: Single-3-Repack.cmd $ +rem rem @file +rem Windows NT batch script for repacking signed amd64 or x86 drivers. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and checks for required enviornment variables. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +if ".%KBUILD_BIN_PATH%" == "." (echo KBUILD_BIN_PATH is not set & goto end_failed) +set _MY_SCRIPT_DIR=%~dp0 +set _MY_SAVED_CD=%CD% +set _MY_VER_REV=@VBOX_VERSION_STRING@r@VBOX_SVN_REV@ + +rem +rem Parse arguments. +rem +set _MY_OPT_UNTAR_DIR=%_MY_SCRIPT_DIR%\..\ +for %%i in (%_MY_OPT_UNTAR_DIR%) do set _MY_OPT_UNTAR_DIR=%%~fi +set _MY_OPT_EXTPACK=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%.vbox-extpack +set _MY_OPT_EXTPACK_ENTERPRISE=%_MY_OPT_UNTAR_DIR%\Oracle_VM_VirtualBox_Extension_Pack-%_MY_VER_REV%-ENTERPRISE.vbox-extpack +set _MY_OPT_BUILD_TYPE=@KBUILD_TYPE@ +set _MY_OPT_OUTDIR=%_MY_OPT_UNTAR_DIR%\output +set _MY_OPT_SIGNED= + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-e" goto opt_e +if ".%1" == ".--extpack" goto opt_e +if ".%1" == ".-o" goto opt_o +if ".%1" == ".--outdir" goto opt_o +if ".%1" == ".-s" goto opt_s +if ".%1" == ".--extpack-enterprise" goto opt_s +if ".%1" == ".--signed" goto opt_signed +if ".%1" == ".-t" goto opt_t +if ".%1" == ".--build-type" goto opt_t +if ".%1" == ".-u" goto opt_u +if ".%1" == ".--vboxall-untar-dir" goto opt_u +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_e +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK=%~f2 +goto argument_loop_next_with_value + +:opt_h +echo Toplevel combined package: Repack the installer and extpacks. +echo . +echo Usage: Combined-3-Repack.cmd [-o output-dir] [-e/--extpack puel.vbox-extpack] +echo [-s/--extpack-enterprise puel-enterprise.vbox-extpack] +echo [-u/--vboxall-dir unpacked-vboxall-dir] [-t build-type] +echo [--signed signed.zip] +echo +echo . +echo Default -e/--extpack value: %_MY_OPT_EXTPACK% +echo Default -s/--extpack-enterprise value: %_MY_OPT_EXTPACK_ENTERPRISE% +echo Default -u/--vboxall-untar-dir value: %_MY_OPT_UNTAR_DIR% +echo Default -o/--outdir value: %_MY_OPT_OUTDIR% +echo Default -t/--build-type value: %_MY_OPT_BUILD_TYPE% +echo . +goto end_failed + +:opt_o +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_OUTDIR=%~f2 +goto argument_loop_next_with_value + +:opt_s +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_EXTPACK_ENTERPRISE=%~f2 +goto argument_loop_next_with_value + +:opt_signed +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_SIGNED=%~f2 +goto argument_loop_next_with_value + +:opt_t +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BUILD_TYPE=%~2 +goto argument_loop_next_with_value + +:opt_u +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_UNTAR_DIR=%~f2 +goto argument_loop_next_with_value + + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + + +:error_vboxall_untar_dir_not_found +echo syntax error: The VBoxAll untar directory was not found: "%_MY_OPT_UNTAR_DIR%" +goto end_failed + +:error_bindir_not_found +echo syntax error: The bin directory was not found: "%_MY_BINDIR%" +goto end_failed + +:error_repack_dir_not_found +echo syntax error: The repack directory was not found: "%_MY_REPACK_DIR%" +goto end_failed + +:error_extpack_not_found +echo syntax error: Specified extension pack not found: "%_MY_OPT_EXTPACK%" +goto end_failed + +:error_enterprise_extpack_not_found +echo syntax error: Specified enterprise extension pack not found: "%_MY_OPT_EXTPACK_ENTERPRISE%" +goto end_failed + +:error_signed_not_found +echo syntax error: Zip with signed drivers not found: "%_MY_OPT_SIGNED%" +goto end_failed + + +:no_more_arguments +rem +rem Validate and adjust specified options. +rem + +if not exist "%_MY_OPT_UNTAR_DIR%" goto error_vboxall_untar_dir_not_found + +set _MY_BINDIR=%_MY_OPT_UNTAR_DIR%\bin +if not exist "%_MY_BINDIR%" goto error_bindir_not_found + +set _MY_REPACK_DIR=%_MY_OPT_UNTAR_DIR%\repack +if not exist "%_MY_REPACK_DIR%" goto error_repack_dir_not_found + +if not exist "%_MY_OPT_EXTPACK%" goto error_extpack_not_found +if not ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." if not exist "%_MY_OPT_EXTPACK_ENTERPRISE%" goto error_enterprise_extpack_not_found + +if not exist "%_MY_OPT_SIGNED%" goto error_signed_not_found + +rem Make sure the output dir exists. +if not exist "%_MY_OPT_OUTDIR%" (mkdir "%_MY_OPT_OUTDIR%" || goto end_failed) + +rem +rem Unpacking the driver zip. +rem +echo ************************************************************************** +echo * Unpacking signed drivers... +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR%" || goto end_failed +call "%_MY_REPACK_DIR%\UnpackBlessedDrivers.cmd" -n -b "%_MY_BINDIR%" -i "%_MY_OPT_SIGNED%" || goto end_failed +echo . + + +rem +rem Do the work. +rem +echo ************************************************************************** +echo * Repackaging installers +echo ************************************************************************** +echo * Compiling WIX... +cd /d "%_MY_REPACK_DIR%" || goto end_failed +for %%i in (1-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * Linking WIX... +for %%i in (2-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * Applying language patches to MSI... +for %%i in (3-*.cmd) do (call %%i || goto end_failed) +echo . + +echo * Creating multi arch installer... +for %%i in (4-*.cmd) do (call %%i || goto end_failed) +echo . + + +set _MY_OUT_FILES= +cd /d "%_MY_REPACK_DIR%" || goto end_failed +for %%i in (VBoxMerge*msm) do ( + copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +for %%i in (VirtualBox-*MultiArch*exe) do ( + copy /y "%%i" "%_MY_OPT_OUTDIR%" || goto end_failed + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) + + +rem +rem Repack the extension packs. +rem +echo ************************************************************************** +echo * Repacking extension packs. +echo ************************************************************************** +cd /d "%_MY_REPACK_DIR%" || goto end_failed + +echo * Regular PUEL... +set _MY_TMP_OUT=%_MY_OPT_EXTPACK% +for %%i in (%_MY_TMP_OUT%) do ( + set _MY_TMP_OUT=%_MY_OPT_OUTDIR%\%%~nxi + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +call "%_MY_REPACK_DIR%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR%" --bindir-x86 "%_MY_BINDIR%" ^ + --input "%_MY_OPT_EXTPACK%" --output "%_MY_TMP_OUT%" || goto end_failed + +if ".%_MY_OPT_EXTPACK_ENTERPRISE%" == "." goto no_enterprise_repacking +echo * Enterprise PUEL... +set _MY_TMP_OUT=%_MY_OPT_EXTPACK_ENTERPRISE% +for %%i in (%_MY_TMP_OUT%) do ( + set _MY_TMP_OUT=%_MY_OPT_OUTDIR%\%%~nxi + call set _MY_OUT_FILES=%%_MY_OUT_FILES%% %%~nxi +) +call "%_MY_REPACK_DIR%\RepackExtPack.cmd" --bindir-amd64 "%_MY_BINDIR%" --bindir-x86 "%_MY_BINDIR%" ^ + --input "%_MY_OPT_EXTPACK_ENTERPRISE%" --output "%_MY_TMP_OUT%" || goto end_failed +:no_enterprise_repacking +@cd /d "%_MY_SAVED_CD%" + +rem +rem That's that. +rem +echo ************************************************************************** +echo * The third and final step is done. +echo * +echo * Successfully created: +for %%i in (%_MY_OUT_FILES%) do echo * "%_MY_OPT_OUTDIR%\%%i" +goto end + + +:end_failed +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal +@echo * Failed! +@exit /b 1 + +:end +@cd /d "%_MY_SAVED_CD%" +@endlocal +@endlocal + + diff --git a/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd b/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd new file mode 100644 index 00000000..1e60159f --- /dev/null +++ b/src/VBox/Installer/win/Scripts/UnpackBlessedDrivers.cmd @@ -0,0 +1,185 @@ +@echo off +rem $Id: UnpackBlessedDrivers.cmd $ +rem rem @file +rem Windows NT batch script for unpacking drivers after being signed. +rem + +rem +rem Copyright (C) 2018-2022 Oracle and/or its affiliates. +rem +rem This file is part of VirtualBox base platform packages, as +rem available from https://www.virtualbox.org. +rem +rem This program is free software; you can redistribute it and/or +rem modify it under the terms of the GNU General Public License +rem as published by the Free Software Foundation, in version 3 of the +rem License. +rem +rem This program is distributed in the hope that it will be useful, but +rem WITHOUT ANY WARRANTY; without even the implied warranty of +rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +rem General Public License for more details. +rem +rem You should have received a copy of the GNU General Public License +rem along with this program; if not, see . +rem +rem SPDX-License-Identifier: GPL-3.0-only +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem Globals and Check for environment variables we need. +rem +if ".%KBUILD_DEVTOOLS%" == "." (echo KBUILD_DEVTOOLS is not set & goto end_failed) +set _MY_DRIVER_BASE_NAMES=VBoxSup VBoxNetAdp6 VBoxNetLwf VBoxUSB VBoxUSBMon +set _MY_GUEST_ADDITIONS_DRIVER_BASE_NAMES=VBoxVideo VBoxWddm VBoxGuest VBoxMouse +set _MY_UNZIP=%KBUILD_DEVTOOLS%\win.x86\bin\unzip.exe +if not exist "%_MY_UNZIP%" (echo "%_MY_UNZIP%" does not exist & goto end_failed) + +rem +rem Parse arguments. +rem +set _MY_OPT_BINDIR=..\bin +set _MY_OPT_INPUT= +set _MY_OPT_SIGN_CAT=1 +set _MY_OPT_SIGN_VERIFY=1 + +:argument_loop +if ".%1" == "." goto no_more_arguments + +if ".%1" == ".-h" goto opt_h +if ".%1" == ".-?" goto opt_h +if ".%1" == "./h" goto opt_h +if ".%1" == "./H" goto opt_h +if ".%1" == "./?" goto opt_h +if ".%1" == ".-help" goto opt_h +if ".%1" == ".--help" goto opt_h + +if ".%1" == ".-b" goto opt_b +if ".%1" == ".--bindir" goto opt_b +if ".%1" == ".-i" goto opt_i +if ".%1" == ".--input" goto opt_i +if ".%1" == ".-n" goto opt_n +if ".%1" == ".--no-sign-cat" goto opt_n +if ".%1" == ".-v" goto opt_v +if ".%1" == ".--no-sign-verify" goto opt_v +if ".%1" == ".--guest-additions" goto opt_ga + +echo syntax error: Unknown option: %1 +echo Try --help to list valid options. +goto end_failed + +:argument_loop_next_with_value +shift +shift +goto argument_loop + +:opt_b +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_BINDIR=%~2 +goto argument_loop_next_with_value + +:opt_h +echo This script unpacks the zip-file containing the blessed driver files from +echo Microsoft, replacing original files in the bin directory. The catalog files +echo will be signed again and the Microsoft signature merged with ours. +echo . +echo Usage: UnpackBlessedDrivers.cmd [-b bindir] [-n/--no-sign-cat] [-v/--no-sign-verify] -i input.zip +echo . +echo Warning! This script should normally be invoked from the repack directory +goto end_failed + +:opt_i +if ".%~2" == "." goto syntax_error_missing_value +set _MY_OPT_INPUT=%~2 +goto argument_loop_next_with_value + +:opt_n +set _MY_OPT_SIGN_CAT=0 +shift +goto argument_loop + +:opt_v +set _MY_OPT_SIGN_VERIFY=0 +shift +goto argument_loop + +:opt_ga +set _MY_DRIVER_BASE_NAMES=%_MY_GUEST_ADDITIONS_DRIVER_BASE_NAMES% +shift +goto argument_loop + +:syntax_error_missing_value +echo syntax error: missing or empty option value after %1 +goto end_failed + +:error_bindir_does_not_exist +echo syntax error: Specified BIN directory does not exist: "%_MY_OPT_BINDIR%" +goto end_failed + +:error_input_not_found +echo error: Input file does not exist: "%_MY_OPT_INPUT%" +goto end_failed + +:no_more_arguments +rem validate specified options +if not exist "%_MY_OPT_BINDIR%" goto error_bindir_does_not_exist + +rem figure defaults here: if ".%_MY_OPT_INPUT%" == "." if exist "%_MY_OPT_BINDIR%\x86" set _MY_OPT_INPUT=VBoxDrivers-amd64.cab +rem figure defaults here: if ".%_MY_OPT_INPUT%" == "." set _MY_OPT_INPUT=VBoxDrivers-x86.cab +if not exist "%_MY_OPT_INPUT%" goto error_input_not_found + +rem +rem Unpack the stuff. +rem We ignore error level 1 here as that is what unzip returns on warning (slashes). +rem +"%_MY_UNZIP%" -o -j "%_MY_OPT_INPUT%" -d "%_MY_OPT_BINDIR%" && goto unzip_okay +if NOT ERRORLEVEL 1 goto end_failed +:unzip_okay + +if ".%_MY_OPT_SIGN_VERIFY%" == ".0" goto no_sign_verify +rem +rem Verify it against the PreW10 catalog files we saved. +rem +set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\sdk\v8.1\bin\x86\signtool.exe +if not exist "%_MY_SIGNTOOL%" set _MY_SIGNTOOL=%KBUILD_DEVTOOLS%\win.x86\selfsign\r3\signtool.exe + +for %%d in (%_MY_DRIVER_BASE_NAMES%) do ( + @echo * Verifying %%d against %%d.cat... + "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.inf" || goto end_failed + "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.sys" || goto end_failed + rem The following is disabled because signtool.exe does not accept these + rem signatures because it fails to look at the timestamp. Eventually should + rem replace this by doing out own signature verification in RTSignTool. + rem @echo * Verifying %%d against %%d-PreW10.cat... + rem "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d-PreW10.cat" "%_MY_OPT_BINDIR%\%%d.inf" || goto end_failed + rem "%_MY_SIGNTOOL%" verify /kp /c "%_MY_OPT_BINDIR%\%%d-PreW10.cat" "%_MY_OPT_BINDIR%\%%d.sys" || goto end_failed +) +:no_sign_verify + +rem +rem Modify the catalog signatures. +rem +if "%_MY_OPT_SIGN_CAT%" == "0" goto no_sign_cat +set PATH=%PATH%;%_MY_OPT_BINDIR% +for %%d in (%_MY_DRIVER_BASE_NAMES%) do ( + copy /y "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.cat.ms" || goto end_failed + call sign-dual.cmd "%_MY_OPT_BINDIR%\%%d.cat" || goto end_failed + "%_MY_OPT_BINDIR%\tools\RTSignTool.exe" add-nested-cat-signature -v "%_MY_OPT_BINDIR%\%%d.cat" "%_MY_OPT_BINDIR%\%%d.cat.ms" || goto end_failed +) +:no_sign_cat +goto end + +:end_failed +@echo failed (%ERRORLEVEL%) +@endlocal +@endlocal +@exit /b 1 + +:end +@endlocal +@endlocal + diff --git a/src/VBox/Installer/win/Scripts/VBoxExtPackPuel.inf b/src/VBox/Installer/win/Scripts/VBoxExtPackPuel.inf new file mode 100644 index 00000000..5e604a87 --- /dev/null +++ b/src/VBox/Installer/win/Scripts/VBoxExtPackPuel.inf @@ -0,0 +1,68 @@ +; $Id: VBoxExtPackPuel.inf $ +;; @file +; VBoxExtPackPuel - VirtualBox PUEL ExtPack drivers. +; + +; +; Copyright (C) 2018-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +[Version] +Signature = "$Windows NT$" +Class = System +ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318} +CatalogFile = VBoxExtPackPuel.cat +Provider = %ORACLE% +;edit-DriverVer = 08/26/2008,2.00.0000 + +[SourceDisksNames] +1=%VBoxExtPackPuel.DskDesc%,"",, + +[SourceDisksFiles] +;VBoxEhciR0.r0=1 +VBoxNvmeR0.r0=1 +;VBoxPciRawR0.r0=1 + +[DestinationDirs] +DefaultDestDir = 12 +VBoxExtPackPuelInstall.Files = 12 + +[Manufacturer] +;x86 %ORACLE%=VBoxExtPackPuel +;amd64 %ORACLE%=VBoxExtPackPuel, NTamd64 + +;x86 [VBoxExtPackPuel] +;amd64 [VBoxExtPackPuel.NTamd64] +%VBoxExtPackPuel.DrvDesc% = VBoxExtPackPuelInstall, root\VBoxExtPackPuel + +[VBoxExtPackPuelInstall] +CopyFiles = VBoxExtPackPuelInstall.Files + +[VBoxExtPackPuelInstall.Files] +;VBoxEhciR0.r0,,,2 +VBoxNvmeR0.r0,,,2 +;VBoxPciRawR0.r0,,,2 + +[Strings] +ORACLE = "Oracle Corporation" +VBoxExtPackPuel.DrvDesc = "VirtualBox PUEL ExtPack drivers" +VBoxExtPackPuel.DskDesc = "VirtualBox PUEL ExtPack drivers" + diff --git a/src/VBox/Installer/win/Scripts/VMMR0.inf b/src/VBox/Installer/win/Scripts/VMMR0.inf new file mode 100644 index 00000000..b214b8e5 --- /dev/null +++ b/src/VBox/Installer/win/Scripts/VMMR0.inf @@ -0,0 +1,64 @@ +; $Id: VMMR0.inf $ +;; @file +; VMMR0.inf - VirtualBox VMM drivers. +; + +; +; Copyright (C) 2018-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +[Version] +Signature = "$Windows NT$" +Class = System +ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318} +CatalogFile = VMMR0.cat +Provider = %ORACLE% +;edit-DriverVer = 08/26/2008,2.00.0000 + +[SourceDisksNames] +1=%VBoxVMM.DskDesc%,"",, + +[SourceDisksFiles] +VMMR0.r0=1 +VBoxDDR0.r0=1 + +[DestinationDirs] +DefaultDestDir = 12 +VBoxVMMInstall.Files = 12 + +[Manufacturer] +%ORACLE%=VBoxVMM@COMMA-NT-ARCH@ + +[VBoxVMM@DOT-NT-ARCH@] +%VBoxVMM.DrvDesc% = VBoxVMMInstall, root\VBoxVMM + +[VBoxVMMInstall] +CopyFiles = VBoxVMMInstall.Files + +[VBoxVMMInstall.Files] +VMMR0.r0,,,2 +VBoxDDR0.r0,,,2 + +[Strings] +ORACLE = "Oracle Corporation" +VBoxVMM.DrvDesc = "VirtualBox VMM drivers" +VBoxVMM.DskDesc = "VirtualBox VMM drivers" + diff --git a/src/VBox/Installer/win/Stub/Makefile.kmk b/src/VBox/Installer/win/Stub/Makefile.kmk new file mode 100644 index 00000000..08bec001 --- /dev/null +++ b/src/VBox/Installer/win/Stub/Makefile.kmk @@ -0,0 +1,173 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the stub installer. +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + +TEMPLATE_VBOXSTUB = Drop the signing, we will sign it later. +TEMPLATE_VBOXSTUB_EXTENDS = VBOXR3STATIC +TEMPLATE_VBOXSTUB_POST_CMDS = $(NO_SUCH_VARIABLE) + +# +# Installer stub program +# +PROGRAMS += VBoxStub +VBoxStub_TEMPLATE= VBOXSTUB +VBoxStub_BLD_TRG_ARCH = x86 +VBoxStub_DEFS = _WIN32_WINNT=0x0501 IN_RT_R3 + +VBoxStub_SOURCES = \ + VBoxStub.cpp \ + VBoxStub.rc + +VBoxStub_SDKS += \ + VBOX_NTDLL +ifeq ($(KBUILD_TARGET_ARCH),x86) +VBoxStub_LIBS += \ + $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \ + $(VBOX_LIB_RUNTIME_STATIC) +else +VBoxStub_LIBS += \ + $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \ + $(PATH_STAGE_LIB)/RuntimeR3-x86.lib +endif + +VBoxStub_LDFLAGS = -SubSystem:Windows -DelayLoad:comctl32.dll +VBoxStub_POST_CMDS = $(VBOX_CHECK_IMPORTS) --image $(out) ntdll.dll kernel32.dll +ifeq ($(KBUILD_TYPE),asan) + VBoxStub_POST_CMDS += advapi32.dll +endif +VBoxStub_LNK_DEPS = $(VBOX_CHECK_IMPORTS) + +VBoxStub.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV) +VBoxStub.cpp_DEPS = $(VBOX_SVN_REV_KMK) + +# If signing mode is enabled, then add the possibility to install the code +# signing certificates (public key only) automatically in /silent mode. +ifdef VBOX_SIGNING_MODE + + VBoxStub_SOURCES += VBoxStubCertUtil.cpp + VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h + VBoxStub.cpp_DEPS += $(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h + VBoxStub.cpp_INCS += $(VBoxStub_0_OUTDIR) + VBoxStub.cpp_DEFS += VBOX_WITH_CODE_SIGNING + ifdef VBOX_WITH_VBOX_LEGACY_TS_CA + VBoxStub.cpp_DEFS += VBOX_WITH_VBOX_LEGACY_TS_CA + endif + + $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: | $$(dir $$@) $(VBOX_RTSIGNTOOL) $(VBOX_BIN2C) $(PATH_STAGE_SYS)/VBoxSup.sys + $(RM) -f -- "$@" "$@.cer0" "$@.cer1" "$@.cer2" "$@.array" + + $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 0 --exe "$(PATH_STAGE_SYS)/VBoxSup.sys" --output "$@.cer0" --der + $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert0 "$@.cer0" $@ + $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert0, sizeof(g_abVBoxStubTrustedCert0) }, " + if defined(VBOX_CERTIFICATE_SUBJECT_NAME) && defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) + $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 1 --exe "$(PATH_STAGE_SYS)/VBoxSup.sys" --output "$@.cer1" --der + $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert1 "$@.cer1" $@ + $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert1, sizeof(g_abVBoxStubTrustedCert1) }, " + endif + if $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING)) + $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 1 --exe "$(VBOX_RTSIGNTOOL)" --output "$@.cer2" --der + $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert2 "$@.cer2" $@ + $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert2, sizeof(g_abVBoxStubTrustedCert2) }, " + endif + $(APPEND) -n "$@" \ + "" \ + "struct { uint8_t const *pab; uint32_t cb; }" "g_aVBoxStubTrustedCerts[] = " \ + "{" + $(SED) --append "$@" -e "" "$@.array" + $(APPEND) -n "$@" \ + "};" + $(RM) -f -- "$@.cer0" "$@.cer1" "$@.cer2" "$@.array" + ifdef VBOX_WITH_VBOX_LEGACY_TS_CA + $(VBOX_BIN2C) -ascii --append VBoxLegacyWinCA "$(VBOX_LEGACY_TS_CA_FILE)" $@ + endif + + VBoxStubPublicCert.h:: $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h + +endif + +# The icon location is configurable. +VBoxStub.rc_INCS += $(VBoxStub_0_OUTDIR) +VBoxStub.rc_DEPS += \ + $(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc \ + $(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc +VBoxStub_CLEAN += \ + $(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc \ + $(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc + +# Icon include file. +$$(VBoxStub_0_OUTDIR)/VBoxStub-icon.rc: $(VBOX_WINDOWS_ICON_FILE) $(MAKEFILE_CURRENT) | $$(dir $$@) + $(APPEND) -t $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ICON_FILE))"' + +# Manifest. +VBOX_STUB_MANIFEST_FILE := $(PATH_SUB_CURRENT)/VBoxStub.manifest +$$(VBoxStub_0_OUTDIR)/VBoxStub-manifest.rc: $(VBOX_STUB_MANIFEST_FILE) $(MAKEFILE_CURRENT) | $$(dir $$@) + $(APPEND) -t $@ 'APP_MANIFEST RT_MANIFEST "$(subst /,\\,$(VBOX_STUB_MANIFEST_FILE))"' + +# Dynamic import no. 1: MSI.DLL +VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/MsiLazyLoad.asm +VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/MsiLazyLoad.asm +$$(VBoxStub_0_OUTDIR)/MsiLazyLoad.asm: $(PATH_SUB_CURRENT)/msi.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@) + $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@) + $(QUIET)$(RM) -f -- "$@" + $(VBOX_DEF_2_LAZY_LOAD) --system --library MSI.DLL --output "$@" $(filter %.def, $^) + +# Dynamic import no. 2: CRYPTO32.DLL +VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Crypt32LazyLoad.asm +VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/Crypt32LazyLoad.asm +$$(VBoxStub_0_OUTDIR)/Crypt32LazyLoad.asm: $(PATH_SUB_CURRENT)/crypt32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@) + $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@) + $(QUIET)$(RM) -f -- "$@" + $(VBOX_DEF_2_LAZY_LOAD) --system --library CRYPT32.DLL --output "$@" $(filter %.def, $^) + +# Dynamic import no. 3: WS2_32.DLL +VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Ws232LazyLoad.asm +VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/Ws232LazyLoad.asm +$$(VBoxStub_0_OUTDIR)/Ws232LazyLoad.asm: $(PATH_SUB_CURRENT)/ws2_32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@) + $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@) + $(QUIET)$(RM) -f -- "$@" + $(VBOX_DEF_2_LAZY_LOAD) --system --library WS2_32.DLL --output "$@" $(filter %.def, $^) + +# Dynamic import no. 4: USER32.DLL +VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/User32LazyLoad.asm +VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/User32LazyLoad.asm +$$(VBoxStub_0_OUTDIR)/User32LazyLoad.asm: $(PATH_SUB_CURRENT)/user32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@) + $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@) + $(QUIET)$(RM) -f -- "$@" + $(VBOX_DEF_2_LAZY_LOAD) --system --library USER32.DLL --output "$@" $(filter %.def, $^) + +# Dynamic import no. 5: SHELL32.DLL +VBoxStub_SOURCES += $(VBoxStub_0_OUTDIR)/Shell32LazyLoad.asm +VBoxStub_CLEAN += $(VBoxStub_0_OUTDIR)/Shell32LazyLoad.asm +$$(VBoxStub_0_OUTDIR)/Shell32LazyLoad.asm: $(PATH_SUB_CURRENT)/shell32.def $(VBOX_DEF_2_LAZY_LOAD) | $$(dir $$@) + $(call MSG_TOOL,VBoxDef2LazyLoad,VBoxStub,$(filter %.def, $^),$@) + $(QUIET)$(RM) -f -- "$@" + $(VBOX_DEF_2_LAZY_LOAD) --system --library SHELL32.DLL --output "$@" $(filter %.def, $^) + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/win/Stub/VBoxStub.cpp b/src/VBox/Installer/win/Stub/VBoxStub.cpp new file mode 100644 index 00000000..4aed5e59 --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStub.cpp @@ -0,0 +1,1522 @@ +/* $Id: VBoxStub.cpp $ */ +/** @file + * VBoxStub - VirtualBox's Windows installer stub. + */ + +/* + * Copyright (C) 2010-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef IPRT_NO_CRT +# include +# include +#endif + +#include "VBoxStub.h" +#include "../StubBld/VBoxStubBld.h" +#include "resource.h" + +#ifdef VBOX_WITH_CODE_SIGNING +# include "VBoxStubCertUtil.h" +# include "VBoxStubPublicCert.h" +#endif + + +/********************************************************************************************************************************* +* Defined Constants And Macros * +*********************************************************************************************************************************/ +#define MY_UNICODE_SUB(str) L ##str +#define MY_UNICODE(str) MY_UNICODE_SUB(str) + +/* Use an own console window if run in verbose mode. */ +#define VBOX_STUB_WITH_OWN_CONSOLE + + +/********************************************************************************************************************************* +* Structures and Typedefs * +*********************************************************************************************************************************/ +/** + * Cleanup record. + */ +typedef struct STUBCLEANUPREC +{ + /** List entry. */ + RTLISTNODE ListEntry; + /** Stub package index (zero-based) this record belongs to. */ + unsigned idxPkg; + /** True if file, false if directory. */ + bool fFile; + /** Set if we should not delete the file/directory. + * This is used for user supplied extraction directories. */ + bool fDontDelete; + union + { + /** File handle (if \a fFile is \c true). */ + RTFILE hFile; + /** Directory handle (if \a fFile is \c false). */ + RTDIR hDir; + }; + /** The path to the file or directory to clean up. */ + char szPath[1]; +} STUBCLEANUPREC; +/** Pointer to a cleanup record. */ +typedef STUBCLEANUPREC *PSTUBCLEANUPREC; + + +/********************************************************************************************************************************* +* Prototypes * +*********************************************************************************************************************************/ +static PSTUBCLEANUPREC AddCleanupRec(const char *pszPath, bool fIsFile); + + +/********************************************************************************************************************************* +* Global Variables * +*********************************************************************************************************************************/ +/** Whether it's a silent or interactive GUI driven install. */ +static bool g_fSilent = false; +/** List of temporary files. */ +static RTLISTANCHOR g_TmpFiles; +/** Verbosity flag. */ +static int g_iVerbosity = 0; + + + +/** + * Shows an error message box with a printf() style formatted string. + * + * @returns RTEXITCODE_FAILURE + * @param pszFmt Printf-style format string to show in the message box body. + * + */ +static RTEXITCODE ShowError(const char *pszFmt, ...) +{ + char *pszMsg; + va_list va; + + va_start(va, pszFmt); + if (RTStrAPrintfV(&pszMsg, pszFmt, va)) + { + if (g_fSilent) + RTMsgError("%s", pszMsg); + else + { + PRTUTF16 pwszMsg; + int rc = RTStrToUtf16(pszMsg, &pwszMsg); + if (RT_SUCCESS(rc)) + { + MessageBoxW(GetDesktopWindow(), pwszMsg, MY_UNICODE(VBOX_STUB_TITLE), MB_ICONERROR); + RTUtf16Free(pwszMsg); + } + else + MessageBoxA(GetDesktopWindow(), pszMsg, VBOX_STUB_TITLE, MB_ICONERROR); + } + RTStrFree(pszMsg); + } + else /* Should never happen! */ + AssertMsgFailed(("Failed to format error text of format string: %s!\n", pszFmt)); + va_end(va); + return RTEXITCODE_FAILURE; +} + + +/** + * Same as ShowError, only it returns RTEXITCODE_SYNTAX. + */ +static RTEXITCODE ShowSyntaxError(const char *pszFmt, ...) +{ + va_list va; + va_start(va, pszFmt); + ShowError("%N", pszFmt, &va); + va_end(va); + return RTEXITCODE_SYNTAX; +} + + +/** + * Shows a message box with a printf() style formatted string. + * + * @param uType Type of the message box (see MSDN). + * @param pszFmt Printf-style format string to show in the message box body. + * + */ +static void ShowInfo(const char *pszFmt, ...) +{ + char *pszMsg; + va_list va; + va_start(va, pszFmt); + int rc = RTStrAPrintfV(&pszMsg, pszFmt, va); + va_end(va); + if (rc >= 0) + { + if (g_fSilent) + RTPrintf("%s\n", pszMsg); + else + { + PRTUTF16 pwszMsg; + rc = RTStrToUtf16(pszMsg, &pwszMsg); + if (RT_SUCCESS(rc)) + { + MessageBoxW(GetDesktopWindow(), pwszMsg, MY_UNICODE(VBOX_STUB_TITLE), MB_ICONINFORMATION); + RTUtf16Free(pwszMsg); + } + else + MessageBoxA(GetDesktopWindow(), pszMsg, VBOX_STUB_TITLE, MB_ICONINFORMATION); + } + } + else /* Should never happen! */ + AssertMsgFailed(("Failed to format error text of format string: %s!\n", pszFmt)); + RTStrFree(pszMsg); +} + + +/** Logs error details to stderr. */ +static void LogError(const char *pszFmt, ...) +{ + va_list va; + va_start(va, pszFmt); + RTStrmPrintf(g_pStdErr, "error: %N\n", pszFmt, &va); + va_end(va); +} + + +/** Logs error details to stderr, returning @a rc. */ +static int LogErrorRc(int rc, const char *pszFmt, ...) +{ + va_list va; + va_start(va, pszFmt); + RTStrmPrintf(g_pStdErr, "error: %N\n", pszFmt, &va); + va_end(va); + return rc; +} + + +/** Logs error details to stderr, RTEXITCODE_FAILURE. */ +static RTEXITCODE LogErrorExitFailure(const char *pszFmt, ...) +{ + va_list va; + va_start(va, pszFmt); + RTStrmPrintf(g_pStdErr, "error: %N\n", pszFmt, &va); + va_end(va); + return RTEXITCODE_FAILURE; +} + + +/** + * Finds the specified in the resource section of the executable. + * + * @returns IPRT status code. + * + * @param pszDataName Name of resource to read. + * @param ppbResource Where to return the pointer to the data. + * @param pcbResource Where to return the size of the data (if found). + * Optional. + */ +static int FindData(const char *pszDataName, uint8_t const **ppbResource, DWORD *pcbResource) +{ + AssertReturn(pszDataName, VERR_INVALID_PARAMETER); + HINSTANCE hInst = NULL; /* indicates the executable image */ + + /* Find our resource. */ + PRTUTF16 pwszDataName; + int rc = RTStrToUtf16(pszDataName, &pwszDataName); + AssertRCReturn(rc, rc); + HRSRC hRsrc = FindResourceExW(hInst, + (LPWSTR)RT_RCDATA, + pwszDataName, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); + RTUtf16Free(pwszDataName); + AssertReturn(hRsrc, VERR_IO_GEN_FAILURE); + + /* Get resource size. */ + DWORD cb = SizeofResource(hInst, hRsrc); + AssertReturn(cb > 0, VERR_NO_DATA); + if (pcbResource) + *pcbResource = cb; + + /* Get pointer to resource. */ + HGLOBAL hData = LoadResource(hInst, hRsrc); + AssertReturn(hData, VERR_IO_GEN_FAILURE); + + /* Lock resource. */ + *ppbResource = (uint8_t const *)LockResource(hData); + AssertReturn(*ppbResource, VERR_IO_GEN_FAILURE); + return VINF_SUCCESS; +} + + +/** + * Finds the header for the given package. + * + * @returns Pointer to the package header on success. On failure NULL is + * returned after ShowError has been invoked. + * @param iPackage The package number. + */ +static const VBOXSTUBPKG *FindPackageHeader(unsigned iPackage) +{ + char szHeaderName[32]; + RTStrPrintf(szHeaderName, sizeof(szHeaderName), "HDR_%02d", iPackage); + + VBOXSTUBPKG const *pPackage; + int rc = FindData(szHeaderName, (uint8_t const **)&pPackage, NULL); + if (RT_FAILURE(rc)) + { + ShowError("Internal error: Could not find package header #%u: %Rrc", iPackage, rc); + return NULL; + } + + /** @todo validate it. */ + return pPackage; +} + + + +/** + * Constructs a full temporary file path from the given parameters. + * + * @returns iprt status code. + * + * @param pszTempPath The pure path to use for construction. + * @param pszTargetFileName The pure file name to use for construction. + * @param ppszTempFile Pointer to the constructed string. Must be freed + * using RTStrFree(). + */ +static int GetTempFileAlloc(const char *pszTempPath, + const char *pszTargetFileName, + char **ppszTempFile) +{ + if (RTStrAPrintf(ppszTempFile, "%s\\%s", pszTempPath, pszTargetFileName) >= 0) + return VINF_SUCCESS; + return VERR_NO_STR_MEMORY; +} + + +/** + * Extracts a built-in resource to disk. + * + * @returns iprt status code. + * + * @param pszResourceName The resource name to extract. + * @param pszTempFile The full file path + name to extract the resource to. + * @param hFile Handle to pszTempFile if RTFileCreateUnique was + * used to generate the name, otherwise NIL_RTFILE. + * @param idxPackage The package index for annotating the cleanup + * record with (HACK ALERT). + */ +static int ExtractFile(const char *pszResourceName, const char *pszTempFile, RTFILE hFile, unsigned idxPackage) +{ + AssertPtrReturn(pszResourceName, VERR_INVALID_POINTER); + AssertPtrReturn(pszTempFile, VERR_INVALID_POINTER); + + /* Create new (and replace any old) file. */ + if (hFile == NIL_RTFILE) + { + int rc = RTFileOpen(&hFile, pszTempFile, + RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE + | (0700 << RTFILE_O_CREATE_MODE_SHIFT)); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: Failed to create/replace '%s' for writing: %Rrc", idxPackage, pszTempFile, rc)); + } + + /* Add a cleanup record, so that we can properly clean up (partially run) stuff. */ + int rc = VERR_NO_MEMORY; + PSTUBCLEANUPREC pCleanupRec = AddCleanupRec(pszTempFile, true /*fIsFile*/); + AssertReturn(pCleanupRec, VERR_NO_MEMORY); + + pCleanupRec->idxPkg = idxPackage; + pCleanupRec->hFile = hFile; + + /* Find the data of the built-in resource. */ + uint8_t const *pbData = NULL; + DWORD cbData = 0; + rc = FindData(pszResourceName, &pbData, &cbData); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: Failed to locate resource '%s': %Rrc", idxPackage, pszResourceName, rc)); + + /* Write the contents to the file. */ + rc = RTFileWrite(hFile, pbData, cbData, NULL); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: RTFileWrite('%s',, %#x,) failed: %Rrc", idxPackage, pszTempFile, cbData, rc)); + + /* + * We now wish to keep the file open, however since we've got it open in write + * mode with deny-write sharing (effectively exclusive write mode) this will + * prevent the MSI API from opening it in deny-write mode for reading purposes. + * + * So we have to do the best we can to transition this to a read-only handle + * that denies write (and deletion/renaming). First we open it again in + * read-only mode only denying deletion, not writing. Then close the original + * handle. Finally open a read-only handle that denies both reading and + * deletion/renaming, and verify that the file content is still the same. + * + * Note! DuplicateHandle to read-only and closing the original does not work, + * as the kernel doesn't update the sharing access info for the handles. + */ + RTFSOBJINFO ObjInfo1; + rc = RTFileQueryInfo(hFile, &ObjInfo1, RTFSOBJATTRADD_UNIX); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: RTFileQueryInfo failed on '%s': %Rrc", idxPackage, pszTempFile, rc)); + + RTFILE hFile2 = NIL_RTFILE; + rc = RTFileOpen(&hFile2, pszTempFile, + RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_NONE | (0700 << RTFILE_O_CREATE_MODE_SHIFT)); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: First re-opening of '%s' failed: %Rrc", idxPackage, pszTempFile, rc)); + + rc = RTFileClose(hFile); + AssertRCReturnStmt(rc, RTFileClose(hFile2), + LogErrorRc(rc, "#%u: RTFileClose('%s') failed: %Rrc", idxPackage, pszTempFile, rc)); + pCleanupRec->hFile = hFile2; + + rc = RTFileOpen(&hFile, pszTempFile, RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: Second re-opening of '%s' failed: %Rrc", idxPackage, pszTempFile, rc)); + pCleanupRec->hFile = hFile; + + rc = RTFileClose(hFile2); + AssertRCStmt(rc, LogError("#%u: Failed to close 2nd handle to '%s': %Rrc", idxPackage, pszTempFile, rc)); + + /* check the size and inode number. */ + RTFSOBJINFO ObjInfo2; + rc = RTFileQueryInfo(hFile, &ObjInfo2, RTFSOBJATTRADD_UNIX); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: RTFileQueryInfo failed on '%s': %Rrc", idxPackage, pszTempFile, rc)); + + AssertReturn(ObjInfo2.cbObject == cbData, + LogErrorRc(VERR_STATE_CHANGED, "#%u: File size of '%s' changed: %'RU64, expected %'RU32", + idxPackage, pszTempFile, ObjInfo2.cbObject, pbData)); + + AssertReturn(ObjInfo2.Attr.u.Unix.INodeId == ObjInfo1.Attr.u.Unix.INodeId, + LogErrorRc(VERR_STATE_CHANGED, "#%u: File ID of '%s' changed: %#RX64, expected %#RX64", + idxPackage, pszTempFile, ObjInfo2.Attr.u.Unix.INodeId, ObjInfo1.Attr.u.Unix.INodeId)); + + + /* Check the content. */ + uint32_t off = 0; + while (off < cbData) + { + uint8_t abBuf[_64K]; + size_t cbToRead = RT_MIN(cbData - off, sizeof(abBuf)); + rc = RTFileRead(hFile, abBuf, cbToRead, NULL); + AssertRCReturn(rc, LogErrorRc(rc, "#%u: RTFileRead failed on '%s' at offset %#RX32: %Rrc", + idxPackage, pszTempFile, off, rc)); + AssertReturn(memcmp(abBuf, &pbData[off], cbToRead) == 0, + LogErrorRc(VERR_STATE_CHANGED, "#%u: File '%s' has change (mismatch in %#zx byte block at %#RX32)", + idxPackage, pszTempFile, cbToRead, off)); + off += cbToRead; + } + + return VINF_SUCCESS; +} + + +/** + * Extracts a built-in resource to disk. + * + * @returns iprt status code. + * + * @param pPackage Pointer to a VBOXSTUBPKG struct that contains the resource. + * @param pszTempFile The full file path + name to extract the resource to. + * @param hFile Handle to pszTempFile if RTFileCreateUnique was + * used to generate the name, otherwise NIL_RTFILE. + * @param idxPackage The package index for annotating the cleanup + * record with (HACK ALERT). + */ +static int Extract(VBOXSTUBPKG const *pPackage, const char *pszTempFile, RTFILE hFile, unsigned idxPackage) +{ + return ExtractFile(pPackage->szResourceName, pszTempFile, hFile, idxPackage); +} + + +/** + * Detects whether we're running on a 32- or 64-bit platform and returns the result. + * + * @returns TRUE if we're running on a 64-bit OS, FALSE if not. + */ +static BOOL IsWow64(void) +{ + BOOL fIsWow64 = TRUE; + fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); + if (NULL != fnIsWow64Process) + { + if (!fnIsWow64Process(GetCurrentProcess(), &fIsWow64)) + { + /* Error in retrieving process type - assume that we're running on 32bit. */ + return FALSE; + } + } + return fIsWow64; +} + + +/** + * Decides whether we need a specified package to handle or not. + * + * @returns @c true if we need to handle the specified package, @c false if not. + * + * @param pPackage Pointer to a VBOXSTUBPKG struct that contains the resource. + */ +static bool PackageIsNeeded(VBOXSTUBPKG const *pPackage) +{ + if (pPackage->enmArch == VBOXSTUBPKGARCH_ALL) + return true; + VBOXSTUBPKGARCH enmArch = IsWow64() ? VBOXSTUBPKGARCH_AMD64 : VBOXSTUBPKGARCH_X86; + return pPackage->enmArch == enmArch; +} + + +/** + * Adds a cleanup record. + * + * The caller must set the hFile or hDir if so desired. + * + * @returns Pointer to the cleanup record on success, fully complained NULL on + * failure. + * @param pszPath The path to the file or directory to clean up. + * @param fIsFile @c true if file, @c false if directory. + */ +static PSTUBCLEANUPREC AddCleanupRec(const char *pszPath, bool fIsFile) +{ + size_t cchPath = strlen(pszPath); Assert(cchPath > 0); + PSTUBCLEANUPREC pRec = (PSTUBCLEANUPREC)RTMemAllocZ(RT_UOFFSETOF_DYN(STUBCLEANUPREC, szPath[cchPath + 1])); + if (pRec) + { + pRec->idxPkg = ~0U; + pRec->fFile = fIsFile; + if (fIsFile) + pRec->hFile = NIL_RTFILE; + else + pRec->hDir = NIL_RTDIR; + memcpy(pRec->szPath, pszPath, cchPath + 1); + + RTListPrepend(&g_TmpFiles, &pRec->ListEntry); + } + else + ShowError("Out of memory!"); + return pRec; +} + + +/** + * Cleans up all the extracted files and optionally removes the package + * directory. + * + * @param pszPkgDir The package directory, NULL if it shouldn't be + * removed. + */ +static void CleanUp(const char *pszPkgDir) +{ + for (int i = 0; i < 5; i++) + { + bool const fFinalTry = i == 4; + + PSTUBCLEANUPREC pCur, pNext; + RTListForEachSafe(&g_TmpFiles, pCur, pNext, STUBCLEANUPREC, ListEntry) + { + int rc = VINF_SUCCESS; + if (pCur->fFile) + { + if (pCur->hFile != NIL_RTFILE) + { + if (RTFileIsValid(pCur->hFile)) + { + int rcCloseFile = RTFileClose(pCur->hFile); + AssertRCStmt(rcCloseFile, LogError("Cleanup file '%s' for #%u: RTFileClose(%p) failed: %Rrc", + pCur->szPath, pCur->idxPkg, pCur->hFile, rcCloseFile)); + } + pCur->hFile = NIL_RTFILE; + } + if (!pCur->fDontDelete) + rc = RTFileDelete(pCur->szPath); + } + else /* Directory */ + { + if (pCur->hDir != NIL_RTDIR) + { + if (RTDirIsValid(pCur->hDir)) + { + int rcCloseDir = RTDirClose(pCur->hDir); + AssertRCStmt(rcCloseDir, LogError("Cleanup dir '%s' for #%u: RTDirClose(%p) failed: %Rrc", + pCur->szPath, pCur->idxPkg, pCur->hDir, rcCloseDir)); + } + pCur->hDir = NIL_RTDIR; + } + + /* Note: Not removing the directory recursively, as we should have separate cleanup records for that. */ + if (!pCur->fDontDelete) + { + rc = RTDirRemove(pCur->szPath); + if (rc == VERR_DIR_NOT_EMPTY && fFinalTry) + rc = VINF_SUCCESS; + } + } + if (rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND) + rc = VINF_SUCCESS; + if (RT_SUCCESS(rc)) + { + RTListNodeRemove(&pCur->ListEntry); + RTMemFree(pCur); + } + else if (fFinalTry) + { + if (pCur->fFile) + ShowError("Failed to delete temporary file '%s': %Rrc", pCur->szPath, rc); + else + ShowError("Failed to delete temporary directory '%s': %Rrc", pCur->szPath, rc); + } + } + + if (RTListIsEmpty(&g_TmpFiles) || fFinalTry) + { + if (!pszPkgDir) + return; + int rc = RTDirRemove(pszPkgDir); + if (RT_SUCCESS(rc) || rc == VERR_FILE_NOT_FOUND || rc == VERR_PATH_NOT_FOUND || fFinalTry) + return; + } + + /* Delay a little and try again. */ + RTThreadSleep(i == 0 ? 100 : 3000); + } +} + + +/** + * Processes an MSI package. + * + * @returns Fully complained exit code. + * @param pszMsi The path to the MSI to process. + * @param pszMsiArgs Any additional installer (MSI) argument + * @param pszMsiLogFile Where to let MSI log its output to. NULL if logging is disabled. + */ +static RTEXITCODE ProcessMsiPackage(const char *pszMsi, const char *pszMsiArgs, const char *pszMsiLogFile) +{ + int rc; + + /* + * Set UI level. + */ + INSTALLUILEVEL enmDesiredUiLevel = g_fSilent ? INSTALLUILEVEL_NONE : INSTALLUILEVEL_FULL; + INSTALLUILEVEL enmRet = MsiSetInternalUI(enmDesiredUiLevel, NULL); + if (enmRet == INSTALLUILEVEL_NOCHANGE /* means error */) + return ShowError("Internal error: MsiSetInternalUI failed."); + + /* + * Enable logging? + */ + if (pszMsiLogFile) + { + PRTUTF16 pwszLogFile; + rc = RTStrToUtf16(pszMsiLogFile, &pwszLogFile); + if (RT_FAILURE(rc)) + return ShowError("RTStrToUtf16 failed on '%s': %Rrc", pszMsiLogFile, rc); + + UINT uLogLevel = MsiEnableLogW(INSTALLLOGMODE_VERBOSE, + pwszLogFile, + INSTALLLOGATTRIBUTES_FLUSHEACHLINE); + RTUtf16Free(pwszLogFile); + if (uLogLevel != ERROR_SUCCESS) + return ShowError("MsiEnableLogW failed"); + } + + /* + * Initialize the common controls (extended version). This is necessary to + * run the actual .MSI installers with the new fancy visual control + * styles (XP+). Also, an integrated manifest is required. + */ + INITCOMMONCONTROLSEX ccEx; + ccEx.dwSize = sizeof(INITCOMMONCONTROLSEX); + ccEx.dwICC = ICC_LINK_CLASS | ICC_LISTVIEW_CLASSES | ICC_PAGESCROLLER_CLASS | + ICC_PROGRESS_CLASS | ICC_STANDARD_CLASSES | ICC_TAB_CLASSES | ICC_TREEVIEW_CLASSES | + ICC_UPDOWN_CLASS | ICC_USEREX_CLASSES | ICC_WIN95_CLASSES; + InitCommonControlsEx(&ccEx); /* Ignore failure. */ + + /* + * Convert both strings to UTF-16 and start the installation. + */ + PRTUTF16 pwszMsi; + rc = RTStrToUtf16(pszMsi, &pwszMsi); + if (RT_FAILURE(rc)) + return ShowError("RTStrToUtf16 failed on '%s': %Rrc", pszMsi, rc); + PRTUTF16 pwszMsiArgs; + rc = RTStrToUtf16(pszMsiArgs, &pwszMsiArgs); + if (RT_FAILURE(rc)) + { + RTUtf16Free(pwszMsi); + return ShowError("RTStrToUtf16 failed on '%s': %Rrc", pszMsiArgs, rc); + } + + UINT uStatus = MsiInstallProductW(pwszMsi, pwszMsiArgs); + RTUtf16Free(pwszMsi); + RTUtf16Free(pwszMsiArgs); + + if (uStatus == ERROR_SUCCESS) + return RTEXITCODE_SUCCESS; + if (uStatus == ERROR_SUCCESS_REBOOT_REQUIRED) + { + if (g_fSilent) + RTMsgInfo("Reboot required (by %s)\n", pszMsi); + return (RTEXITCODE)uStatus; + } + + /* + * Installation failed. Figure out what to say. + */ + switch (uStatus) + { + case ERROR_INSTALL_USEREXIT: + /* Don't say anything? */ + break; + + case ERROR_INSTALL_PACKAGE_VERSION: + ShowError("This installation package cannot be installed by the Windows Installer service.\n" + "You must install a Windows service pack that contains a newer version of the Windows Installer service."); + break; + + case ERROR_INSTALL_PLATFORM_UNSUPPORTED: + ShowError("This installation package is not supported on this platform."); + break; + + default: + { + /* + * Try get windows to format the message. + */ + DWORD dwFormatFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER + | FORMAT_MESSAGE_IGNORE_INSERTS + | FORMAT_MESSAGE_FROM_SYSTEM; + HMODULE hModule = NULL; + if (uStatus >= NERR_BASE && uStatus <= MAX_NERR) + { + hModule = LoadLibraryExW(L"netmsg.dll", + NULL, + LOAD_LIBRARY_AS_DATAFILE); + if (hModule != NULL) + dwFormatFlags |= FORMAT_MESSAGE_FROM_HMODULE; + } + + PWSTR pwszMsg; + if (FormatMessageW(dwFormatFlags, + hModule, /* If NULL, load system stuff. */ + uStatus, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (PWSTR)&pwszMsg, + 0, + NULL) > 0) + { + ShowError("Installation failed! Error: %ls", pwszMsg); + LocalFree(pwszMsg); + } + else /* If text lookup failed, show at least the error number. */ + ShowError("Installation failed! Error: %u", uStatus); + + if (hModule) + FreeLibrary(hModule); + break; + } + } + + return RTEXITCODE_FAILURE; +} + + +/** + * Processes a package. + * + * @returns Fully complained exit code. + * @param iPackage The package number. + * @param pszMsiArgs Any additional installer (MSI) argument + * @param pszMsiLogFile Where to let MSI log its output to. NULL if logging is disabled. + */ +static RTEXITCODE ProcessPackage(unsigned iPackage, const char *pszMsiArgs, const char *pszMsiLogFile) +{ + /* + * Get the package header and check if it's needed. + */ + VBOXSTUBPKG const * const pPackage = FindPackageHeader(iPackage); + if (pPackage == NULL) + return RTEXITCODE_FAILURE; + + if (!PackageIsNeeded(pPackage)) + return RTEXITCODE_SUCCESS; + + /* + * Get the cleanup record for the package so we can get the extracted + * filename (pPackage is read-only and thus cannot assist here). + */ + PSTUBCLEANUPREC pRec = NULL; + PSTUBCLEANUPREC pCur; + RTListForEach(&g_TmpFiles, pCur, STUBCLEANUPREC, ListEntry) + { + if (pCur->idxPkg == iPackage) + { + pRec = pCur; + break; + } + } + AssertReturn(pRec != NULL, LogErrorExitFailure("Package #%u not found in cleanup records", iPackage)); + + /* + * Deal with the file based on it's extension. + */ + RTPathChangeToDosSlashes(pRec->szPath, true /* Force conversion. */); /* paranoia */ + + RTEXITCODE rcExit; + const char *pszSuff = RTPathSuffix(pRec->szPath); + if (RTStrICmpAscii(pszSuff, ".msi") == 0) + rcExit = ProcessMsiPackage(pRec->szPath, pszMsiArgs, pszMsiLogFile); + else if (RTStrICmpAscii(pszSuff, ".cab") == 0) + rcExit = RTEXITCODE_SUCCESS; /* Ignore .cab files, they're generally referenced by other files. */ + else + rcExit = ShowError("Internal error: Do not know how to handle file '%s' (%s).", pPackage->szFilename, pRec->szPath); + return rcExit; +} + +#ifdef VBOX_WITH_CODE_SIGNING + +# ifdef VBOX_WITH_VBOX_LEGACY_TS_CA +/** + * Install the timestamp CA currently needed to support legacy Windows versions. + * + * See @bugref{8691} for details. + * + * @returns Fully complained exit code. + */ +static RTEXITCODE InstallTimestampCA(bool fForce) +{ + /* + * Windows 10 desktop should be fine with attestation signed drivers, however + * the driver guard (DG) may alter that. Not sure yet how to detect, but + * OTOH 1809 and later won't accept the SHA-1 stuff regardless, so out of + * options there. + * + * The Windows 2016 server and later is not fine with attestation signed + * drivers, so we need to do the legacy trick there. + */ + if ( !fForce + && RTSystemGetNtVersion() >= RTSYSTEM_MAKE_NT_VERSION(10, 0, 0) + && RTSystemGetNtProductType() == VER_NT_WORKSTATION) + return RTEXITCODE_SUCCESS; + + if (!addCertToStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, "Root", g_abVBoxLegacyWinCA, sizeof(g_abVBoxLegacyWinCA))) + return ShowError("Failed add the legacy Windows timestamp CA to the root certificate store."); + return RTEXITCODE_SUCCESS; +} +# endif /* VBOX_WITH_VBOX_LEGACY_TS_CA*/ + +/** + * Install the public certificate into TrustedPublishers so the installer won't + * prompt the user during silent installs. + * + * @returns Fully complained exit code. + */ +static RTEXITCODE InstallCertificates(void) +{ + for (uint32_t i = 0; i < RT_ELEMENTS(g_aVBoxStubTrustedCerts); i++) + { + if (!addCertToStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, + "TrustedPublisher", + g_aVBoxStubTrustedCerts[i].pab, + g_aVBoxStubTrustedCerts[i].cb)) + return ShowError("Failed to add our certificate(s) to trusted publisher store."); + } + return RTEXITCODE_SUCCESS; +} + +#endif /* VBOX_WITH_CODE_SIGNING */ + +/** + * Copies the ".custom" directory to the extraction path if it exists. + * + * This is used by the MSI packages from the resource section. + * + * @returns Fully complained exit code. + * @param pszDstDir The destination directory. + */ +static RTEXITCODE CopyCustomDir(const char *pszDstDir) +{ + char szSrcDir[RTPATH_MAX]; + int rc = RTPathExecDir(szSrcDir, sizeof(szSrcDir)); + if (RT_SUCCESS(rc)) + rc = RTPathAppend(szSrcDir, sizeof(szSrcDir), ".custom"); + if (RT_FAILURE(rc)) + return ShowError("Failed to construct '.custom' dir path: %Rrc", rc); + + if (RTDirExists(szSrcDir)) + { + /* + * Use SHFileOperation w/ FO_COPY to do the job. This API requires an + * extra zero at the end of both source and destination paths. + */ + size_t cwc; + RTUTF16 wszSrcDir[RTPATH_MAX + 1]; + PRTUTF16 pwszSrcDir = wszSrcDir; + rc = RTStrToUtf16Ex(szSrcDir, RTSTR_MAX, &pwszSrcDir, RTPATH_MAX, &cwc); + if (RT_FAILURE(rc)) + return ShowError("RTStrToUtf16Ex failed on '%s': %Rrc", szSrcDir, rc); + wszSrcDir[cwc] = '\0'; + + RTUTF16 wszDstDir[RTPATH_MAX + 1]; + PRTUTF16 pwszDstDir = wszSrcDir; + rc = RTStrToUtf16Ex(pszDstDir, RTSTR_MAX, &pwszDstDir, RTPATH_MAX, &cwc); + if (RT_FAILURE(rc)) + return ShowError("RTStrToUtf16Ex failed on '%s': %Rrc", pszDstDir, rc); + wszDstDir[cwc] = '\0'; + + SHFILEOPSTRUCTW FileOp; + RT_ZERO(FileOp); /* paranoia */ + FileOp.hwnd = NULL; + FileOp.wFunc = FO_COPY; + FileOp.pFrom = wszSrcDir; + FileOp.pTo = wszDstDir; + FileOp.fFlags = FOF_SILENT + | FOF_NOCONFIRMATION + | FOF_NOCONFIRMMKDIR + | FOF_NOERRORUI; + FileOp.fAnyOperationsAborted = FALSE; + FileOp.hNameMappings = NULL; + FileOp.lpszProgressTitle = NULL; + + rc = SHFileOperationW(&FileOp); + if (rc != 0) /* Not a Win32 status code! */ + return ShowError("Copying the '.custom' dir failed: %#x", rc); + + /* + * Add a cleanup record for recursively deleting the destination + * .custom directory. We should actually add this prior to calling + * SHFileOperationW since it may partially succeed... + */ + char *pszDstSubDir = RTPathJoinA(pszDstDir, ".custom"); + if (!pszDstSubDir) + return ShowError("Out of memory!"); + + PSTUBCLEANUPREC pCleanupRec = AddCleanupRec(pszDstSubDir, false /*fIsFile*/); + AssertReturn(pCleanupRec, RTEXITCODE_FAILURE); + + /* + * Open the directory to make it difficult to replace or delete (see @bugref{10201}). + */ + /** @todo this is still race prone, given that SHFileOperationW is the one + * creating it and we're really a bit late opening it here. Anyway, + * it's harmless as this code isn't used at present. */ + RTDIR hDstSubDir; + rc = RTDirOpen(&hDstSubDir, pszDstSubDir); + if (RT_FAILURE(rc)) + return ShowError("Unable to open the destination .custom directory: %Rrc", rc); + pCleanupRec->hDir = hDstSubDir; + + RTStrFree(pszDstSubDir); + } + + return RTEXITCODE_SUCCESS; +} + + +/** + * Extracts the files for all needed packages to @a pszDstDir. + * + * @returns + * @param cPackages Number of packages to consinder. + * @param pszDstDir Where to extract the files. + * @param fExtractOnly Set if only extracting and not doing any installing. + * @param ppExtractDirRec Where we keep the cleanup record for @a pszDstDir. + * This may have been created by the caller already. + */ +static RTEXITCODE ExtractFiles(unsigned cPackages, const char *pszDstDir, bool fExtractOnly, PSTUBCLEANUPREC *ppExtractDirRec) +{ + int rc; + + /* + * Make sure the directory exists (normally WinMain created it for us). + */ + PSTUBCLEANUPREC pCleanupRec = *ppExtractDirRec; + if (!RTDirExists(pszDstDir)) + { + AssertReturn(!pCleanupRec, ShowError("RTDirExists failed on '%s' which we just created!", pszDstDir)); + + rc = RTDirCreate(pszDstDir, 0700, 0); + if (RT_FAILURE(rc)) + return ShowError("Failed to create extraction path '%s': %Rrc", pszDstDir, rc); + + *ppExtractDirRec = pCleanupRec = AddCleanupRec(pszDstDir, false /*fFile*/); + AssertReturn(pCleanupRec, LogErrorExitFailure("Failed to add cleanup record for dir '%s'", pszDstDir)); + } + /* + * If we need to create the cleanup record, the caller did not create the + * directory so we should not delete it when done. + */ + else if (!pCleanupRec) + { + *ppExtractDirRec = pCleanupRec = AddCleanupRec(pszDstDir, false /*fFile*/); + AssertReturn(pCleanupRec, LogErrorExitFailure("Failed to add cleanup record for existing dir '%s'", pszDstDir)); + pCleanupRec->fDontDelete = true; + } + + /* + * Open up the directory to make it difficult to delete / replace. + */ + rc = RTDirOpen(&pCleanupRec->hDir, pszDstDir); + if (RT_FAILURE(rc)) + return ShowError("Failed to open extraction path '%s': %Rrc", pszDstDir, rc); + + /* + * Change current directory to the extraction directory for the same reason + * as we open it above. + */ + RTPathSetCurrent(pszDstDir); + + /* + * Extract files. + */ + for (unsigned k = 0; k < cPackages; k++) + { + VBOXSTUBPKG const * const pPackage = FindPackageHeader(k); + if (!pPackage) + return RTEXITCODE_FAILURE; /* Done complaining already. */ + + if (fExtractOnly || PackageIsNeeded(pPackage)) + { + /* If we only extract or if it's a common file, use the original file name, + otherwise generate a random name with the same file extension (@bugref{10201}). */ + RTFILE hFile = NIL_RTFILE; + char szDstFile[RTPATH_MAX]; + if (fExtractOnly || pPackage->enmArch == VBOXSTUBPKGARCH_ALL) + rc = RTPathJoin(szDstFile, sizeof(szDstFile), pszDstDir, pPackage->szFilename); + else + { + rc = RTPathJoin(szDstFile, sizeof(szDstFile), pszDstDir, "XXXXXXXXXXXXXXXXXXXXXXXX"); + if (RT_SUCCESS(rc)) + { + const char *pszSuffix = RTPathSuffix(pPackage->szFilename); + if (pszSuffix) + rc = RTStrCat(szDstFile, sizeof(szDstFile), pszSuffix); + if (RT_SUCCESS(rc)) + { + rc = RTFileCreateUnique(&hFile, szDstFile, + RTFILE_O_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE + | (0700 << RTFILE_O_CREATE_MODE_SHIFT)); + if (RT_FAILURE(rc)) + return ShowError("Failed to create unique filename for '%s' in '%s': %Rrc", + pPackage->szFilename, pszDstDir, rc); + } + } + } + if (RT_FAILURE(rc)) + return ShowError("Internal error: Build extraction file name failed: %Rrc", rc); + + rc = Extract(pPackage, szDstFile, hFile, k); + if (RT_FAILURE(rc)) + return ShowError("Error extracting package #%u (%s): %Rrc", k, pPackage->szFilename, rc); + } + } + + return RTEXITCODE_SUCCESS; +} + +int main(int argc, char **argv) +{ + /* + * Init IPRT. This is _always_ the very first thing we do. + */ + int vrc = RTR3InitExe(argc, &argv, RTR3INIT_FLAGS_STANDALONE_APP); + if (RT_FAILURE(vrc)) + return RTMsgInitFailure(vrc); + + /* + * Parse arguments. + */ + + /* Parameter variables. */ + bool fExtractOnly = false; + bool fEnableLogging = false; +#ifdef VBOX_WITH_CODE_SIGNING + bool fEnableSilentCert = true; + bool fInstallTimestampCA = true; + bool fForceTimestampCaInstall = false; +#endif + bool fIgnoreReboot = false; + char szExtractPath[RTPATH_MAX] = {0}; + char szMSIArgs[_4K] = {0}; + char szMSILogFile[RTPATH_MAX] = {0}; + + /* Argument enumeration IDs. */ + enum KVBOXSTUBOPT + { + KVBOXSTUBOPT_MSI_LOG_FILE = 1000 + }; + + /* Parameter definitions. */ + static const RTGETOPTDEF s_aOptions[] = + { + /** @todo Replace short parameters with enums since they're not + * used (and not documented to the public). */ + { "--extract", 'x', RTGETOPT_REQ_NOTHING }, + { "-extract", 'x', RTGETOPT_REQ_NOTHING }, + { "/extract", 'x', RTGETOPT_REQ_NOTHING }, + { "--silent", 's', RTGETOPT_REQ_NOTHING }, + { "-silent", 's', RTGETOPT_REQ_NOTHING }, + { "/silent", 's', RTGETOPT_REQ_NOTHING }, +#ifdef VBOX_WITH_CODE_SIGNING + { "--no-silent-cert", 'c', RTGETOPT_REQ_NOTHING }, + { "-no-silent-cert", 'c', RTGETOPT_REQ_NOTHING }, + { "/no-silent-cert", 'c', RTGETOPT_REQ_NOTHING }, + { "--no-install-timestamp-ca", 't', RTGETOPT_REQ_NOTHING }, + { "--force-install-timestamp-ca", 'T', RTGETOPT_REQ_NOTHING }, +#endif + { "--logging", 'l', RTGETOPT_REQ_NOTHING }, + { "-logging", 'l', RTGETOPT_REQ_NOTHING }, + { "--msi-log-file", KVBOXSTUBOPT_MSI_LOG_FILE, RTGETOPT_REQ_STRING }, + { "-msilogfile", KVBOXSTUBOPT_MSI_LOG_FILE, RTGETOPT_REQ_STRING }, + { "/logging", 'l', RTGETOPT_REQ_NOTHING }, + { "--path", 'p', RTGETOPT_REQ_STRING }, + { "-path", 'p', RTGETOPT_REQ_STRING }, + { "/path", 'p', RTGETOPT_REQ_STRING }, + { "--msiparams", 'm', RTGETOPT_REQ_STRING }, + { "-msiparams", 'm', RTGETOPT_REQ_STRING }, + { "--msi-prop", 'P', RTGETOPT_REQ_STRING }, + { "--reinstall", 'f', RTGETOPT_REQ_NOTHING }, + { "-reinstall", 'f', RTGETOPT_REQ_NOTHING }, + { "/reinstall", 'f', RTGETOPT_REQ_NOTHING }, + { "--ignore-reboot", 'r', RTGETOPT_REQ_NOTHING }, + { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, + { "-verbose", 'v', RTGETOPT_REQ_NOTHING }, + { "/verbose", 'v', RTGETOPT_REQ_NOTHING }, + { "--version", 'V', RTGETOPT_REQ_NOTHING }, + { "-version", 'V', RTGETOPT_REQ_NOTHING }, + { "/version", 'V', RTGETOPT_REQ_NOTHING }, + { "--help", 'h', RTGETOPT_REQ_NOTHING }, + { "-help", 'h', RTGETOPT_REQ_NOTHING }, + { "/help", 'h', RTGETOPT_REQ_NOTHING }, + { "/?", 'h', RTGETOPT_REQ_NOTHING }, + }; + + RTGETOPTSTATE GetState; + vrc = RTGetOptInit(&GetState, argc, argv, s_aOptions, RT_ELEMENTS(s_aOptions), 1, 0); + AssertRCReturn(vrc, ShowError("RTGetOptInit failed: %Rrc", vrc)); + + /* Loop over the arguments. */ + int ch; + RTGETOPTUNION ValueUnion; + while ((ch = RTGetOpt(&GetState, &ValueUnion)) != 0) + { + switch (ch) + { + case 'f': /* Force re-installation. */ + if (szMSIArgs[0]) + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), " "); + if (RT_SUCCESS(vrc)) + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), "REINSTALLMODE=vomus REINSTALL=ALL"); + if (RT_FAILURE(vrc)) + return ShowSyntaxError("Out of space for MSI parameters and properties"); + break; + + case 'x': + fExtractOnly = true; + break; + + case 's': + g_fSilent = true; + break; + +#ifdef VBOX_WITH_CODE_SIGNING + case 'c': + fEnableSilentCert = false; + break; + case 't': + fInstallTimestampCA = false; + break; + case 'T': + fForceTimestampCaInstall = fInstallTimestampCA = true; + break; +#endif + case 'l': + fEnableLogging = true; + break; + + case KVBOXSTUBOPT_MSI_LOG_FILE: + if (*ValueUnion.psz == '\0') + szMSILogFile[0] = '\0'; + else + { + vrc = RTPathAbs(ValueUnion.psz, szMSILogFile, sizeof(szMSILogFile)); + if (RT_FAILURE(vrc)) + return ShowSyntaxError("MSI log file path is too long (%Rrc)", vrc); + } + break; + + case 'p': + if (*ValueUnion.psz == '\0') + szExtractPath[0] = '\0'; + else + { + vrc = RTPathAbs(ValueUnion.psz, szExtractPath, sizeof(szExtractPath)); + if (RT_FAILURE(vrc)) + return ShowSyntaxError("Extraction path is too long (%Rrc)", vrc); + } + break; + + case 'm': + if (szMSIArgs[0]) + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), " "); + if (RT_SUCCESS(vrc)) + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), ValueUnion.psz); + if (RT_FAILURE(vrc)) + return ShowSyntaxError("Out of space for MSI parameters and properties"); + break; + + case 'P': + { + const char *pszProp = ValueUnion.psz; + if (strpbrk(pszProp, " \t\n\r") == NULL) + { + vrc = RTGetOptFetchValue(&GetState, &ValueUnion, RTGETOPT_REQ_STRING); + if (RT_SUCCESS(vrc)) + { + size_t cchMsiArgs = strlen(szMSIArgs); + if (RTStrPrintf2(&szMSIArgs[cchMsiArgs], sizeof(szMSIArgs) - cchMsiArgs, + strpbrk(ValueUnion.psz, " \t\n\r") == NULL ? "%s%s=%s" : "%s%s=\"%s\"", + cchMsiArgs ? " " : "", pszProp, ValueUnion.psz) <= 1) + return ShowSyntaxError("Out of space for MSI parameters and properties"); + } + else if (vrc == VERR_GETOPT_REQUIRED_ARGUMENT_MISSING) + return ShowSyntaxError("--msi-prop takes two arguments, the 2nd is missing"); + else + return ShowSyntaxError("Failed to get 2nd --msi-prop argument: %Rrc", vrc); + } + else + return ShowSyntaxError("The first argument to --msi-prop must not contain spaces: %s", pszProp); + break; + } + + case 'r': + fIgnoreReboot = true; + break; + + case 'V': + ShowInfo("Version: %u.%u.%ur%u", VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV); + return RTEXITCODE_SUCCESS; + + case 'v': + g_iVerbosity++; + break; + + case 'h': + ShowInfo("-- %s v%u.%u.%ur%u --\n" + "\n" + "Command Line Parameters:\n\n" + "--extract\n" + " Extract file contents to temporary directory\n" + "--logging\n" + " Enables MSI installer logging (to extract path)\n" + "--msi-log-file \n" + " Sets MSI logging to \n" + "--msiparams \n" + " Specifies extra parameters for the MSI installers\n" + " double quoted arguments must be doubled and put\n" + " in quotes: --msiparams \"PROP=\"\"a b c\"\"\"\n" + "--msi-prop \n" + " Adds = to the MSI parameters,\n" + " quoting the property value if necessary\n" +#ifdef VBOX_WITH_CODE_SIGNING + "--no-silent-cert\n" + " Do not install VirtualBox Certificate automatically\n" + " when --silent option is specified\n" +#endif +#ifdef VBOX_WITH_VBOX_LEGACY_TS_CA + "--force-install-timestamp-ca\n" + " Install the timestamp CA needed for supporting\n" + " legacy Windows versions regardless of the version or\n" + " type of Windows VirtualBox is being installed on.\n" + " Default: All except Windows 10 & 11 desktop\n" + "--no-install-timestamp-ca\n" + " Do not install the above mentioned timestamp CA.\n" +#endif + "--path\n" + " Sets the path of the extraction directory\n" + "--reinstall\n" + " Forces VirtualBox to get re-installed\n" + "--ignore-reboot\n" + " Do not set exit code to 3010 if a reboot is required\n" + "--silent\n" + " Enables silent mode installation\n" + "--version\n" + " Displays version number and exit\n" + "-?, -h, --help\n" + " Displays this help text and exit\n" + "\n" + "Examples:\n" + " %s --msiparams \"INSTALLDIR=\"\"C:\\Program Files\\VirtualBox\"\"\"\n" + " %s --extract -path C:\\VBox", + VBOX_STUB_TITLE, VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV, + argv[0], argv[0]); + return RTEXITCODE_SUCCESS; + + case VINF_GETOPT_NOT_OPTION: + /* Are (optional) MSI parameters specified and this is the last + * parameter? Append everything to the MSI parameter list then. */ + /** @todo r=bird: this makes zero sense */ + if (szMSIArgs[0]) + { + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), " "); + if (RT_SUCCESS(vrc)) + vrc = RTStrCat(szMSIArgs, sizeof(szMSIArgs), ValueUnion.psz); + if (RT_FAILURE(vrc)) + return ShowSyntaxError("Out of space for MSI parameters and properties"); + continue; + } + /* Fall through is intentional. */ + + default: + if (g_fSilent) + return RTGetOptPrintError(ch, &ValueUnion); + if (ch == VERR_GETOPT_UNKNOWN_OPTION) + return ShowSyntaxError("Unknown option \"%s\"\n" + "Please refer to the command line help by specifying \"-?\"\n" + "to get more information.", ValueUnion.psz); + return ShowSyntaxError("Parameter parsing error: %Rrc\n" + "Please refer to the command line help by specifying \"-?\"\n" + "to get more information.", ch); + } + } + + /* + * Check if we're already running and jump out if so (this is mainly to + * protect the TEMP directory usage, right?). + */ + SetLastError(0); + HANDLE hMutexAppRunning = CreateMutexW(NULL, FALSE, L"VBoxStubInstaller"); + if ( hMutexAppRunning != NULL + && GetLastError() == ERROR_ALREADY_EXISTS) + { + CloseHandle(hMutexAppRunning); /* close it so we don't keep it open while showing the error message. */ + return ShowError("Another installer is already running"); + } + +/** @todo + * + * Split the remainder up in functions and simplify the code flow!! + * + * */ + RTEXITCODE rcExit = RTEXITCODE_SUCCESS; + RTListInit(&g_TmpFiles); + + /* + * Create a random extraction directory in the temporary directory if none + * was given by the user (see @bugref{10201}). + */ + PSTUBCLEANUPREC pExtractDirRec = NULL; /* This also indicates that */ + if (szExtractPath[0] == '\0') + { + vrc = RTPathTemp(szExtractPath, sizeof(szExtractPath)); + if (RT_FAILURE(vrc)) + { + CloseHandle(hMutexAppRunning); /* close it so we don't keep it open while showing the error message. */ + return ShowError("Failed to find temporary directory: %Rrc", vrc); + } + if (!fExtractOnly) /* Only use a random sub-dir if we extract + run (and not just extract). */ + { + vrc = RTPathAppend(szExtractPath, sizeof(szExtractPath), "XXXXXXXXXXXXXXXXXXXXXXXX"); + if (RT_SUCCESS(vrc)) + /** @todo Need something that return a handle as well as a path. */ + vrc = RTDirCreateTemp(szExtractPath, 0700); + if (RT_FAILURE(vrc)) + { + CloseHandle(hMutexAppRunning); /* close it so we don't keep it open while showing the error message. */ + return ShowError("Failed to create extraction path: %Rrc", vrc); + } + pExtractDirRec = AddCleanupRec(szExtractPath, false /*fIsFile*/); + } + } + RTPathChangeToDosSlashes(szExtractPath, true /* Force conversion. */); /* MSI requirement. */ + + /* + * Create a console for output if we're in verbose mode. + */ +#ifdef VBOX_STUB_WITH_OWN_CONSOLE + if (g_iVerbosity) + { + if (!AllocConsole()) + return ShowError("Unable to allocate console: LastError=%u\n", GetLastError()); + +# ifdef IPRT_NO_CRT + PRTSTREAM pNewStdOutErr = NULL; + vrc = RTStrmOpen("CONOUT$", "a", &pNewStdOutErr); + if (RT_SUCCESS(vrc)) + { + RTStrmSetBufferingMode(pNewStdOutErr, RTSTRMBUFMODE_UNBUFFERED); + g_pStdErr = pNewStdOutErr; + g_pStdOut = pNewStdOutErr; + } +# else + freopen("CONOUT$", "w", stdout); + setvbuf(stdout, NULL, _IONBF, 0); + freopen("CONOUT$", "w", stderr); +# endif + } +#endif /* VBOX_STUB_WITH_OWN_CONSOLE */ + + /* Convenience: Enable logging if a log file (via --log-file) is specified. */ + if ( !fEnableLogging + && szMSILogFile[0] != '\0') + fEnableLogging = true; + + if ( fEnableLogging + && szMSILogFile[0] == '\0') /* No log file explicitly specified? Use the extract path by default. */ + { + vrc = RTStrCopy(szMSILogFile, sizeof(szMSILogFile), szExtractPath); + if (RT_SUCCESS(vrc)) + vrc = RTPathAppend(szMSILogFile, sizeof(szMSILogFile), "VBoxInstallLog.txt"); + if (RT_FAILURE(vrc)) + return ShowError("Error creating MSI log file name, rc=%Rrc", vrc); + } + + if (g_iVerbosity) + { + RTPrintf("Extraction path : %s\n", szExtractPath); + RTPrintf("Silent installation : %RTbool\n", g_fSilent); +#ifdef VBOX_WITH_CODE_SIGNING + RTPrintf("Certificate installation : %RTbool\n", fEnableSilentCert); +#endif + RTPrintf("Additional MSI parameters: %s\n", szMSIArgs[0] ? szMSIArgs : ""); + RTPrintf("Logging to file : %s\n", szMSILogFile[0] ? szMSILogFile : ""); + } + + /* + * 32-bit is not officially supported any more. + */ + if ( !fExtractOnly + && !g_fSilent + && !IsWow64()) + rcExit = ShowError("32-bit Windows hosts are not supported by this VirtualBox release."); + else + { + /* + * Read our manifest. + */ + VBOXSTUBPKGHEADER const *pHeader = NULL; + vrc = FindData("MANIFEST", (uint8_t const **)&pHeader, NULL); + if (RT_SUCCESS(vrc)) + { + /** @todo If we could, we should validate the header. Only the magic isn't + * commonly defined, nor the version number... */ + + /* + * Up to this point, we haven't done anything that requires any cleanup. + * From here on, we do everything in functions so we can counter clean up. + */ + rcExit = ExtractFiles(pHeader->cPackages, szExtractPath, fExtractOnly, &pExtractDirRec); + if (rcExit == RTEXITCODE_SUCCESS) + { + if (fExtractOnly) + ShowInfo("Files were extracted to: %s", szExtractPath); + else + { + rcExit = CopyCustomDir(szExtractPath); +#ifdef VBOX_WITH_CODE_SIGNING +# ifdef VBOX_WITH_VBOX_LEGACY_TS_CA + if (rcExit == RTEXITCODE_SUCCESS && fInstallTimestampCA) + rcExit = InstallTimestampCA(fForceTimestampCaInstall); +# endif + if (rcExit == RTEXITCODE_SUCCESS && fEnableSilentCert && g_fSilent) + rcExit = InstallCertificates(); +#endif + unsigned iPackage = 0; + while ( iPackage < pHeader->cPackages + && (rcExit == RTEXITCODE_SUCCESS || rcExit == (RTEXITCODE)ERROR_SUCCESS_REBOOT_REQUIRED)) + { + RTEXITCODE rcExit2 = ProcessPackage(iPackage, szMSIArgs, szMSILogFile[0] ? szMSILogFile : NULL); + if (rcExit2 != RTEXITCODE_SUCCESS) + rcExit = rcExit2; + iPackage++; + } + } + } + + /* + * Do cleanups unless we're only extracting (ignoring failures for now). + */ + if (!fExtractOnly) + { + RTPathSetCurrent(".."); + CleanUp(!fEnableLogging && pExtractDirRec && !pExtractDirRec->fDontDelete ? szExtractPath : NULL); + } + + /* Free any left behind cleanup records (not strictly needed). */ + PSTUBCLEANUPREC pCur, pNext; + RTListForEachSafe(&g_TmpFiles, pCur, pNext, STUBCLEANUPREC, ListEntry) + { + RTListNodeRemove(&pCur->ListEntry); + RTMemFree(pCur); + } + } + else + rcExit = ShowError("Internal package error: Manifest not found (%Rrc)", vrc); + } + +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0501 +# ifdef VBOX_STUB_WITH_OWN_CONSOLE + if (g_iVerbosity) + FreeConsole(); +# endif /* VBOX_STUB_WITH_OWN_CONSOLE */ +#endif + + /* + * Release instance mutex just to be on the safe side. + */ + if (hMutexAppRunning != NULL) + CloseHandle(hMutexAppRunning); + + return rcExit != (RTEXITCODE)ERROR_SUCCESS_REBOOT_REQUIRED || !fIgnoreReboot ? rcExit : RTEXITCODE_SUCCESS; +} + +#ifndef IPRT_NO_CRT +int WINAPI WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + char *lpCmdLine, + int nCmdShow) +{ + RT_NOREF(hInstance, hPrevInstance, lpCmdLine, nCmdShow); + return main(__argc, __argv); +} +#endif + diff --git a/src/VBox/Installer/win/Stub/VBoxStub.h b/src/VBox/Installer/win/Stub/VBoxStub.h new file mode 100644 index 00000000..4dcfff38 --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStub.h @@ -0,0 +1,40 @@ +/* $Id: VBoxStub.h $ */ +/** @file + * VBoxStub - VirtualBox's Windows installer stub. + */ + +/* + * Copyright (C) 2009-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_Stub_VBoxStub_h +#define VBOX_INCLUDED_SRC_Stub_VBoxStub_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +#define VBOX_STUB_TITLE "VirtualBox Installer" + +typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); +LPFN_ISWOW64PROCESS fnIsWow64Process; + +#endif /* !VBOX_INCLUDED_SRC_Stub_VBoxStub_h */ + diff --git a/src/VBox/Installer/win/Stub/VBoxStub.manifest b/src/VBox/Installer/win/Stub/VBoxStub.manifest new file mode 100644 index 00000000..37eaf957 --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStub.manifest @@ -0,0 +1,28 @@ + + + +VirtualBox Windows Installer + + + + + + + + true + PerMonitorV2 + + + diff --git a/src/VBox/Installer/win/Stub/VBoxStub.rc b/src/VBox/Installer/win/Stub/VBoxStub.rc new file mode 100644 index 00000000..1953348c --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStub.rc @@ -0,0 +1,66 @@ +/* $Id: VBoxStub.rc $*/ +/** @file + * Resource file for the Windows install stub program. + */ + +/* + * Copyright (C) 2009-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include +#include +#include "resource.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VBOX_RC_FILE_VERSION + PRODUCTVERSION VBOX_RC_FILE_VERSION + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK + FILEFLAGS VBOX_RC_FILE_FLAGS + FILEOS VBOX_RC_FILE_OS + FILETYPE VBOX_RC_TYPE_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "VirtualBox Installer\0" + VALUE "InternalName", "VirtualBox-" RT_XSTR(VBOX_VERSION_MAJOR) "." RT_XSTR(VBOX_VERSION_MINOR) "." RT_XSTR(VBOX_VERSION_BUILD) "-r" RT_XSTR(VBOX_SVN_REV) "-Win\0" + VALUE "OriginalFilename", "VirtualBox-" RT_XSTR(VBOX_VERSION_MAJOR) "." RT_XSTR(VBOX_VERSION_MINOR) "." RT_XSTR(VBOX_VERSION_BUILD) "-r" RT_XSTR(VBOX_SVN_REV) "-Win.exe\0" + VALUE "CompanyName", VBOX_RC_COMPANY_NAME + VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR + VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT + VALUE "ProductName", VBOX_RC_PRODUCT_NAME_STR + VALUE "ProductVersion", VBOX_RC_PRODUCT_VERSION_STR + VBOX_RC_MORE_STRINGS + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#include "VBoxStub-icon.rc" +#include "VBoxStub-manifest.rc" + diff --git a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp new file mode 100644 index 00000000..09db3db7 --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.cpp @@ -0,0 +1,152 @@ +/* $Id: VBoxStubCertUtil.cpp $ */ +/** @file + * VBoxStub - VirtualBox's Windows installer stub (certificate manipulations). + * + * NOTE: The content of this file is partly + * grabbed from src/VBox/Additions/WINNT/tools/VBoxCertUtil.cpp + */ + +/* + * Copyright (C) 2012-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include + +#include +#include +#include +#include + + +/** + * Reads a certificate from a (const char []) buffer, returning a context + * or a the handle to a temporary memory store. + * + * @returns true on success, false on failure (error message written). + * @param kpCertBuf The pointer to the buffer containing the + * certificates. + * @param cbCertBuf Size of @param kpCertBuf in bytes. + * @param ppOutCtx Where to return the handle to the temporary + * memory store. + */ +static bool readCertBuf(const unsigned char kpCertBuf[], DWORD cbCertBuf, PCCERT_CONTEXT *ppOutCtx) +{ + *ppOutCtx = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + (PBYTE)kpCertBuf, cbCertBuf); + if (*ppOutCtx) + return true; + + return false; +} + +/** + * Opens a certificate store. + * + * @returns true on success, false on failure (error message written). + * @param dwDst The destination, like + * CERT_SYSTEM_STORE_LOCAL_MACHINE or + * CERT_SYSTEM_STORE_CURRENT_USER. + * @param pszStoreNm The store name. + */ +static HCERTSTORE openCertStore(DWORD dwDst, const char *pszStoreNm) +{ + HCERTSTORE hStore = NULL; + PRTUTF16 pwszStoreNm; + int rc = RTStrToUtf16(pszStoreNm, &pwszStoreNm); + if (RT_SUCCESS(rc)) + { + /* + * Make sure CERT_STORE_OPEN_EXISTING_FLAG is not set. This causes Windows XP + * to return ACCESS_DENIED when installing TrustedPublisher certificates via + * CertAddCertificateContextToStore() if the TrustedPublisher store never has + * been used (through certmgr.exe and friends) yet. + * + * According to MSDN, if neither CERT_STORE_OPEN_EXISTING_FLAG nor + * CERT_STORE_CREATE_NEW_FLAG is set, the store will be either opened or + * created accordingly. + */ + dwDst &= ~CERT_STORE_OPEN_EXISTING_FLAG; + + hStore = CertOpenStore(CERT_STORE_PROV_SYSTEM_W, + PKCS_7_ASN_ENCODING | X509_ASN_ENCODING, + NULL /* hCryptProv = default */, + dwDst, + pwszStoreNm); + + RTUtf16Free(pwszStoreNm); + } + return hStore; +} + +/** + * Adds a certificate to a store. + * + * @returns true on success, false on failure (error message written). + * @param dwDst The destination, like + * CERT_SYSTEM_STORE_LOCAL_MACHINE or + * CERT_SYSTEM_STORE_CURRENT_USER. + * @param pszStoreNm The store name. + * @param kpCertBuf Buffer that contains a certificate + * @param cbCertBuf Size of @param kpCertBuf in bytes + */ +bool addCertToStore(DWORD dwDst, const char *pszStoreNm, const unsigned char kpCertBuf[], DWORD cbCertBuf) +{ + /* + * Get certificate from buffer. + */ + PCCERT_CONTEXT pSrcCtx = NULL; + bool fRc = false; + + if (!readCertBuf(kpCertBuf, cbCertBuf, &pSrcCtx)) + { + RTMsgError("Unable to get certificate context: %d", GetLastError()); + return fRc; + } + + /* + * Open the certificates store. + */ + HCERTSTORE hDstStore = openCertStore(dwDst, pszStoreNm); + if (hDstStore) + { + /* + * Finally, add certificate to store + */ + if (CertAddCertificateContextToStore(hDstStore, pSrcCtx, CERT_STORE_ADD_REPLACE_EXISTING, NULL)) + fRc = true; + else + RTMsgError("Unable to install certificate: %d", GetLastError()); + + CertCloseStore(hDstStore, CERT_CLOSE_STORE_CHECK_FLAG); + } + else + RTMsgError("Unable to open certificates store: %d", GetLastError()); + + /* Release resources */ + CertFreeCertificateContext(pSrcCtx); + + return fRc; +} diff --git a/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h new file mode 100644 index 00000000..6f221f6d --- /dev/null +++ b/src/VBox/Installer/win/Stub/VBoxStubCertUtil.h @@ -0,0 +1,37 @@ +/* $Id: VBoxStubCertUtil.h $ */ +/** @file + * VBoxStub - VirtualBox's Windows installer stub (certificate manipulations). + */ + +/* + * Copyright (C) 2012-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_Stub_VBoxStubCertUtil_h +#define VBOX_INCLUDED_SRC_Stub_VBoxStubCertUtil_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +extern bool addCertToStore(DWORD dwDst, const char *pszStoreNm, const unsigned char kpCertBuf[], DWORD cbCertBuf); + +#endif /* !VBOX_INCLUDED_SRC_Stub_VBoxStubCertUtil_h */ + diff --git a/src/VBox/Installer/win/Stub/crypt32.def b/src/VBox/Installer/win/Stub/crypt32.def new file mode 100644 index 00000000..4c1c6ea8 --- /dev/null +++ b/src/VBox/Installer/win/Stub/crypt32.def @@ -0,0 +1,35 @@ +; $Id: crypt32.def $ +;; @file +; Definitions for CRYPT32.DLL lazy import library. +; + +; +; Copyright (C) 2009-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY CRYPT32.DLL +EXPORTS + _CertCreateCertificateContext@12 + _CertOpenStore@20 + _CertFreeCertificateContext@4 + _CertAddCertificateContextToStore@16 + _CertCloseStore@8 + diff --git a/src/VBox/Installer/win/Stub/msi.def b/src/VBox/Installer/win/Stub/msi.def new file mode 100644 index 00000000..7d608ace --- /dev/null +++ b/src/VBox/Installer/win/Stub/msi.def @@ -0,0 +1,33 @@ +; $Id: msi.def $ +;; @file +; Definitions for MSI.DLL lazy import library. +; + +; +; Copyright (C) 2009-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY MSI.DLL +EXPORTS + _MsiInstallProductW@8 + _MsiEnableLogW@12 + _MsiSetInternalUI@8 + diff --git a/src/VBox/Installer/win/Stub/resource.h b/src/VBox/Installer/win/Stub/resource.h new file mode 100644 index 00000000..ecf87f94 --- /dev/null +++ b/src/VBox/Installer/win/Stub/resource.h @@ -0,0 +1,42 @@ +/* $Id: resource.h $ */ +/** @file + * VBoxStub - resource header file. + */ + +/* + * Copyright (C) 2009-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_Stub_resource_h +#define VBOX_INCLUDED_SRC_Stub_resource_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +#define IDI_VIRTUALBOX 101 + +#ifndef RT_MANIFEST +# define RT_MANIFEST 24 +#endif +#define APP_MANIFEST 1 + +#endif /* !VBOX_INCLUDED_SRC_Stub_resource_h */ + diff --git a/src/VBox/Installer/win/Stub/shell32.def b/src/VBox/Installer/win/Stub/shell32.def new file mode 100644 index 00000000..b45eb7ea --- /dev/null +++ b/src/VBox/Installer/win/Stub/shell32.def @@ -0,0 +1,32 @@ +; $Id: shell32.def $ +;; @file +; Definitions for SHELL32.DLL lazy import library. +; + +; +; Copyright (C) 2009-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY SHELL32.DLL +EXPORTS + _CommandLineToArgvW@8 + _SHFileOperationW@4 + diff --git a/src/VBox/Installer/win/Stub/user32.def b/src/VBox/Installer/win/Stub/user32.def new file mode 100644 index 00000000..7500d039 --- /dev/null +++ b/src/VBox/Installer/win/Stub/user32.def @@ -0,0 +1,33 @@ +; $Id: user32.def $ +;; @file +; Definitions for USER32.DLL lazy import library. +; + +; +; Copyright (C) 2009-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY USER32.DLL +EXPORTS + _MessageBoxW@16 + _MessageBoxA@16 + _GetDesktopWindow@0 + diff --git a/src/VBox/Installer/win/Stub/ws2_32.def b/src/VBox/Installer/win/Stub/ws2_32.def new file mode 100644 index 00000000..672fde1e --- /dev/null +++ b/src/VBox/Installer/win/Stub/ws2_32.def @@ -0,0 +1,32 @@ +; $Id: ws2_32.def $ +;; @file +; Definitions for WS2_32.DLL lazy import library. +; + +; +; Copyright (C) 2009-2022 Oracle and/or its affiliates. +; +; This file is part of VirtualBox base platform packages, as +; available from https://www.virtualbox.org. +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation, in version 3 of the +; License. +; +; This program is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, see . +; +; SPDX-License-Identifier: GPL-3.0-only +; + +LIBRARY WS2_32.DLL +EXPORTS + _WSASetLastError@4 + _WSAGetLastError@0 + diff --git a/src/VBox/Installer/win/StubBld/Makefile.kmk b/src/VBox/Installer/win/StubBld/Makefile.kmk new file mode 100644 index 00000000..f27d9c96 --- /dev/null +++ b/src/VBox/Installer/win/StubBld/Makefile.kmk @@ -0,0 +1,38 @@ +# $Id: Makefile.kmk $ +## @file +# Sub-Makefile for the stub builder. +# + +# +# Copyright (C) 2009-2022 Oracle and/or its affiliates. +# +# This file is part of VirtualBox base platform packages, as +# available from https://www.virtualbox.org. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, in version 3 of the +# License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# SPDX-License-Identifier: GPL-3.0-only +# + +SUB_DEPTH = ../../../../.. +include $(KBUILD_PATH)/subheader.kmk + +# Not a build program as it is needed for repacking after we Get the MS driver blessing. +PROGRAMS += VBoxStubBld +VBoxStubBld_TEMPLATE= VBoxBldProg +VBoxStubBld_DEFS = _WIN32_WINNT=0x0400 VBOX_SVN_REV=$(VBOX_SVN_REV) $(VBOX_SVN_REV_KMK) +VBoxStubBld_SOURCES = VBoxStubBld.cpp + +include $(FILE_KBUILD_SUB_FOOTER) + diff --git a/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp b/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp new file mode 100644 index 00000000..c85d8107 --- /dev/null +++ b/src/VBox/Installer/win/StubBld/VBoxStubBld.cpp @@ -0,0 +1,331 @@ +/* $Id: VBoxStubBld.cpp $ */ +/** @file + * VBoxStubBld - VirtualBox's Windows installer stub builder. + */ + +/* + * Copyright (C) 2009-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + + +/********************************************************************************************************************************* +* Header Files * +*********************************************************************************************************************************/ +#include +#include +#include + +#include +#include + +#include "VBoxStubBld.h" + + +static HRESULT GetFile(const char *pszFilePath, HANDLE *phFile, DWORD *pcbFile) +{ + HANDLE hFile = CreateFileA(pszFilePath, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + SetLastError(NO_ERROR); + LARGE_INTEGER cbFile; + if (GetFileSizeEx(hFile, &cbFile)) + { + if (cbFile.HighPart == 0) + { + *pcbFile = cbFile.LowPart; + *phFile = hFile; + return S_OK; + } + fprintf(stderr, "error: File '%s' is too large: %llu bytes\n", pszFilePath, cbFile.QuadPart); + } + else + fprintf(stderr, "error: GetFileSizeEx failed on '%s': %lu\n", pszFilePath, GetLastError()); + CloseHandle(hFile); + } + else + fprintf(stderr, "error: CreateFileA failed on '%s': %lu\n", pszFilePath, GetLastError()); + *phFile = INVALID_HANDLE_VALUE; + return E_FAIL; +} + +static HRESULT MyUpdateResource(HANDLE hFile, DWORD cbFile, HANDLE hResourceUpdate, + const char *pszResourceType, const char *pszResourceId) +{ + HRESULT hr = E_FAIL; + HANDLE hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL); + if (hMap != NULL) + { + PVOID pvFile = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, cbFile); + if (pvFile) + { + if (UpdateResourceA(hResourceUpdate, pszResourceType, pszResourceId, + MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), pvFile, cbFile)) + hr = S_OK; + else + fprintf(stderr, "error: UpdateResourceA failed: %lu\n", GetLastError()); + + UnmapViewOfFile(pvFile); + } + else + fprintf(stderr, "error: MapViewOfFile failed: %lu\n", GetLastError()); + CloseHandle(hMap); + } + else + fprintf(stderr, "error: CreateFileMappingW failed: %lu\n", GetLastError()); + return hr; +} + +static HRESULT IntegrateFile(HANDLE hResourceUpdate, const char *pszResourceType, + const char *pszResourceId, const char *pszFilePath) +{ + HANDLE hFile = INVALID_HANDLE_VALUE; + DWORD cbFile = 0; + HRESULT hr = GetFile(pszFilePath, &hFile, &cbFile); + if (SUCCEEDED(hr)) + { + hr = MyUpdateResource(hFile, cbFile, hResourceUpdate, pszResourceType, pszResourceId); + if (FAILED(hr)) + printf("ERROR: Error updating resource for file %s!", pszFilePath); + CloseHandle(hFile); + } + else + hr = HRESULT_FROM_WIN32(GetLastError()); + return hr; +} + +static char *MyPathFilename(const char *pszPath) +{ + const char *pszName = pszPath; + for (const char *psz = pszPath;; psz++) + { + switch (*psz) + { + /* handle separators. */ + case ':': + pszName = psz + 1; + break; + + case '\\': + case '/': + pszName = psz + 1; + break; + + /* the end */ + case '\0': + if (*pszName) + return (char *)(void *)pszName; + return NULL; + } + } + + /* will never get here */ +} + + +int main(int argc, char* argv[]) +{ + /* + * Parse arguments. + */ + const char *pszSetupStub = "VBoxStub.exe"; + const char *pszOutput = "VirtualBox-MultiArch.exe"; + + printf(VBOX_PRODUCT " Stub Builder v%d.%d.%d.%d\n", + VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV); + + struct VBOXSTUBBUILDPKG + { + const char *pszSrcPath; + VBOXSTUBPKGARCH enmArch; + } aBuildPkgs[VBOXSTUB_MAX_PACKAGES] = { { NULL } }; + VBOXSTUBPKGHEADER StubHdr = + { + /*.szMagic = */ VBOXSTUBPKGHEADER_MAGIC_SZ, + /*.cPackages = */ 0 + }; + + for (int i = 1; i < argc; i++) + { + const char *pszArg = argv[i]; + if ( strcmp(pszArg, "--help") == 0 + || strcmp(pszArg, "-help") == 0 + || strcmp(pszArg, "-h") == 0 + || strcmp(pszArg, "-?") == 0) + { + printf("usage: %s -out -stub [-target-all ] [-target- ]\n", argv[0]); + return RTEXITCODE_SUCCESS; + } + + /* The remaining options all take a while. */ + if ( strcmp(pszArg, "-out") + && strcmp(pszArg, "-stub") + && strcmp(pszArg, "-target-all") + && strcmp(pszArg, "-target-x86") + && strcmp(pszArg, "-target-amd64")) + { + fprintf(stderr, "syntax error: Invalid parameter: %s\n", argv[i]); + return RTEXITCODE_SYNTAX; + } + + i++; + if (i >= argc) + { + fprintf(stderr, "syntax error: Option '%s' takes a value argument!\n", pszArg); + return RTEXITCODE_SYNTAX; + } + const char *pszValue = argv[i]; + + /* Process the individual options. */ + if (strcmp(pszArg, "-out") == 0) + pszOutput = pszValue; + else if (strcmp(pszArg, "-stub") == 0) + pszSetupStub = pszValue; + else + { + if (StubHdr.cPackages >= RT_ELEMENTS(aBuildPkgs)) + { + fprintf(stderr, "error: Too many packages specified!\n"); + return RTEXITCODE_FAILURE; + } + aBuildPkgs[StubHdr.cPackages].pszSrcPath = pszValue; + if (strcmp(pszArg, "-target-all") == 0) + aBuildPkgs[StubHdr.cPackages].enmArch = VBOXSTUBPKGARCH_ALL; + else if (strcmp(pszArg, "-target-amd64") == 0) + aBuildPkgs[StubHdr.cPackages].enmArch = VBOXSTUBPKGARCH_AMD64; + else if (strcmp(pszArg, "-target-x86") == 0) + aBuildPkgs[StubHdr.cPackages].enmArch = VBOXSTUBPKGARCH_X86; + else + { + fprintf(stderr, "internal error: %u\n", __LINE__); + return RTEXITCODE_FAILURE; + } + StubHdr.cPackages++; + } + } + + if (StubHdr.cPackages == 0) + { + fprintf(stderr, "syntax error: No packages specified! Exiting.\n"); + return RTEXITCODE_SYNTAX; + } + + printf("Stub: %s\n", pszSetupStub); + printf("Output: %s\n", pszOutput); + printf("# Packages: %u\n", StubHdr.cPackages); + + /* + * Copy the stub over the output file. + */ + if (!CopyFile(pszSetupStub, pszOutput, FALSE)) + { + fprintf(stderr, "ERROR: Could not copy the stub loader: %lu\n", GetLastError()); + return RTEXITCODE_SYNTAX; + } + + /* + * Start updating the resources of the output file. + */ + HANDLE hUpdate = BeginUpdateResourceA(pszOutput, FALSE); + if (hUpdate) + { + /* + * Add the file one by one to the output file. + */ + HRESULT hrc = S_OK; + for (BYTE i = 0; i < StubHdr.cPackages; i++) + { + printf("Integrating (Platform %d): %s\n", aBuildPkgs[i].enmArch, aBuildPkgs[i].pszSrcPath); + + /* + * Create the package header. + */ + VBOXSTUBPKG Package = {0}; + Package.enmArch = aBuildPkgs[i].enmArch; + + /* The resource name */ + hrc = StringCchPrintf(Package.szResourceName, sizeof(Package.szResourceName), "BIN_%02d", i); + if (FAILED(hrc)) + { + fprintf(stderr, "Internal error: %u\n", __LINE__); + break; + } + + /* Construct final name used when extracting. */ + hrc = StringCchCopy(Package.szFilename, sizeof(Package.szFilename), MyPathFilename(aBuildPkgs[i].pszSrcPath)); + if (FAILED(hrc)) + { + fprintf(stderr, "ERROR: Filename is too long: %s\n", aBuildPkgs[i].pszSrcPath); + break; + } + + /* + * Add the package header to the binary. + */ + char szHeaderName[32]; + hrc = StringCchPrintf(szHeaderName, sizeof(szHeaderName), "HDR_%02d", i); + if (FAILED(hrc)) + { + fprintf(stderr, "Internal error: %u\n", __LINE__); + break; + } + + if (!UpdateResourceA(hUpdate, RT_RCDATA, szHeaderName, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + &Package, sizeof(Package))) + { + fprintf(stderr, "ERROR: UpdateResourceA failed for the package header: %lu\n", GetLastError()); + hrc = E_FAIL; + break; + } + + /* + * Add the file content under the BIN_xx resource name. + */ + hrc = IntegrateFile(hUpdate, RT_RCDATA, Package.szResourceName, aBuildPkgs[i].pszSrcPath); + if (FAILED(hrc)) + break; + } + if (SUCCEEDED(hrc)) + { + /* + * Now add the header/manifest and complete the operation. + */ + if (UpdateResourceA(hUpdate, RT_RCDATA, "MANIFEST", MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + &StubHdr, sizeof(StubHdr))) + { + if (EndUpdateResourceA(hUpdate, FALSE /*fDiscard*/)) + { + printf("Successfully created the installer\n"); + return RTEXITCODE_SUCCESS; + } + fprintf(stderr, "ERROR: EndUpdateResourceA failed: %lu\n", GetLastError()); + } + else + fprintf(stderr, "ERROR: UpdateResourceA failed for the installer header/manifest: %lu\n", GetLastError()); + } + + EndUpdateResourceA(hUpdate, TRUE /*fDiscard*/); + hUpdate = NULL; + } + else + fprintf(stderr, "error: BeginUpdateResource failed: %lu\n", GetLastError()); + return RTEXITCODE_FAILURE; +} diff --git a/src/VBox/Installer/win/StubBld/VBoxStubBld.h b/src/VBox/Installer/win/StubBld/VBoxStubBld.h new file mode 100644 index 00000000..a7d5225d --- /dev/null +++ b/src/VBox/Installer/win/StubBld/VBoxStubBld.h @@ -0,0 +1,88 @@ +/* $Id: VBoxStubBld.h $ */ +/** @file + * VBoxStubBld - VirtualBox's Windows installer stub builder. + */ + +/* + * Copyright (C) 2009-2022 Oracle and/or its affiliates. + * + * This file is part of VirtualBox base platform packages, as + * available from https://www.virtualbox.org. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, in version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#ifndef VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h +#define VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h +#ifndef RT_WITHOUT_PRAGMA_ONCE +# pragma once +#endif + +#include +#include + +/**/ +#define VBOXSTUB_MAX_PACKAGES 128 + +/** */ +#define VBOXSTUBPKGHEADER_MAGIC_SZ "VBoxInstV1\0\0\0\0" + +/** + * VBox installer stub header, aka "MANIFEST". + * + * This just holds the number of packages present in the image. + */ +typedef struct VBOXSTUBPKGHEADER +{ + /** Magic value/string (VBOXSTUBPKGHEADER_MAGIC_SZ) */ + char szMagic[11 + 4]; + /** Number of packages following the header. */ + uint8_t cPackages; +} VBOXSTUBPKGHEADER; +AssertCompileSize(VBOXSTUBPKGHEADER, 16); +typedef VBOXSTUBPKGHEADER *PVBOXSTUBPKGHEADER; + +typedef enum VBOXSTUBPKGARCH +{ + /** Always extract. */ + VBOXSTUBPKGARCH_ALL = 1, + /** Extract on x86 hosts. */ + VBOXSTUBPKGARCH_X86, + /** Extract on AMD64 hosts. */ + VBOXSTUBPKGARCH_AMD64 +} VBOXSTUBPKGARCH; + +/** + * Package header/descriptor. + * + * This is found as "HDR_xx" where xx is replaced by the decimal package number, + * zero padded to two digits. + */ +typedef struct VBOXSTUBPKG +{ + /** The architecture for the file. */ + VBOXSTUBPKGARCH enmArch; + /** The name of the resource holding the file bytes. + * This is a pointless field, because the resource name is "BIN_xx" + * corresponding to the name of the resource containing this struct. */ + char szResourceName[28]; + /** The filename. */ + char szFilename[224]; +} VBOXSTUBPKG; +AssertCompileSize(VBOXSTUBPKG, 256); +typedef VBOXSTUBPKG *PVBOXSTUBPKG; + +#endif /* !VBOX_INCLUDED_SRC_StubBld_VBoxStubBld_h */ diff --git a/src/VBox/Installer/win/UserInterface.wxi b/src/VBox/Installer/win/UserInterface.wxi new file mode 100644 index 00000000..fdce16b2 --- /dev/null +++ b/src/VBox/Installer/win/UserInterface.wxi @@ -0,0 +1,1247 @@ + + + + + + + + + + 1 + + + 1 + + + !(loc.CancelDlg_Question) + + + + + + + + + + + + {\DlgVerdanaBold13}!(loc.WelcomeDlg_Header) + + + + + !(loc.WelcomeDlg_Body) + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + + 1 + + + + + + + + + + + + + + + + + [DlgTitleFont]!(loc.LicenseAgreementDlg_Header) + + + + !(loc.LicenseAgreementDlg_Body) + + + + + + + + + + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + "Yes"]]> + + + + + + 1 + + + + + + + + + {\DlgVerdanaBold13}!(loc.CheckSerialDlg_Header) + + + + + !(loc.CheckSerialDlg_Body) + + + + + + + + + + + + + + + + + + + + !(loc.CheckSerialDlg_Footer) + + + + + + 1 + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + + + + + + + {\DlgInvalidSerial}!(loc.WrongSerialDlg_Header) + + + + + !(loc.WrongSerialDlg_Desc1) + + + + !(loc.WrongSerialDlg_Desc2) + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + + 1 + + + + + + + + + + [DlgTitleFont]!(loc.CustomizeDlg_CustomSetup) + + + !(loc.CustomizeDlg_SelFeatures) + + + !(loc.CustomizeDlg_IconTree) + + + + 1 + Installed + + + !(loc.CustomizeDlg_DiskUsage) + 1 + + + + + !(loc.CustomizeDlg_SelItemDesc) + + + + !(loc.CustomizeDlg_SelItemSize) + + + + !(loc.CustomizeDlg_SelItemPath) + + + Installed + + + + Installed + + + + + + + + 1 + + + + + + [Version_text] $(var.Property_Version) + + + + + + + + + + + + + + [DlgTitleFont]!(loc.CustomizeDlg_CustomSetup) + + + !(loc.CustomizeDlg_SelFeatures) + + + + !(loc.SelectionNetworkTypeDlg_CommonDescription) + + + + + + + + !(loc.SelectionNetworkTypeDlg_DescriptionNDIS5) + NETWORKTYPE = "NDIS6" + NETWORKTYPE = "NDIS5" + + + !(loc.SelectionNetworkTypeDlg_DescriptionNDIS6) + NETWORKTYPE = "NDIS5" + NETWORKTYPE = "NDIS6" + + + + + + 1 + + + + + + [Version_text] $(var.Property_Version) + + + + + + + + [DlgTitleFont]!(loc.CustomizeDlg_CustomSetup) + + + !(loc.CustomizeDlg_SelFeatures) + + + !(loc.Customize2Dlg_Desc) + + + + + !(loc.Customize2Dlg_CreateStartMenuEntries) + + + !(loc.Customize2Dlg_CreateDesktopShortcut) + + + !(loc.Customize2Dlg_CreateQuickLaunch) + + + !(loc.Customize2Dlg_RegisterFileExtensions) + + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + + + + + + {\DlgWarnDisconNetIfaces}!(loc.WarnDisconNetIfacesDlg_Title) + + + + {\DlgWarnDisconNetIfaces}!(loc.WarnDisconNetIfacesDlg_Title2) + + + + + !(loc.WarnDisconNetIfacesDlg_Desc) + + + + !(loc.WarnDisconNetIfacesDlg_Question) + + + + + + + + [Version_text] $(var.Property_Version) + + + + + 1 + + + + + + + + + + + + {\DlgWarnPython}!(loc.WarnPythonDlg_Title) + + + + {\DlgWarnPython}!(loc.WarnPythonDlg_Title2) + + + + + !(loc.WarnPythonDlg_Desc) + + + + !(loc.WarnPythonDlg_Desc2) + + + + !(loc.WarnPythonDlg_Question) + + + + + + + + [Version_text] $(var.Property_Version) + + + + + 1 + + + + + + + 1 + + + + !(loc.DiskCostDlg_SpaceRequired) + + + !(loc.DiskCostDlg_NotEnoughSpace) + + + + [DlgTitleFont]!(loc.DiskCostDlg_SpaceRequirements) + + + + !(loc.DiskCostDlg_VolumeList) + + + + + + + + 1 + 1 + + + 1 + 1 + + + + + + + 1 + + + 1 + + + + + + !(loc.BrowseDlg_BrowseDestFolder) + + + + [DlgTitleFont]!(loc.BrowseDlg_ChangeCurFolder) + + + + + + + 1 + + + + + + + + + [DlgTitleFont]!(loc.VerifyReadyDlg_ReadyToInstall) + + + !(loc.VerifyReadyDlg_ReadyToBegin) + + + !(loc.VerifyReadyDlg_ClickInstall) + + + + 1]]> + + + + + + + + 1 + + + + + [Version_text] $(var.Property_Version) + + + + + + + + + + 1 + + + + + [Version_text] $(var.Property_Version) + + + + + + + !(loc.ExitDlg_ClickFinish) + + + + + + + !(loc.ExitDlg_StartVBox) + + + + + + + + {\DlgVerdanaBold13}!(loc.ExitDlg_InstComplete) + + + + + + + + + 1 + + + 1 + + + 1 + + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + + 1 + + + + + + + + + [Version_text] $(var.Property_Version) + + + + + + 1 + + + + 1 + + + + + + + + + + + + + + 1 + + + + [Version_text] $(var.Property_Version) + + + + + + + + {\DlgVerdanaBold13}!(loc.UserExitDlg_Header) + + + !(loc.UserExitDlg_Desc) + + + !(loc.UserExitDlg_Footer) + + + + + + + 1 + + + + + [Version_text] $(var.Property_Version) + + + + + + + + + + !(loc.ProgressDlg_PleaseWait) + + + + [DlgTitleFont][Progress1] [ProductName] + + + + + + + + + + + CostingComplete = 1 + 1]]> + + + + + + + + + + + + + 1 + + + + + {\DlgVerdanaBold13}!(loc.ResumeDlg_Header) + + + !(loc.ResumeDlg_Desc) + + + + [Version_text] $(var.Property_Version) + + + + + + + [DlgTitleFont]!(loc.MaintenanceTypeDlg_Repair) + + + 1 + 1 + 1 + 1 + + + [DlgTitleFont]!(loc.MaintenanceTypeDlg_Remove) + + + 1 + 1 + 1 + 1 + + + + + [Version_text] $(var.Property_Version) + + + + 1 + + + + 1 + + + + !(loc.MaintenanceTypeDlg_SelOption) + + + + [DlgTitleFont]!(loc.MaintenanceTypeDlg_Header) + + + + !(loc.MaintenanceTypeDlg_RemoveText) + + + !(loc.MaintenanceTypeDlg_RepairText) + + + + + + + {\DlgVerdanaBold13}!(loc.MaintenanceWelcomeDlg_Header) + + + + + [Version_text] $(var.Property_Version) + + + + CostingComplete = 1 + 1 + + + 1 + + + + + !(loc.MaintenanceWelcomeDlg_Desc) + + + + + + + + + + [Version_text] $(var.Property_Version) + + + + 1 + + + + !(loc.OutOfDiskDlg_InstallationExceeds) + + + !(loc.OutOfDiskDlg_NotEnoughDiskSpace) + + + + [DlgTitleFont]!(loc.OutOfDiskDlg_OutOfDiskSpace) + + + + {120}{70}{70}{70}{70} + + + + + + 1 + + + 1 + 1 + + + + !(loc.OutOfRbDiskDlg_InstallationExceeds) + + + !(loc.OutOfRbDiskDlg_NotEnoughDiskSpace) + + + + [DlgTitleFont]!(loc.OutOfRbDiskDlg_OutOfDiskSpace) + + + + {120}{70}{70}{70}{70} + + + !(loc.OutOfRbDiskDlg_Desc) + + + + + + + + [Version_text] $(var.Property_Version) + + + + 1 + + + 1]]> + 1]]> + + + + + + + 1 + + + + !(loc.VerifyRemoveDlg_Desc) + + + !(loc.VerifyRemoveDlg_ClickRemove) + + + + [DlgTitleFont]!(loc.VerifyRemoveDlg_Header) + + + + + + + 1]]> + 1]]> + 1]]> + + + + + + + + + [Version_text] $(var.Property_Version) + + + + 1 + + + + 1 + + + !(loc.VerifyRepairDlg_ReadyToBegin) + + + !(loc.VerifyRepairDlg_ClickRepair) + + + + [DlgTitleFont]!(loc.VerifyRepairDlg_Header) + + + + + + + 1 + + + !(loc.WaitForCostingDlg_PleaseWait) + + + + + + + + + DlgFont8 + + + + + + + + + !(loc.ProgressTextCostFinalize) + !(loc.ProgressTextCostInitialize) + !(loc.ProgressTextFileCost) + !(loc.ProgressTextInstallValidate) + !(loc.ProgressTextInstallFiles) + !(loc.ProgressTextInstallAdminPackage) + !(loc.ProgressTextCreateShortcuts) + !(loc.ProgressTextPublishComponents) + !(loc.ProgressTextPublishFeatures) + !(loc.ProgressTextPublishProduct) + !(loc.ProgressTextRegisterClassInfo) + !(loc.ProgressTextRegisterExtensionInfo) + !(loc.ProgressTextRegisterMIMEInfo) + !(loc.ProgressTextRegisterProgIdInfo) + !(loc.ProgressTextAllocateRegistrySpace) + !(loc.ProgressTextAppSearch) + !(loc.ProgressTextBindImage) + !(loc.ProgressTextCCPSearch) + !(loc.ProgressTextCreateFolders) + !(loc.ProgressTextDeleteServices) + !(loc.ProgressTextDuplicateFiles) + !(loc.ProgressTextFindRelatedProducts) + !(loc.ProgressTextInstallODBC) + !(loc.ProgressTextInstallServices) + !(loc.ProgressTextLaunchConditions) + !(loc.ProgressTextMigrateFeatureStates) + !(loc.ProgressTextMoveFiles) + !(loc.ProgressTextPatchFiles) + !(loc.ProgressTextProcessComponents) + !(loc.ProgressTextRegisterComPlus) + !(loc.ProgressTextRegisterFonts) + !(loc.ProgressTextRegisterProduct) + !(loc.ProgressTextRegisterTypeLibraries) + !(loc.ProgressTextRegisterUser) + !(loc.ProgressTextRemoveDuplicateFiles) + !(loc.ProgressTextRemoveEnvironmentStrings) + !(loc.ProgressTextRemoveExistingProducts) + !(loc.ProgressTextRemoveFiles) + !(loc.ProgressTextRemoveFolders) + !(loc.ProgressTextRemoveIniValues) + !(loc.ProgressTextRemoveODBC) + !(loc.ProgressTextRemoveRegistryValues) + !(loc.ProgressTextRemoveShortcuts) + !(loc.ProgressTextRMCCPSearch) + !(loc.ProgressTextSelfRegModules) + !(loc.ProgressTextSelfUnregModules) + !(loc.ProgressTextSetODBCFolders) + !(loc.ProgressTextStartServices) + !(loc.ProgressTextStopServices) + !(loc.ProgressTextUnpublishComponents) + !(loc.ProgressTextUnpublishFeatures) + !(loc.ProgressTextUnregisterClassInfo) + !(loc.ProgressTextUnregisterComPlus) + !(loc.ProgressTextUnregisterExtensionInfo) + !(loc.ProgressTextUnregisterFonts) + !(loc.ProgressTextUnregisterMIMEInfo) + !(loc.ProgressTextUnregisterProgIdInfo) + !(loc.ProgressTextUnregisterTypeLibraries) + !(loc.ProgressTextWriteEnvironmentStrings) + !(loc.ProgressTextWriteIniValues) + !(loc.ProgressTextWriteRegistryValues) + !(loc.ProgressTextAdvertise) + !(loc.ProgressTextGenerateScript) + !(loc.ProgressTextInstallSFPCatalogFile) + !(loc.ProgressTextMsiPublishAssemblies) + !(loc.ProgressTextMsiUnpublishAssemblies) + !(loc.ProgressTextRollback) + !(loc.ProgressTextRollbackCleanup) + !(loc.ProgressTextUnmoveFiles) + !(loc.ProgressTextUnpublishProduct) + + !(loc.UITextbytes) + !(loc.UITextGB) + !(loc.UITextKB) + !(loc.UITextMB) + + !(loc.UITextMenuAbsent) + !(loc.UITextMenuAdvertise) + !(loc.UITextMenuAllCD) + !(loc.UITextMenuAllLocal) + !(loc.UITextMenuAllNetwork) + !(loc.UITextMenuCD) + !(loc.UITextMenuLocal) + !(loc.UITextMenuNetwork) + !(loc.UITextScriptInProgress) + !(loc.UITextSelAbsentAbsent) + !(loc.UITextSelAbsentAdvertise) + !(loc.UITextSelAbsentCD) + !(loc.UITextSelAbsentLocal) + !(loc.UITextSelAbsentNetwork) + !(loc.UITextSelAdvertiseAbsent) + !(loc.UITextSelAdvertiseAdvertise) + !(loc.UITextSelAdvertiseCD) + !(loc.UITextSelAdvertiseLocal) + !(loc.UITextSelAdvertiseNetwork) + !(loc.UITextSelCDAbsent) + !(loc.UITextSelCDAdvertise) + !(loc.UITextSelCDCD) + !(loc.UITextSelCDLocal) + !(loc.UITextSelChildCostNeg) + !(loc.UITextSelChildCostPos) + !(loc.UITextSelCostPending) + !(loc.UITextSelLocalAbsent) + !(loc.UITextSelLocalAdvertise) + !(loc.UITextSelLocalCD) + !(loc.UITextSelLocalLocal) + !(loc.UITextSelLocalNetwork) + !(loc.UITextSelNetworkAbsent) + !(loc.UITextSelNetworkAdvertise) + !(loc.UITextSelNetworkLocal) + !(loc.UITextSelNetworkNetwork) + !(loc.UITextSelParentCostNegNeg) + !(loc.UITextSelParentCostNegPos) + !(loc.UITextSelParentCostPosNeg) + !(loc.UITextSelParentCostPosPos) + !(loc.UITextTimeRemaining) + !(loc.UITextVolumeCostAvailable) + !(loc.UITextVolumeCostDifference) + !(loc.UITextVolumeCostRequired) + !(loc.UITextVolumeCostSize) + !(loc.UITextVolumeCostVolume) + + + !(loc.Error25001) + + + Version + + + {&DlgFontBold8} + + + No + + + + + + + + + + + + + + + + infoico + exclico + removico + repairic + dlgjpg + bannerjpg + folderupico + foldernewico + + + + + + + + 1 + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + 1 + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + + + + 1 + + + + + + + + + + + + + + 1 + 1 + + 1 + + + + + NOT Installed + Installed AND (RESUME OR Preselected) + Installed AND (NOT RESUME) AND (NOT Preselected) + 1 + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxKey.wxi b/src/VBox/Installer/win/VBoxKey.wxi new file mode 100644 index 00000000..ca6d170e --- /dev/null +++ b/src/VBox/Installer/win/VBoxKey.wxi @@ -0,0 +1,5 @@ + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeApp.wxi b/src/VBox/Installer/win/VBoxMergeApp.wxi new file mode 100644 index 00000000..0825d570 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeApp.wxi @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 601)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeApp.wxs b/src/VBox/Installer/win/VBoxMergeApp.wxs new file mode 100644 index 00000000..ffb43095 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeApp.wxs @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeAppCA.wxi b/src/VBox/Installer/win/VBoxMergeAppCA.wxi new file mode 100644 index 00000000..3cea00df --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeAppCA.wxi @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeAppSeq.wxi b/src/VBox/Installer/win/VBoxMergeAppSeq.wxi new file mode 100644 index 00000000..ad3b6aad --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeAppSeq.wxi @@ -0,0 +1,37 @@ + + + + + + + + 1 + + + 1 + + + diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi new file mode 100644 index 00000000..7da6d804 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxi @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64.wxs b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxs new file mode 100644 index 00000000..ba869924 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeCOM32On64.wxs @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi new file mode 100644 index 00000000..55735a1d --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeCOM32On64CA.wxi @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi b/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi new file mode 100644 index 00000000..55735a1d --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeCOM32On64Seq.wxi @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp.wxi new file mode 100644 index 00000000..cf3e5f78 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp.wxi @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp.wxs b/src/VBox/Installer/win/VBoxMergeNetAdp.wxs new file mode 100644 index 00000000..50520d54 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp.wxs @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi new file mode 100644 index 00000000..7bfa04fa --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxi @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6.wxs b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxs new file mode 100644 index 00000000..accc990a --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp6.wxs @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi new file mode 100644 index 00000000..b67bfc39 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp6CA.wxi @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi b/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi new file mode 100644 index 00000000..d6bdc868 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdp6Seq.wxi @@ -0,0 +1,75 @@ + + + + + + + + + + + = 600) AND ($cp_NetAdp6Driver=3)]]> + + = 600) AND ($cp_NetAdp6Driver=3)]]> + + + + + = 600) AND ($cp_NetAdp6Driver=3)]]> + + = 600) AND ($cp_NetAdp6Driver=3)]]> + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi b/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi new file mode 100644 index 00000000..891531eb --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdpCA.wxi @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi new file mode 100644 index 00000000..da7d0d88 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetAdpSeq.wxi @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetFlt.wxi b/src/VBox/Installer/win/VBoxMergeNetFlt.wxi new file mode 100644 index 00000000..bc39b33e --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetFlt.wxi @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetFlt.wxs b/src/VBox/Installer/win/VBoxMergeNetFlt.wxs new file mode 100644 index 00000000..f37015ad --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetFlt.wxs @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi b/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi new file mode 100644 index 00000000..30a88a03 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetFltCA.wxi @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi new file mode 100644 index 00000000..733012ce --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetFltSeq.wxi @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetLwf.wxi b/src/VBox/Installer/win/VBoxMergeNetLwf.wxi new file mode 100644 index 00000000..cd61bfc1 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetLwf.wxi @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetLwf.wxs b/src/VBox/Installer/win/VBoxMergeNetLwf.wxs new file mode 100644 index 00000000..508ea8cc --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetLwf.wxs @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi b/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi new file mode 100644 index 00000000..2d80faa9 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetLwfCA.wxi @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi b/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi new file mode 100644 index 00000000..4f06e05d --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeNetLwfSeq.wxi @@ -0,0 +1,90 @@ + + + + + + + + + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + + + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + + + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + + + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + = 600) AND $cp_NetLwfDriver=3 AND (NOT Installed)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergePython.wxi b/src/VBox/Installer/win/VBoxMergePython.wxi new file mode 100644 index 00000000..153368a5 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergePython.wxi @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + VBOX_PYTHON_IS_INSTALLED + + + diff --git a/src/VBox/Installer/win/VBoxMergePython.wxs b/src/VBox/Installer/win/VBoxMergePython.wxs new file mode 100644 index 00000000..f4bb15e1 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergePython.wxs @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergePythonCA.wxi b/src/VBox/Installer/win/VBoxMergePythonCA.wxi new file mode 100644 index 00000000..5ebb5534 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergePythonCA.wxi @@ -0,0 +1,35 @@ + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergePythonSeq.wxi b/src/VBox/Installer/win/VBoxMergePythonSeq.wxi new file mode 100644 index 00000000..46f08096 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergePythonSeq.wxi @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeUSB.wxi b/src/VBox/Installer/win/VBoxMergeUSB.wxi new file mode 100644 index 00000000..37951ee5 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeUSB.wxi @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeUSB.wxs b/src/VBox/Installer/win/VBoxMergeUSB.wxs new file mode 100644 index 00000000..553c0178 --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeUSB.wxs @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeUSBCA.wxi b/src/VBox/Installer/win/VBoxMergeUSBCA.wxi new file mode 100644 index 00000000..55735a1d --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeUSBCA.wxi @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi b/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi new file mode 100644 index 00000000..55735a1d --- /dev/null +++ b/src/VBox/Installer/win/VBoxMergeUSBSeq.wxi @@ -0,0 +1,30 @@ + + + + + + + diff --git a/src/VBox/Installer/win/VirtualBox.wxs b/src/VBox/Installer/win/VirtualBox.wxs new file mode 100644 index 00000000..9a4659f5 --- /dev/null +++ b/src/VBox/Installer/win/VirtualBox.wxs @@ -0,0 +1,690 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IconVirtualBox + http://www.virtualbox.org + http://www.virtualbox.org + + + + + + + + + + + + + + + + + + + + + + + + + + + VersionNT64 + + + + NOT VersionNT64 + + + + NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64 + + + + + + Privileged + + + + + + Installed OR (VBOX_MSCRT_INSTALLED) + + + + + + + + + + NOT VBOXINNOTEK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT (VBOXDEPENDENCY AND UPGRADINGPRODUCTCODE) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VBOX_INSTALLSTARTMENUENTRIES + + + + + + + + VBOX_INSTALLDESKTOPSHORTCUT + + + + + + + + VBOX_INSTALLQUICKLAUNCHSHORTCUT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VirtualBox_TypeLib.xsl b/src/VBox/Installer/win/VirtualBox_TypeLib.xsl new file mode 100644 index 00000000..bf833aa1 --- /dev/null +++ b/src/VBox/Installer/win/VirtualBox_TypeLib.xsl @@ -0,0 +1,195 @@ + + + + + + + + + + + +all + + + + + + + + +/* + * DO NOT EDIT! This is a generated file. + * + * WiX include script for the VirtualBox Type Library + * generated from XIDL (XML interface definition). + * + * Source : src/VBox/Main/idl/VirtualBox.xidl + * Generator : src/VBox/Installer/VirtualBox_TypeLib.xsl + * Arguments : a_sTarget= + */ + + + + + + + + + + + yes + + + 0 + + msm_VBoxApplicationFolder + + + + + + + + + + + + + + + + + + + + + Application + + + + + + + + + + + + + + + + + + + + + + + + Class + + + + InprocServer32 + LocalServer32 + LocalServer32 + + + + module context + + is invalid! + + + + + + + + + apartment + free + both + neutral + single + rental + + + + class (or module) threading model + + is invalid! + + + + + + + + + + Class + + + + + Class + + + + + + + + + + + diff --git a/src/VBox/Installer/win/VirtualBox_TypeLibWithInterfaces.xsl b/src/VBox/Installer/win/VirtualBox_TypeLibWithInterfaces.xsl new file mode 100644 index 00000000..a6d883ba --- /dev/null +++ b/src/VBox/Installer/win/VirtualBox_TypeLibWithInterfaces.xsl @@ -0,0 +1,318 @@ + + + + + + + + + + + +all + +{0BB3B78C-1807-4249-5BA5-EA42D66AF0BF} + + + + + + + + + + DO NOT EDIT! This is a generated file. + + WiX include script for the VirtualBox Type Library + generated from XIDL (XML interface definition). + + Source : src/VBox/Main/idl/VirtualBox.xidl + Generator : src/VBox/Installer/win/VirtualBox_Interfaces.xsl + Arguments : a_sTarget= + a_sProxyStubClsid= + + + + + + + + + + + + + + + + + + + + + + + yes + + + 0 + + msm_VBoxApplicationFolder + + + + + + + + + + + + + Application + + + + + + + + + + + + + + + + + + + + + + + + + + Class + + + VBoxClient_x86 + + + + + + InprocServer32 + LocalServer32 + LocalServer32 + + + + module context + + is invalid! + + + + + + + + + apartment + free + both + neutral + single + rental + + + + class (or module) threading model + + is invalid! + + + + + + + + + + Class + + + + + Class + + + + + + + + + + + + { + + } + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + + + + + + + + + + + + + Couldn't find parent () to + + + + + + + + + + + + + + + + Debug: cMethods= + cReadOnlyAttributes= + cReadWriteAttributes= + cReservedMethods= + cReservedAttributes= + cParent= + name= + parent= + + + + +Fatal xidl error: Interface + has + ! The maximum that older windows allows for proxy stubs is 256. + Please try adjust the number of reserved methods or attributes, + though it's clearly time to consider splitting up this monster interface. + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/dep.xsl b/src/VBox/Installer/win/dep.xsl new file mode 100644 index 00000000..92edab69 --- /dev/null +++ b/src/VBox/Installer/win/dep.xsl @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + \ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/VBox/Installer/win/dep2.xsl b/src/VBox/Installer/win/dep2.xsl new file mode 100644 index 00000000..83746331 --- /dev/null +++ b/src/VBox/Installer/win/dep2.xsl @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + \ + + + + + + + + + + \ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3