Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 29 Jan 2008 17:12:59 +0100
Hi
It's really great! The first app is running under Windows. But I've no clue how to make a binary for macos. When I use the commandline to create a binary my system (morphos) displays the file as a link which means its displayed as a dir. Uploading to a linux machine keeps this ...
drwxr-xr-x 3 robin www-data 4096 2008-01-29 11:50 myKalah.bin.app
What can/should I do ?
Mac OS X uses this weird "application bundle" format which means that under Mac OS X, every application is in fact a directory. The program executable is then in the subdirectory Contents/MacOS of the application bundle. Thus, when you compile a Hollywood script for Mac OS, you will get a whole directory as the result.
Example:
Code: Select all
Hollywood test.hws -compile ram:test -exetype macos
This will create a directory called ram:test.app.
The directory will contain the following files
Code: Select all
ram:test.app/Contents/MacOS/test ---> this is the executable
ram:test.app/Contents/Info.plist ---> this is an xml containing information
ram:test.app/Contents/Resources/test.icns ---> icon for the application
Now when you copy the directory ram:test.app to Mac OS X, it will no longer be shown as a directory by the file system of Mac OS X. Although it still is a directory of course. But it will be listed as an application now because the file system recognized it as an application.
This might be a little bit confusing for Amiga and Windows users, but that's the way things work over at Apple
So, summing up, the following steps are necessary to compile for Mac OS X:
1) Compile your script with -exetype macos
2) Copy the whole directory created by Hollywood (e.g. test.app) to your Mac OS X installation
3) Last step. Very important. Set the "execute" file attribute. Once you've transferred test.app to Mac OS X, you need to change the attribute of the executable file (resides in test.app/Contents/MacOS) to "executable". This can be done using "chmod" from the console or using a file manager like DiskOrder.
Then you can simply double click on test.app and it will start.
Have a look at the directory Demoprgs_MacOS on the Hollywood CD-ROM. It contains some example programs for Mac OS X.