QtCreator shell script project
I'm looking for a way to include a directory of Linux shell scripts in a subdirs project. Is that possible?
I can create an empty Qt project and add my scripts to it. Then the build fails because QtCreator insists on running make. Make fails because the linking fails. There isn't anything to build!
I can import an existing project. Then QtCreator won't add it to my subdirs project. Instead, it's a separate project.
I've searched this site and and the rest of the Web. I can't believe that I'm the first person to do this, yet I can't find anyone else's wisdom on this topic.
You failed to add some reasoning why you want to add shell scripts as a sub-project, and what you expect from "building" suich a shell script sub-project.
Sometimes I add shell scripts using qmake (only for visualization, on my project):
@OTHER_FILES += share/scripts/shell/*.sh@
[quote author="Duck" date="1346104365"]You failed to add some reasoning why you want to add shell scripts as a sub-project, and what you expect from "building" suich a shell script sub-project.[/quote]
Does it matter? I'll tell you, since you asked. It didn't occur to me that the reason might be important.
Some of the apps in my subdirs project are command line apps. I have some shell scripts that invoke them, either individually, or in a pipeline. Mostly, this is for testing, although many of the shells scripts are useful in their own right. All of the scripts are related. If I keep using this project, I will probably refactor most of the scripts. It makes sense to me to keep them together as a subordinate project of my main project.
For now, I've added the scripts to the .pro file of one of the other subordinate projects. It's not what I wanted but it does the job. I did it like this:
scripts.path = /opt/myproject/bin
scripts.files = ../scripts/*.sh
INSTALLS += scripts