diff package-files/linux/imageprep @ 28:c310ec097194

Add Linux support.
author David Barts <n5jrn@me.com>
date Fri, 25 Dec 2020 19:07:47 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package-files/linux/imageprep	Fri Dec 25 19:07:47 2020 -0800
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Runs ImagePrep. Adopted from a similar script in the jEdit distribution.
+#
+# Find a java installation.
+if [ -z "${JAVA_HOME}" ]; then
+	echo 'Warning: $JAVA_HOME environment variable not set! Consider setting it.'
+	echo '         Attempting to locate java...'
+	j=`which java 2>/dev/null`
+	if [ -z "$j" ]; then
+		echo "Failed to locate the java virtual machine! Bailing..."
+		exit 1
+	else
+		echo "Found a virtual machine at: $j..."
+		JAVA="$j"
+	fi
+else
+	JAVA="${JAVA_HOME}/bin/java"
+fi
+
+# Antialias menus and dockable text:
+ANTIALIAS_ALL="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
+
+# Launch application.
+exec "${JAVA}" ${ANTIALIAS_ALL} -jar "/usr/share/imageprep/@jar.filename@"