#!/bin/sh
if [ -z "$JAVA_HOME" ]; then
    export JAVA_HOME=/usr/lib64/openjdk-21
fi
cd $(dirname $0)
exec $JAVA_HOME/bin/java \
	-p "/usr/share/cryptomator/mods" \
	-cp "/usr/share/cryptomator/libs/*" \
	-Dcryptomator.settingsPath="~/.config/Cryptomator/settings.json" \
	-Dcryptomator.ipcSocketPath="~/.config/Cryptomator/ipc.socket" \
	-Dcryptomator.logDir="~/.local/share/Cryptomator/logs" \
	-Dcryptomator.mountPointsDir="~/.local/share/Cryptomator/mnt" \
	-Djdk.gtk.version=2 \
	-Xss2m \
	-Xmx512m \
	-m org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator
