Skip to content

Commit

Permalink
Added scripts into Mac .app files to allow running from command line.…
Browse files Browse the repository at this point in the history
… Incremented release number in pom.
  • Loading branch information
kpepper committed Jan 17, 2019
1 parent 2fc4340 commit 1708b25
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 11 deletions.
5 changes: 4 additions & 1 deletion act
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ done
JAR_NAME=act.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME
ARTEMIS_CP=$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED

#
# Use a custom Java version if necessary
Expand Down Expand Up @@ -135,14 +136,16 @@ PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Xdock:name=ACT"
JAR_FILE_MACAPP=$APPLICATION_HOME/Java/$JAR_NAME
ARTEMIS_CP="$JAR_FILE_MACAPP:$ARTEMIS_CP"
fi

if [[ "$QUIET" = no ]]
then
echo "Starting ACT with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi

$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED" uk.ac.sanger.artemis.components.ActMain $*
$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$ARTEMIS_CP" uk.ac.sanger.artemis.components.ActMain $*
result=$?

exit $result
Expand Down
5 changes: 4 additions & 1 deletion art
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ done
JAR_NAME=artemis.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME
ARTEMIS_CP=$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED

#
# Use a custom Java version if necessary
Expand Down Expand Up @@ -142,14 +143,16 @@ PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Xdock:name=Artemis"
JAR_FILE_MACAPP=$APPLICATION_HOME/Java/$JAR_NAME
ARTEMIS_CP="$JAR_FILE_MACAPP:$ARTEMIS_CP"
fi

if [[ "$QUIET" = "no" ]]
then
echo "Starting Artemis with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi

$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED" uk.ac.sanger.artemis.components.ArtemisMain $*
$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$ARTEMIS_CP" uk.ac.sanger.artemis.components.ArtemisMain $*
result=$?

exit $result
Expand Down
5 changes: 4 additions & 1 deletion bamview
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environme
JAR_NAME=bamview.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME
ARTEMIS_CP=$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED

#
# Use a custom Java version if necessary
Expand Down Expand Up @@ -72,14 +73,16 @@ PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Xdock:name=BamView"
JAR_FILE_MACAPP=$APPLICATION_HOME/Java/$JAR_NAME
ARTEMIS_CP="$JAR_FILE_MACAPP:$ARTEMIS_CP"
fi

if [[ "$QUIET" = "no" ]]
then
echo "Starting BamView with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi

$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED" uk.ac.sanger.artemis.components.alignment.BamView $*
$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$ARTEMIS_CP" uk.ac.sanger.artemis.components.alignment.BamView $*
result=$?

exit $result
5 changes: 4 additions & 1 deletion dnaplotter
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ done
JAR_NAME=dnaplotter.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME
ARTEMIS_CP=$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED

#
# Use a custom Java version if necessary
Expand Down Expand Up @@ -111,14 +112,16 @@ PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Xdock:name=Circular-Plot"
JAR_FILE_MACAPP=$APPLICATION_HOME/Java/$JAR_NAME
ARTEMIS_CP="$JAR_FILE_MACAPP:$ARTEMIS_CP"
fi

if [[ "$QUIET" = "no" ]]
then
echo "Starting DNA Plotter with arguments: $FLAGS $APPLICATION_PROPERTIES $TEMPLATE_FILE_ARG"
fi

$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$APPLICATION_HOME:$JAR_FILE_DEFAULT:$JAR_FILE_INSTALLED" uk.ac.sanger.artemis.circular.DNADraw $TEMPLATE_FILE_ARG
$JAVA $FLAGS $APPLICATION_PROPERTIES -cp "$ARTEMIS_CP" uk.ac.sanger.artemis.circular.DNADraw $TEMPLATE_FILE_ARG
result=$?

