Results 1 to 13 of 13
  1. #1


    Member Since
    Mar 12, 2010
    Posts
    7
    Creating an installer for my first Cocoa Application
    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!

  2. #2

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    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

  3. #3


    Member Since
    Mar 12, 2010
    Posts
    7
    Thanks for the quick response...
    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!

  4. #4

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5


    Member Since
    Mar 12, 2010
    Posts
    7
    More help?
    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!

  6. #6

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    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

  7. #7


    Member Since
    Mar 12, 2010
    Posts
    7
    Didn't work
    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>

  8. #8

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    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

  9. #9


    Member Since
    Mar 12, 2010
    Posts
    7
    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.

  10. #10

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    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

  11. #11


    Member Since
    Mar 12, 2010
    Posts
    7
    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!

  12. #12

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,789
    Specs:
    Early 2015 13" rMBP
    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

  13. #13


    Member Since
    Mar 12, 2010
    Posts
    7
    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Empty window in Cocoa application, controls don't appear.
    By ksoileau in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 04-14-2013, 02:32 PM
  2. Replies: 0
    Last Post: 07-25-2012, 07:03 PM
  3. Software Installer used for creating Installs
    By wtdedula in forum OS X - Operating System
    Replies: 0
    Last Post: 11-11-2007, 08:29 AM
  4. creating os9 installer
    By ghjplanit in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 01-28-2004, 08:09 PM
  5. Creating an Installer with PackageManager
    By ChrisKnox in forum OS X - Development and Darwin
    Replies: 4
    Last Post: 10-02-2003, 01:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •