[Interest] Qt Installer Framework 2.0.0 [ OS X ] - How to install my.app to /Applications folder ?

Eddie Sutton edsutton at gmail.com
Wed Apr 8 21:39:04 CEST 2015


Hi Robert,

I had an existing build script I created, that used macdeployqt to add dependencies,  then built a DMG installer with an Application shortcut.  It was fine but I cannot resist new software so I had to try out QtIFW 2.0.0.

I am beginning to appreciate the QtIFW more.  I like the fact that I can display and ask user to agree to software license, and display a read-me.txt or start the app.

My DMG was fine expect it is not signed and I had background image issues I never understood.  I wanted to create a background with a text note asking the user to drag & drop the app into the Applications folder.  However I could never get the background to work properly or consistently.  It would be nice to be able to customize the QtIFW background image with a company logo as well but I can find no mention of how to do so.

I think figuring out how to use certificates and signing is my next priority as I expect many users will just give up when a double-click does not open and launch the installer or the app.

Thank you very much.  I will keep this information in case it is needed.

-Ed

> On Apr 8, 2015, at 2:31 AM, Robert Iakobashvili <coroberti at gmail.com> wrote:
> 
> On Wed, Apr 8, 2015 at 10:11 AM, Koehne Kai <Kai.Koehne at theqtcompany.com> wrote:
>>> -----Original Message-----
>>> From: interest-bounces+kai.koehne=theqtcompany.com at qt-project.org
>>> Subject: [Interest] Qt Installer Framework 2.0.0 [ OS X ] - How to install
>>> my.app to /Applications folder ?
>>> 
>>> I want to deploy my,app to the /Applications folder.  This is the  standard
>>> method of deploying an OS X applications.
>>> 
>>> If I set the config.xml to <TargetDir>@ApplicationsDir@</TargetDir>
>>> 
>>> the user receives error message warning “You have selected an existing,
>>> non-empty folder for installation”.
>>> 
>>> Qt Installer Framework seems to require that I create a "/Applications/my/“
>>> folder in which to deploy my.app ?
>> 
>> Yes. The problem here is that the Maintenance tool isn't part of your .app bundle, but it needs to be placed alongside your application.
>> 
>>> Is there a more OS X way of creating an installer?
>> 
>> Well, the 'native' way is to not use an installer on OS X, but just ship a .dmg with your .app bundle (or use the Mac App store).
>> 
>> Regards
>> 
>> Kai
>> 
> 
> Hi Edi.
> Going the path that Kai suggested, first create your app bundle.
> (Signing of the bundle and certificate is a separate story that you can
> find by searching)
> 
> macdeployqt ./build/YourApp.app -verbose=3
> 
> Preparing dmg was mentioned on:
> http://digital-sushi.org/entry/how-to-create-a-disk-image-installer-for-apple-mac-os-x/
> 
> Since the link is not working, see some extracts from there:
> 
> ----------------------------------------------------------------------------------------------------------
> First, we want a disk image that we can use as a template in a script
> or automated build system. Open Disk Utility which you find in the
> Utilities folder in Applications. Click the New Image button, and
> select a size that is at least twice as much as you ever figure you
> will need on your disk image. You should select the sparse image
> format. Carefully select the name of the image, as this will be the
> name of the directory that will eventually open on your customer's
> desktop when they open the final disk image. In this example, I will
> use YoyodyneApp.
> 
> When you click on create, a new disk image is created and mounted. You
> will see that two new items show up in the left column of Disk
> Utility:
> 
> YoyodyneApp.sparseimage
> YoyodyneApp
> 
> The first item is the actual disk image, and the second item is a
> partition within the disk image. When you select the partition, you
> can see where it is mounted. In my case, the mount point is
> /Volumes/YoyodyneApp. Notice that the mount point is a link. Click on
> the link thereby opening the YoyodyneApp directory in a regular finder
> window with toolbars (and column view if you set the preference as
> described above):
> 
> Open a Terminal window and type:
> bless --folder /Volumes/YoyodyneApp --openfolder /Volumes/YoyodyneApp
> 
> In the Finder window for YoyodyneApp:
> Click the little pill shaped icon to hide the toolbar.
> Hit Cmd-1 to switch to icon view.
> Hit Cmd-E to eject the disk image (important).
> Switch to Disk Utility
> Select Yoyodyne.sparseimage.
> Click open.
> 
> Customizing the Background
> 
> Now is the time to brand the installer disk image with a custom background.
> 
> Drag your background image to the Finder window for YoyodyneApp. It
> has to be in the disk image to display properly at the end user's
> computer.
> 
> In the Finder window for YoyodyneApp:
> Hit Cmd-J to open the view options for YoyodyneApp.
> Make sure you select This window only.
> Select Picture under Background:
> Select the background image you just dragged to this folder. (I have
> to click on Picture once more after selecting the file).
> You can make other customizations if you like, I prefer setting the
> icon and text sizes to their maximum values.
> Open a Terminal window and type (use the actual name of your background image):
> 
> SetFile -a V /Volumes/YoyodyneApp/installation-background.png
> 
> This will hide the background image from Finder. But not until you
> eject and open the image from Disk Utility. So, do that now.
> 
> 
> Link to Applications
> Apple recommends that you include a symbolic link to /Applications if
> you expect the
> user to drag your application there (manual install):
> 
> Open a Terminal window and type:
> ln -s /Applications /Volumes/YoyodyneApp/. (include the period)
> 
> hdiutil eject /Volumes/YoyodyneApp
> hdiutil convert YoyodyneApp.sparseimage -format UDBZ -o YoyodyneApp.dmg
> 
> ----------------------------------------------------------------------------------------------------------
> 
> You can make your script or find somewhere to automate.
> 
> Hope this has some help.
> 
> Kind regards,
> Robert




More information about the Interest mailing list