[QBS] Clean install directory

Stéphane Fabry sf at xris.eu
Thu Sep 15 15:42:07 CEST 2016


I found the solution, I had to use product build directory in the rule:


cmd.binInstall=product.buildDirectory+"/"+project.binInstall

cmd.pluginInstall=product.buildDirectory+"/"+project.pluginInstall

cmd.sourceCode=function(){

File.remove(binInstall)

File.remove(pluginInstall)

}



Le 15-09-16 à 15:19, Stéphane Fabry a écrit :
> 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
>
>
>
>
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs

-- 

*Stéphane Fabry*, R&D Manager & Software architect
+32 (0)4 367 07 92
*X-RIS* | /X-Ray Imaging Solutions/
www.xris.eu/contact.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20160915/60abfc52/attachment.html>


More information about the Qbs mailing list