mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-20 14:16:01 +00:00
38 lines
1.5 KiB
Bash
Executable File
38 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
cd $(dirname $0)
|
|
|
|
# determine GTK version
|
|
GTK2_PRESENT=1 # initially false
|
|
GTK3_PRESENT=0 # initially true
|
|
if command -v dpkg &> /dev/null; then # do stuff for debian based things
|
|
GTK2_PRESENT=`dpkg -l libgtk* | grep -e '\^ii' | grep -e 'libgtk2-*' &> /dev/null; echo $?`
|
|
GTK3_PRESENT=`dpkg -l libgtk* | grep -e '\^ii' | grep -e 'libgtk-3-*' &> /dev/null; echo $?`
|
|
elif command -v rpm &> /dev/null; then # do stuff for rpm based things (including yum/dnf)
|
|
GTK2_PRESENT=`rpm -qa | grep -e '\^gtk2-[0-9][0-9]*' &> /dev/null; echo $?`
|
|
GTK3_PRESENT=`rpm -qa | grep -e '\^gtk3-[0-9][0-9]*' &> /dev/null; echo $?`
|
|
elif command -v pacman &> /dev/null; then # don't forget arch
|
|
GTK2_PRESENT=`pacman -Qi gtk2 &> /dev/null; echo $?`
|
|
GTK3_PRESENT=`pacman -Qi gtk3 &> /dev/null; echo $?`
|
|
fi
|
|
|
|
if [ "$GTK2_PRESENT" -eq 0 ] && [ "$GTK3_PRESENT" -ne 0 ]; then
|
|
GTK_FLAG="-Djdk.gtk.version=2"
|
|
fi
|
|
|
|
# workaround for https://github.com/cryptomator/cryptomator-linux/issues/27
|
|
export LD_PRELOAD=lib/app/libjffi.so
|
|
|
|
# start Cryptomator
|
|
./lib/runtime/bin/java \
|
|
-p "lib/app/mods" \
|
|
-cp "lib/app/*" \
|
|
-Dcryptomator.logDir="~/.local/share/Cryptomator/logs" \
|
|
-Dcryptomator.mountPointsDir="~/.local/share/Cryptomator/mnt" \
|
|
-Dcryptomator.settingsPath="~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json" \
|
|
-Dcryptomator.ipcSocketPath="~/.config/Cryptomator/ipc.socket" \
|
|
-Dcryptomator.buildNumber="appimage-${REVISION_NO}" \
|
|
$GTK_FLAG \
|
|
-Xss2m \
|
|
-Xmx512m \
|
|
-m org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator
|