-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPCVerse
More file actions
32 lines (26 loc) · 869 Bytes
/
Copy pathPCVerse
File metadata and controls
32 lines (26 loc) · 869 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"
if [[ -x "$ROOT/bin/pcverse" ]]; then
export LD_LIBRARY_PATH="$ROOT/bin/lib:${LD_LIBRARY_PATH:-}"
exec "$ROOT/bin/pcverse" "$@"
fi
NATIVE="$ROOT/native/build/apps/pcverse/pcverse"
if [[ -x "$NATIVE" ]]; then
export LD_LIBRARY_PATH="$ROOT/native/build/apps/pcverse/lib:${LD_LIBRARY_PATH:-}"
exec "$NATIVE" "$@"
fi
PHP_BIN="php"
if [[ -x "$ROOT/runtime/php/bin/php" ]]; then
PHP_BIN="$ROOT/runtime/php/bin/php"
fi
if [[ ! -f vendor/autoload.php ]]; then
echo "PCVerse is not fully installed. Run the PCVerse installer again."
echo "Dev: build native desktop with scripts/build-native-desktop.sh"
exit 1
fi
if command -v xdg-open >/dev/null 2>&1; then
xdg-open "http://127.0.0.1:8080/diagnostic" >/dev/null 2>&1 &
fi
exec "$PHP_BIN" -S 127.0.0.1:8080 -t public