Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Install Framework MAC - how to create dock entry


  • Qt Champions 2017

    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.


  • Qt Champions 2017

    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


Log in to reply