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. How to set linux permissions to installed files with QMake
QtWS25 Last Chance

How to set linux permissions to installed files with QMake

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 4.6k Views
  • 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.
  • T Offline
    T Offline
    Twinky
    wrote on last edited by
    #1

    Hello,

    Here is a guide to set permissions for installed files on linux.

    I've looked at these references:
    http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html
    http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html
    http://paulf.free.fr/undocumented_qmake.html
    http://www.qtcentre.org/wiki/index.php?title=Undocumented_qmake
    But couldn't find any mention of setting permissions.

    According to this post: http://www.qtcentre.org/threads/13687-How-to-set-permission-of-installed-files-via-qmake there is a QMake variable called QMAKE_INSTALL_FILE but this is not documented in the variables reference link above.

    Thus I modified my .pro file to the following:
    @unix {
    target.path = /opt/my_app_dir
    INSTALLS += target

    QMAKE_INSTALL_FILE = install -m 6755 -p -o root -g root
    QMAKE_INSTALL_PROGRAM = install -m 6755 -p -o root -g root
    

    }@

    Where /opt/my_app_dir is the directory in which I wanted to install my file.
    I got the "install" options from http://linux.about.com/library/cmd/blcmdl1_install.htm

    Cheers,
    Daniel K.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      How about to post this like article in wiki? :)

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Twinky
        wrote on last edited by
        #3

        Great suggestion, I've just created one now: http://qt-project.org/wiki/How_to_set_installed_file_permissions_for_Linux

        Thanks!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          Twinky
          wrote on last edited by
          #4

          The wiki page has been moved by another user. The new link is: http://qt-project.org/wiki/Set-Installed-File-Permissions-for-Linux

          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