New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Creating an installer for my first Cocoa Application


Post Reply New Thread Subscribe

 
Thread Tools
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
Hey everyone!

I'm new to the Mac. I've had one since about Thanksgiving, and I got it to do iPhone programming. That's going well, and I've made the transition (somewhat) to Cocoa Desktop development.

Deploying your application on the iPhone isn't easy, but there's generally one way to do it (at least, one for testing and one for sale). With desktop apps, however, I can't find a good resource to tell me how to get started with distribution and installation.

I've given my .app file to a fellow developer friend, and he can run my application. Step 1: check.

I've also played a little bit with packing my .app file in a .dmg. Step 2: check. (NOT packageMaker, which confuses me)

I further found a program that would let me create an installer package, but it still isn't quite what I want.

What I'd like to do is have a .dmg file that opens up with my app's icon on the left and an arrow in the middle pointing to the applications folder on the right. Then, the user can drag my app there to install it (which will also place it in their applications directory).

I've seen this done with many of the programs I've downloaded to install. It seems like everyone knows how to do this except for me. If you want to see a perfect example of what I want to do, check out the Google Chrome installer.

I've googled for hours, but I seem to be going around in circles. I've looked at ChocTop, but I can't get all of the steps to work. Some of the command-line stuff is still fairly advanced for me yet.

Does anyone know how to do this? Better yet, is there a graphical tutorial that explains the process?

Thanks for helping out a mac noob!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
I tried this with a project of my own once and I may not have done this the right way but I created a folder, changed the folder background, added an alias to the Applications folder and created a disk image of that folder. In other words, create the folder exactly as you would want the user to see it. There may be an easier way to do it but I believe that's what I did last time.

EDIT: If you're wondering how to give the folder a background picture, make sure the folder is in icon view > right-click > Show View Options > "Background:" > Picture.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
But this just exposes more of my lack of knowledge.

I followed most of what you were saying, but I have no idea how to "alias the applications folder". Do you mind explaining that?

Thanks!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
There you are.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
Van,

Thanks for the help. I thought I figured out your instructions, and I got my folder looking exactly as I wanted, but when I created the disk image and then opened it, the folder wasn't laid out at all like I wanted. No background image, icons not set like I wanted, etc...

Did I miss a step?

Thanks!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Try this - create the disk image, mount it and customize that.

EDIT: Tried it and it should work for you. Give it a test and let me know if that works for you.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
I tried doing what you suggested, but when I opened the dmg I couldn't move the icons. I was able to set the background image, but the icons kept snapping back where they were (2 icons, top left). I didn't see an option that would let me change that behavior. Align/arrange was set to "None".

This ought to be easy!!!

<mutter>Stupid Apple, it doesn't just work!</mutter>
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Open up your image. Right click, go to Show View Options. For "Arrange by:", make sure it's set to None. It sounds like your icons are being forced into some arrangement.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
I did that (I think). Now, with my icon size being set pretty large, the icons are actually stuck in an overlaid pattern.

Man, I'm sure I'm not stupid, and this is hard, but COME ON!!! (Yelling into the void, not at you.) Are there other settings that I'm missing? Is it because I've got Snow Leopard? Like I said, I'm really pretty new to OS X, so I may be missing something obvious.

Any other ideas? Start over?

Thanks for you help.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
Did you change the arrangement settings? If you prevent Finder from arranging icons in a particular way, it should work.

P.S.: I'm running SL as well.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
Man, I appreciate the help, but I can't make sense of your last comment. How would I go about preventing arrangement other than what I've already done? Is there another setting I need to know about?

Let me recap:

1. I created new folder.
2. I set the background image of the folder to a custom image I made.
3. I placed my app in the folder and positioned it where I wanted it.
4. I placed an alias to the Applications folder in the folder and positioned it where I wanted it.
5. I created a disk image (using disk utility) of the folder.
6. When I open the dmg, the folder is not laid out like I want.

At first (in #6) the folder came up with small icons arranged in the top left of the window. I then resized the icons to 128x128, which I wanted. Then, somehow (and I'm not sure how), I changed something and now they're stuck overlaying each other. Not what I want.

The original folder is PERFECTLY like I want it. What happens between the folder in Finder and the folder inside of the dmg? A lot of the settings seem to be different or locked down in the dmg. Did I screw up a setting when creating the image?

Thanks for all your help tonight. I'm going to bed. If you don't mind commenting one more time, that would be awesome!

Thanks!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,813
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is online now
You need to create the disk image first and then customize the image. In other words, create the image, mount it and customize that. If you do this, you need to make sure to create an image with r/w privileges (read/write).

My initial instructions were bad - create the image first, not the folder. From the instructions you just gave me, you're still creating a folder and then making an image of that.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
mbm30075

 
Member Since: Mar 12, 2010
Posts: 7
mbm30075 is on a distinguished road

mbm30075 is offline
That seems to have done it.

I'm having only one more problem. When I drag the app into the app folder, it installs and will run just fine. Why, though, would the icon for my program not display only when in the app folder? It displays fine in the Finder window. All looks good everywhere else, but not when I click on my Applications folder in my dock. If, however, I open the Applications folder in Finder, the icon shows up just fine. Ideas?

Thank you soo much for all of your help. What a great, great help you've been. Great help!!!

Thanks!
QUOTE Thanks

Post Reply New Thread Subscribe


« Convert a web clip widget into an actual dashboard widget with Dashcode? | Applescript Help req. as script not working under 10.6.2 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting 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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Software Installer used for creating Installs wtdedula OS X - Operating System 0 11-11-2007 07:29 AM
Need help creating application... Padawan OS X - Development and Darwin 2 03-04-2005 11:46 AM
creating os9 installer ghjplanit OS X - Development and Darwin 0 01-28-2004 07:09 PM
Upgrading PERL Forum Setup, MySQL, etc. ssotti OS X - Development and Darwin 0 11-29-2003 11:16 AM
Creating an Installer with PackageManager ChrisKnox OS X - Development and Darwin 4 10-02-2003 12:18 AM

All times are GMT -4. The time now is 05:53 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?