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. qbs: DynamicLibrary under MacOS
Forum Updated to NodeBB v4.3 + New Features

qbs: DynamicLibrary under MacOS

Scheduled Pinned Locked Moved Solved Installation and Deployment
qbsmacosxlibrabriesdynamiclibrary
4 Posts 2 Posters 2.0k 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.
  • A Offline
    A Offline
    Andreas_Scholz
    wrote on last edited by
    #1

    Gentleman,

    I am trying to deploy a Windows/Linux project for MacOS.
    Everything is working except for the ".framework" files not being installed into the "install-root" folder.

    On Windows the "install-root" looks roughly like this:
    mylib.dll
    myapplication.exe

    On MacOC the "install-root" looks like this:
    mylib
    myapplication

    When running the application it will not run due to missing "mylib.framework"

    The ".framework" file is present but remains in the build folder for the library. When manually transferring the file to the "install-root" folder the application will start successfully.

    What keeps me up and led me to signing up and writing this post is that I can't find any documentation on what qbs actually does when "installing" the librarys. From my point of view the ".framework" is somehow forged into a binary package which can not be interpreted by the OS.

    Following screenshots are all stripped down to the relevant files to demonstrate the issue.

    install-root
    install-root

    build folder
    build-folder

    working setup
    working

    The qbs file is simply setup as this:

    DynamicLibrary {
    ...
        Group  {
            name: "Install"
            qbs.install: true
            qbs.installDir: "bin"
            fileTagsFilter: "dynamiclibrary"
        }
    ...
    

    Please let me know if I need to be more specific on any topic.
    Thank you very much for any input!

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! I'm not familiar with macOS, but I found a page in Qbs' manual that might be of interest: http://doc.qt.io/qbs/bundle-module.html

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Andreas_Scholz
        wrote on last edited by Andreas_Scholz
        #3

        Thank you very much Wieland!

        The hint I needed was the bundles.

        For someone finding this post with the same issue, here is my solution:

            Group {
                fileTagsFilter: ["dynamiclibrary"]
                qbs.install: true
                qbs.installDir: bundle.isBundle ? FileInfo.joinPaths("bin", FileInfo.path(bundle.executablePath)) : "bin"
            }
        
            Group {
                fileTagsFilter: ["aggregate_infoplist"]
                qbs.install: bundle.isBundle && !bundle.embedInfoPlist
                qbs.installDir: FileInfo.joinPaths("bin", FileInfo.path(bundle.infoPlistPath))
            }
        

        Best regards,
        Andreas

        1 Reply Last reply
        1
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Great! Thanks for sharing your solution!

          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