Program distribution on Mac

31 views
Skip to first unread message

Igor Korot

unread,
Sep 30, 2012, 6:42:48 PM9/30/12
to wx-u...@googlegroups.com
Hi, ALL,
As I'm complete newbie on Mac, here is the question:

How do I make a distribution package for my program to get installed
on Mac machine? Something like an .msi, but for Apple.

Thank you.

Fulvio Senore

unread,
Oct 1, 2012, 2:02:17 AM10/1/12
to wx-u...@googlegroups.com
Here are some info:

https://developer.apple.com/library/mac/#documentation/Porting/Conceptual/PortingUnix/distributing/distibuting.html

Basically, for simpler programs, you distribute a .dmg file: it is a
disk image and it contains your app. Users simply drag the app and drop
it in the Applications folder. Often .dmg files contain also a link to
the Application folder so the user can drag the app and drop it to the
nearby link to easily copy it to the Application folder.

Here is a script that I use to create a .dmg file:

-- script start -------------------------------------------

#!/bin/bash

# change these
VOLUME_NAME="vvvP-1.1"
DMG_NAME=vvvP-1.1-i386.dmg

# this script creates a disk image for software distribution in the
current folder,
# copying the content from the app in the ../installed_cocoa folder

# Create an initial disk image (32 megs)
hdiutil create -size 32m -fs HFS+ -volname ${VOLUME_NAME} temp.dmg

# Mount the disk image
hdiutil attach temp.dmg

# copy files to the disk image
cp -R Applications /Volumes/${VOLUME_NAME}
cp -R ../installed_cocoa/vvvP.app /Volumes/${VOLUME_NAME}

# Unmount the disk image
hdiutil detach /Volumes/${VOLUME_NAME}

# Convert the disk image to read-only
hdiutil convert temp.dmg -format UDZO -o ${DMG_NAME}

-- script end -------------------------------------------

Fulvio Senore

Igor Korot

unread,
Oct 24, 2012, 4:07:39 AM10/24/12
to wx-u...@googlegroups.com
Fulvio,

On Sun, Sep 30, 2012 at 11:02 PM, Fulvio Senore <mai...@fsoft.it> wrote:
> Il 01/10/2012 0.42, Igor Korot ha scritto:
>
>> Hi, ALL,
>> As I'm complete newbie on Mac, here is the question:
>>
>> How do I make a distribution package for my program to get installed
>> on Mac machine? Something like an .msi, but for Apple.
>>
>
> Here are some info:
>
> https://developer.apple.com/library/mac/#documentation/Porting/Conceptual/PortingUnix/distributing/distibuting.html
>
> Basically, for simpler programs, you distribute a .dmg file: it is a disk
> image and it contains your app. Users simply drag the app and drop it in the
> Applications folder. Often .dmg files contain also a link to the Application
> folder so the user can drag the app and drop it to the nearby link to easily
> copy it to the Application folder.
>
> Here is a script that I use to create a .dmg file:

Does the script packages wxWidgets as well?

I have an application bundle that uses wxWidgets-2.9.4.

Thank you.

>
> -- script start -------------------------------------------
>
> #!/bin/bash
>
> # change these
> VOLUME_NAME="vvvP-1.1"
> DMG_NAME=vvvP-1.1-i386.dmg
>
> # this script creates a disk image for software distribution in the current
> folder,
> # copying the content from the app in the ../installed_cocoa folder
>
> # Create an initial disk image (32 megs)
> hdiutil create -size 32m -fs HFS+ -volname ${VOLUME_NAME} temp.dmg
>
> # Mount the disk image
> hdiutil attach temp.dmg
>
> # copy files to the disk image
> cp -R Applications /Volumes/${VOLUME_NAME}
> cp -R ../installed_cocoa/vvvP.app /Volumes/${VOLUME_NAME}
>
> # Unmount the disk image
> hdiutil detach /Volumes/${VOLUME_NAME}
>
> # Convert the disk image to read-only
> hdiutil convert temp.dmg -format UDZO -o ${DMG_NAME}
>
> -- script end -------------------------------------------
>
> Fulvio Senore
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users
Reply all
Reply to author
Forward
0 new messages