bashmacos.app

Alternatives to Platypus (which builds a mac .app that runs a script when user double clicks it), which run on Linux?


I already have software which runs on mac, which can be driven by a main 'runner' script. However, I want the software to be packaged as a .app. On a mac, I can run 'platypus' (https://www.sveinbjorn.org/platypus), and it will create a very nice .app file, which calls that runner script as an entry point (exactly what I am trying to do). It's very simple to use.

The problem is, platypus itself only runs on mac, and I need to bundle this all together (create the .app), on a Linux machine.

Is there an alternative to Platypus, which accomplishes the same result (generates a .app, with a script as the entrypoint), but which you can build on Linux? Or, is anyone aware of up-to date tutorial which explains how to accomplish this manually (but on Linux)?

(I've seen this: How to build a dmg Mac OS X file (on a non-Mac platform)? but it is for dmg files, while I need a .app file. Also, I'm specifically curious about programs simple like Platypus is.)


Solution

  • A mac .app "file" is actually just a folder (you can browse the contents by right clicking, "show package contents". The main part you'd need to change is the .sh script itself which can be found within the app package: yourapp.app/Contents/MacOS/yourscript.sh

    So you could copy an existing yourapp.app and use it as a template, just editing the script contents and app (folder) name all within Linux. You might have to set permissions when copying back (chmod +x etc.).. I'm not sure having not tested this method, but I can't see why it wouldn't work.