Changeset 14664 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 26, 2008 9:19:35 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39973
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r14646 r14664 318 318 { 319 319 RTPrintf("VBoxManage createvm -name <name>\n" 320 " [-ostype <ostype>]\n" 320 321 " [-register]\n" 321 322 " [-basefolder <path> | -settingsfile <path>]\n" … … 1345 1346 Bstr settingsFile; 1346 1347 Bstr name; 1348 Bstr osTypeId; 1347 1349 RTUUID id; 1348 1350 bool fRegister = false; … … 1372 1374 name = argv[i]; 1373 1375 } 1376 else if (strcmp(argv[i], "-ostype") == 0) 1377 { 1378 if (argc <= i + 1) 1379 return errorArgument("Missing argument to '%s'", argv[i]); 1380 i++; 1381 osTypeId = argv[i]; 1382 } 1374 1383 else if (strcmp(argv[i], "-uuid") == 0) 1375 1384 { … … 1399 1408 if (!settingsFile) 1400 1409 CHECK_ERROR_BREAK(virtualBox, 1401 CreateMachine( baseFolder, name, Guid(id), machine.asOutParam()));1410 CreateMachine(name, osTypeId, baseFolder, Guid(id), machine.asOutParam())); 1402 1411 else 1403 1412 CHECK_ERROR_BREAK(virtualBox, 1404 CreateLegacyMachine( settingsFile, name, Guid(id), machine.asOutParam()));1413 CreateLegacyMachine(name, osTypeId, settingsFile, Guid(id), machine.asOutParam())); 1405 1414 1406 1415 CHECK_ERROR_BREAK(machine, SaveSettings()); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui.h
r13580 r14664 291 291 CVirtualBox vbox = vboxGlobal().virtualBox(); 292 292 293 /* OS type */ 294 CGuestOSType type = vboxGlobal().vmGuestOSType (cbOS->currentItem()); 295 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type")); 296 QString typeId = type.GetId(); 297 293 298 /* create a machine with the default settings file location */ 294 299 if (mMachine.isNull()) 295 300 { 296 mMachine = vbox.CreateMachine ( QString(), leName->text(), QUuid());301 mMachine = vbox.CreateMachine (leName->text(), typeId, QString::null, QUuid()); 297 302 if (!vbox.isOk()) 298 303 { … … 308 313 } 309 314 310 /* name is set in CreateMachine() */311 312 /* OS type */313 CGuestOSType type = vboxGlobal().vmGuestOSType (cbOS->currentItem());314 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type"));315 QString typeId = type.GetId();316 mMachine.SetOSTypeId (typeId);317 318 if (typeId == "os2warp3" ||319 typeId == "os2warp4" ||320 typeId == "os2warp45" ||321 typeId == "ecs")322 mMachine.SetHWVirtExEnabled (KTSBool_True);323 324 315 /* RAM size */ 325 316 mMachine.SetMemorySize (slRAM->value()); 326 327 /* add one network adapter (NAT) by default */328 {329 CNetworkAdapter cadapter = mMachine.GetNetworkAdapter (0);330 #ifdef VBOX_WITH_E1000331 /* Default to e1k on solaris */332 if (typeId == "solaris" ||333 typeId == "opensolaris")334 cadapter.SetAdapterType (KNetworkAdapterType_I82540EM);335 #endif /* VBOX_WITH_E1000 */336 cadapter.SetEnabled (true);337 cadapter.AttachToNAT();338 cadapter.SetMACAddress (QString::null);339 cadapter.SetCableConnected (true);340 341 }342 317 343 318 /* register the VM prior to attaching hard disks */ -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r14652 r14664 5262 5262 { 5263 5263 CGuestOSTypeEnumerator en = coll.Enumerate(); 5264 5265 /* Here we assume 'Other' type is always the first, so we 5266 * remember it and will append it to the list when finish */ 5267 CGuestOSType otherType (en.GetNext()); 5268 QString otherFamilyId (otherType.GetFamilyId()); 5269 5270 /* Fill the lists with all the available OS Types except 5271 * the 'Other' one type, it will be appended. */ 5264 5272 while (en.HasMore()) 5265 5273 { … … 5273 5281 mTypes [mFamilyIDs.indexOf (familyId)].append (os); 5274 5282 } 5283 5284 /* Append the 'Other' OS Type to the end of list */ 5285 if (!mFamilyIDs.contains (otherFamilyId)) 5286 { 5287 mFamilyIDs << otherFamilyId; 5288 mTypes << QList <CGuestOSType> (); 5289 } 5290 mTypes [mFamilyIDs.indexOf (otherFamilyId)].append (otherType); 5275 5291 } 5276 5292 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNewVMWzd.cpp
r14442 r14664 303 303 CVirtualBox vbox = vboxGlobal().virtualBox(); 304 304 305 /* OS type */ 306 CGuestOSType type = mOSTypeSelector->type(); 307 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type")); 308 QString typeId = type.GetId(); 309 305 310 /* Create a machine with the default settings file location */ 306 311 if (mMachine.isNull()) 307 312 { 308 mMachine = vbox.CreateMachine ( QString(), mLeName->text(), QUuid());313 mMachine = vbox.CreateMachine (mLeName->text(), typeId, QString::null, QUuid()); 309 314 if (!vbox.isOk()) 310 315 { … … 320 325 } 321 326 322 /* OS type */323 CGuestOSType type = mOSTypeSelector->type();324 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type"));325 QString typeId = type.GetId();326 mMachine.SetOSTypeId (typeId);327 328 /* Dsen: move it to Main when implementing 3002: GUI/Main enhancements for 64 bits guests */329 if (typeId == "os2warp3" ||330 typeId == "os2warp4" ||331 typeId == "os2warp45" ||332 typeId == "ecs")333 mMachine.SetHWVirtExEnabled (KTSBool_True);334 /* Dsen: move it to Main when implementing 3002: GUI/Main enhancements for 64 bits guests */335 336 327 /* RAM size */ 337 328 mMachine.SetMemorySize (mSlRAM->value()); … … 340 331 mMachine.SetVRAMSize (qMax (type.GetRecommendedVRAM(), 341 332 (ULONG) (VBoxGlobal::requiredVideoMemory() / _1M))); 342 343 /* Add one network adapter (NAT) by default */344 {345 CNetworkAdapter cadapter = mMachine.GetNetworkAdapter (0);346 #ifdef VBOX_WITH_E1000347 /* Default to e1k on solaris */348 if (typeId == "solaris" ||349 typeId == "opensolaris")350 cadapter.SetAdapterType (KNetworkAdapterType_I82540EM);351 #endif /* VBOX_WITH_E1000 */352 cadapter.SetEnabled (true);353 cadapter.AttachToNAT();354 cadapter.SetMACAddress (QString::null);355 cadapter.SetCableConnected (true);356 }357 333 358 334 /* Register the VM prior to attaching hard disks */
Note:
See TracChangeset
for help on using the changeset viewer.