June 7, 2011

geostein8888 geostein8888
Lab Rat
4 posts

Deploying a mac package

 

Hello,
i work normally with a windows platform, and wrote now a multiplatfor application. I use Installbuilder to package my application and right now i put every library into th package (about 50 MBytes) because i couldnt find a information how to tell the app where it has to search for the libs.
is there a tutorial for this somewhere or can somebody give me a hint for what i have to search to find some information on this subject

with regards
Georg

9 replies

June 8, 2011

sigrid sigrid
Lab Rat
144 posts

The following piece of documentation [doc.qt.nokia.com] contains information regarding deployment on Mac. Does that help?

June 8, 2011

divide divide
Lab Rat
33 posts

I’ve made a script that automatically relink Qt lib, your application and plugins if you provide all the files (application, plugins and framework) in a mac application bundle. You just have to run it once before packaging your installer, or after your installer has finished deploying the files.
It has to be in the root of the bundle (Contents/) along with install_name_tool utility.

http://www.divideconcept.net/dump/relinklib.bash

June 8, 2011

Volker Volker
Ant Farmer
5428 posts

On the Mac, you usually do not have any installer. Put the libraries, plugins, resources and everything else into the application bundle. Then create a ZIP or – better – a disk image (DMG) from which your target user just drags and drops the application. That’s what Mac users expect for simple applications.

June 9, 2011

geostein8888 geostein8888
Lab Rat
4 posts

Hello,
this with the app package i know. Ma problem here is, i have to bundle then about 50 MBytes libraries and the app itself is only 10, this takes arougn 15minutes for the download.
On windows i can get normally the installpath of a needed application and take this as the lib path so i do not need to put these libs into the package – how can i do this on a mac

Georg

June 9, 2011

Volker Volker
Ant Farmer
5428 posts

Mac binaries are always huge. Depending on the used system libs (carbon/cocoa) and CPU platform they can contain binary code for up to four architectures (i386, i386_64, ppc, ppc64).

Your statement about windows is nonsense. Qt is not a system library, you cannot rely on it being installed already. So your installer package has to provide them as well and is as big as your app plus Qt libs. Compared to a Mac bundle, it’s usually smaller in size though, as there is only one architecture in it.

June 9, 2011

geostein8888 geostein8888
Lab Rat
4 posts

i dont speak from qt libs, i mean other libs from packages the user already has installed or installs seperately, because these libs will not change when i provide an update, it makes no snese for the user to redownload them everytime again

Georg

June 9, 2011

Volker Volker
Ant Farmer
5428 posts

I don’t understand the question. If it is a prerequisite of your application, then those parts must be installed before your application. Then you know the paths, as it should be in standard locations. Otherwise you’re lost anyways.

If you cannot guarantee that the components are preinstalled in any way, you will have to provide them yourself anyways.

If you need some update mechanism, look for auto updaters for the Mac (e.g. Sparkle [sparkle.andymatuschak.org]) which provide means for updating only the changed components.

Put your stuff in a complete bundle and you’re done. Everything else breaks Mac user experience. You can have installers (pkg), even ones with multiple subpackages (mpkg) in the Mac. But that’s only for libraries or stuff that has to go into system directories or the like. Having to install a myriad of packages will make the Mac crowd angry.

Remember that Apple slogan from back in the 90ies? Think different [en.wikipedia.org] – adhere to it :-) You cannot adapt Windows habit one to one…

August 12, 2011

elyness elyness
Lab Rat
1 posts

I have found the macdeployqt works great. I usually deploy with the drag-n-drop method but I have some legacy code that I’d just as soon not modify much that relies on some support files in the users home folder. I fairly easily got packagemaker to put the files in the home folder using post-scripts. But every time I run my pkg, it skips all of my QT developed *.app files. I can put other .app files in and they appear in the /Applications folder just fine, but my QT created (after running macdeployqt) never get copied, even though the installer tells me it finished successfully. Anyone had this problem?

August 13, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

elyness,

I think that that the consideration should be out of the Qt packaging question.

If the previously installed stuff is a set of components i.e. libraries or commands etc that – to be clear – will be managed / called by the application the problem is how these packages should be installed. To give and example the Inkscape porting on Mac will work as do Gimp and other programs with the “X” component for Mac. This means that you before install the “X” component that is packaged in a way so that the application can start from the aplication menu but also called automatically like any other Mac OS-X command. After installing and running Inkscape or Gimp you see that if it is not running yet “X” component will start before.

The legacy stuff that you should have external to your package need to be installed somewhere in the Mac OS so that it can be managed / launched by other applications (i.e. the programs under /bin, or /usr/bin or /usr/sbin and this means as I understand, that:

1) Your application package should be app as you have already done
2) The legacy stuff should be packaged for install separately (i.e. deployed only in the first installation or as a “needed package”
3) Your users should install / update their application in the conditions that the legacy stuff is already present in the computer.

What the application should do is to check the presence of these files or libraries when start and – if not – notify it to the user.

Can be a method ?

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

 
  ‹‹ Plugin won’t load [Solved]      designing simple integrated circuits simulator ››

You must log in to post a reply. Not a member yet? Register here!