Results 1 to 4 of 4

Thread: qmake to copy bash scripts and other files

  1. #1
    Join Date
    Jan 2009
    Posts
    5

    Default qmake to copy bash scripts and other files

    Hi,

    I have these files:
    Qt Code:
    1. /root
    2. root.pro
    3. /src
    4. /script.sh
    5. /desktop_entry.desktop
    To copy to clipboard, switch view to plain text mode 

    How can I...
    - Copy script.sh to /usr/bin/
    - Give execution rights to /usr/bin/script.sh
    - Copy desktop_entry.desktop to /usr/share/xsessions
    ... using qmake?

    If I use app TEMPLATE in root.pro, qmake generates a Makefile that compiles a non-existent C++ code.

    Can I implement my idea using INSTALLS variable?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake to copy bash scripts and other files

    Yes, INSTALLS variable was meant for copying additional files during make install. As for permissions, you could use the system() funtion to invoke chmod.

  3. #3
    Join Date
    Jan 2009
    Posts
    5

    Default Re: qmake to copy bash scripts and other files

    I'm trying this example:

    Qt Code:
    1. executable.files = src/script.sh
    2. executable.path = /usr/bin/
    3. INSTALLS = executable
    To copy to clipboard, switch view to plain text mode 

    But if I do a make...
    Qt Code:
    1. nitz@nodo001:~/projects/simple-environment/simple-environment$ qmake
    2. nitz@nodo001:~/projects/simple-environment/simple-environment$ make
    3. g++ -o simple-environment -L/usr/lib -lQtGui -lQtCore -lpthread
    4. /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o: In function `_start':
    5. (.text+0x18): undefined reference to `main'
    6. collect2: ld returned 1 exit status
    7. make: *** [simple-environment] Error 1
    8. nitz@nodo001:~/projects/simple-environment/simple-environment$
    To copy to clipboard, switch view to plain text mode 

    How can I avoid the compilation and only copy the script?

    EDIT: I have renamed the files as the first post
    Last edited by Nitz; 27th January 2009 at 22:27.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake to copy bash scripts and other files

    INSTALLS is for copying files along with the TARGET --- there is no "do nothing" template (sorry, I haven't noticed the if part in your first post).

Tags for this Thread

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.