Changeset 68055 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jul 19, 2017 10:19:19 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r67949 r68055 1022 1022 1023 1023 if (fCategory & USAGE_UNATTENDEDINSTALL) 1024 RTStrmPrintf(pStrm, 1024 RTStrmPrintf(pStrm, /* This will be replaced by a docbook man page. */ 1025 1025 "%s unattended %s <uuid|vmname>\n" 1026 " 1027 " 1026 " <OUTDATED-TODO> --settings-file <file>\n" 1027 " <OUTDATED-TODO> [--session-type <type>]\n" 1028 1028 "%s unattended %s <uuid|vmname>\n" 1029 " 1030 " 1031 " 1032 " 1033 " 1034 " 1035 " 1036 " 1029 " <OUTDATED-TODO> --user <user>\n" 1030 " <OUTDATED-TODO> --password <password>\n" 1031 " <OUTDATED-TODO> --iso-path <path>\n" 1032 " <OUTDATED-TODO> [--key <CD-key>]\n" 1033 " <OUTDATED-TODO> [--additions-iso-path <path>]\n" 1034 " <OUTDATED-TODO> [--install-additions]\n" 1035 " <OUTDATED-TODO> [--image-index <index>]\n" 1036 " <OUTDATED-TODO> [--session-type <type>]\n" 1037 1037 "\n", SEP, SEP); 1038 1038 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r68029 r68055 42 42 #include <iprt/param.h> 43 43 #include <iprt/path.h> 44 #include <iprt/cpp/path.h> 44 45 #include <iprt/stream.h> 45 46 #include <iprt/string.h> … … 1272 1273 * Options. 1273 1274 */ 1274 const char *pszIsoPath = NULL; 1275 const char *pszUser = NULL; 1276 const char *pszPassword = NULL; 1277 const char *pszFullUserName = NULL; 1278 const char *pszProductKey = NULL; 1279 const char *pszAdditionsIsoPath = NULL; 1280 int fInstallAdditions = -1; 1281 const char *pszAuxiliaryBasePath = NULL; 1282 const char *pszMachineName = NULL; 1283 const char *pszSettingsFile = NULL; 1284 bool fSetImageIdx = false; 1285 uint32_t idxImage = 0; 1286 const char *pszSessionType = "headless"; 1275 Utf8Str strAbsIsoPath; 1276 const char *pszIsoPath = NULL; 1277 const char *pszUser = NULL; 1278 const char *pszPassword = NULL; 1279 const char *pszFullUserName = NULL; 1280 const char *pszProductKey = NULL; 1281 Utf8Str strAbsAdditionsIsoPath; 1282 const char *pszAdditionsIsoPath = NULL; 1283 int fInstallAdditions = -1; 1284 Utf8Str strAbsValidationKitIsoPath; 1285 const char *pszValidationKitIsoPath = NULL; 1286 int fInstallTxs = -1; 1287 const char *pszMachineName = NULL; 1288 Utf8Str strAbsSettingsFile; 1289 const char *pszSettingsFile = NULL; 1290 bool fSetImageIdx = false; 1291 uint32_t idxImage = 0; 1292 const char *pszPostInstallCommand = NULL; 1293 Utf8Str strAbsAuxiliaryBasePath; 1294 const char *pszAuxiliaryBasePath = NULL; 1295 Utf8Str strAbsScriptTemplatePath; 1296 const char *pszScriptTemplatePath = NULL; 1297 const char *pszSessionType = "headless"; 1287 1298 1288 1299 /* … … 1294 1305 static const RTGETOPTDEF s_aOptions[] = 1295 1306 { 1296 { "--iso-path", 'i', RTGETOPT_REQ_STRING }, 1297 { "--user", 'u', RTGETOPT_REQ_STRING }, 1298 { "--password", 'p', RTGETOPT_REQ_STRING }, 1299 { "--full-user-name", 'U', RTGETOPT_REQ_STRING }, 1300 { "--key", 'k', RTGETOPT_REQ_STRING }, 1301 { "--install-additions", 'A', RTGETOPT_REQ_NOTHING }, 1302 { "--no-install-additions", 'N', RTGETOPT_REQ_NOTHING }, 1303 { "--additions-iso-path", 'a', RTGETOPT_REQ_STRING }, 1304 { "--auxiliary-base-path", 'x', RTGETOPT_REQ_STRING }, 1305 { "--image-index", 'm', RTGETOPT_REQ_UINT32 }, 1306 { "--settings-file", 's', RTGETOPT_REQ_STRING }, 1307 { "--session-type", 'S', RTGETOPT_REQ_STRING }, 1307 { "--iso", 'i', RTGETOPT_REQ_STRING }, 1308 { "--user", 'u', RTGETOPT_REQ_STRING }, 1309 { "--password", 'p', RTGETOPT_REQ_STRING }, 1310 { "--full-user-name", 'U', RTGETOPT_REQ_STRING }, 1311 { "--key", 'k', RTGETOPT_REQ_STRING }, 1312 { "--install-additions", 'A', RTGETOPT_REQ_NOTHING }, 1313 { "--no-install-additions", 'N', RTGETOPT_REQ_NOTHING }, 1314 { "--additions-iso", 'a', RTGETOPT_REQ_STRING }, 1315 { "--install-txs", 't', RTGETOPT_REQ_NOTHING }, 1316 { "--no-install-txs", 'T', RTGETOPT_REQ_NOTHING }, 1317 { "--validation-kit-iso", 'K', RTGETOPT_REQ_STRING }, 1318 { "--auxiliary-base-path", 'x', RTGETOPT_REQ_STRING }, 1319 { "--image-index", 'm', RTGETOPT_REQ_UINT32 }, 1320 { "--script-template", 'c', RTGETOPT_REQ_STRING }, 1321 { "--post-install-command", 'P', RTGETOPT_REQ_STRING }, 1322 { "--settings-file", 's', RTGETOPT_REQ_STRING }, 1323 { "--session-type", 'S', RTGETOPT_REQ_STRING }, 1308 1324 }; 1309 1325 … … 1327 1343 1328 1344 case 's': // --settings-file <key value file> 1329 pszSettingsFile = ValueUnion.psz; 1345 vrc = RTPathAbsCxx(strAbsSettingsFile, ValueUnion.psz); 1346 if (RT_FAILURE(vrc)) 1347 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1348 pszSettingsFile = strAbsSettingsFile.c_str(); 1349 break; 1350 1351 case 'i': // --iso 1352 vrc = RTPathAbsCxx(strAbsIsoPath, ValueUnion.psz); 1353 if (RT_FAILURE(vrc)) 1354 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1355 pszIsoPath = strAbsIsoPath.c_str(); 1330 1356 break; 1331 1357 … … 1352 1378 fInstallAdditions = false; 1353 1379 break; 1354 case 'a': // --additions-iso-path 1355 pszAdditionsIsoPath = ValueUnion.psz; 1356 break; 1357 1358 case 'i': // --iso-path 1359 pszIsoPath = ValueUnion.psz; 1380 case 'a': // --additions-iso 1381 vrc = RTPathAbsCxx(strAbsAdditionsIsoPath, ValueUnion.psz); 1382 if (RT_FAILURE(vrc)) 1383 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1384 pszAdditionsIsoPath = strAbsAdditionsIsoPath.c_str(); 1385 break; 1386 1387 case 't': // --install-txs 1388 fInstallTxs = true; 1389 break; 1390 case 'T': // --no-install-txs 1391 fInstallTxs = false; 1392 break; 1393 case 'K': // --valiation-kit-iso 1394 vrc = RTPathAbsCxx(strAbsValidationKitIsoPath, ValueUnion.psz); 1395 if (RT_FAILURE(vrc)) 1396 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1397 pszValidationKitIsoPath = strAbsValidationKitIsoPath.c_str(); 1360 1398 break; 1361 1399 1362 1400 case 'x': // --auxiliary-base-path 1363 pszAuxiliaryBasePath = ValueUnion.psz; 1401 vrc = RTPathAbsCxx(strAbsAuxiliaryBasePath, ValueUnion.psz); 1402 if (RT_FAILURE(vrc)) 1403 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1404 pszAuxiliaryBasePath = strAbsAuxiliaryBasePath.c_str(); 1364 1405 break; 1365 1406 … … 1367 1408 idxImage = ValueUnion.u32; 1368 1409 fSetImageIdx = true; 1410 break; 1411 1412 case 'c': // --script-template 1413 vrc = RTPathAbsCxx(strAbsScriptTemplatePath, ValueUnion.psz); 1414 if (RT_FAILURE(vrc)) 1415 return errorSyntax(USAGE_UNATTENDEDINSTALL, "RTPathAbsCxx failed on '%s': %Rrc", ValueUnion.psz, vrc); 1416 pszScriptTemplatePath = strAbsScriptTemplatePath.c_str(); 1417 break; 1418 1419 case 'P': // --post-install-command. 1420 pszPostInstallCommand = ValueUnion.psz; 1369 1421 break; 1370 1422 … … 1385 1437 1386 1438 if (!pszSettingsFile && !pszIsoPath) 1387 return errorSyntax(USAGE_UNATTENDEDINSTALL, "Missing required --iso -path(or --settings-file) option");1439 return errorSyntax(USAGE_UNATTENDEDINSTALL, "Missing required --iso (or --settings-file) option"); 1388 1440 1389 1441 /* … … 1452 1504 if (fInstallAdditions >= 0) 1453 1505 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(InstallGuestAdditions)(fInstallAdditions != (int)false)); 1506 if (pszValidationKitIsoPath) 1507 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(ValidationKitIsoPath)(Bstr(pszValidationKitIsoPath).raw())); 1508 if (fInstallTxs >= 0) 1509 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(InstallTestExecService)(fInstallTxs != (int)false)); 1454 1510 if (fSetImageIdx) 1455 1511 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(ImageIndex)(idxImage)); 1512 if (pszScriptTemplatePath) 1513 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(ScriptTemplatePath)(Bstr(pszScriptTemplatePath).raw())); 1514 if (pszPostInstallCommand) 1515 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(PostInstallCommand)(Bstr(pszPostInstallCommand).raw())); 1456 1516 if (pszAuxiliaryBasePath) 1457 1517 CHECK_ERROR_BREAK(ptrUnattended, COMSETTER(AuxiliaryBasePath)(Bstr(pszAuxiliaryBasePath).raw()));
Note:
See TracChangeset
for help on using the changeset viewer.