Changeset 31595 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 12, 2010 11:44:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r31574 r31595 182 182 HRESULT rc; 183 183 Bstr baseFolder; 184 Bstr settingsFile;185 184 Bstr name; 186 185 Bstr osTypeId; … … 198 197 i++; 199 198 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];208 199 } 209 200 else if ( !strcmp(a->argv[i], "--name") … … 243 234 return errorSyntax(USAGE_CREATEVM, "Parameter --name is required"); 244 235 245 if (!baseFolder.isEmpty() && !settingsFile.isEmpty())246 return errorSyntax(USAGE_CREATEVM, "Cannot specify both --basefolder and --settingsfile together");247 248 236 do 249 237 { 250 238 ComPtr<IMachine> machine; 251 239 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())); 258 247 259 248 CHECK_ERROR_BREAK(machine, SaveSettings()); … … 264 253 Bstr uuid; 265 254 CHECK_ERROR_BREAK(machine, COMGETTER(Id)(uuid.asOutParam())); 255 Bstr settingsFile; 266 256 CHECK_ERROR_BREAK(machine, COMGETTER(SettingsFilePath)(settingsFile.asOutParam())); 267 257 RTPrintf("Virtual machine '%ls' is created%s.\n"
Note:
See TracChangeset
for help on using the changeset viewer.