VirtualBox

Changeset 5823 in vbox for trunk/src/VBox/Additions/linux


Ignore:
Timestamp:
Nov 22, 2007 7:22:50 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
26253
Message:

Additions (Linux): committed current seamless code, still disabled

Location:
trunk/src/VBox/Additions/linux/xclient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/xclient/Makefile.kmk

    r5500 r5823  
    1818include $(PATH_KBUILD)/header.kmk
    1919
    20 
    2120ifneq ($(USERNAME),bird) # crap
    2221PROGRAMS = vboxadd-xclient
     
    2726vboxadd-xclient_TEMPLATE = VBOXLNX32GUESTR3EXE
    2827vboxadd-xclient_SOURCES  = clipboard.cpp main.cpp
     28ifdef LINUX_SEAMLESS_GUEST
     29vboxadd-xclient_SOURCES += \
     30                seamless-host.cpp \
     31                seamless-x11.cpp
     32endif
    2933vboxadd-xclient_LIBPATH  = $(PATH_TARGET)/vboxadd-xclient $(VBOX_LIBPATH32_X11)
    3034vboxadd-xclient_LIBS     = \
    31     $(PATH_LIB)/RuntimeLnx32GuestR3.a pthread rt Xt X11
     35                $(PATH_LIB)/VBoxGuestR3LibLinux.a \
     36                $(PATH_LIB)/RuntimeLnx32GuestR3.a \
     37                pthread \
     38                rt \
     39                Xt \
     40                Xext \
     41                X11
    3242vboxadd-xclient_DEFS     = _GNU_SOURCE VBOX_HGCM
     43ifdef LINUX_SEAMLESS_GUEST
     44vboxadd-xclient_DEFS     += LINUX_SEAMLESS
     45endif
    3346
    3447# link agaginst libstdc++.a (http://www.trilithium.com/johan/2005/06/static-libstdc/)
  • trunk/src/VBox/Additions/linux/xclient/main.cpp

    r4353 r5823  
    3737#include "clipboard.h"
    3838
     39#ifdef SEAMLESS_LINUX
     40# include "seamless.h"
     41#endif
     42
    3943static bool gbDaemonise = true;
    4044
     
    9397{
    9498    int rc;
     99#ifdef SEAMLESS_LINUX
     100    /** Our instance of the seamless class. */
     101    VBoxGuestSeamless seamless;
     102#endif
    95103
    96104    /* Parse our option(s) */
     
    136144    XSetErrorHandler(vboxClipboardXLibErrorHandler);
    137145    /* Connect to the host clipboard. */
     146    LogRel(("Starting clipboard Guest Additions...\n"));
    138147    rc = vboxClipboardConnect();
    139148    if (rc != VINF_SUCCESS)
    140149    {
    141         Log(("vboxClipboardConnect failed with rc = %d\n", rc));
     150        LogRel(("vboxClipboardConnect failed with rc = %d\n", rc));
    142151        cout << "Failed to connect to the host clipboard." << endl;
    143         LogFlowFunc(("returning 1\n"));
    144         return 1;
    145     }
     152    }
     153#ifdef SEAMLESS_LINUX
     154    try
     155    {
     156        LogRel(("Starting seamless Guest Additions...\n"));
     157        rc = seamless.init();
     158        if (rc != VINF_SUCCESS)
     159        {
     160            LogRel(("Failed to initialise seamless Additions, rc = %d\n", rc));
     161            cout << "Failed to initialise seamless Additions." << endl;
     162        }
     163    }
     164    catch (std::exception e)
     165    {
     166        LogRel(("Failed to initialise seamless Additions - caught exception: %s\n", e.what()));
     167        cout << "Failed to initialise seamless Additions\n" << endl;
     168        rc = VERR_UNRESOLVED_ERROR;
     169    }
     170    catch (...)
     171    {
     172        LogRel(("Failed to initialise seamless Additions - caught unknown exception.\n"));
     173        cout << "Failed to initialise seamless Additions\n" << endl;
     174        rc = VERR_UNRESOLVED_ERROR;
     175    }
     176#endif /* SEAMLESS_LINUX defined */
    146177    if (gbDaemonise)
    147178    {
     
    150181    vboxClipboardMain();
    151182    vboxClipboardDisconnect();
    152     LogFlowFunc(("returning 0\n"));
    153     return 0;
     183#ifdef SEAMLESS_LINUX
     184    try
     185    {
     186        seamless.uninit();
     187    }
     188    catch (std::exception e)
     189    {
     190        LogRel(("Error shutting down seamless Additions - caught exception: %s\n", e.what()));
     191        rc = VERR_UNRESOLVED_ERROR;
     192    }
     193    catch (...)
     194    {
     195        LogRel(("Error shutting down seamless Additions - caught unknown exception.\n"));
     196        rc = VERR_UNRESOLVED_ERROR;
     197    }
     198#endif /* SEAMLESS_LINUX defined */
     199    LogFlowFunc(("returning %Vrc\n", rc));
     200    return rc;
    154201}
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