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

Adam Strzelecki ono at java.pl
Tue Jun 18 12:44:22 CEST 2013


Probably I am duplicating discussion at: https://bugreports.qt-project.org/browse/QTBUG-31814 but anyway it would be worth to let everyone know the insights made here.

> 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

Yes, that fair point. Still once we don't need any patching (see below) I don't see the point of having installer app at all, if we have Qt5.1.sdk folder in the dmg that can by dragged anywhere by the developer, this makes the maintenance even easier :>

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

I agree. Apple dropped /Developer because Xcode.app is now self contained app, which resolved long-standing problem with uninstallation and managing multiple Xcode version, now you just drag Xcode.app to trash.

> 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.

Great to hear that.

> 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.

Ad detailed at https://bugreports.qt-project.org/browse/QTBUG-31814#comment-206336 I don't see any reason that qmake and QtCore could not use paths relative to current executable rather than hardcoding absolute paths.

This together with @rpath will make both SDK and Qt apps work well regardless where user puts them or moves them afterwards and follow platform specific app directory layout.

Also this would resolve https://bugreports.qt-project.org/browse/QTBUG-29550

Cheers,
-- 
Adam


More information about the Development mailing list