Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Making an .app package

Making an .app package
Thread Tools
MacPino
Forum Regular
Join Date: Dec 2000
Location: Netherlands
Status: Offline
Reply With Quote
Aug 3, 2005, 08:37 AM
 
I would like to create an .app package for a project of mine, MM director + some external files. Does any of you know a program that would help me create one? (I mean to package the whole stuff into one "file" which links to the director file inside the package)
proud daddy!
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Aug 3, 2005, 03:03 PM
 
It depends on whether the app produced by Director is a bundle already or not. Control-click on the app and see if there is a "Show Package Contents" menu in the context menu that appears. If there is, you can just show the package contents and put whatever files you want inside the bundle. If the app is an old-style CFM app, though, you can follow these steps:

1. Create a folder.

2. Name the folder something ending with the file extension '.app' (without the quotes, of course). The folder will start to look like an application, although it won't do anything when you double-click it.

3. Control-click the .app bundle and choose Show Package Contents. You will end up inside the .app bundle.

4. Create a new folder called "Contents", again without the quotes, and navigate inside it.

5. Create a new folder called "MacOS" without the quotes.

6. Drag the app and any support files that need to be in the same folder as the app into the MacOS folder.

7. Now, you need to make an Info.plist file for the app. Open up TextEdit, create a plain text document (not rich text), and use these contents for the file:

Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleExecutable</key> <string>The name of your app goes here</string> </dict> </plist>
8. Copy the Info.plist file you just made into the Contents folder inside the app bundle (not the MacOS folder).

9. Navigate inside the MacOS folder, Get Info on the app, and copy its icon.

10. Close all the windows and paste the app icon onto the .app bundle you made. Double-click the .app bundle, and if all goes well, your app should start.

That should about do it. If you want to make the icon a little less fragile so that it couldn't be deleted just by deleting it in the Get Info window for the .app bundle, you could make an .icns file, put it inside a Resources folder which you create inside the Contents folder of the .app bundle, and add an "CFBundleIconFile" key to the Info.plist file which is set to the name of the .icns file you made.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:57 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,