making a mac dmg installer

Hi there - after 3 -4 years I’m ready to release my product. I’m not right now interested on selling it through the macstore (maybe sometime in the future - right now I cannot afford a developer account) so I’m not needing a certificate for signing it.

I want to have the user download it from my website as a dmg and install it.
I bought in the last days
AppWrapper from ohanaware (useless as it needs a certificate for signing)
DMGCanvas - equally useless and totally featureless as I can see

I also downloaded Iceberg as the magical Bob Keeney suggested this - but I can’t understand all the way the files work

I will be able to do all this with windows in no time flat - but the mac way makes me want to go to the corner with a cap sporting a big “D” on it.

All I want to do is create a zip or dmg file to do this:
install my app into the apps folder
put my data folder with all it’s stuff in the application support folder
Put in the frameworks folder (/library/frameworks/) a folder with contains openAL files
install 3 fonts

Anybody know anyway reasonable way to do this?

Before anybody says ‘Well, you’d best be doing this via appstore’, I didn’t make this software because I’m rich. Until I get some capitol from selling my software, then in the future I’ll be able to do this certificate business. Apple sure does know how to squeeze every little cent out of it’s suckers. No wonder they sitting on billions.

It is easy to create a dmg-file (disk-image) with OS X build-in Disk Utility (Applications > Utilities > Disk Utility). There you find the “New Image” Icon. Click it, add you files and you’re ready to go.

Um…I don’t even know what “Iceberg” is.

If you are not signing your app, you don’t need AppWrapper. And, as Michael suggests, you don’t need DMGCanvas either to create a simple Disk Image. However, if you have users that are using an older OS the Disk Images may not work as intended if your computer is newer. DMGCanvas does some work to ensure backwards compatibility (exact versions escape me at the moment).

What we do is create an IDE script that once the app is built, it sends it, via command line) to AppWrapper for signing and massaging any PList settings, and once that’s done sends it to DMGCanvas, again via command line) to create the disk image. That way it’s a completely automated build process that takes maybe 2 minutes versus the 15 if I had to do it all manually.

Iceberg is an installer from http://s.sudre.free.fr/Software/Iceberg.html . An installer isn’t really needed on the Mac, except if your app is really doing something complicated.

When you have a dmg then you usually have an alias to the application folder also in the dmg. Your users know how to drag the app to the applications. For creating dmgs I use DropDMG. Similar to Bob I do this with a script, which I can share if you want.

The best way is to not have to do it at all - at least not at install time.
Do this on first launch.
The “installer” should just copy your app to the users Applications directory (something like the IDE does with the local language reference)
Then when you first run detect that things are missing from where they are expected to be and copy them from inside your app bundle to the right places. That way even if the user goes around & deletes these things on you your app is “self repairing”.

And away you go.
Quite literally you won’t need an installer UNLESS you have hard declares to frameworks.
And you probably should not be putting things in /library/frameworks anyways

[quote=38689:@Sean Clancy]
Before anybody says ‘Well, you’d best be doing this via appstore’, I didn’t make this software because I’m rich. Until I get some capitol from selling my software, then in the future I’ll be able to do this certificate business. Apple sure does know how to squeeze every little cent out of it’s suckers. No wonder they sitting on billions.[/quote]
Apple’s sitting on billions because of the sales of iPods, iPads & iPhones - not because developers pay $99 a year.
I’d hazard a guess that barely covers the cost of giving away Xcode and any of the other tools that Apple gives away.

I love to have that script :slight_smile:
So, I’m unclear a little about simply burning it using disk utility (I mean I know how to use it).
but to but a folder into me\library\application/support\
as well as putting the package into applications
and a folder called OpenAL32Audio into the \library\frameworks\
how would that look using simply disk utility?

I know the best teacher is mangling your way through yourself - but I’m quite stuck!

Take a look a packagemaker
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/packagemaker.1.html

it has a “watch” mode where you should be able to create an installer by starting packagemaker and then doing the install by hand and it should create an installer pkg for you based on what you did (copy/modify files and folders). I say “should” because I haven’t tried it myself, but it might be what you need.
It’s free with XCode from Apple…
:wink:

I also don’t own a certificate yet (same as you, can I afford it? Do I Want to do, at least? ) , but I use AppWrapper a lot now.
Mainly it helps me to add HelpViewer files created with an HTML editor before and offers some other nice options like Application Category.

[quote=38689:@Sean Clancy]All I want to do is create a zip or dmg file to do this:
install my app into the apps folder
put my data folder with all it’s stuff in the application support folder
Put in the frameworks folder (/library/frameworks/) a folder with contains openAL files
install 3 fonts[/quote]

You do not need to codesign to distribute from your own site.

I have been distributing for years an installer for MICR Wizard from http://micr-fonts.com/MICRfont/micr-fonts-macintosh.html which is written in Xojo. It does pretty much what you describe, including a data file for settings and 15 fonts.

