VirtualBox

source: vbox/trunk/src/VBox/Additions/solaris/Installer/vbox_vendor_select@ 100267

最後變更 在這個檔案從100267是 98103,由 vboxsync 提交於 23 月 前

Copyright year updates by scm.

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:executable 設為 *
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.7 KB
 
1#!/bin/ksh93
2# $Id: vbox_vendor_select 98103 2023-01-17 14:15:46Z vboxsync $
3## @file
4# ???
5#
6
7#
8# Copyright (C) 2013-2023 Oracle and/or its affiliates.
9# This file is based on mesa_vendor_select from Solaris 11.3 with the following copyright:
10#
11# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
12#
13# Permission is hereby granted, free of charge, to any person obtaining a
14# copy of this software and associated documentation files (the "Software"),
15# to deal in the Software without restriction, including without limitation
16# the rights to use, copy, modify, merge, publish, distribute, sublicense,
17# and/or sell copies of the Software, and to permit persons to whom the
18# Software is furnished to do so, subject to the following conditions:
19#
20# The above copyright notice and this permission notice (including the next
21# paragraph) shall be included in all copies or substantial portions of the
22# Software.
23#
24# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30# DEALINGS IN THE SOFTWARE.
31#
32
33LINKDIR=/system/volatile/opengl
34MESA_SELECT=/lib/opengl/ogl_select/mesa_vendor_select
35
36PATH=/usr/bin:/usr/sbin
37
38ARCH="$(uname -p)"
39
40case "${ARCH}" in
41 i386) ;;
42 *) exit 1 ;; # Unsupported architecture
43esac
44
45# We need Mesa for the parts we do not supply.
46if [[ ! -x "${MESA_SELECT}" ]]; then
47 exit 0
48fi
49
50if [[ $# -eq 1 ]] && [[ $1 == "identify" ]] ; then
51 # Probe time. Check whether this system supports pass-through.
52 # If so, emit an identity string attaching us to the current
53 # console identifier.
54 if /usr/bin/VBoxClient --check3d ; then
55 print "$(constype) vbox"
56 fi
57 return 0
58fi
59
60# Make a file link. $1 is the source path, $2 is the target path
61function make_link {
62 if [[ $# != 2 ]]; then
63 return
64 fi
65 if [[ -h $2 ]]; then
66 rm -f $2
67 fi
68 ln -sf $1 $2
69}
70
71# Start by setting up Mesa, as we use that for everything except the user
72# libraries.
73${MESA_SELECT}
74
75# User libraries
76if [[ -f ${LINKDIR}/lib/libGL.so.1 ]] && [[ -f /usr/lib/VBoxOGL.so ]] ; then
77 make_link /usr/lib/VBoxOGL.so ${LINKDIR}/lib/libGL.so.1
78fi
79if [[ -f ${LINKDIR}/lib/i386/libGL.so.1 ]] && \
80 [[ -f /usr/lib/i386/VBoxOGL.so ]] ; then
81 make_link /usr/lib/i386/VBoxOGL.so ${LINKDIR}/lib/i386/libGL.so.1
82fi
83if [[ -f ${LINKDIR}/lib/amd64/libGL.so.1 ]] && \
84 [[ -f /usr/lib/amd64/VBoxOGL.so ]] ; then
85 make_link /usr/lib/amd64/VBoxOGL.so ${LINKDIR}/lib/amd64/libGL.so.1
86fi
87
88return 0
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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