I am trying to deploy a Qt application that uses the Assistant to show help, on mac (OS X 10.6-10.9, Qt 4.8)
QStringList args = "-collectionFile " + "my_help_file";
QString app = "path/"+"Assistant.app";
m_helpProcess->start(app, args);
I placed the Assistant.app inside the Resources folder.
Since I deploy the app on a system with no qt installed, I placed all he QT dependencies in Contents/Frameworks, and ran install_name_tool
# for QtCore:
install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Version/QtCore.framework/Versions/4/QtCore xxx.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore xxx.app/Contents/MacOs/xxx
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore xxx.app/Contents/Resources/Assistant.app/Contents/MacOS/Assistant
The app gets it, it is functional, but Assistant doesn't... obviously it is a different level.
I don't want to place multiple copies of the frameworks... besides I am sure there will be conflicts if i do...
Calling Assistant without its bundle didn't work... (I would love to place the executable next to the xxx executable)
Since I guess I set the id for the Frameworks as one directory down from @executable_path, I can't tell help to look elsewhere...
How do I link the Assistant properly with the Frameworks ?
Note: I have tried:
# for QtCore:
install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Version/QtCore.framework/Versions/4/QtCore xxx.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore xxx.app/Contents/MacOs/xxx
install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../../../Frameworks/QtCore.framework/Versions/4/QtCore xxx.app/Contents/Resources/Assistant.app/Contents/MacOS/Assistant
Did not find libraries... I guess the id has to match the path... but for a single instance of the lib, it just can't...
I also tried to make symbolic link (alias ?) to the Qt library, in the location where Assistant will look... It tried and failed, complaining of a malformed file.
Update to answer comment:
Running otool -L on the assistant in the Assistant bundle in the Resources folder:
@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore
And the Assistant can't find the library which really is at
@executable_path/../../../Frameworks/QtCore.framework/Versions/4/QtCore