Changeset 27753 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 26, 2010 4:18:45 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxHeadless
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/Makefile.kmk
r25797 r27753 63 63 VBoxHeadless_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxHeadless.dylib 64 64 endif 65 ifdef VBOX_WITH_VNC 66 VBoxHeadless_DEFS += VBOX_WITH_VNC 67 VBoxHeadless_SOURCES += FramebufferVNC.cpp 68 endif 65 69 66 70 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r27607 r27753 529 529 RTPrintf("Usage:\n" 530 530 " -s, -startvm, --startvm <name|uuid> Start given VM (required argument)\n" 531 #ifdef VBOX_WITH_VNC 532 " -n, -vnc Enable the built in VNC server\n" 533 " -m, -vncport TCP port number to use for the VNC server\n" 534 " -o, -vncpass <pw> Set the VNC server password\n" 535 #endif 531 536 #ifdef VBOX_WITH_VRDP 532 537 " -v, -vrdp, --vrdp on|off|config Enable (default) or disable the VRDP\n" … … 605 610 const char *vrdpEnabled = NULL; 606 611 #endif 612 #ifdef VBOX_WITH_VNC 613 bool fVNCEnable = false; 614 unsigned uVNCPort = 0; /* default port */ 615 char *pszVNCPassword = NULL; /* no password */ 616 #endif 607 617 unsigned fRawR0 = ~0U; 608 618 unsigned fRawR3 = ~0U; … … 662 672 { "--vrdp", 'v', RTGETOPT_REQ_STRING }, 663 673 #endif /* VBOX_WITH_VRDP defined */ 674 #ifdef VBOX_WITH_VNC 675 { "-vncport", 'm', RTGETOPT_REQ_INT32 }, 676 { "-vncpass", 'o', RTGETOPT_REQ_STRING }, 677 { "-vnc", 'n', 0 }, 678 #endif /* VBOX_WITH_VNC */ 664 679 { "-rawr0", OPT_RAW_R0, 0 }, 665 680 { "--rawr0", OPT_RAW_R0, 0 }, … … 716 731 break; 717 732 #endif /* VBOX_WITH_VRDP defined */ 733 #ifdef VBOX_WITH_VNC 734 case 'n': 735 fVNCEnable = true; 736 break; 737 case 'm': 738 uVNCPort = ValueUnion.i32; 739 break; 740 case 'o': 741 pszVNCPassword = (char*)ValueUnion.psz; 742 break; 743 #endif /* VBOX_WITH_VNC */ 718 744 case OPT_RAW_R0: 719 745 fRawR0 = true; … … 933 959 } 934 960 #endif /* defined(VBOX_FFMPEG) */ 935 961 #ifdef VBOX_WITH_VNC 962 if (fVNCEnable) 963 { 964 VNCFB *pFramebuffer; 965 RTLDRMOD hLdrVNC; 966 PFNREGISTERVNCFB pfnRegisterVNCFB; 967 968 pFramebuffer = new VNCFB(console, uVNCPort, pszVNCPassword); 969 rc = pFramebuffer->init(); 970 if (rc != S_OK) 971 { 972 LogError("Failed to load the vnc server extension, possibly due to a damaged file\n", rrc); 973 delete pFramebuffer; 974 break; 975 } 976 977 Log2(("VBoxHeadless: Registering VNC framebuffer\n")); 978 pFramebuffer->AddRef(); 979 display->SetFramebuffer(VBOX_VIDEO_PRIMARY_SCREEN, pFramebuffer); 980 } 981 if (rc != S_OK) 982 break; 983 #endif 936 984 ULONG cMonitors = 1; 937 985 machine->COMGETTER(MonitorCount)(&cMonitors);
Note:
See TracChangeset
for help on using the changeset viewer.