Package .App folder as one executable file

Discussion in 'Mac Programming' started by goyalpk, Sep 28, 2009.

  1. goyalpk macrumors newbie

    Joined:
    Aug 7, 2009
    #1
    Hi there,
    I have my Cocoa application's executable as xyz.app folder. This folder has lots of resource files also. Is there any way to create a single file executable on Mac similar to .exe file on Windows?

    I want to package my Cocoa application as part of some Windows resource file.

    Thanks so much.
    Pankaj
     
  2. Catfish_Man macrumors 68030

    Catfish_Man

    Joined:
    Sep 13, 2001
    Location:
    Portland, OR
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    Archive the xyz.app directory first. You can use the 'ditto' command on the Mac to do this.

    http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/ditto.1.html

    Frankly, packaging a Mac app as a Windows executable seems crazy to me. There's no guarantee that a Windows machine will be able to correctly unarchive the contents. And even if it can, there's no way to run it on Windows. And even if it could do all that, it requires a user to be running Windows in order to obtain a Mac app. Why? What is the purpose of doing this?

    You might be better off linking to a URL where users who are actually running on a Mac can download a Mac-usable format. That format could be a Mac-produced zip, tgz, or dmg file.
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    Distribute it as a dmg so that a Windows users couldn't accidentally open it.

    I worked on a project where the Windows version required distributing the Mac version as well, and we used DMGs without any problems. It was kind of crazy, but it worked :)
     

Share This Page