Results 1 to 4 of 4

Thread: Custom clean step does not work

  1. #1
    Join Date
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Custom clean step does not work

    Hello,

    I'd like to add a new custom clean step, removing libraries.
    so the "Command" is /bin/rm
    "Working directory" is the project directory,
    "Command arguments" is the ABSOLUTE path to the lib directory /projects/MyProj/Lib/*

    Executing the same command fro any shall removes the library files!

    Attempt to execute the cleaning step results in error message like:

    The process "/usr/bin/make" exited normally.
    Starting: "/bin/rm" /projects/MyPro/Lib/*.so*
    /bin/rm: cannot remove `/projects/MyPro/Lib/*.so*': No such file or directory
    The process "/bin/rm" exited with code %2.
    Error while building project MyPro (target: Desktop)
    When executing build step 'Remove Libraries'

    Directory and files EXIST and the path is CORRECT!!!

    any ideas?

    PS
    as you definitely noticed I work under LINUX (Suse 11.2)

    Thanks for your help

  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: Custom clean step does not work

    "*" is interpreted by a shell and not by rm. Since the command here doesn't pass through a shell the asterisk is fed directly to rm which doesn't treat it as a wildcard character. You need to enumerate the files directly or use something like 'find . -name "*.so" -delete' as your command. Why would you want to remove files that were not part of the compilation anyway?
    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
    Sep 2010
    Posts
    62
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Custom clean step does not work

    Hello,

    First, thanks for your readiness to help, but I cant really follow you.
    - Shall it mean, that the arguments to the shall call "/bin/rm" are not attached to the call and then executed in a shall? so how it works in this case?
    - what is then a "/bin/rm" and how it is called with arguments not processed by the shall?
    - I've also tried to execute '/bin/rm /projects/MyProj/Lib/*' and "find" as you suggested written in the "Command Field" without giving an argument, and it also does not work.

    By the way, the files in the /projects/MyProj/Lib/, similarly as the /projects/MyProj/Bin/* directory are the part of compilation

    with best regards

  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: Custom clean step does not work

    Quote Originally Posted by lotek View Post
    - Shall it mean, that the arguments to the shall call "/bin/rm" are not attached to the call and then executed in a shall? so how it works in this case?
    The command is called directly without the shell.

    - what is then a "/bin/rm" and how it is called with arguments not processed by the shall?
    I don't understand your question /bin/rm is a binary executable that can be executed the same way as any other binary executable and arguments are passed to it the same way as to every other binary executable. A shell is not required for that.

    - I've also tried to execute '/bin/rm /projects/MyProj/Lib/*' and "find" as you suggested written in the "Command Field" without giving an argument, and it also does not work.
    Why would it work if you didn't give any arguments?

    By the way, the files in the /projects/MyProj/Lib/, similarly as the /projects/MyProj/Bin/* directory are the part of compilation
    So just call "make distclean" and forget about your custom clean step.
    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. Qt Creator Custom Process Step...how?
    By My3rdGradeShirt in forum Qt Tools
    Replies: 6
    Last Post: 2nd December 2010, 23:55
  2. Qt Creator Debugging step by step through else rich code does not work
    By Terjoqu in forum Qt Tools
    Replies: 1
    Last Post: 11th March 2010, 21:44
  3. learn how to install QT with msvc2005 step by step
    By coder1985 in forum Installation and Deployment
    Replies: 6
    Last Post: 20th December 2007, 19:56
  4. Video Tutorials or step by step guides?
    By Dumbledore in forum Newbie
    Replies: 2
    Last Post: 10th October 2007, 08:33
  5. Step by Step MySQL Plugin... what's next step?
    By chaosgeorge in forum Qt Programming
    Replies: 20
    Last Post: 5th November 2006, 15:32

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.