[QBS] Post Build process to install_name_tool

olivier musse olivier.musse at sfr.fr
Mon Sep 8 10:07:47 CEST 2014


Le 06/09/2014 00:45, Jake Petroules a écrit :
> On 2014-09-05, at 04:18 AM, olivier musse <olivier.musse at sfr.fr> wrote:
>
>> Hi,
>>
>> Thanks for these informations, they are precious.
>> In fact we are already using the cpp.rpaths property and the
>> cpp.installNamePrefix property is not documented.
>> Whatever this does not work for our case but perhaps we are not using it
>> the right case.
>> Our case is the following : we develop plugins for a not Qt application
>> and we need to deploy Qt with the plugins (Qt is not installed on the
>> target platform and must be automatically deployed with the application)
>> So with the cpp.installNamePrefix, only the install_name of the
>> executable is set to "@rpath" and we would like it also to be set for Qt
>> library
>> So we have something like
>>   @rpath/AudioPlugin (compatibility version 0.0.0, current version 0.0.0)
>>   /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 57.0.0)
>>   /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.0.0)
>>   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
>> (compatibility version 1.0.0, current version 275.0.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtCore.framework/Versions/5/QtCore
>> (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtGui.framework/Versions/5/QtGui
>> (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtNetwork.framework/Versions/5/QtNetwork
>> (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtWidgets.framework/Versions/5/QtWidgets
>> (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>> version 56.0.0)
>>   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 169.3.0)
>> and we need to have something like
>>   @rpath/AudioPlugin (compatibility version 0.0.0, current version 0.0.0)
>>   /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 57.0.0)
>>   /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 744.0.0)
>>   /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
>> (compatibility version 1.0.0, current version 275.0.0)
>> @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0,
>> current version 5.3.0)
>> @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.3.0,
>> current version 5.3.0)
>> @rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version
>> 5.3.0, current version 5.3.0)
>> @rpath/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility
>> version 5.3.0, current version 5.3.0)
>>   /usr/local/qt-5.3.0-mana/lib/QtWidgets.framework/Versions/5/QtWidgets
>> (compatibility version 5.3.0, current version 5.3.0)
>>   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
>> version 56.0.0)
>>   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>> version 169.3.0)
>>
>> Since we are not experimented OSX developers (sorry for that) we are
>> perhaps not doing well.
>>
>> Many thanks in advance for you help
>>
>> Regards
>>
>>
>> Olivier
>>
>> _______________________________________________
>> QBS mailing list
>> QBS at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/qbs
> Because the Qt libraries are an external dependency of your project, you will indeed need to use install_name_tool to set the install name for just those libraries. This is a shortcoming of Qt itself which we are planning to address for the 5.4 release (all Qt libraries should have @rpath install names then as the default configuration).

Hi,
Many thanks for this information. This is a good news since we are 
struggling with install_name_tool for many years now (with qmake and now 
with QBS) and this is not simple.
However we can not wait 5.4 release and we have started our migration to 
QBS 1.3 and we do no want to stop it (QBS 1.3 is really good).
What is your advice to do what we need in QBS 1.3.
Many thanks in advance for your help.

Regards

Olivier







More information about the Qbs mailing list