VirtualBox

Changeset 31595 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 12, 2010 11:44:47 AM (14 years ago)
Author:
vboxsync
Message:

Main: remove deprecated VirtualBox::createLegacyMachine() and corresponding VBoxManage --settingsfile option; new API docs for IMachine::attachDevice() (not yet implemented)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp

    r31574 r31595  
    182182    HRESULT rc;
    183183    Bstr baseFolder;
    184     Bstr settingsFile;
    185184    Bstr name;
    186185    Bstr osTypeId;
     
    198197            i++;
    199198            baseFolder = a->argv[i];
    200         }
    201         else if (   !strcmp(a->argv[i], "--settingsfile")
    202                  || !strcmp(a->argv[i], "-settingsfile"))
    203         {
    204             if (a->argc <= i + 1)
    205                 return errorArgument("Missing argument to '%s'", a->argv[i]);
    206             i++;
    207             settingsFile = a->argv[i];
    208199        }
    209200        else if (   !strcmp(a->argv[i], "--name")
     
    243234        return errorSyntax(USAGE_CREATEVM, "Parameter --name is required");
    244235
    245     if (!baseFolder.isEmpty() && !settingsFile.isEmpty())
    246         return errorSyntax(USAGE_CREATEVM, "Cannot specify both --basefolder and --settingsfile together");
    247 
    248236    do
    249237    {
    250238        ComPtr<IMachine> machine;
    251239
    252         if (settingsFile.isEmpty())
    253             CHECK_ERROR_BREAK(a->virtualBox,
    254                 CreateMachine(name, osTypeId, baseFolder, Guid(id).toUtf16(), FALSE, machine.asOutParam()));
    255         else
    256             CHECK_ERROR_BREAK(a->virtualBox,
    257                 CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id).toUtf16(), machine.asOutParam()));
     240        CHECK_ERROR_BREAK(a->virtualBox,
     241                          CreateMachine(name,
     242                                        osTypeId,
     243                                        baseFolder,
     244                                        Guid(id).toUtf16(),
     245                                        FALSE,
     246                                        machine.asOutParam()));
    258247
    259248        CHECK_ERROR_BREAK(machine, SaveSettings());
     
    264253        Bstr uuid;
    265254        CHECK_ERROR_BREAK(machine, COMGETTER(Id)(uuid.asOutParam()));
     255        Bstr settingsFile;
    266256        CHECK_ERROR_BREAK(machine, COMGETTER(SettingsFilePath)(settingsFile.asOutParam()));
    267257        RTPrintf("Virtual machine '%ls' is created%s.\n"
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