Results 1 to 2 of 2

Thread: Setting default resource search paths @rpath to @executable_path/../

  1. #1
    Join Date
    Jul 2016
    Posts
    1
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Setting default resource search paths @rpath to @executable_path/../

    I guess it's mostly self explanatory but after running qmake, make and macappbundler I'm able to get my .app file with all the frameworks and plugins bundled.

    While trying to run the bundle, I got errors stating that the frameworks could not be found at @rpath/path/to/framework . The path was correct with respect to the bundle so i changed all instances of @rpath with install_name_tool, to @executable_path/../path/to/framework for all the frameworks and for the plugins and their dependencies.

    Now the app does work, and the libraries are found.

    Is there a way to set the default search paths in qt so that i don't have to do this manually, as for more involved projects it might take quite a long time. Or is there a reason why @rpath doesn't work but @executable_path does?

    Sorry if I'm missing an important detail. Thanks.

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Setting default resource search paths @rpath to @executable_path/../

    Here's what I use for my app bundle projects:
    Qt Code:
    1. QMAKE_LFLAGS = -Wl,-rpath,@executable_path/../Frameworks
    To copy to clipboard, switch view to plain text mode 
    I then run macdeployqt to copy the frameworks/libraries/plugins into the app bundle. Works great, no need to run install_name_tool separately.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

  3. The following user says thank you to jefftee for this useful post:

    zczlmes (29th July 2016)

Similar Threads

  1. Getting and setting default language from source
    By Coder5546 in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2014, 12:16
  2. Setting default item in a QCombobox
    By graffy in forum Qt Programming
    Replies: 4
    Last Post: 14th August 2013, 13:13
  3. Replies: 2
    Last Post: 2nd March 2012, 08:07
  4. Setting a widget's QPalette to default?
    By Spectralist in forum Newbie
    Replies: 2
    Last Post: 29th December 2009, 22:47
  5. Replies: 9
    Last Post: 9th April 2009, 07:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.