January 23, 2012

Cg_Artist Cg_Artist
Lab Rat
20 posts

Bundling Qt frameworks with application with a .bundle extension ?

 

I have been trying to follow the instructions for application deployment:
Deploying an Application on Mac OS X [developer.qt.nokia.com]
However my application requires that I use the .bundle format. As a result when I try:
Example:

  1.  mkdir myApp.bundle/Contents/Frameworks
  2.  cp -R /path/to/Qt/lib/QtCore.framework
  3.          myApp.bundle/Contents/Frameworks
  4.  cp -R /path/to/Qt/lib/QtGui.framework
  5.         myApp.bundle/Contents/Frameworks

I get an error saying “myApp.bundle: Not a directory”. Am I missing something. Is there a way to bundle the Qt frameworks with my application with a .bundle extension?

5 replies

January 23, 2012

Volker Volker
Ant Farmer
5428 posts

plain mkdir only creates the last directory in the path (Frameworks in your case), just add the -p switch to create all missing parent dirs:

  1. mkdir -p myApp.bundle/Contents/Frameworks

January 23, 2012

Cg_Artist Cg_Artist
Lab Rat
20 posts

Hmm… I actually already tried that as well. However I still get the same error. Any other suggestions?

January 24, 2012

Volker Volker
Ant Farmer
5428 posts

Does myApp.bundle exist? If yes, is it a file or a directory?

January 24, 2012

Cg_Artist Cg_Artist
Lab Rat
20 posts

Yes myApp.bundle does exist. However, I am beginning to think that it is a file. For example when I run:

  1. otool -L myApp.bundle/Contents/

I get an error. However when I run:
  1. otool -L myApp.bundle

I get a list of the libraries my application is linked to. Also, I know this will sound totally novice, but by default my application has a white “Lego” type icon the represents it. I also did a search on my machine for similar type files and there seems to be two kinds of .bundle files. Some of them have the “Lego” icons like mine and there are others that share the “.bundle” extension with a different icon (A white page) and those I can add directories to. So my thinking is that my .bundle is not a directory but rather a file. I hope this helps better explain what I have. Also if what I have is a file what are the steps to making a .bundle that is a directory.

January 24, 2012

Cg_Artist Cg_Artist
Lab Rat
20 posts

I found a solution. I was able to point to the correct libraries in the make file before building the .bundle.

 
  ‹‹ Pixmap-error triggered after adding inheritance      QTableView::setColumnHidden after the inital painting of the table ››

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