42

I am a developer of iOS, and developed a mac app. Now I want to distribute my app so that a searched for it and found that we need to upload .app to Mac App Store it looks fine. While for self distribution we can have three options:

  1. is to share our app
  2. is to create .dmg file
  3. is to share .pkg file (Package Maker).

In pkg file my client want to install app without introduction, read me as well as license agreement, I removed the license and readme but unable to remove introduction section. Please help me out from here…

Thanks in advance

Andriy's user avatar

Andriy

2,8042 gold badges23 silver badges30 bronze badges

asked May 18, 2016 at 7:20

Anupam Gupta's user avatar

2

49

If you dont need any introduction, readme etc, the best option is to create a DMG.

You don't need any external tools for this.

  • Copy your app to a new folder.
  • Open Disk Utility -> File -> New Image -> Image From Folder.
  • Select the folder where you have placed the App. Give a name for the DMG and save. This creates a distributable image for you.

If needed you can add a link to applications to DMG. It helps user in installing by drag and drop.

answered May 31, 2016 at 5:10

Seema Kadavan's user avatar

5 Comments

Can you please let me know the process of adding licence agreement to DMG file and also the process of adding a link to applications to DMG file?

I didn't find this worked as the disk utility would not allow the selection of .app(s). Any folder with .app extension remains greyed out and un-selectable! You guys must have special macs!!!

@WallyZ you have to add the .app file into a folder and then open disk utility -> File -> New Image -> Image From Folder.

@Akshay That's my problem. Xcode generates a folder containing the app and that folder already has a ".app" extension. So I can find the .app folder but I don't know what this .app file is!

@WalterZAMBOTTI this is not related to xCode. This method is used to create a dmg from an existing installed application that exists in your applications folder. Even then, you have to create a new folder, drag the app into the new folder and then use that folder to create a dmg. you can't crate dmg directly from a .app file

32

How to create a dmg file for a .app for mac.?

It's a subjective issue, but .dmg's are a good and popular way to distribute the apps - user double-clicks, drags app, ejects just as they would a USB stick, done.

You can get apps to help you build them, but its not too Hard with Disk Utility, you just need to mess around a little to make it look nice. Here is one way to do it:

  1. Use Disk Utility to create a new empty sparse bundle disk image
  2. Double-click the image to open it.
  3. Copy your app into the image.
  4. Make a link to /Applications in the image.
  5. Hide the toolbar/sidebar/etc. as desired.
  6. Using View Options set to always one in icon mode.
  7. Also add a background image if you like using View Options. Background images often contain text such as "Drag App to Application". Layout the app and /Applications icons to match your background image.
  8. In another Finder window eject the sparse bundle.
  9. In Disk Utility use Images -> Convert... to convert the sparse bundle to a read-only DMG

HTH

Aman's user avatar

Aman

7061 gold badge8 silver badges28 bronze badges

answered May 18, 2016 at 21:20

CRD's user avatar

CRD

53.1k5 gold badges74 silver badges87 bronze badges

2 Comments

When I follow your instructions, several hidden files are shown (.DS_Store, .fseventsd, and .Trashes). This is despite the fact that I have not set Finder to show hidden files (i.e., it's set to 'defaults write com.apple.finder AppleShowAllFiles NO'). Is there a way to hide those files in the sparsebundle, and ultimately in the DMG?

@pfurbacher - The outlined process should not cause those hidden files to be shown, and I cannot reproduce your problem. Those files are there of course and in the Terminal display when using ls -la. You will need to investigate further, something in your setup must be causing it.

6

I scripted my dmg creation, with create-dmg.

brew install create-dmg

My command is similar to the example:

create-dmg \
  --volname "Application Installer" \
  --volicon "application_icon.icns" \
  --background "installer_background.png" \
  --window-pos 200 120 \
  --window-size 800 400 \
  --icon-size 100 \
  --icon "Application.app" 200 190 \
  --hide-extension "Application.app" \
  --app-drop-link 600 185 \
  "Application-Installer.dmg" \
  "source_folder/"

answered Apr 14, 2023 at 20:08

pmarquis's user avatar

pmarquis

812 silver badges2 bronze badges

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.