blob: 41295c183dcd8594b789b63f18888e929f019908 (
plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
#!/bin/bash
# ==============================================================================
# Hytale Launcher Wrapper for Arch Linux
#
# Author: [SCDevel/root@scdevel.net]
# License: MIT
# Description: Handles custom directory installation and environment variables for the Hytale Launcher.
#
# Disclaimer: This script is an unofficial community tool and is not
# affiliated with, endorsed by, or owned by Hypixel Studios Canada.
# ==============================================================================
# temporary fix for nautilus crash
if ! command -v nautilus &> /dev/null; then
export PATH="/opt/hytale-launcher-bin/nautilus-fix:$PATH"
fi
# Time Sync Check
if ! command -v timedatectl &> /dev/null; then
echo "WARN: 'timedatectl' command not found. Unable to check system clock synchronization."
elif timedatectl status | grep -qi "System clock synchronized: yes"; then
echo "[OK] System clock is synchronized."
else
echo "****************************************************"
echo "WARNING: System clock is NOT synchronized!"
echo "This may cause authentication errors in Hytale."
echo "Run: sudo timedatectl set-ntp true"
echo "****************************************************"
fi
# IPV6 Check
if [[ -f /proc/sys/net/ipv6/conf/all/disable_ipv6 ]]; then
if [[ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) -eq 1 ]]; then
echo "****************************************************"
echo "WARNING: IPv6 is DISABLED in your kernel settings!"
echo "****************************************************"
fi
else
echo "WARN: Could not find IPv6 kernel settings file."
fi
if ! command -v ip &> /dev/null; then
echo "WARN: 'ip' command not found. Unable to check network interface status."
else
if ! ip -6 addr show | grep -q "scope global"; then
echo "****************************************************"
echo "WARNING: IPv6 is enabled, but no GLOBAL address found."
echo "You may only have local connectivity."
echo "****************************************************"
else
echo "[OK] IPv6 is enabled and has a global address."
fi
fi
# NVIDIA Sync Fix
export __NV_DISABLE_EXPLICIT_SYNC=1
# Webkit Rendering Fix
export WEBKIT_DISABLE_DMABUF_RENDERER=1
export DESKTOP_STARTUP_ID=com.hypixel.HytaleLauncher
# Set XDG Specs.
: "${HYTALE_HOME:=$HOME}"
: "${XDG_DATA_HOME:=$HYTALE_HOME/.local/share}"
: "${XDG_CONFIG_HOME:=$HYTALE_HOME/.config}"
: "${XDG_CACHE_HOME:=$HYTALE_HOME/.cache}"
# Internal Script Dirs
LAUNCHER_DIR="${XDG_DATA_HOME}/hytale-launcher/bin"
SOURCE_DIR="/opt/hytale-launcher-bin"
BIN_NAME="hytale-launcher"
# If the launcher isn't in the user's home yet, copy the files
if [ ! -d "$LAUNCHER_DIR" ]; then
echo "Installing Hytale Launcher to $LAUNCHER_DIR..."
mkdir -p "$LAUNCHER_DIR"
cp -r "$SOURCE_DIR/$BIN_NAME" "$LAUNCHER_DIR/$BIN_NAME"
fi
# Just wanna make sure these are exported.
export HYTALE_HOME XDG_DATA_HOME XDG_CONFIG_HOME XDG_CACHE_HOME
# Switch to the directory and run it
cd "$LAUNCHER_DIR"
exec "./$BIN_NAME" "$@"
|