View Full Version : QMake QMake customization
csgib
9th June 2012, 11:40
Hi,
First sorry for my english (i'm french), but ill try to be clear.
My problem is :
I work on linux and i have developed a program with qt4 and all is working perfectly.
I have customized my qmake to install all the file i need with a make install ....
Problem : install himself in /usr/bin, libraries in /usr/share/ but i want change a right on an install folder. Imagine :
I install a folder toto in /usr/share/lala/
with make insatll (in root) the target folder will have attribute 775 but me i want 777 .... how can i accomplished this to tell to the make install to keep this attribute.
Thanks
Stéphane
wysota
9th June 2012, 12:43
Add the following directive to your .pro file:
linux:QMAKE_INSTALL_PROGRAM = install -m 777 -p
Just be aware you are making a security breach in your system this way.
csgib
9th June 2012, 18:12
Thanks but is it possible to make this sort of custo only on one folder and not all the files ...
BIBLIOTHEQUE_DIR.files = Bibliotheque
BIBLIOTHEQUE_DIR.path = /usr/share/2ManDVD
TRANSLATIONS_DIR.files = *.qm
TRANSLATIONS_DIR.path = /usr/share/2ManDVD
ICONS_DIR.files = Interface/mandvdico.png
ICONS_DIR.path = /usr/share/2ManDVD
FAKE_DIR.files = fake.pl
FAKE_DIR.path = /usr/bin
desktop.path = /usr/share/applications
desktop.files = 2ManDVD.desktop
INSTALLS += target FAKE_DIR BIBLIOTHEQUE_DIR TRANSLATIONS_DIR ICONS_DIR desktop
Here all i want is just 777 for BIBLIOTHEQUE_DIR
Thanks
Stéphane
wysota
10th June 2012, 19:46
For that you'll need a separate install rule. However think twice if you really want to make some file (or worse, a directory) in a public place world writable. It's a huge security breach. Better make your app suid some user and make that directory owned by that user or group.
csgib
15th June 2012, 06:33
Good ... i have make ton of modification to take care of your remarks to be sure to don't have a folder with perms 777 in my /usr/share/
But now i already have a problem...
When i make install all my files have a 644 perms but ...
In /usr/share i have a folder with 700 perms with user root.... all the files in this folder have good perms but the folder himself have limited right...
I just want a 644 or 744 or anything else, but i want access this directory with normal user, without creating a special group , ...
Help welcome, and thanks in advance
Stéphane
wysota
15th June 2012, 08:15
If you want to do that then the directory can't be 700 but rather 755.
csgib
15th June 2012, 08:24
I'm agree with you but make install create a directory with perms 700 ... and i don't find how change to 755 or 644 automatically without make it manually after make install...
Probably a rule in my pro file but don't find
Thanks
Stéphane
wysota
15th June 2012, 08:30
I don't think it's qmake. It's probably "install" that does that (see man install).
csgib
15th June 2012, 08:55
Yes but how customize make install from my pro file ?
wysota
15th June 2012, 08:59
I have shown you how to customize the command ran when a program is getting installed. Now you need to find the proper command. This is definitely out of scope of this forum.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.