[QBS] Clean install directory

Stéphane Fabry sf at xris.eu
Thu Sep 15 15:19:59 CEST 2016


Hi,

I have some files installed by qbs this way, inside a group of file:

qbs.install:true

qbs.installDir:project.binInstall


But if files are removed from the group later on, they remains installed, they are not cleaned.
I'd like to add a rule to clean those directories but didn't succeeded.

Here's my trial, the rule is executed, but the files not removed...

Product{
name:"Cleaninstall"
type:["install"]


Rule{
multiplex:true
alwaysRun:true
Artifact{
fileTags:["install"]
}


prepare:{
varcmd=newJavaScriptCommand();
cmd.binInstall=project.binInstall+"/"
cmd.pluginInstall=project.pluginInstall+"/"
cmd.sourceCode=function(){
console.info("removing:"+binInstall);
File.remove(binInstall)
File.remove(pluginInstall)
}
cmd.description="Cleanbinandplugindirectories"
returncmd;
}
}
}



Thanks



Stéphane


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20160915/30f63834/attachment.html>


More information about the Qbs mailing list