annotate package-files/linux/imageprep @ 31:99a0eb385c9a default tip

Work around annoying Swing glitch.
author David Barts <n5jrn@me.com>
date Sat, 20 Aug 2022 09:19:49 -0700
parents c310ec097194
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
1 #!/bin/sh
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
2 #
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
3 # Runs ImagePrep. Adopted from a similar script in the jEdit distribution.
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
4 #
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
5 # Find a java installation.
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
6 if [ -z "${JAVA_HOME}" ]; then
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
7 echo 'Warning: $JAVA_HOME environment variable not set! Consider setting it.'
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
8 echo ' Attempting to locate java...'
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
9 j=`which java 2>/dev/null`
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
10 if [ -z "$j" ]; then
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
11 echo "Failed to locate the java virtual machine! Bailing..."
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
12 exit 1
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
13 else
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
14 echo "Found a virtual machine at: $j..."
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
15 JAVA="$j"
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
16 fi
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
17 else
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
18 JAVA="${JAVA_HOME}/bin/java"
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
19 fi
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
20
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
21 # Antialias menus and dockable text:
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
22 ANTIALIAS_ALL="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
23
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
24 # Launch application.
c310ec097194 Add Linux support.
David Barts <n5jrn@me.com>
parents:
diff changeset
25 exec "${JAVA}" ${ANTIALIAS_ALL} -jar "/usr/share/imageprep/@jar.filename@"