Results 1 to 2 of 2

Thread: How to set permission of installed files via qmake?

  1. #1
    Join Date
    May 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How to set permission of installed files via qmake?

    i use this in my .pro file to install a config file to ~/.programrc:
    Qt Code:
    1. configfile.path = /${HOME}
    2. configfile.files = .programrc
    3. INSTALLS += configfile
    To copy to clipboard, switch view to plain text mode 

    This works, "make install" copies the .programrc to $HOME, but the file is owned by root:
    Qt Code:
    1. $ ls -l .programmrc
    2. -rw-r--r-- 1 root root 432 2008-05-19 11:02 /home/totycro/.programrc
    To copy to clipboard, switch view to plain text mode 

    How can i change the ownership of the file to the user during the installation?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to set permission of installed files via qmake?

    In mkspecs/common/linux.conf there is:
    Qt Code:
    1. QMAKE_INSTALL_FILE = install -m 644 -p
    2. QMAKE_INSTALL_PROGRAM = install -m 755 -p
    To copy to clipboard, switch view to plain text mode 
    Perhaps you could override it with something like:
    Qt Code:
    1. QMAKE_INSTALL_FILE = install -m 644 -p -o $$(USER)
    To copy to clipboard, switch view to plain text mode 
    in the .pro file of your application.
    J-P Nurmi

Similar Threads

  1. Replies: 4
    Last Post: 7th April 2010, 23:09
  2. Mac: Copy Files Build Phase and qmake...
    By kuwan in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2007, 20:59
  3. MacOS settings
    By skaiser in forum Installation and Deployment
    Replies: 2
    Last Post: 19th July 2007, 07:47
  4. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  5. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.