Install_name_tool on Mac..is there an equivalent tool for Windows?



  • The utility prog "install_name_tool" on the Mac allows you to alter the app so it knows where the support libs can be found. Usually somewhere in the app bundle..like Frameworks.

    Is there a tool for Windows that does the same thing?

    Trying to make a Windows release. App works fine when all the Qt support DLLs are located in the same directory as the app.exe. What I would like to do is set up a similar directory structure for the Windows deploy similar to the Mac App bundle IE all the support Libs(mac) and DLLs(win) in a Frameworks/DLL subdirectory.

    I tried the setLibrayPath and addLibraryPath approach, but the Windows .exe dies before the DLL library paths can be set when it is run from a directory other than the development directory.

    I have a 3rd party installer program that can add the DLL subdirectory to the Windows PATH environment variable but was wondering if there was a more elegant approach.


  • Moderators

    AFAIK, no there is no equivalent to install_name_tool because Windows supports only 3 scenarios:

    • DLL is in the same directory as executable
    • DLL is in PATH
    • DLL is a system library

    no tool will get around that ;) You know who to blame for all this :P


  • Lifetime Qt Champion

    Additionally there's the "deployment documentation":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html to help you with that



  • [quote author="sierdzio" date="1374126908"]AFAIK, no there is no equivalent to install_name_tool because Windows supports only 3 scenarios:

    • DLL is in the same directory as executable
    • DLL is in PATH
    • DLL is a system library

    no tool will get around that ;) You know who to blame for all this :P[/quote]

    I like the way of windows far more than mac, deploy apps on mac is a real pain, have no ideas why the designer insist on making those path of dylib become absolute path?



  • You know who to blame for all this :P
    Yep, kinda what I expected :-(

    deploy apps on mac is a real pain,
    But not so much if you set them up with Automater & Shell Scripts

    I hate to modify the PATH var permanently...too easy to get messed up or over-written.

    If you were to run a .bat file that sets the PATH then executes the Qt .exe, is the PATH setting permanent or does it revert to previous setting after the .bat file terminates? Have to check this...


  • Moderators

    [quote author="PSI-lbc" date="1374368014"]I hate to modify the PATH var permanently...too easy to get messed up or over-written. [/quote]Agreed

    [quote]If you were to run a .bat file that sets the PATH then executes the Qt .exe, is the PATH setting permanent or does it revert to previous setting after the .bat file terminates? Have to check this...[/quote]PATH modifications by .bat files are non-permanant. They will be gone when the .bat quits. In fact, this is the preferred way of setting your PATH.

    e.g. When you install Qt, you'll notice that it places a shortcut to a Command Prompt in your Start menu. Launch this, and you'll get a command prompt with a custom environment set up for Qt. (Visual Studio uses the same method)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.