Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Qt Install Framework MAC - how to create dock entry

    General and Desktop
    1
    2
    82
    Loading More Posts
    • 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.
    • dheerendra
      dheerendra Qt Champions 2022 last edited by

      We are using the Qt Install Framework on MAC. I would like to create the dock entry in MAC.

      If you know how to create dock entry, let me know.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply Reply Quote 3
      • dheerendra
        dheerendra Qt Champions 2022 last edited by dheerendra

        Qt Install framework does not provide any option like this. We need to execute apple script code.

        Following is the code snippet to create the same

        ======== createDock.sh =========

        #!/bin/sh
        user=`ls -la /dev/console | cut -d " " -f4`
        echo " User list is $user"
        sudo -u $user defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file:///Users/dheeru/Desktop/1_MT/CheckDockEntry/bins/CheckDockEntry.app</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>"
        killall Dock
        

        Following is my application location. Change the path according to your app.
        file:///Users/dheeru/Desktop/1_MT/CheckDockEntry/bins/CheckDockEntry.app

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply Reply Quote 2
        • First post
          Last post