VirtualBox

Changeset 106262 in vbox for trunk


Ignore:
Timestamp:
Oct 9, 2024 6:57:43 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165054
Message:

Main: Automatic GAs upgrade: Add support for Linux/Arm64 installer, bugref:10783.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestSessionImplTasks.h

    r106159 r106262  
    462462    int waitForGuestSession(ComObjPtr<Guest> pGuest, eOSType osType, ComObjPtr<GuestSession> &pNewSession);
    463463
     464    PlatformArchitecture_T getPlatformArch(void);
     465
    464466    /** Files to handle. */
    465467    std::vector<ISOFile>        mFiles;
  • trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp

    r106153 r106262  
    29102910
    29112911    return vrcRet;
     2912}
     2913
     2914/**
     2915 * Helper function which retrieves guest platform architecture information.
     2916 *
     2917 * @returns Platform architecture type or PlatformArchitecture_None if
     2918 *          architecture information cannot be retrieved.
     2919 */
     2920PlatformArchitecture_T GuestSessionTaskUpdateAdditions::getPlatformArch(void)
     2921{
     2922    HRESULT hrc;
     2923    PlatformArchitecture_T enmArch = PlatformArchitecture_None;
     2924
     2925    ComObjPtr<GuestSession> pSession = mSession;
     2926    Assert(!pSession.isNull());
     2927
     2928    ComObjPtr<Guest> pGuest(pSession->i_getParent());
     2929    Assert(!pGuest.isNull());
     2930
     2931    ComObjPtr<Console> pConsole = pGuest->i_getConsole();
     2932    Assert(!pConsole.isNull());
     2933
     2934    const ComPtr<IMachine> pMachine = pConsole->i_machine();
     2935    Assert(!pMachine.isNull());
     2936
     2937    ComPtr<IPlatform> pPlatform;
     2938
     2939    hrc = pMachine->COMGETTER(Platform)(pPlatform.asOutParam());
     2940    AssertComRCReturn(hrc, PlatformArchitecture_None);
     2941
     2942    hrc = pPlatform->COMGETTER(Architecture)(&enmArch);
     2943    AssertComRCReturn(hrc, PlatformArchitecture_None);
     2944
     2945    return enmArch;
    29122946}
    29132947
     
    32613295                        case eOSType_Linux:
    32623296                        {
     3297                            bool fIsArm = getPlatformArch() == PlatformArchitecture_ARM;
     3298
     3299                            const Utf8Str strInstallerBinUC("VBOXLINUXADDITIONS" + Utf8Str(fIsArm ? "-ARM64" : "") + ".RUN");
     3300                            const Utf8Str strInstallerBin  ("VBoxLinuxAdditions" + Utf8Str(fIsArm ? "-arm64" : "") + ".run");
     3301
    32633302                            /* Copy over the installer to the guest but don't execute it.
    32643303                             * Execution will be done by the shell instead. */
    3265                             mFiles.push_back(ISOFile("VBOXLINUXADDITIONS.RUN",
    3266                                                      strUpdateDir + "VBoxLinuxAdditions.run", ISOFILE_FLAG_COPY_FROM_ISO));
     3304                            mFiles.push_back(ISOFile(strInstallerBinUC, strUpdateDir + strInstallerBin, ISOFILE_FLAG_COPY_FROM_ISO));
    32673305
    32683306                            UpdateAdditionsStartupInfo siInstaller;
     
    32743312                            siInstaller.mArguments.push_back("/bin/sh");
    32753313                            /* Now add the stuff we need in order to execute the installer.  */
    3276                             siInstaller.mArguments.push_back(strUpdateDir + "VBoxLinuxAdditions.run");
     3314                            siInstaller.mArguments.push_back(strUpdateDir + strInstallerBin);
    32773315                            /* Make sure to add "--nox11" to the makeself wrapper in order to not getting any blocking xterm
    32783316                             * window spawned when doing any unattended Linux GA installations. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette