This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Exclude folder from build in CCS v4

I am using CCS v4 and I haven't fould a way to exclude a folder from a build.

Is it possible to write a script that excludes the folder? 

Could someone please point me in the right direction?

Stephen

  • HI Stephen,

    I was able to do this with a folder in v5 but not v4.  What type of folder are you trying to exclude?  What have you tried so far?  COuld you send a few more details/screen captures?

    Best Regards,
    Lisa

  • Thanks for the reply.

    I created a unit test project and put that project in a folder that is in my main project.

    I want to exclude the unit test project folder from my main project build.

    Here's the structure (I want to exclude the UnitTestFolder):

    mainProjectFolder\

        someFiles

        UnitTestsFolder\

                       Debug

                       SomeFiles

     

     I am currently individually excluding each file in the UnitTestsFolder.   Also, I delete the UnitTest Debug folder before I do a main project build. 

    Stephen

  • Hi Stephen,

    I have been able to confirm v4 does not support excluding folders.  This was added for v5.  So I would definitely recommend giving the latest v5 release a try.

    Hope this helps and clarifies.

    Best Regards,
    Lisa

  • Is it possible to write a script that will exclude the items in the folder?

    Does CCSv4 scripting have the capability to

    1. Retrieve all of the files in a folder?

    2. Call  existing menu items?

    Stephen

  • Hi Stephen,

    technically you can write a script to exclude a folder.  We are very hesitant to recommend this however, as it does involve manually parsing the project files.    Ie the only really way to do it would be to manually manipulate the three main project files (.project, .cdtproject and .ccsproject).   They are xml files so you could have a look at them and see how an excluded file in entered.  You could then for example exclude a new file and monitor the changes to these three files to get an idea of what your script would need to modify.

    So it is not the most straightforward, and I hope you can appreciate why we really don't highlight or recommend this as a common practice.

    Does this help you further?

    Best Regards,

    Lisa

  • I would think that there would be a way to retrieve a list of files in the the directory and then call the menu item function that excludes files, but I guess that's not possible.

    I'll take a look at the project file.

    Are there any good tutorials on CCSv4 scripting?

    Stephen 

  • Hi Stephen,

    unfortuantely not.  The best that we have are the examples in the dss folder for example.

    Please keep us informed.

    Best Regards,
    Lisa

  • What's the dss folder?

    Stephen

  • Hi Stephen,

    this directory has any examples etc:

    C:\ti\ccsv5\ccs_base\scripting

    Please keep us informed if you need a touch further assistance here.

    Best Regards,
    Lisa