Changeset 73191 in vbox
- Timestamp:
- Jul 17, 2018 8:16:32 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123794
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r72389 r73191 271 271 static void ShowHelp() 272 272 { 273 RTPrintf(VBOX_PRODUCT " Manager %s\n" 274 "(C) 2005-" VBOX_C_YEAR " " VBOX_VENDOR "\n" 275 "All rights reserved.\n" 276 "\n" 277 "Usage:\n" 278 " --startvm <vmname|UUID> start a VM by specifying its UUID or name\n" 279 " --separate start a separate VM process\n" 280 " --normal keep normal (windowed) mode during startup\n" 281 " --fullscreen switch to fullscreen mode during startup\n" 282 " --seamless switch to seamless mode during startup\n" 283 " --scale switch to scale mode during startup\n" 284 " --no-startvm-errormsgbox do not show a message box for VM start errors\n" 285 " --restore-current restore the current snapshot before starting\n" 286 " --no-aggressive-caching delays caching media info in VM processes\n" 287 " --fda <image|none> Mount the specified floppy image\n" 288 " --dvd <image|none> Mount the specified DVD image\n" 273 #if !defined(VBOX_GUI_WITH_SHARED_LIBRARY) || !defined(VBOX_RUNTIME_UI) 274 static const char s_szTitle[] = VBOX_PRODUCT " VM Selector"; 275 #else 276 static const char s_szTitle[] = VBOX_PRODUCT " VM Runner"; 277 #endif 278 static const char s_szUsage[] = 279 #if !defined(VBOX_GUI_WITH_SHARED_LIBRARY) || defined(VBOX_RUNTIME_UI) 280 "Options:\n" 281 " --startvm <vmname|UUID> start a VM by specifying its UUID or name\n" 282 " --separate start a separate VM process\n" 283 " --normal keep normal (windowed) mode during startup\n" 284 " --fullscreen switch to fullscreen mode during startup\n" 285 " --seamless switch to seamless mode during startup\n" 286 " --scale switch to scale mode during startup\n" 287 " --no-startvm-errormsgbox do not show a message box for VM start errors\n" 288 " --restore-current restore the current snapshot before starting\n" 289 " --no-aggressive-caching delays caching media info in VM processes\n" 290 " --fda <image|none> Mount the specified floppy image\n" 291 " --dvd <image|none> Mount the specified DVD image\n" 289 292 # ifdef VBOX_GUI_WITH_PIDFILE 290 293 " --pidfile <file> create a pidfile file when a VM is up and running\n" 291 294 # endif /* VBOX_GUI_WITH_PIDFILE */ 292 295 # ifdef VBOX_WITH_DEBUGGER_GUI 293 " --dbg enable the GUI debug menu\n" 294 " --debug like --dbg and show debug windows at VM startup\n" 295 " --debug-command-line like --dbg and show command line window at VM startup\n" 296 " --debug-statistics like --dbg and show statistics window at VM startup\n" 297 " --no-debug disable the GUI debug menu and debug windows\n" 298 " --start-paused start the VM in the paused state\n" 299 " --start-running start the VM running (for overriding --debug*)\n" 300 "\n" 296 " --dbg enable the GUI debug menu\n" 297 " --debug like --dbg and show debug windows at VM startup\n" 298 " --debug-command-line like --dbg and show command line window at VM startup\n" 299 " --debug-statistics like --dbg and show statistics window at VM startup\n" 300 " --no-debug disable the GUI debug menu and debug windows\n" 301 " --start-paused start the VM in the paused state\n" 302 " --start-running start the VM running (for overriding --debug*)\n" 301 303 # endif /* VBOX_WITH_DEBUGGER_GUI */ 302 "Expert options:\n" 303 " --disable-patm disable code patching (ignored by AMD-V/VT-x)\n" 304 " --disable-csam disable code scanning (ignored by AMD-V/VT-x)\n" 305 " --recompile-supervisor recompiled execution of supervisor code (*)\n" 306 " --recompile-user recompiled execution of user code (*)\n" 307 " --recompile-all recompiled execution of all code, with disabled\n" 308 " code patching and scanning\n" 309 " --execute-all-in-iem For debugging the interpreted execution mode.\n" 310 " --warp-pct <pct> time warp factor, 100%% (= 1.0) = normal speed\n" 311 " (*) For AMD-V/VT-x setups the effect is --recompile-all.\n" 312 "\n" 304 "\n" 305 "Expert options:\n" 306 " --disable-patm disable code patching (ignored by AMD-V/VT-x)\n" 307 " --disable-csam disable code scanning (ignored by AMD-V/VT-x)\n" 308 " --recompile-supervisor recompiled execution of supervisor code (*)\n" 309 " --recompile-user recompiled execution of user code (*)\n" 310 " --recompile-all recompiled execution of all code, with disabled\n" 311 " code patching and scanning\n" 312 " --execute-all-in-iem For debugging the interpreted execution mode.\n" 313 " --warp-pct <pct> time warp factor, 100%% (= 1.0) = normal speed\n" 314 " (*) For AMD-V/VT-x setups the effect is --recompile-all.\n" 315 "\n" 313 316 # ifdef VBOX_WITH_DEBUGGER_GUI 314 "The following environment (and extra data) variables are evaluated:\n" 315 " VBOX_GUI_DBG_ENABLED (GUI/Dbg/Enabled)\n" 316 " enable the GUI debug menu if set\n" 317 " VBOX_GUI_DBG_AUTO_SHOW (GUI/Dbg/AutoShow)\n" 318 " show debug windows at VM startup\n" 319 " VBOX_GUI_NO_DEBUGGER disable the GUI debug menu and debug windows\n" 317 "The following environment (and extra data) variables are evaluated:\n" 318 " VBOX_GUI_DBG_ENABLED (GUI/Dbg/Enabled)\n" 319 " enable the GUI debug menu if set\n" 320 " VBOX_GUI_DBG_AUTO_SHOW (GUI/Dbg/AutoShow)\n" 321 " show debug windows at VM startup\n" 322 " VBOX_GUI_NO_DEBUGGER\n" 323 " disable the GUI debug menu and debug windows\n" 320 324 # endif /* VBOX_WITH_DEBUGGER_GUI */ 321 "\n", 322 RTBldCfgVersion()); 323 /** @todo Show this as a dialog on windows. */ 325 #else 326 "No special options.\n" 327 "\n" 328 "If you are looking for --startvm and related options, you need to use VirtualBoxVM.\n" 329 #endif 330 ; 331 332 RTPrintf("%s v%s\n" 333 "(C) 2005-" VBOX_C_YEAR " " VBOX_VENDOR "\n" 334 "All rights reserved.\n" 335 "\n" 336 "%s", 337 s_szTitle, RTBldCfgVersion(), s_szUsage); 338 339 #ifdef RT_OS_WINDOWS 340 /* 341 * Show message box. We modify the option list a little to better 342 * make it fit in the dialog. 343 */ 344 char szTitleWithVersion[sizeof(s_szTitle) + 128]; 345 char szMsg[sizeof(s_szUsage) + 128]; 346 char *pszDst = szMsg; 347 size_t offSrc = 0; 348 while (offSrc < sizeof(s_szUsage) - 1U) 349 { 350 char ch; 351 if ( s_szUsage[offSrc] == ' ' 352 && s_szUsage[offSrc + 1] == ' ' 353 && ( (ch = s_szUsage[offSrc + 2]) == '-' /* option line */ 354 || ch == 'V' /* env.var. line*/ ) ) 355 { 356 /* Split option lines: */ 357 if (ch == '-') 358 { 359 offSrc += 2; 360 size_t cchOption = 0; 361 while ( s_szUsage[offSrc + cchOption] != ' ' 362 || s_szUsage[offSrc + cchOption + 1] != ' ') 363 cchOption++; 364 365 memcpy(pszDst, &s_szUsage[offSrc], cchOption); 366 offSrc += cchOption + 2; 367 pszDst += cchOption; 368 } 369 /* Change environment variable indentation: */ 370 else 371 { 372 offSrc += 2; 373 size_t cchLine = 0; 374 while ((ch = s_szUsage[offSrc + cchLine]) != '\n' && ch != '\0') 375 cchLine++; 376 377 memcpy(pszDst, &s_szUsage[offSrc], cchLine); 378 offSrc += cchLine + 1; 379 pszDst += cchLine; 380 } 381 *pszDst++ = '\n'; 382 *pszDst++ = '\t'; 383 384 while (s_szUsage[offSrc] == ' ') 385 offSrc++; 386 } 387 388 /* Copy up to and including end of line. */ 389 while ((ch = s_szUsage[offSrc++]) != '\n' && ch != '\0') 390 *pszDst++ = ch; 391 *pszDst++ = ch; 392 } 393 *pszDst = '\0'; 394 395 RTStrPrintf(szTitleWithVersion, sizeof(szTitleWithVersion), "%s v%s - Command Line Options", s_szTitle, RTBldCfgVersion()); 396 MessageBoxExA(NULL /*hwndOwner*/, szMsg, szTitleWithVersion, MB_OK | MB_ICONINFORMATION, 397 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); 398 #endif 324 399 } 325 400 … … 469 544 #else 470 545 # ifndef VBOX_RUNTIME_UI 471 /* Create global app instance for Selec otr UI: */546 /* Create global app instance for Selector UI: */ 472 547 VBoxGlobal::create(VBoxGlobal::UIType_SelectorUI); 473 548 # else
Note:
See TracChangeset
for help on using the changeset viewer.