VirtualBox

vbox的更動 62551 路徑 trunk/src/VBox/Additions


忽略:
時間撮記:
2016-7-25 下午06:44:22 (8 年 以前)
作者:
vboxsync
訊息:

bugref:8087: Additions/x11: support non-root X server: simplify loading of 3D library. I hope that this will not cause any regressions, but I also hope it will prevent non-obvious failures.

位置:
trunk/src/VBox/Additions
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r60940 r62551  
    11231123    return bRc;
    11241124}
    1125 
    1126 #if defined(Linux) && !defined(VBOXOGL_FAKEDRI)
    1127 # include <dlfcn.h>
    1128 /* We only support being used by GLX clients.  If the X server GLX extension
    1129  * tries to use our OpenGL library it will fail, as it is written specifically
    1130  * against Mesa.  So we detect this with the assumption that the server will
    1131  * not have the DISPLAY variable set, and a client will do or we can't do much
    1132  * with it anyway.  This is only needed on Linux, as Solaris lets us replace
    1133  * the client library only.  To avoid complications with iprt initialisation
    1134  * we use native system/C library APIs.
    1135  * We do this in a very naive way, not even checking for failure (not much we
    1136  * can do, better for GLX to fail than the whole X server).  To keep things as
    1137  * simple and fail-safe as possible, we use a fixed path to the system GL
    1138  * library. */
    1139 #ifndef RTLD_DEEPBIND
    1140 # define RTLD_DEEPBIND 0x8
    1141 #endif
    1142 
    1143 void __attribute__ ((constructor)) checkServerGLX(void)
    1144 {
    1145     char *pszDisplay = getenv("DISPLAY");
    1146 
    1147     if (!pszDisplay || !*pszDisplay)
    1148     {
    1149         dlopen("/var/lib/VBoxGuestAdditions/lib/system/libGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
    1150         dlopen("/var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1", RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
    1151     }
    1152 }
    1153 #endif
    11541125
    11551126/* Sigh -- we can't do initialization at load time, since Windows forbids
  • trunk/src/VBox/Additions/linux/installer/vboxadd.sh

    r62397 r62551  
    228228    # multi-architecture installations
    229229    rm -f /etc/ld.so.conf.d/00vboxvideo.conf
    230     ldconfig
    231230    if /usr/bin/VBoxClient --check3d 2>/dev/null; then
    232         rm -f /var/lib/VBoxGuestAdditions/lib/system/tmp.so
    233         mkdir -m 0755 -p /var/lib/VBoxGuestAdditions/lib/system
    234         ldconfig -p | while read -r line; do
    235             case "${line}" in "libGL.so.1 ${ldconfig_arch} => "*)
    236                 ln -s "${line#libGL.so.1 ${ldconfig_arch} => }" /var/lib/VBoxGuestAdditions/lib/system/tmp.so
    237                 mv /var/lib/VBoxGuestAdditions/lib/system/tmp.so /var/lib/VBoxGuestAdditions/lib/system/libGL.so.1
    238                 break
    239             esac
    240         done
    241         ldconfig -p | while read -r line; do
    242             case "${line}" in "libEGL.so.1 ${ldconfig_arch} => "*)
    243                 ln -s "${line#libEGL.so.1 ${ldconfig_arch} => }" /var/lib/VBoxGuestAdditions/lib/system/tmp.so
    244                 mv /var/lib/VBoxGuestAdditions/lib/system/tmp.so /var/lib/VBoxGuestAdditions/lib/system/libEGL.so.1
    245                 break
    246             esac
    247         done
     231        mkdir -p /var/lib/VBoxGuestAdditions/lib
    248232        ln -sf "${INSTALL_DIR}/lib/VBoxOGL.so" /var/lib/VBoxGuestAdditions/lib/libGL.so.1
    249233        ln -sf "${INSTALL_DIR}/lib/VBoxEGL.so" /var/lib/VBoxGuestAdditions/lib/libEGL.so.1
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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