VirtualBox

Changeset 58737 in vbox


Ignore:
Timestamp:
Nov 18, 2015 12:21:56 PM (9 years ago)
Author:
vboxsync
Message:

UIDownloaderAdditions: adjust version number for test builds and trunk builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp

    r58422 r58737  
    5858        m_spInstance = this;
    5959
     60    /* Get version number and adjust it for test and trunk builds, both have
     61       odd build numbers.  The server only has official releases. */
     62    QString strVersion = vboxGlobal().vboxVersionStringNormalized();
     63    QChar qchLastDigit = strVersion[strVersion.length() - 1];
     64    if (   qchLastDigit == '1'
     65        || qchLastDigit == '3'
     66        || qchLastDigit == '5'
     67        || qchLastDigit == '7'
     68        || qchLastDigit == '9')
     69    {
     70        if (   !strVersion.endsWith(".51")
     71            && !strVersion.endsWith(".53")
     72            && !strVersion.endsWith(".97")
     73            && !strVersion.endsWith(".99"))
     74            strVersion[strVersion.length() - 1] = qchLastDigit.toAscii() - 1;
     75        else
     76        {
     77            strVersion.chop(2);
     78            strVersion += "10"; /* Current for 5.0.x */
     79        }
     80    }
     81
    6082    /* Prepare source/target: */
    61     const QString &strName = QString("VBoxGuestAdditions_%1.iso").arg(vboxGlobal().vboxVersionStringNormalized());
    62     const QString &strSource = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vboxGlobal().vboxVersionStringNormalized()) + strName;
     83    const QString &strName = QString("VBoxGuestAdditions_%1.iso").arg(strVersion);
     84    const QString &strSource = QString("http://download.virtualbox.org/virtualbox/%1/").arg(strVersion) + strName;
    6385    const QString &strTarget = QDir(vboxGlobal().homeFolder()).absoluteFilePath(strName);
    6486
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