PDA

View Full Version : How to set permission of installed files via qmake?



totycro
19th May 2008, 10:59
i use this in my .pro file to install a config file to ~/.programrc:

configfile.path = /${HOME}
configfile.files = .programrc
INSTALLS += configfile

This works, "make install" copies the .programrc to $HOME, but the file is owned by root:

$ ls -l .programmrc
-rw-r--r-- 1 root root 432 2008-05-19 11:02 /home/totycro/.programrc

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

jpn
25th May 2008, 13:33
In mkspecs/common/linux.conf there is:


QMAKE_INSTALL_FILE = install -m 644 -p
QMAKE_INSTALL_PROGRAM = install -m 755 -p

Perhaps you could override it with something like:


QMAKE_INSTALL_FILE = install -m 644 -p -o $$(USER)

in the .pro file of your application.