VirtualBox

Ignore:
Timestamp:
Oct 21, 2009 3:40:36 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53757
Message:

VBoxClient: Installer, command line, define cleanup.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk

    r23859 r23941  
    6161        seamless-x11.cpp \
    6262        thread.cpp \
    63         display.cpp
     63        display.cpp \
     64        hostversion.cpp
    6465 VBoxClient_LIBS += \
    6566        Xext Xmu
    6667endif
    6768ifdef VBOX_WITH_GUEST_PROPS
    68  VBoxClient_SOURCES += hostversion.cpp
    6969 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
    7070endif
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r23876 r23941  
    4545    {
    4646        int rc;
    47 #ifdef VBOX_WITH_DBUS
     47# ifdef VBOX_WITH_DBUS
    4848        DBusConnection *conn;
    4949        DBusMessage* msg;
     
    104104        if (msg != NULL)
    105105            dbus_message_unref(msg);
    106 #else
     106# else
    107107        /* TODO: Implement me */
    108108        rc = VINF_SUCCESS;
    109 #endif /* VBOX_WITH_DBUS */
     109# endif /* VBOX_WITH_DBUS */
    110110        return rc;
    111111    }
    112112
    113     /** @todo Move this part in VbglR3 and just provide a callback for the platform-specific 
     113    /** @todo Move this part in VbglR3 and just provide a callback for the platform-specific
    114114              notification stuff, since this is very similar to the VBoxTray code. */
    115115    virtual int run()
     
    117117        int rc;
    118118        LogFlowFunc(("\n"));
    119 #ifdef VBOX_WITH_DBUS
     119# ifdef VBOX_WITH_DBUS
    120120        rc = RTDBusLoadLib();
    121121        if (RT_FAILURE(rc))
     122            LogRel(("VBoxClient: D-Bus seems not to be installed; no host version check/notification done.\n"));
     123# else
     124        rc = VERR_NOT_IMPLEMENTED;
     125# endif /* VBOX_WITH_DBUS */
     126
     127# ifdef VBOX_WITH_GUEST_PROPS
     128        if (RT_SUCCESS(rc))
    122129        {
    123             LogRel(("VBoxClient: D-Bus seems not to be installed; no host version check/notification done.\n"));
     130            uint32_t uGuestPropSvcClientID;
     131            rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
     132            if (RT_FAILURE(rc))
     133                LogFlow(("Cannot connect to guest property service! rc = %Rrc\n", rc));
    124134        }
    125 #else
    126         rc = VERR_NOT_IMPLEMENTED;
    127 #endif
    128         uint32_t uGuestPropSvcClientID;
    129         rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
     135
    130136        if (RT_SUCCESS(rc))
    131137        {
     
    143149                        char szMsg[256];
    144150                        char szTitle[64];
    145        
     151
    146152                        /** @todo add some translation macros here */
    147153                        RTStrPrintf(szTitle, sizeof(szTitle), "VirtualBox Guest Additions update available!");
     
    156162                    /* Store host version to not notify again */
    157163                    rc = VbglR3HostVersionLastCheckedStore(uGuestPropSvcClientID, pszHostVersion);
    158    
     164
    159165                    VbglR3GuestPropReadValueFree(pszHostVersion);
    160166                    VbglR3GuestPropReadValueFree(pszGuestVersion);
     
    163169            VbglR3GuestPropDisconnect(uGuestPropSvcClientID);
    164170        }
     171# endif /* VBOX_WITH_GUEST_PROPS */
    165172        LogFlowFunc(("returning %Rrc\n", rc));
    166173        return rc;
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r23859 r23941  
    138138    RTPrintf("  --clipboard      start the shared clipboard service\n");
    139139    RTPrintf("  --display     start the display management service\n");
     140# ifdef VBOX_WITH_GUEST_PROPS
     141    RTPrintf("  --checkhostversion      start the host version notifier service\n");
     142# endif
    140143    RTPrintf("  --seamless       start the seamless windows service\n");
    141144    RTPrintf("  -d, --nodaemon   continue running as a system service\n");
     
    190193                fSuccess = false;
    191194        }
    192 #ifdef VBOX_WITH_GUEST_PROPS
    193195        else if (!strcmp(argv[i], "--checkhostversion"))
    194196        {
     
    198200                fSuccess = false;
    199201        }
    200 #endif
    201202        else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
    202203        {
     
    223224            RTPrintf("VBoxClient: failed to daemonize.  Exiting.\n");
    224225            Log(("VBoxClient: failed to daemonize.  Exiting.\n"));
    225 #ifdef DEBUG
     226# ifdef DEBUG
    226227            RTPrintf("Error %Rrc\n", rc);
    227 #endif
     228# endif
    228229            return 1;
    229230        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette