[Development] Why custom installer on Mac, why not using @rpath?

Ziller Eike Eike.Ziller at digia.com
Tue Jun 18 09:43:50 CEST 2013


On 17.06.2013, at 18:38, Adam Strzelecki <ono at java.pl> wrote:

> Hello,
> 
> This may be a silly question, but why Qt5 is not using Mac native installer packages anymore, but own (unusual on Mac) installer application?

Because we are using the same installer framework for all platforms. Which has the advantage of a) less reproduced work for packaging, b) the ability to at some point provide online updates, c) probably more

> Before in Qt4 there was .pkg installer, that was simply putting Qt frameworks into /Library/Frameworks and rest of the stuff into /Developer. Which is IMHO something that is pretty expected by Mac developer. Of course this could make problem for Qt4 & Qt5 coexests, that's why it is possible to enable specifying different installation target in installer .pkg.

/Developer does no longer exists since some Xcode versions, so there is no standard install location for "development tools" anymore.

> Once of the reasons I can see there's new "qt5.patcher" installer task that simply rewrites all referenced Qt frameworks to their paths using "install_name_tool". This solves the problem when referencing framework, but this is awkward solution.
> 
> Why not use @rpath? And make all Qt frameworks to use id of @rpath/QtNAME/Versions/VERSION/NAME, i.e. @rpath/QtCore/Versions/5/QtCore
> 
> Anyway pre-built SDKs come in 64-bit flavor on Mac, so they will run need at least Leopard 10.5 where @rpath is supported.

I already talked to Morten about that a while ago, and there's probably nothing preventing us from switching to using @rpath, since Qt 5 no longer supports the older platforms that don't have it.
The installer would still need to patch the installed Qt though, because qmake and QtCore have paths hardcoded / compiled into them (e.g. the paths returned from QLibraryInfo::location). That was only not necessary for the Qt4 installers because they were installed into a predefined location. You could *not* change the install path in the Qt4 installers.

Br, Eike

> Just to have a reference I've created bug entry for that:
> 
> 	https://bugreports.qt-project.org/browse/QTBUG-31814
> 
> Best regards,
> -- 
> Adam Strzelecki | nanoant.com | twitter.com/nanoant
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Development mailing list