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. Basic deployment question
Forum Updated to NodeBB v4.3 + New Features

Basic deployment question

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 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.
  • I Offline
    I Offline
    Immii
    wrote on last edited by
    #1

    Sorry if it is too basic to ask in this forum

    I have Qt application, I am deploying it on different desktop, i copy every thing (exe , all required Qt dll )in one folder it works (keeping plug in in another dir in parent dir), but when I am integrating my Qt app(which is a tool for big app) and copying Qt dll in different folder and my Qt app.exe in different folder it is not working. Do I need to register my dll ( i thought this regsvr32 stuff is for COM only)

    This structure works: C:\MainApp\App\Tool(Qtapp.exe All Qt dll and imageformats/pluing dll )

    My final Dir strucuture is like this which does not work

    C:\MainApp\lib\ ( here I have all my Qt dll and imageformats\plugin dll)
    C:\MainApp\App\Tool(my Qt app is here)

    What do i need to do to make it working I saw this "link":http://qt-project.org/doc/qt-4.8/deployment-windows.html but it does not help

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qxoz
      wrote on last edited by
      #2

      Have you try?:
      @qApp->addLibraryPath("C:/MainApp/lib");@
      or
      @qApp->addLibraryPath("../../../lib");@
      It didn't help?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Immii
        wrote on last edited by
        #3

        No but if I do this, then wont I again make my app and restricted to this dir structure?

        now I am wondering how I should make my app totally independent from this path stuff. Is this possible at all to keep my exe at my own desired location and lib at totally different location .
        I mean at deploy time can I really decide this path or do i always have to use addLibraryPath stuff?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qxoz
          wrote on last edited by
          #4

          In theory (i haven't try this :) ) when you start your application you can read path from some *.ini file or register, and call QApplication::addLibraryPath() or QApplication::setLibraryPaths().

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Better go with:
            @
            qApp->addLibraryPath(qApp->applicationDirPath() + "/../../../lib");
            @

            This prevents surprises when you launch your app from a link, or from different $PWD (

            (Z(:^

            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