Macdeployqt does not copy plugins

I am developing a Qt-based application, and when I use macdeployqt in the kit, Qt plugins are not copied to the package.

However, if I ran it a second time, it is. In addition, "The svg icon plugin is deployed if the application uses the QtSvg module." not populated - my application does use QtSvg, but the iconengines / * plugin is not copied.

I tried to run it using -verbose = 3, and the last couple of lines:

Log: Created configuration file: "silverlock.app/Contents/Resources/qt.conf" Log: This file sets the plugin search path to "silverlock.app/Contents/PlugIns" 

From what the last message says, it seems that he intended to continue to work, but did not - almost as if he had crashed.

Why is this happening? macdeployqt worked for me before that without any problems.

Using:

  • Qt 4.6
  • Qt Creator 2.0
  • Leopard 10.5.8
+3
c ++ qt macos macdeployqt
source share
1 answer

The problem is lines 355-365 shared.cpp in the macdeployqt source:

 while (frameworks.isEmpty() == false) { const FrameworkInfo framework = frameworks.takeFirst(); copiedFrameworks.append(framework.frameworkName); // Get the qt path from one of the Qt frameworks; if (deploymenInfo.qtPath.isNull() && framework.frameworkName.contains("Qt") && framework.frameworkDirectory.contains("/lib")) { deploymenInfo.qtPath = framework.frameworkDirectory; deploymenInfo.qtPath.chop(5); // remove "/lib/" } 

The first name of the / dylib framework in your package, which has a "Qt" in its name, is used to determine the path to the plugin. Since the first frame name / dylib in my package was "QtSolutions_QtSingleApplication-2.6" ... you get an image. Therefore, I believe that a workaround is to rename dylib to "qsa-2.6.dylib" or something like that.

In short: make sure that the names of the frameworks and libraries do not have “Qt”, or you will run into problems with macdeployqt.

Hope this answer can help someone having the same issue.

+5
source share

All Articles