0

I have a number of jar-files, some resources, h2 database, etc. in my project. To create Mac application I used Platypus. To run my application shell script was used.

However at this case when application starts then separate java process starts and there neither proper name of the app nor proper About description in Mac menu. Also Terminal starts that is not wanted.

How I should launch the app to avoid this drawbacks so that the name of the app and About description were the right ones?

What I see now (name and About):

enter image description here

enter image description here

My launching shell script is the following:

#!/bin/bash

export IRULE_HOME="$(cd "$(dirname "$0")" && pwd -P)"

export IRULE_LANG=en
export IRULE_REGION=EN
export IRULE_XMS=-Xms256m
export IRULE_XMX=-Xmx1024m
export LOG4J_CONFIGURATION=${IRULE_HOME}/conf/log4j2.xml
export JAVA_HOME="${IRULE_HOME}/jre/Contents/Home"

export DEFAULT_JVM_OPTS="$IRULE_XMS \
              $IRULE_XMX \
              -Dlog4j.configuration=file:"${LOG4J_CONFIGURATION}" \
              -Dirule.home=${IRULE_HOME} \
              -Dirule.client.logs.path=${IRULE_HOME}/logs \
              -Duser.language="${IRULE_LANG}" \
              -Duser.region="${IRULE_REGION}" \
              $JAVA_OPTS"


export PATH=${JAVA_HOME}/bin:${JAVA_HOME}:${PATH}
export CLASSPATH=${IRULE_HOME}/lib/*:${IRULE_HOME}/conf:${JAVA_HOME}/lib/jfxrt.jar;

exec ${JAVA_HOME}/bin/java -Xdock:name="iRule Reader" -Xdock:icon=${IRULE_HOME}/image/irule.png ${DEFAULT_JVM_OPTS} -classpath "${CLASSPATH}" com.spi2.Main $* 

How I created the app by Platypus. The process is simple: I set my shell-script and add all my resources. Also I can set up the icon. And I add Credits.html to allow About description as said in documentation:

enter image description here

1

If you use a shell script you must run it from a shell and so to ghet a shell macOS opens Terminal. You are also not running an app so not getting the correct setup for icons, menus etc.

To be seen as an app the executable needs to be packaged as per Apple's Bundle documentation

This Platypus seems to say it should do this. So in this case you need to read its documentation and see what you have not done. If this is the problem then this would need to be a question on StackOverflow but you would need to show how you set your app up.

  • Thanks for your advice. I have read this article but it is hard for me to understand how to transform launching process from shell-script to Apple bundle. – Kirill Ch Aug 24 '17 at 10:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .