sveinbjornt / Platypus

Create native Mac applications from command line scripts.
https://sveinbjorn.org/platypus
BSD 3-Clause "New" or "Revised" License
2.84k stars 171 forks source link

App bundle from UNIX Executable File #248

Open gahbes opened 1 year ago

gahbes commented 1 year ago

Platypus has been suggested by many sources to do this but I can't figure out how.

Is this actually supported? I already tried creating the app bundle manually by creating the correct folder structure and info.plist but the app keeps closing right after opening.

Running the Unix exec directly works fine.

gahbes commented 1 year ago

To clarify, using script type sh, bash or zsh (with interface text window) shows the following when I run the app.. 'Test.app/Contents/Resources/script: cannot execute binary file'.

Using 'Other' as script type shows no output and just a spinning wheel in the bottom left corner of the app window.

Creating an app with Script Editor using the following works as intended.. to run tell application "Terminal" do script "path_to_unix_exec" end tell end run

bornjre commented 1 year ago

Just create with simple sh script and execute you actual binary. (your added binaries/files are in resources folder)


#!/bin/sh

echo 'Hello, World'

echo $PWD

exec ./mybinary

also if u donot like panel created by platypus and instead want to execute your binary directly just copy your binary to Contents/Macos and replace binary there. There probably is better way by writing .plist file yourself though.