Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. what is wrong in script of application bundle for IOs application?
Forum Updated to NodeBB v4.3 + New Features

what is wrong in script of application bundle for IOs application?

Scheduled Pinned Locked Moved Solved 3rd Party Software
3rd partydynamiclibrarymac-osmacdeployqtbundle
8 Posts 2 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.
  • Y Offline
    Y Offline
    Yash001
    wrote on 18 Jul 2018, 07:17 last edited by Yash001
    #1

    I am using Qt 5.11.0 in Mac system. I got the build success in QT, I am trying to create the application bundle for the my application.

    we have one script, which is copy the 3rd party library and framework into bundle. I am calling that script from QT creator project setting. But I getting error related to dynamic library. It name is squidstateLibrary,i am using that library inside the main project and another dynamic lib file.

    My project .pro file location
    potentiostat/src/Squidstat/Squidstat.pro

    output directory:
    potentiostat/out/Release/_Squidstat/

    SquidstatLibrary location:
    potentiostat/out/Release/squidstatlibrary/libSquidStateLibrary.1.dylib

    the script, which is create the application bundle

    #!/bin/sh
    QTDIR="$1"
    cp ./../../3rdparty/qtcsv-out/lib-release/libqtcsv.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/libqtcsv.1.dylib
    cp ./../../3rdparty/hidapi-out/lib-release/libhidapi.0.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/
    
    
    
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/qwt.framework/
    cp -R ./../../3rdparty/qwt/bin/lib/qwt.framework/ ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/qwt.framework/
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtConcurrent.framework/
    cp -R $QTDIR/../lib/QtConcurrent.framework/ ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtConcurrent.framework/
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtOpenGL.framework/
    cp -R $QTDIR/../lib/QtOpenGL.framework/ ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtOpenGL.framework/
    
    install_name_tool -change /usr/local/opt/hidapi/lib/libhidapi.0.dylib @executable_path/libhidapi.0.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat
    install_name_tool -change libqtcsv.1.dylib @executable_path/libqtcsv.1.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat
    install_name_tool -change qwt.framework/Versions/6/qwt @executable_path/../Frameworks/qwt.framework/Versions/6/qwt ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat
    
    
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/squidstatelibrary/
    cp ./../../out/Release/squidstatelibrary/libSquidStateLibrary.1.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/
    
    install_name_tool -change ./../../out/Release/squidstatelibrary/libSquidStateLibrary.1.dylib @executable_path/libSquidStateLibrary.1.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat
    
    
    
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/elements/
    cp -R ./../../out/Release/elements/ ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/elements/
    mkdir -p ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/prebuilt/
    cp -R ./../../out/Release/prebuilt/ ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/prebuilt/
    rm -f ./../../out/Release/_SquidStat/_SquidStat.dmg
    $QTDIR/macdeployqt ./../../out/Release/_SquidStat/_SquidStat.app -dmg
    
    

    Output of otool -L Potentiostat/out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat

    _SquidStat:
    	@executable_path/../Frameworks/qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.3)
    	@executable_path/libhidapi.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    	@executable_path/libqtcsv.1.dylib (compatibility version 1.5.0, current version 1.5.0)
    	libSquidStateLibrary.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    	@rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.11.0, current version 5.11.0)
    	/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/QtSerialPort.framework/Versions/5/QtSerialPort (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.11.0, current version 5.11.0)
    	/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 400.9.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
    

    output of

     otool -L out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/prebuilt/libChargeDischarge1.dylib
    
    out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/prebuilt/libChargeDischarge1.dylib:
    	libChargeDischarge1.dylib (compatibility version 0.0.0, current version 0.0.0)
    	libSquidStateLibrary.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    	@rpath/QtDesigner.framework/Versions/5/QtDesigner (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.11.0, current version 5.11.0)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.11.0, current version 5.11.0)
    	/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/QtXml.framework/Versions/5/QtXml (compatibility version 5.11.0, current version 5.11.0)
    	/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 400.9.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
    

    complier Output:

    18:27:10: The process "/usr/bin/make" exited normally.
    18:27:10: Starting: "/bin/bash" macdeploy.sh /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/qwt.framework/Headers with non-directory ./../../3rdparty/qwt/bin/lib/qwt.framework//Headers
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/qwt.framework/Resources with non-directory ./../../3rdparty/qwt/bin/lib/qwt.framework//Resources
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/qwt.framework/Versions/Current with non-directory ./../../3rdparty/qwt/bin/lib/qwt.framework//Versions/Current
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtConcurrent.framework/Headers with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtConcurrent.framework//Headers
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtConcurrent.framework/Resources with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtConcurrent.framework//Resources
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtConcurrent.framework/Versions/Current with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtConcurrent.framework//Versions/Current
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtOpenGL.framework/Headers with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtOpenGL.framework//Headers
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtOpenGL.framework/Resources with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtOpenGL.framework//Resources
    cp: cannot overwrite directory ./../../out/Release/_SquidStat/_SquidStat.app/Contents/Frameworks/QtOpenGL.framework/Versions/Current with non-directory /Users/admiralinstruments/Qt_New/5.11.0/clang_64/bin/../lib/QtOpenGL.framework//Versions/Current
    ERROR: no file at "/usr/lib/libSquidStateLibrary.1.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/platforms/libqcocoa.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/styles/libqmacstyle.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqgif.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqicns.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqico.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqjpeg.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqmacheif.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqmacjp2.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqsvg.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqtga.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqtiff.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqwbmp.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/imageformats/libqwebp.dylib"
    File exists, skip copy: "../../out/Release/_SquidStat/_SquidStat.app/Contents/PlugIns/iconengines/libqsvgicon.dylib"
    WARNING:
    WARNING: "../../out/Release/_SquidStat/_SquidStat.app/Contents/Resources/qt.conf" already exists, will not overwrite.
    WARNING: To make sure the plugins are loaded from the correct location,
    WARNING: please make sure qt.conf contains the following lines:
    WARNING: [Paths]
    WARNING:   Plugins = PlugIns
    18:27:39: The process "/bin/bash" exited normally.
    18:27:39: Elapsed time: 00:39.
    

    I am getting error like

    ERROR: no file at "/usr/lib/libSquidStateLibrary.1.dylib"
    

    what is wrong, I am doing while writing intall_tool_change command in script.
    so that it is show the message like no squidstatlibrary file found.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Jul 2018, 20:29 last edited by SGaist
      #2

      Hi,

      What does libSquidStateLibrary.1.dylib do ?

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

      Y 1 Reply Last reply 18 Jul 2018, 20:56
      0
      • S SGaist
        18 Jul 2018, 20:29

        Hi,

        What does libSquidStateLibrary.1.dylib do ?

        Y Offline
        Y Offline
        Yash001
        wrote on 18 Jul 2018, 20:56 last edited by
        #3

        @SGaist libSquidStateLibrary is dynamic library file, and I created with help of another project in Qt creator.

        On Windows system I created SquidStateLibrary.dll file in visual studio.

        libSquidStateLibrary contain various function for calculation.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 18 Jul 2018, 21:32 last edited by
          #4

          Can you show the otool -L output on libSquidStateLibrary ?
          Where is it located exactly ?

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

          Y 2 Replies Last reply 18 Jul 2018, 21:54
          0
          • S SGaist
            18 Jul 2018, 21:32

            Can you show the otool -L output on libSquidStateLibrary ?
            Where is it located exactly ?

            Y Offline
            Y Offline
            Yash001
            wrote on 18 Jul 2018, 21:54 last edited by Yash001
            #5

            @SGaist
            SquidStateLibrary project generated library file at location:
            Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.1.dylib
            Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.1.0.dylib
            Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.1.0.0.dylib
            Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.dylib

            After libSquidStateLibrary.1.dylib copy into the application bundle it is located at:
            Potentiostat/out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/libSquidStateLibrary.1.dylib

            Here the output of the otool -L on libSquidStateLibrary:

            otool -L Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.1.dylib 
            
            //**************output******************// 
            Potentiostat/out/Release/squidstatelibrary/libSquidStateLibrary.1.dylib:
            	libSquidStateLibrary.1.dylib (compatibility version 1.0.0, current version 1.0.0)
            	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.11.0, current version 5.11.0)
            	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.11.0, current version 5.11.0)
            	/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)
            	/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 400.9.0)
            	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
            Admirals-MacBook-Pro:Documents admiralinstruments$ 
            
            1 Reply Last reply
            0
            • S SGaist
              18 Jul 2018, 21:32

              Can you show the otool -L output on libSquidStateLibrary ?
              Where is it located exactly ?

              Y Offline
              Y Offline
              Yash001
              wrote on 19 Jul 2018, 21:06 last edited by
              #6

              @SGaist Do I need to add any other contain in script?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 19 Jul 2018, 21:12 last edited by
                #7

                Something I would try first is to use the -libpath option of macdeployqt to help it find your dependencies.

                Otherwise, you need to also fix the id attribute using install_name_tool`

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

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  Yash001
                  wrote on 23 Aug 2018, 19:52 last edited by Yash001
                  #8

                  Hi,

                  With help of our senior Engineer. I am able to solve this issue. He change the binary path of libSquidStateLibrary.1.dylib into libChargeDischarge1.dylib and .app file.

                  Inside the bundle my library location at _Squidstate.app/squidstatelibrary/libSquidStateLibrary.1.dylib

                  //change Binary path in Plugin

                  install_name_tool -change  libSquidStateLibrary.1.dylib  @executable_path/squidstatelibrary/libSquidStateLibrary.1.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/prebuilt/libChargeDischarge1.dylib
                  

                  // change binary path in app

                  install_name_tool -change  libSquidStateLibrary.1.dylib  @executable_path/squidstatelibrary/libSquidStateLibrary.1.dylib ./../../out/Release/_SquidStat/_SquidStat.app/Contents/MacOS/_SquidStat
                  

                  solution may be helpful to novice programmer like me.
                  Thank you.

                  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