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. Mac OS X deployment
Forum Updated to NodeBB v4.3 + New Features

Mac OS X deployment

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
8 Posts 3 Posters 3.8k Views 3 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.
  • alejandro_pnzA Offline
    alejandro_pnzA Offline
    alejandro_pnz
    wrote on last edited by
    #1

    Hi all. I have deployed my program on Mac OS X 10.11, using next commands:

     Qt/5.5/clang_64/bin/macdeployqt App.app
     npm install -g appdmg
     appdmg spec.json App.dmg
    

    On my mac everything works fine. But users of the program facing the next problem due to start:

    Application Specific Information: 
    dyld: launch, loading dependent libraries 
    
    Dyld Error Message: 
    Library not loaded: @rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets 
    Referenced from: /Applications/VkJust.app/Contents/MacOS/VkJust 
    Reason: image not found 
    

    Using otool, I see the next info:

    	@rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.5.0, current version 5.5.1)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.1)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.1)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.1)
    	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    	@rpath/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.5.0, current version 5.5.1)
    	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.1)
    	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I'd recommend running macdeployqt with the verbose option enabled to check what happens regarding QtWebKit.

      On a side note, you can generate the .dmg file directly with macdeployqt

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      alejandro_pnzA 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        I'd recommend running macdeployqt with the verbose option enabled to check what happens regarding QtWebKit.

        On a side note, you can generate the .dmg file directly with macdeployqt

        alejandro_pnzA Offline
        alejandro_pnzA Offline
        alejandro_pnz
        wrote on last edited by alejandro_pnz
        #3

        @SGaist Hello, yes, I know about it, but I need a custom dmg image file.
        I've ran macdeployqt with verbose option, and there are not any problems here.

        Log: Adding framework:
        Log: Framework name "QtWebKitWidgets.framework" 
         Framework directory "/Users/alejandro/Qt/5.5/clang_64/lib/" 
         Framework path "/Users/alejandro/Qt/5.5/clang_64/lib/QtWebKitWidgets.framework" 
         Binary directory "Versions/5" 
         Binary name "QtWebKitWidgets" 
         Binary path "/Versions/5/QtWebKitWidgets" 
         Version "5" 
         Install name "/Users/alejandro/Qt/5.5/clang_64/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets" 
         Deployed install name "@executable_path/../Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets" 
         Source file Path "/Users/alejandro/Qt/5.5/clang_64/lib/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets" 
         Framework Destination Directory (relative to bundle) "Contents/Frameworks/QtWebKitWidgets.framework" 
         Binary Destination Directory (relative to bundle) "Contents/Frameworks/QtWebKitWidgets.framework/Versions/5" 
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you check the rpath from your executable ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          alejandro_pnzA 1 Reply Last reply
          0
          • SGaistS SGaist

            Can you check the rpath from your executable ?

            alejandro_pnzA Offline
            alejandro_pnzA Offline
            alejandro_pnz
            wrote on last edited by
            #5

            @SGaist What do you mean?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Call otool -l on your executable and check for the LD_RPATH values

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              alejandro_pnzA 1 Reply Last reply
              0
              • SGaistS SGaist

                Call otool -l on your executable and check for the LD_RPATH values

                alejandro_pnzA Offline
                alejandro_pnzA Offline
                alejandro_pnz
                wrote on last edited by
                #7

                @SGaist It is the same like in first post:

                @rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.5.0, current version 5.5.1)
                	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.1)
                	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.1)
                	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.1)
                	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
                	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
                	@rpath/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.5.0, current version 5.5.1)
                	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.1)
                	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
                	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
                	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
                	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
                
                shavS 1 Reply Last reply
                0
                • alejandro_pnzA alejandro_pnz

                  @SGaist It is the same like in first post:

                  @rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.5.0, current version 5.5.1)
                  	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.1)
                  	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.1)
                  	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.1)
                  	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
                  	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
                  	@rpath/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.5.0, current version 5.5.1)
                  	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.1)
                  	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
                  	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
                  	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
                  	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
                  
                  shavS Offline
                  shavS Offline
                  shav
                  wrote on last edited by
                  #8

                  @alejandro_pnz Did you run macdeployqt from the Qt install folder? I had the same problem when try to call macdeployqt command from the another folder. I will try to explain what i mean:

                  1. I have a application in folder /Users/andrew/qt_projects/myapp/build
                  2. Go to this folder with command: cd /Users/andrew/qt_projects/myapp/build
                  3. In folder I call command qt_install_folder/5.7/clang_64/bin/macdeploy myapp.app
                  4. In current folder I receive myapp.app with all needs libraries and frameworks. And if I run it on my mac it's works fine. But if this application will open on another mac the users will get the same error with framework (in my case it's QML plugin).

                  The solution for this it's run macdeployqt from the Qt install folder. You need to go to folder where is macdeplotqt binary file and run this command from there.

                  Another way it's configure QtCreator to run macdeploy command when you build your app. For this create a new Build step in Project settings. And add Custom Build Step where set next properties:

                  command: macdeployqt
                  arguments: %{buildDir}/YouprojectName.app -qmldir=fullpath_to_qml_folder -always-overwrite -verbose=2 -codesign="3rd Party Mac Developer Application: Team Name"
                  working folder: $QTDIR/bin
                  

                  This configuration works for me. Please check the arguments for macdeploqt for your project.

                  I hope this will help to you.

                  Mac OS and iOS Developer

                  1 Reply Last reply
                  1

                  • Login

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