A simple DMG would require instructing the user into copying each folder/file in the proper place, and installing fonts. So an installer could take care of placing each file where it is needed. I do not know Iceberg and used PackageMaker. The learning curve is kind of steep, but by patient experiment, you will be able to get what you want done. And for the user, it becomes very easy.

Another approach I am considering for future releases is what is usually done today : one app that contains everything in a simple DMG folder, which the user places himself in the App folder. At first launch, the app creates the data file(s) and install the fonts (it works fine to copy font files in Library/Fonts). Then each time it is launched, it verify the presence of data files and does not install again. Maybe this will be easier to do, since it is all contained within Xojo code.

That’s now what I’m trying to do.

I’ve been programming on the mac for a couple of years - much longer on PC.
In the application’s folder, if I right click on an app, it’ll show the package contents.

Now,

  1. do I put my data folders to be copied to application data folder on first run?
  2. if so, how do I get my data folders into there and how do I access this via code.

I bought appwrapper, DMG canvas and none them seem to do this in any way I can imagine.
If there’s any easier way then I’d love to know.

On Windows, I use InnoSetup - it uses a script and works wonders. Do any of these programs I bought use scripts that would simply all of this? My biggest hassle is putting the data folders my software uses into applicationdata and also 3 fonts into the font library. None of these programs (and I paid for both of them) has any documentation to tell me how to do that :frowning:
Cheers for any help

You do not need anything besides Xojo to copy your files. Read my post in the “fonts and deployment” topic this forum for detailed instructions. Try to stop looking for the same installer you use on Windows. Each platform has its own philosophy and data structure.

Apple sure does know how to squeeze every little cent out of it’s suckers. No wonder they sitting on billions.

You took here the stuff in the wrong wa:

It is because Apple know how to squeeze every little cent out of it’s suckers they are sitting on billions. ;-:slight_smile:

Sorry; I could’nt resist !
(now I have to read seriously the answers…)

ha!

FWIW, I’m using DropDMG, and I’m very happy with it.

Okay - my app now copies the application support folders over on first run - check!

The only thing now holding me back is fonts.
I have three fonts and in the first run method , I’m using this code that doesn’t work:
ff =app.ExecutableFile.Parent.Parent.Child("Resources").Child("GSTFont.ttf") f=SpecialFolder.Fonts ff.CopyFileTo(f) ff =app.ExecutableFile.Parent.Parent.Child("Resources").Child("GSTChord.ttf") f=SpecialFolder.Fonts ff.CopyFileTo(f) ff =app.ExecutableFile.Parent.Parent.Child("Resources").Child("GSTMusic.ttf") f=SpecialFolder.Fonts ff.CopyFileTo(f)

how do I do this? copy file doesn’t want to work.

I found this

I had a built version of my software. I added this to the info.plist file and copied the fonts into an app fonts folder in the resource folder. It didn’t work :frowning:


Allright. I have found a way to have custom fonts without extraneous steps, without dependencies everywhere, and sorry without MBS. I post it here in the hope of saving frustration to countless other poor souls who may not like seing that something is ‘very easy’ without any hint of solution.

Add a Copy Files to the project build steps (insert) and copy all fonts into the Resources folder in a subfolder called appfonts (in this example, any name will do)
Build an app. In the package contents folder, pick the info.plist file, copy it into your development folder, and add to it the following line:
ATSApplicationFontsPath
appfonts

  • Add a Copy Files which copies the modified info.plist back into the Contents folder.

Voil. That’s it.

I found that it is easier to install the fonts in the system to have a correct display in the IDE, but at runtime, the app will use the fonts within itself.

If you are looking for original fonts, look for FontMenu.com. They may not be free, but they are extremely affordable. And I can grant usage rights to friendly Xojo developers. If you need fonts created to your specs, I do that too.

my info plist file:
did i put it in the wrong place?

[code]<?xml version="1.0" encoding="UTF-8"?>

ATSApplicationFontsPath appfonts CFBundleExecutable Guitar SightReader Toolbox CFBundleName Guitar SightReader Toolbox CFBundleIdentifier GST CFBundleInfoDictionaryVersion 6.0 CFBundleVersion 1.0.0.3.0 CFBundleDevelopmentRegion en CFBundlePackageType APPL CFBundleSignature CFBundleGetInfoString CFBundleShortVersionString CFBundleIconFile Guitar SightReader Toolbox.icns LSMinimumSystemVersion 10.6.0 CFBundleDocumentTypes CFBundleTypeName text/plain CFBundleTypeIconFile Text.icns CFBundleTypeOSTypes TEXT CFBundleTypeExtensions asc ascii bas c class cp cpp h hp hpp i3 java m2 m3 mak text txt CFBundleTypeRole None [/code]

[quote=52976:@Sean Clancy]my info plist file:
did i put it in the wrong place?[/quote]

Yup. But I see you finally found where the error was and kindly posted a nice how to in another thread :smiley:

I did :slight_smile: