I'm trying to use Mono to create a portable application that runs on Windows, Mac and Linux, but I want to have a standard DMG file that allows users to simply click and drag my application into the Applications folder on their mac. In the best answer to this post, I found that by creating an executable script file starting with #! in the MyAppName.app/Contents/MacOSX/ folder, it can run anything I liked.
How can I run a script?
I made an empty "Hello World" Cocoa App in Xcode and copied the .app file to the application directory and it worked fine. But when I replaced the executable in the MacOSX script folder, starting with #! he did not run the script.
I tried chmod 755 myscript , I tried to delete the old executable and rename my script as the old file name, but all that was done was to stop the application from starting. The script and file name permissions are correct.
So, I suggested that the scripts might not work, and XCoded is a command line utility, again, that just launches "Hello World!", But it still didn't start.
The “.app” extension is formally called an application package and they have pretty good documentation, but none of this tells me why my approach does not work.
Here is the .app package I'm working on. In the MasOSX directory you will find hello (Hello Word line command) and script (one line of script with #! As the first line) and XCodeTest (Hello World Cocoa application).
source share