VirtualBox

Changeset 98031 in vbox


Ignore:
Timestamp:
Jan 9, 2023 1:20:53 PM (23 months ago)
Author:
vboxsync
Message:

ValKit/vboxinstaller.py: Some fixes to r153261 (untested, just like the original). bugref:10284

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py

    r97673 r98031  
    8585        self._fKernelDrivers          = True;
    8686        self._fWinForcedInstallTimestampCA = True;
    87         self._fInstallMSCRT = False; # By default we don't install any CRT.
     87        self._fInstallMsCrt = False; # By default we don't install the Microsoft CRT (only needed once).
    8888
    8989    #
     
    147147            self._fWinForcedInstallTimestampCA = True;
    148148        elif asArgs[iArg] == '--no-win-install-mscrt':
    149             self._fInstallMSCRT = False;
     149            self._fInstallMsCrt = False;
    150150        elif asArgs[iArg] == '--win-install-mscrt':
    151             self._fInstallMSCRT = True;
     151            self._fInstallMsCrt = True;
    152152        else:
    153153            return TestDriverBase.parseOption(self, asArgs, iArg);
     
    933933            return None; # There shouldn't be anything to uninstall, and if there is, it's not our fault.
    934934
    935         #
    936         # Install the MS Visual Studio Redistributable, if needed.
    937         #
    938         # Since VBox 7.0 this is a prerequisite, as we don't ship our own redistributable files anymore.
    939         #
    940         if self._fInstallMSCRT:
    941             reporter.log('Installing MS Visual Studio Redistributable ...');
     935        # Install the MS Visual Studio Redistributable, if requested. (VBox 7.0+ needs this installed once.)
     936        if self._fInstallMsCrt:
     937            reporter.log('Installing MS Visual Studio Redistributable (untested code)...');
     938            ## @todo Test this.
     939            ## @todo We could cache this on the testrsrc share.
    942940            sName = "vc_redist.x64.exe"
    943             ## @todo Can we cache this somewhere, so that we don't need to download this everytime?
    944941            sUrl  = "https://aka.ms/vs/17/release/" + sName # Permalink, according to MS.
    945             if webutils.downloadFile(sUrl, sName, self.sBuildPath, reporter.log, reporter.log) is not True:
    946                 sExe   = os.path.join(self.sBuildPath, sName);
     942            sExe  = os.path.join(self.sBuildPath, sName);
     943            if webutils.downloadFile(sUrl, sExe, None, reporter.log, reporter.log):
    947944                asArgs = [ sExe, '/Q' ];
    948945                fRc2, iRc = self._sudoExecuteSync(asArgs);
    949946                if fRc2 is False:
    950                     reporter.error('Installing MS Visual Studio Redistributable failed, exit code: %s' % (iRc,));
    951                     return False;
     947                    return reporter.error('Installing MS Visual Studio Redistributable failed, exit code: %s' % (iRc,));
    952948                reporter.log('Installing MS Visual Studio Redistributable done');
     949            else:
     950                return False;
    953951
    954952        # We need the help text to detect supported options below.
Note: See TracChangeset for help on using the changeset viewer.

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