• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Creating a bundle with XCode.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a bundle with XCode.


  • Subject: Re: Creating a bundle with XCode.
  • From: Marco S Hyman <email@hidden>
  • Date: Sun, 01 Jan 2017 14:46:17 -0800

> I have try to build a bundle (with XCode),
>
> because it seems the way of building a Mac package
>
> (A *.dmg file to extract with the beautiful copy to Application window, and so on...).

As Jens wrote, you are misusing the term Bundle. The “bundle” Xcode can build is your app named your-app-name.app.   It looks like a single file to macos, but is actually a directory, etc...

First you build your app (bundle) then you may put it in a DMG if you like. Assuming a copy of your app has been placed on your desktop you can make a DMG using a script something like this:

------- stupid script
#!/bin/sh

NAME=your-app-name
DIR=~/Desktop/${NAME}
DMG=~/Desktop/${NAME}.dmg

# create a working directory, blowing away any existing  directory
#
rm -rf ${DIR}
mkdir ${DIR}

# Put the stuff you want in your DMG into the working directory
#
ln -s /Applications ${DIR}
cp -R ~/Desktop/${NAME}.app ${DIR}
# copy anything else you want in the DMG, here

# Create a DMG that is a copy of the working directory
#
rm -f ${DMG}
hdiutil create -srcfolder ${DIR} -volname ${NAME} ${DMG}
rm -rf ${DIR}
------- end stupid script

Season the script to taste.  My versions of the script are run from the command line after using Xcode to build the app.   I’ve never tried to get Xcode to do this for me.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Creating a bundle with XCode.
  • Next by Date: [ Maybe offtopic ] on c++ namespace aliasing
  • Previous by thread: Re: Creating a bundle with XCode.
  • Next by thread: [ Maybe offtopic ] on c++ namespace aliasing
  • Index(es):
    • Date
    • Thread