- Timestamp:
- Mar 15, 2022 9:19:29 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r93814 r94234 55 55 $(if $(VBOX_WITH_MAIN_NLS),VBOX_WITH_MAIN_NLS) \ 56 56 $(if $(VBOX_WITH_TPM),VBOX_WITH_TPM) 57 58 59 ifdef VBOX_WITH_DOCS60 PROGRAMS += VBoxManageHelp61 endif62 VBoxManageHelp_TEMPLATE = VBoxAdvBldProg63 VBoxManageHelp_DEFS += \64 VBOX_ONLY_DOCS \65 $(VBOX_COMMON_VBOXMANAGE_DEFS)66 VBoxManageHelp_SOURCES = \67 VBoxManage.cpp \68 VBoxManageHelp.cpp \69 $(if $(VBOX_WITH_GUEST_PROPS),VBoxManageGuestProp.cpp) \70 $(if $(VBOX_WITH_GUEST_CONTROL),VBoxManageGuestCtrl.cpp)71 57 72 58 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94233 r94234 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #ifndef VBOX_ONLY_DOCS 23 # include <VBox/com/com.h> 24 # include <VBox/com/string.h> 25 # include <VBox/com/Guid.h> 26 # include <VBox/com/array.h> 27 # include <VBox/com/ErrorInfo.h> 28 # include <VBox/com/errorprint.h> 29 # include <VBox/com/NativeEventQueue.h> 30 31 # include <VBox/com/VirtualBox.h> 32 #endif /* !VBOX_ONLY_DOCS */ 22 #include <VBox/com/com.h> 23 #include <VBox/com/string.h> 24 #include <VBox/com/Guid.h> 25 #include <VBox/com/array.h> 26 #include <VBox/com/ErrorInfo.h> 27 #include <VBox/com/errorprint.h> 28 #include <VBox/com/NativeEventQueue.h> 29 30 #include <VBox/com/VirtualBox.h> 33 31 34 32 #ifdef VBOX_WITH_VBOXMANAGE_NLS … … 68 66 * Structures and Typedefs * 69 67 *********************************************************************************************************************************/ 70 #ifndef VBOX_ONLY_DOCS 68 71 69 /** 72 70 * VBoxManage command descriptor. … … 85 83 /** Pointer to a const VBoxManage command descriptor. */ 86 84 typedef VBMGCMD const *PCVBMGCMD; 87 #endif 85 88 86 89 87 DECLARE_TRANSLATION_CONTEXT(VBoxManage); … … 178 176 *********************************************************************************************************************************/ 179 177 /*extern*/ bool g_fDetailedProgress = false; 180 181 #ifndef VBOX_ONLY_DOCS182 178 /** Set by the signal handler. */ 183 179 static volatile bool g_fCanceled = false; … … 501 497 } 502 498 503 #endif /* !VBOX_ONLY_DOCS */504 505 499 506 500 void setBuiltInHelpLanguage(const char *pszLang) … … 556 550 if (RT_FAILURE(vrc)) 557 551 return RTMsgInitFailure(vrc); 558 #if defined(RT_OS_WINDOWS) && !defined(VBOX_ONLY_DOCS)552 #if defined(RT_OS_WINDOWS) 559 553 ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */ 560 554 #endif … … 605 599 const char *pszSettingsPw = NULL; 606 600 const char *pszSettingsPwFile = NULL; 607 #ifndef VBOX_ONLY_DOCS608 601 int cResponseFileArgs = 0; 609 602 char **papszResponseFileArgs = NULL; 610 603 char **papszNewArgv = NULL; 611 #endif 604 612 605 for (int i = 1; i < argc || argc <= iCmd; i++) 613 606 { … … 631 624 } 632 625 633 #ifndef VBOX_ONLY_DOCS634 626 if ( !strcmp(argv[i], "-V") 635 627 || !strcmp(argv[i], "--version") … … 648 640 return 0; 649 641 } 650 #endif651 642 652 643 if ( !strcmp(argv[i], "--dumpopts") … … 689 680 iCmd += 2; 690 681 } 691 #ifndef VBOX_ONLY_DOCS692 682 else if (argv[i][0] == '@') 693 683 { … … 729 719 iCmd++; 730 720 } 731 #endif732 721 else 733 722 break; … … 742 731 showLogo(g_pStdOut); 743 732 744 #ifndef VBOX_ONLY_DOCS745 733 PCVBMGCMD pCmd = lookupCommand(argv[iCmd]); 746 734 if (pCmd && pCmd->enmCmdHelp != VBMG_CMD_INTERNAL) … … 945 933 946 934 return rcExit; 947 #else /* VBOX_ONLY_DOCS */948 return RTEXITCODE_SUCCESS;949 #endif /* VBOX_ONLY_DOCS */950 935 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94231 r94234 22 22 #endif 23 23 24 #ifndef VBOX_ONLY_DOCS25 24 #include <VBox/com/com.h> 26 25 #include <VBox/com/ptr.h> … … 28 27 #include <VBox/com/string.h> 29 28 #include <VBox/com/array.h> 30 #endif /* !VBOX_ONLY_DOCS */31 29 32 30 #include <iprt/types.h> … … 35 33 #include <iprt/getopt.h> 36 34 37 #ifndef VBOX_ONLY_DOCS 38 # include "VBoxManageBuiltInHelp.h" 39 # include "PasswordInput.h" 40 #endif 35 #include "VBoxManageBuiltInHelp.h" 36 #include "PasswordInput.h" 41 37 42 38 #ifdef VBOX_WITH_VBOXMANAGE_NLS … … 130 126 char **argv; 131 127 132 #ifndef VBOX_ONLY_DOCS133 128 ComPtr<IVirtualBox> virtualBox; 134 129 ComPtr<ISession> session; 135 #endif136 130 }; 137 131 … … 176 170 void printUsageInternal(USAGECATEGORY enmCommand, PRTSTREAM pStrm); 177 171 178 #ifndef VBOX_ONLY_DOCS179 172 void setCurrentCommand(enum HELP_CMD_VBOXMANAGE enmCommand); 180 173 void setCurrentSubcommand(uint64_t fCurSubcommandScope); … … 198 191 # define SHOW_PROGRESS_DETAILS RT_BIT_32(2) 199 192 HRESULT showProgress(ComPtr<IProgress> progress, uint32_t fFlags = SHOW_PROGRESS); 200 #endif201 193 202 194 /* VBoxManage.cpp */ 203 195 void showLogo(PRTSTREAM pStrm); 204 196 205 #ifndef VBOX_ONLY_DOCS206 197 RTEXITCODE handleInternalCommands(HandlerArg *a); 207 #endif /* !VBOX_ONLY_DOCS */208 198 209 199 /* VBoxManageControlVM.cpp */ … … 211 201 212 202 /* VBoxManageModifyVM.cpp */ 213 #ifndef VBOX_ONLY_DOCS214 203 void parseGroups(const char *pcszGroups, com::SafeArray<BSTR> *pGroups); 215 # 204 #ifdef VBOX_WITH_RECORDING 216 205 int parseScreens(const char *pcszScreens, com::SafeArray<BOOL> *pScreens); 217 # endif218 206 #endif 219 207 RTEXITCODE handleModifyVM(HandlerArg *a); … … 222 210 RTEXITCODE handleDebugVM(HandlerArg *a); 223 211 224 #ifndef VBOX_ONLY_DOCS225 212 /* VBoxManageGuestProp.cpp */ 226 213 RTEXITCODE handleGuestProperty(HandlerArg *a); … … 350 337 RTEXITCODE handleModifyNvram(HandlerArg *a); 351 338 352 #endif /* !VBOX_ONLY_DOCS */353 354 339 #endif /* !VBOX_INCLUDED_SRC_VBoxManage_VBoxManage_h */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r93835 r94234 16 16 */ 17 17 18 #ifndef VBOX_ONLY_DOCS19 20 21 18 /********************************************************************************************************************************* 22 19 * Header Files * 23 20 *********************************************************************************************************************************/ 24 #ifndef VBOX_ONLY_DOCS25 21 #include <VBox/com/com.h> 26 22 #include <VBox/com/string.h> … … 37 33 #include <list> 38 34 #include <map> 39 #endif /* !VBOX_ONLY_DOCS */40 35 41 36 #include <iprt/getopt.h> … … 2877 2872 return RT_SUCCESS(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 2878 2873 } 2879 2880 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp
r94181 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 375 372 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 376 373 } 377 378 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r94218 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 2730 2727 return errorNoSubcommand(); 2731 2728 } 2732 2733 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r94209 r94234 22 22 #include "VBoxManage.h" 23 23 #include "VBoxManageGuestCtrl.h" 24 25 #ifndef VBOX_ONLY_DOCS26 24 27 25 #include <VBox/com/array.h> … … 217 215 kStreamTransform_Unix2Dos 218 216 }; 219 #endif /* VBOX_ONLY_DOCS */ 217 220 218 221 219 DECLARE_TRANSLATION_CONTEXT(GuestCtrl); 222 223 #ifndef VBOX_ONLY_DOCS224 220 225 221 … … 3726 3722 return rcExit; 3727 3723 } 3728 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.h
r93115 r94234 22 22 #endif 23 23 24 #ifndef VBOX_ONLY_DOCS25 26 24 #include <VBox/com/com.h> 27 25 #include <VBox/com/listeners.h> … … 259 257 AdditionsRunLevelType_T mRunLevelTarget; 260 258 }; 261 #endif /* !VBOX_ONLY_DOCS */262 259 263 260 #endif /* !VBOX_INCLUDED_SRC_VBoxManage_VBoxManageGuestCtrl_h */ 264 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrlListener.cpp
r93115 r94234 22 22 #include "VBoxManage.h" 23 23 #include "VBoxManageGuestCtrl.h" 24 25 #ifndef VBOX_ONLY_DOCS26 24 27 25 #include <VBox/com/com.h> … … 569 567 return S_OK; 570 568 } 571 572 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r94208 r94234 22 22 #include "VBoxManage.h" 23 23 24 #ifndef VBOX_ONLY_DOCS25 26 24 #include <VBox/com/com.h> 27 25 #include <VBox/com/string.h> … … 49 47 using namespace com; 50 48 51 #endif /* !VBOX_ONLY_DOCS */52 53 49 DECLARE_TRANSLATION_CONTEXT(GuestProp); 54 50 55 56 #ifndef VBOX_ONLY_DOCS57 51 58 52 static RTEXITCODE handleGetGuestProperty(HandlerArg *a) … … 428 422 return errorSyntax(GuestProp::tr("Incorrect parameters")); 429 423 } 430 431 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94218 r94234 49 49 DECLARE_TRANSLATION_CONTEXT(Help); 50 50 51 #ifndef VBOX_ONLY_DOCS52 51 static enum HELP_CMD_VBOXMANAGE g_enmCurCommand = HELP_CMD_VBOXMANAGE_INVALID; 53 52 /** The scope mask for the current subcommand. */ … … 488 487 return RTEXITCODE_SYNTAX; 489 488 } 490 491 #endif /* !VBOX_ONLY_DOCS */492 493 489 494 490 … … 584 580 "\n"); 585 581 586 #ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */587 582 if (enmCommand == USAGE_S_ALL) 588 583 { … … 606 601 } 607 602 } 608 #endif609 603 } 610 604 … … 617 611 va_list args; 618 612 showLogo(g_pStdErr); // show logo even if suppressed 619 #ifndef VBOX_ONLY_DOCS 613 620 614 if (g_fInternalMode) 621 615 printUsageInternal(enmCommand, g_pStdErr); … … 624 618 else 625 619 printUsage(g_pStdErr); 626 #else 627 RT_NOREF_PV(enmCommand); 628 #endif 620 629 621 va_start(args, pszFormat); 630 622 RTStrmPrintf(g_pStdErr, Help::tr("\nSyntax error: %N\n"), pszFormat, &args); … … 641 633 va_list args; 642 634 showLogo(g_pStdErr); // show logo even if suppressed 643 #ifndef VBOX_ONLY_DOCS 635 644 636 if (g_fInternalMode) 645 637 printUsageInternal(enmCommand, g_pStdErr); … … 648 640 else 649 641 printUsage(g_pStdErr); 650 #else 651 RT_NOREF2(enmCommand, fSubcommandScope); 652 #endif 642 653 643 va_start(args, pszFormat); 654 644 RTStrmPrintf(g_pStdErr, Help::tr("\nSyntax error: %N\n"), pszFormat, &args); … … 673 663 * Check if it is an unhandled standard option. 674 664 */ 675 #ifndef VBOX_ONLY_DOCS676 665 if (rc == 'V') 677 666 { … … 679 668 return RTEXITCODE_SUCCESS; 680 669 } 681 #endif682 670 683 671 if (rc == 'h') 684 672 { 685 673 showLogo(g_pStdErr); 686 #ifndef VBOX_ONLY_DOCS 674 687 675 if (g_fInternalMode) 688 676 printUsageInternal(enmCommand, g_pStdOut); … … 691 679 else 692 680 printUsage(g_pStdErr); 693 #endif 681 694 682 return RTEXITCODE_SUCCESS; 695 683 } … … 699 687 */ 700 688 showLogo(g_pStdErr); // show logo even if suppressed 701 #ifndef VBOX_ONLY_DOCS 689 702 690 if (g_fInternalMode) 703 691 printUsageInternal(enmCommand, g_pStdErr); … … 706 694 else 707 695 printUsage(g_pStdErr); 708 #else709 RT_NOREF2(enmCommand, fSubcommandScope);710 #endif711 696 712 697 if (rc == VINF_GETOPT_NOT_OPTION) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r94212 r94234 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #ifndef VBOX_ONLY_DOCS23 22 #include <VBox/com/com.h> 24 23 #include <VBox/com/array.h> … … 26 25 #include <VBox/com/errorprint.h> 27 26 #include <VBox/com/VirtualBox.h> 28 #endif /* !VBOX_ONLY_DOCS */29 27 30 28 #include <iprt/cidr.h> … … 43 41 DECLARE_TRANSLATION_CONTEXT(HostOnly); 44 42 45 #ifndef VBOX_ONLY_DOCS 43 46 44 using namespace com; 47 45 … … 537 535 } 538 536 #endif /* VBOX_WITH_VMNET */ 539 540 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r93702 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 3108 3105 } 3109 3106 3110 #endif /* !VBOX_ONLY_DOCS */3111 3107 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r93699 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 2370 2367 } 2371 2368 2372 #endif /* !VBOX_ONLY_DOCS */2373 2369 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
r94210 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 662 659 return rcExit; 663 660 } 664 665 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r94206 r94234 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #ifndef VBOX_ONLY_DOCS 23 # include <VBox/com/com.h> 24 # include <VBox/com/string.h> 25 # include <VBox/com/Guid.h> 26 # include <VBox/com/array.h> 27 # include <VBox/com/ErrorInfo.h> 28 # include <VBox/com/errorprint.h> 29 # include <VBox/com/VirtualBox.h> 30 # include <VBox/com/NativeEventQueue.h> 31 #endif /* !VBOX_ONLY_DOCS */ 22 #include <VBox/com/com.h> 23 #include <VBox/com/string.h> 24 #include <VBox/com/Guid.h> 25 #include <VBox/com/array.h> 26 #include <VBox/com/ErrorInfo.h> 27 #include <VBox/com/errorprint.h> 28 #include <VBox/com/VirtualBox.h> 29 #include <VBox/com/NativeEventQueue.h> 32 30 33 31 #include <iprt/asm.h> -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyNvram.cpp
r93115 r94234 16 16 */ 17 17 18 #ifndef VBOX_ONLY_DOCS19 20 21 18 /********************************************************************************************************************************* 22 19 * Header Files * … … 496 493 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 497 494 } 498 499 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r94070 r94234 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #ifndef VBOX_ONLY_DOCS23 22 #include <VBox/com/com.h> 24 23 #include <VBox/com/array.h> … … 26 25 #include <VBox/com/errorprint.h> 27 26 #include <VBox/com/VirtualBox.h> 28 #endif /* !VBOX_ONLY_DOCS */29 27 30 28 #include <iprt/cidr.h> … … 42 40 DECLARE_TRANSLATION_CONTEXT(ModifyVM); 43 41 44 #ifndef VBOX_ONLY_DOCS45 42 using namespace com; 46 43 /** @todo refine this after HDD changes; MSC 8.0/64 has trouble with handleModifyVM. */ … … 3542 3539 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 3543 3540 } 3544 3545 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageNATNetwork.cpp
r94211 r94234 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #ifndef VBOX_ONLY_DOCS23 24 22 #include <VBox/com/com.h> 25 23 #include <VBox/com/array.h> … … 27 25 #include <VBox/com/errorprint.h> 28 26 #include <VBox/com/VirtualBox.h> 29 #endif /* !VBOX_ONLY_DOCS */30 27 31 28 #ifndef RT_OS_WINDOWS … … 57 54 #include "VBoxPortForwardString.h" 58 55 59 #ifndef VBOX_ONLY_DOCS60 56 61 57 DECLARE_TRANSLATION_CONTEXT(Nat); … … 695 691 return RTEXITCODE_SUCCESS; 696 692 } 697 698 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r94217 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 1297 1294 return SUCCEEDED(rc) ? RTEXITCODE_SUCCESS : RTEXITCODE_FAILURE; 1298 1295 } 1299 1300 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUpdateCheck.cpp
r93115 r94234 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 #ifndef VBOX_ONLY_DOCS19 20 17 21 18 /********************************************************************************************************************************* … … 367 364 } 368 365 369 #endif /* !VBOX_ONLY_DOCS */370 366 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.cpp
r93115 r94234 16 16 */ 17 17 18 #ifndef VBOX_ONLY_DOCS19 18 #include "VBoxManageUtils.h" 20 19 #include "VBoxManage.h" … … 121 120 RTMsgWarning(Utils::tr("Interface \"%s\" doesn't seem to exist"), pszTargetName); 122 121 } 123 124 #endif /* !VBOX_ONLY_DOCS */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.h
r93115 r94234 22 22 #endif 23 23 24 #ifndef VBOX_ONLY_DOCS25 24 #include <VBox/com/com.h> 26 25 #include <VBox/com/ptr.h> 27 26 #include <VBox/com/VirtualBox.h> 28 #endif29 27 30 28 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox,
Note:
See TracChangeset
for help on using the changeset viewer.