Changeset 5823 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Nov 22, 2007 7:22:50 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 26253
- Location:
- trunk/src/VBox/Additions/linux/xclient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/xclient/Makefile.kmk
r5500 r5823 18 18 include $(PATH_KBUILD)/header.kmk 19 19 20 21 20 ifneq ($(USERNAME),bird) # crap 22 21 PROGRAMS = vboxadd-xclient … … 27 26 vboxadd-xclient_TEMPLATE = VBOXLNX32GUESTR3EXE 28 27 vboxadd-xclient_SOURCES = clipboard.cpp main.cpp 28 ifdef LINUX_SEAMLESS_GUEST 29 vboxadd-xclient_SOURCES += \ 30 seamless-host.cpp \ 31 seamless-x11.cpp 32 endif 29 33 vboxadd-xclient_LIBPATH = $(PATH_TARGET)/vboxadd-xclient $(VBOX_LIBPATH32_X11) 30 34 vboxadd-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 32 42 vboxadd-xclient_DEFS = _GNU_SOURCE VBOX_HGCM 43 ifdef LINUX_SEAMLESS_GUEST 44 vboxadd-xclient_DEFS += LINUX_SEAMLESS 45 endif 33 46 34 47 # link agaginst libstdc++.a (http://www.trilithium.com/johan/2005/06/static-libstdc/) -
trunk/src/VBox/Additions/linux/xclient/main.cpp
r4353 r5823 37 37 #include "clipboard.h" 38 38 39 #ifdef SEAMLESS_LINUX 40 # include "seamless.h" 41 #endif 42 39 43 static bool gbDaemonise = true; 40 44 … … 93 97 { 94 98 int rc; 99 #ifdef SEAMLESS_LINUX 100 /** Our instance of the seamless class. */ 101 VBoxGuestSeamless seamless; 102 #endif 95 103 96 104 /* Parse our option(s) */ … … 136 144 XSetErrorHandler(vboxClipboardXLibErrorHandler); 137 145 /* Connect to the host clipboard. */ 146 LogRel(("Starting clipboard Guest Additions...\n")); 138 147 rc = vboxClipboardConnect(); 139 148 if (rc != VINF_SUCCESS) 140 149 { 141 Log (("vboxClipboardConnect failed with rc = %d\n", rc));150 LogRel(("vboxClipboardConnect failed with rc = %d\n", rc)); 142 151 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 */ 146 177 if (gbDaemonise) 147 178 { … … 150 181 vboxClipboardMain(); 151 182 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; 154 201 }
Note:
See TracChangeset
for help on using the changeset viewer.