Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] Shared Libraries and Installation Framework
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Shared Libraries and Installation Framework

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kbarresi
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbnoimi
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kbarresi
        wrote on last edited by
        #3

        That second link was very helpful. I ended up using the launcher script that sets up the lib path. Thanks mbnoimi :)

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #4

          You welcome.

          May you please edit the title of this thread to [SOLVED]?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved