2

I have a shell script, and a tarball. The shell script unpacks the tarball, and makes use of the files inside of for performing a task. I need to make this accessible on mac laptops, but in such a way that there is either a .app or .dmg file that when clicked, ultimately calls that shell script. I found several utilities, that can do this (create such an .app file), such as Platypus, or Appify. However, these require Mac to build the file. The thing is, I must package the .app/.dmg file, in an Ubuntu environment.

Is there any good software for creating a dmg or app file which call a shell script when clicked, but such that the software which can be run in Ubuntu (just for the purpose of creating the file)?

ffConundrums
  • 765
  • 9
  • 24
  • 1
    Is this *just* a command-line tool, or is there a front-end to it? If you're building a `.app` it's expected that's actually a graphical front-end, not some command-line thing. If you have command-line tools, build a proper installer `.pkg`. You may not be able to construct such a thing on Ubuntu, at least not without running a copy of macOS inside a VM. – tadman Mar 29 '18 at 20:45
  • Possible duplicate of [How to build a dmg Mac OS X file (on a non-Mac platform)?](https://stackoverflow.com/questions/286419/how-to-build-a-dmg-mac-os-x-file-on-a-non-mac-platform) – Sam Axe Mar 29 '18 at 21:44
  • this will have a front end component as well yes. Ah yes I thought of running macOS in a VM but my understanding was that was difficult. I might just have to find another way around.. – ffConundrums Mar 30 '18 at 01:38

1 Answers1

1

This is not an exact answer to your question but an workaround that might be acceptable if you can't find a better solution.

First, a zip file will automatically extract its content if you double click it in OS X so

tar -cvzf your_filename.zip ...

would create a file that can be easily extracted.

Secondly, if you create a shell script that has the extension .command, but otherwise is like any shell script, it can be run from OS X by double clicking on it (by opening a terminal and executing it there), it would mean an extra manual step for the user but like I said, this is a workaround :) If you create a .command file, remember to make it executable.

Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52