Results 1 to 10 of 10

Thread: QMake customization

  1. #1
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QMake customization

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake customization

    Add the following directive to your .pro file:

    qmake Code:
    1. linux:QMAKE_INSTALL_PROGRAM = install -m 777 -p
    To copy to clipboard, switch view to plain text mode 

    Just be aware you are making a security breach in your system this way.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake customization

    Thanks but is it possible to make this sort of custo only on one folder and not all the files ...

    Qt Code:
    1. BIBLIOTHEQUE_DIR.files = Bibliotheque
    2. BIBLIOTHEQUE_DIR.path = /usr/share/2ManDVD
    3. TRANSLATIONS_DIR.files = *.qm
    4. TRANSLATIONS_DIR.path = /usr/share/2ManDVD
    5. ICONS_DIR.files = Interface/mandvdico.png
    6. ICONS_DIR.path = /usr/share/2ManDVD
    7. FAKE_DIR.files = fake.pl
    8. FAKE_DIR.path = /usr/bin
    9.  
    10. desktop.path = /usr/share/applications
    11. desktop.files = 2ManDVD.desktop
    12.  
    13. INSTALLS += target FAKE_DIR BIBLIOTHEQUE_DIR TRANSLATIONS_DIR ICONS_DIR desktop
    To copy to clipboard, switch view to plain text mode 

    Here all i want is just 777 for BIBLIOTHEQUE_DIR

    Thanks

    Stéphane

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake customization

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake customization

    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

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake customization

    If you want to do that then the directory can't be 700 but rather 755.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake customization

    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

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake customization

    I don't think it's qmake. It's probably "install" that does that (see man install).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Jun 2012
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QMake customization

    Yes but how customize make install from my pro file ?

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMake customization

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTabWidget customization
    By asafzakay in forum Qt Programming
    Replies: 16
    Last Post: 26th November 2017, 11:01
  2. QWT legend customization
    By alexmal in forum Qwt
    Replies: 1
    Last Post: 20th May 2011, 07:27
  3. Customization of Qt Demo
    By nivditha in forum Newbie
    Replies: 7
    Last Post: 26th October 2010, 22:58
  4. QfileDialog customization
    By vjsharma_30 in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2010, 06:02
  5. Window customization
    By Kostanev in forum Qt Programming
    Replies: 11
    Last Post: 14th August 2008, 18:04

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.