-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathrun-BlackBox
More file actions
executable file
·61 lines (53 loc) · 1.4 KB
/
run-BlackBox
File metadata and controls
executable file
·61 lines (53 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
# ulimit -s 32000
# ulimit -a
rn=$(readlink -f "${0}")
standardDir=$(dirname "${rn}")
useDir=$(readlink -f .)
exeBase="blackbox"
os=$(uname -s)
case "${os%%-*}" in
"Linux")
exe="${exeBase}Linux"
# fix Ubuntu-specific problems:
unset UBUNTU_MENUPROXY
unset GTK_MODULES
export LIBOVERLAY_SCROLLBAR=0
;;
"OpenBSD")
exe="${exeBase}OpenBSD"
;;
"FreeBSD")
exe="${exeBase}FreeBSD"
;;
"NetBSD")
exe="${exeBase}NetBSD"
export LD_LIBRARY_PATH=/usr/pkg/lib:${LD_LIBRARY_PATH}
;;
"MSYS_NT" | "MINGW64_NT" | "MINGW32_NT")
exe="${exeBase}"
;;
*)
echo "unsupported OS"
exit 1
esac
if [ -n "${LD_32_LIBRARY_PATH}" ]; then
# GIO modules
if [ -e "${LD_32_LIBRARY_PATH}"/gio/modules ]; then
export GIO_MODULE_DIR="${LD_32_LIBRARY_PATH}"/gio/modules
fi
# gdk-pixbuf loaders
if [ -e "${LD_32_LIBRARY_PATH}"/gdk-pixbuf-2.0 -a -e "${LD_32_LIBRARY_PATH%/lib}"/bin/gdk-pixbuf-query-loaders ]; then
ver=$(ls "${LD_32_LIBRARY_PATH}"/gdk-pixbuf-2.0)
if [ -n "${ver}" ]; then
export GDK_PIXBUF_MODULEDIR="${LD_32_LIBRARY_PATH}"/gdk-pixbuf-2.0/"${ver}"/loaders
export GDK_PIXBUF_MODULE_FILE=$(mktemp -t loaders.cache)
trap "rm -f ${GDK_PIXBUF_MODULE_FILE}" EXIT
"${LD_32_LIBRARY_PATH%/lib}"/bin/gdk-pixbuf-query-loaders > "${GDK_PIXBUF_MODULE_FILE}"
fi
fi
fi
# export LD_DEBUG=all
env \
BB_STANDARD_DIR="${standardDir}" BB_USE_DIR="${useDir}" \
"${standardDir}"/${exe} "${@}"