exit $result
Expand Down
8 changes: 4 additions & 4 deletions etc/versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Artemis Release 18.0.0
ACT Release 18.0.0
DNAPlotter Release 18.0.0
BamView 18.0.0
Artemis Release 18.0.1
ACT Release 18.0.1
DNAPlotter Release 18.0.1
BamView 18.0.1
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.sanger</groupId>
<artifactId>artemis</artifactId>
<version>18.0.0</version>
<version>18.0.1</version>

<name>Artemis</name>
<description>Artemis is a free genome browser and annotation tool that allows visualisation of sequence features, next generation data and the results of analyses within the context of the sequence, and also its six-frame translation.
Expand Down Expand Up @@ -93,8 +93,7 @@ Artemis is written in Java, and is available for UNIX, Macintosh and Windows sys

<!-- Java version-->
<java.compatibility.major.version>9</java.compatibility.major.version>

<bundler.jdk.path>/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk</bundler.jdk.path>

<osx.bundler.jar>${project.basedir}/maven-lib/appbundler-1.0ea.jar</osx.bundler.jar>
<osx.bundler.volume>Artemis_Tools</osx.bundler.volume>
<osx.bundler.chado.volume>Artemis_Tools_Chado</osx.bundler.chado.volume>
Expand Down
44 changes: 44 additions & 0 deletions src/assembly/macosx-release-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,28 @@
<fileset dir="etc"/>
</copy>

<!-- Copy in scripts for use on command line -->
<copy todir="${osx.app.folder}/apps/${artemis.application.name}.app/Contents/">
<fileset file="art"/>
</copy>
<copy todir="${osx.app.folder}/apps/${act.application.name}.app/Contents/">
<fileset file="act"/>
</copy>
<copy todir="${osx.app.folder}/apps/${dnaplotter.application.name}.app/Contents/">
<fileset file="dnaplotter"/>
</copy>
<copy todir="${osx.app.folder}/apps/${bamview.application.name}.app/Contents/">
<fileset file="bamview"/>
</copy>

<!-- Set script permission -->
<chmod perm="a+x">
<fileset file="${osx.app.folder}/apps/${artemis.application.name}.app/Contents/art"/>
<fileset file="${osx.app.folder}/apps/${act.application.name}.app/Contents/act"/>
<fileset file="${osx.app.folder}/apps/${dnaplotter.application.name}.app/Contents/dnaplotter"/>
<fileset file="${osx.app.folder}/apps/${bamview.application.name}.app/Contents/bamview"/>
</chmod>

<echo>NOTE: hdiutil must be installed to create a Mac .dmg image file...</echo>

<exec executable="hdiutil">
Expand Down Expand Up @@ -305,6 +327,28 @@
<fileset dir="etc"/>
</copy>

<!-- Copy in scripts for use on command line -->
<copy todir="${osx.app.chado.folder}/apps/${artemis.chado.application.name}.app/Contents/">
<fileset file="art"/>
</copy>
<copy todir="${osx.app.chado.folder}/apps/${act.chado.application.name}.app/Contents/">
<fileset file="act"/>
</copy>
<copy todir="${osx.app.chado.folder}/apps/${dnaplotter.application.name}.app/Contents/">
<fileset file="dnaplotter"/>
</copy>
<copy todir="${osx.app.chado.folder}/apps/${bamview.application.name}.app/Contents/">
<fileset file="bamview"/>
</copy>

<!-- Set script permission -->
<chmod perm="a+x">
<fileset file="${osx.app.chado.folder}/apps/${artemis.chado.application.name}.app/Contents/art"/>
<fileset file="${osx.app.chado.folder}/apps/${act.chado.application.name}.app/Contents/act"/>
<fileset file="${osx.app.chado.folder}/apps/${dnaplotter.application.name}.app/Contents/dnaplotter"/>
<fileset file="${osx.app.chado.folder}/apps/${bamview.application.name}.app/Contents/bamview"/>
</chmod>

<echo>NOTE: hdiutil must be installed to create a Mac .dmg image file...</echo>

<exec executable="hdiutil">
Expand Down

0 comments on commit 1708b25

Please sign in to comment.