On Wed, Apr 8, 2015 at 10:11 AM, Koehne Kai <kai.koe...@theqtcompany.com> wrote: >> -----Original Message----- >> From: interest-bounces+kai.koehne=theqtcompany....@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 _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest