[SOLVED] Shared Libraries and Installation Framework
-
Hi,
So I'm trying to use the Qt IFW to make an installer for Linux. I have all the shared libraries (libQtCore.so, etc) packaged with my application, however I'm having troubles loading them.
Apparently Ubuntu has made it so that the LD_LIBRARY_PATH environment variable isn't used anymore, and instead, you have to add your lib directory to /etc/ld.so.conf. This is where my problem is. In my installation script, I have the following function connected to the installer's "installationFinished".
@installLibs = function() {
if (!component.installed)
return;
component.addOperation( "AppendFile",
"/etc/ld.so.conf.d/iubble.conf",
"@TargetDir@/libs"
);component.addOperation( "Execute", "ldconfig" );
}
@This should work, but the problem is that I don't think it's being executed as root. I tried each step on the installer manually with
@sudo ./installer --runoperation "AppendFile" "/etc/ld.so.conf.d/my_program.conf" "/example/libs"@
And that works, so I think it's a permissions issue.
In fact, when I run the installer and point it to /etc/local as the install directory, it creates the gksudo popup to get permissions, but it still doesn't create or append the file. Can anyone think of a way to get this executed as root?
-
I suggest to make a static build because it's the recommended deployment method for IFW ("readmore...":http://qt-project.org/doc/qtinstallerframework-1.4/)
Any way, if you insist to deploy in shared form you can take a look into:
http://www.qtcentre.org/wiki/index.php?title=Deploying_Qt_Applications#Linux