A simple script to create macOS App-Bundles(.app) out of "Unix Executables"(binary files)
The binary file that has to be "converted" into a .app-file.
The example
./macapp.sh -bin MyBinary
will create the App-Bundle MyBinary.app
with the binary MyBinary
.
The name of the application. Defaults to the binary's name.
The name of the App-Bundle(.app-file). Defaults the the binary's name + .app
.
The icon of the application. Must be a .icns
file. If not specified, the default macOS App-Icon is shown.
Allows you to use a predefined Info.plist
. If not set, one will automatically be generated.
(If -inf
is not set)
The application's version. Must satisfy the following criteria:
- The first number represents the most recent major release and is limited to a maximum length of four digits.
- The second number represents the most recent significant revision and is limited to a maximum length of two digits.
- The third number represents the most recent minor bug fix and is limited to a maximum length of two digits.
If the value of the third number is 0, you can omit it and the second period.
(If -inf
is not set)
The application's Identifier. Must be in reverse-DNS format(i.e. com.nk-dm.macapp).
Allows you to choose to copy a resource folder(.icns
-file not included). This is where most of/all your resources should go.
If the path is relative to the binary(which it should be), then this folder's path will be ../Resources
.
This will override the App-Bundle(.app
-file, see -out
) in case it alredy exsists.
This will open the Info.plist
with the default application at the end of the script and allows you to edit far more of the application's attributes.
Prints the following line of text:
usage: macapp -bin binary [-out Out.app] [-ico ico.icns] [-inf info.plist] [-res resource folder] [-name Myapp] [-appid com.eg.Myapp] [-ver 1.2.3a4] [--edit-info] [--override]
Does nothing. It can be used to symbolize that an argument is not specified.
The example
./macapp.sh -bin MyApp -inf --0
will be treated like
./macapp.sh -bin MyApp
and the default Info.plist will be generated.