0

I have a sh-script in MacOS that launches my application. I can use Automator to create executable desctop icon for it but manually.

Is there any way automatically create a desktop icon that will execute this sh-script by double-clicking on this icon? And also I would like to create such icon using some parameters like a path to custom image of the icon.

Note. In our project we have a number of jar-files for about 100Mb. So now I use sh-script with configuration to launch the application.

5
  • 1
    Are you asking how to create an installer for a java application? Like: stackoverflow.com/questions/1536190/… ??? Icons are Icons, not programs. Your question is pretty unclear ... Commented Aug 15, 2017 at 13:26
  • At this point I don't need an installer. Just tie sh-script with desktop icon, not manually. Answer about creating app folder might be the right one, I'll try. Commented Aug 15, 2017 at 13:46
  • The answer with the ".command" extension is the simplest. Commented Aug 15, 2017 at 13:50
  • @ThorbjørnRavnAndersen I know how to execute sh-script by double-clicking. The question is how to automatically create the executable desktop icon for sh-script. Commented Aug 15, 2017 at 13:52
  • 1
    echo java -whatever foo bar > ~/Desktop/foo.command Commented Aug 15, 2017 at 13:54

1 Answer 1

1

You can create an app folder for your application and put the icon you want in it.

More info here.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much. It might be very good solution. I would like to ask: in our application we have a lot of jar-files so is it possible to put sh-script in such folder?
@KirillCh Yes. You MUST include a launcher somewhere in the structure. There is a binary version that comes with MacOs, but there is an open-source alternative that is a shell script: github.com/tofi86/universalJavaApplicationStub

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.