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.

.cdtbuild contains random number strings

Other Parts Discussed in Thread: CCSTUDIO

Why does the .cdtbuild file contain random number strings? For example:

<project id="eNBPhyTx_DSP0C1.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.468113536" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType">

What is the purpose of 468113536 in this project id string? This random number makes it difficult to compare .cdtbuild files.

  • Hi,

    These numbers are unique identifiers generated by the managed project feature of Eclipse CDT, and they are random.

    Unfortunately I couldn't find to date a simple way to compare Eclipse CDT managed project settings - as you noticed, a simple file comparison does not work.

    You can try to write a script that parses the project files and search for specific strings, but keep in mind the version of CDT changes things - for example, in projects migrated from CCSv4 the contents of these files vary.

    Searching on the internet there is one topic that discusses the Eclipse project settings and may help you:

    http://old.nabble.com/Copying-CDT-Build-information-from-one-project-to-another.-td22154587.html

    And a description of a procedure to copy project settings is also shown at:

    http://www.eclipse.org/forums/index.php?t=msg&goto=509989&

    Sorry for not being of much help.

    Rafael

  • Hello Rafael,

    I appreciate taking the time to answer. I didn't have any luck with my Google searches.

    Thanks,

    Don

  • We use an app called Beyond Compare for file comparison. I created a new file format called 'Eclipse' and defined 'Grammer elements' that matched the text strings that have numbers appended to them in the .cdtfile. Then when comparing .cdtfiles I set these Grammer elements to be 'unimportant', and the random numbers are ignored. For anyone who uses Beyond Compare, I have attached my 'Eclipse' file format:

        <TTextFormat Value="Eclipse">
            <Grammar>
                <_0 Value="TBasicTextGrammarItem">
                    <ElementStr Value="ProjectType"/>
                    <IsRegExp Value="True"/>
                    <Text Value="ProjectType\.[0-9]+"/>
                </_0>
                <_1 Value="TBasicTextGrammarItem">
                    <ElementStr Value="Default"/>
                    <IsRegExp Value="True"/>
                    <Text Value="Default\.[0-9]+"/>
                </_1>
                <_2 Value="TBasicTextGrammarItem">
                    <ElementStr Value="VERSION"/>
                    <IsRegExp Value="True"/>
                    <Text Value="VERSION\.[0-9]+"/>
                </_2>
                <_3 Value="TBasicTextGrammarItem">
                    <ElementStr Value="Debug"/>
                    <IsRegExp Value="True"/>
                    <Text Value="Debug\.[0-9]+"/>
                </_3>
                <_4 Value="TBasicTextGrammarItem">
                    <ElementStr Value="DEFINE"/>
                    <IsRegExp Value="True"/>
                    <Text Value="DEFINE\.[0-9]+"/>
                </_4>
                <_5 Value="TBasicTextGrammarItem">
                    <ElementStr Value="Toolchain"/>
                    <IsRegExp Value="True"/>
                    <Text Value="Toolchain\.[0-9]+"/>
                </_5>
                <_6 Value="TBasicTextGrammarItem">
                    <ElementStr Value="OPT_TAGS"/>
                    <IsRegExp Value="True"/>
                    <Text Value="OPT_TAGS\.[0-9]+"/>
                </_6>
                <_7 Value="TBasicTextGrammarItem">
                    <ElementStr Value="UNDEFINE"/>
                    <IsRegExp Value="True"/>
                    <Text Value="UNDEFINE\.[0-9]+"/>
                </_7>
                <_8 Value="TBasicTextGrammarItem">
                    <ElementStr Value="PATH"/>
                    <IsRegExp Value="True"/>
                    <Text Value="PATH\.[0-9]+"/>
                </_8>
                <_9 Value="TBasicTextGrammarItem">
                    <ElementStr Value="REMARKS"/>
                    <IsRegExp Value="True"/>
                    <Text Value="REMARKS\.[0-9]+"/>
                </_9>
                <_10 Value="TBasicTextGrammarItem">
                    <ElementStr Value="WARNING"/>
                    <IsRegExp Value="True"/>
                    <Text Value="WARNING\.[0-9]+"/>
                </_10>
                <_11 Value="TBasicTextGrammarItem">
                    <ElementStr Value="ABI"/>
                    <IsRegExp Value="True"/>
                    <Text Value="ABI\.[0-9]+"/>
                </_11>
                <_12 Value="TBasicTextGrammarItem">
                    <ElementStr Value="MODE"/>
                    <IsRegExp Value="True"/>
                    <Text Value="MODE\.[0-9]+"/>
                </_12>
                <_13 Value="TBasicTextGrammarItem">
                    <ElementStr Value="SUBSECTIONS"/>
                    <IsRegExp Value="True"/>
                    <Text Value="SUBSECTIONS\.[0-9]+"/>
                </_13>
                <_14 Value="TBasicTextGrammarItem">
                    <ElementStr Value="LEVEL"/>
                    <IsRegExp Value="True"/>
                    <Text Value="LEVEL\.[0-9]+"/>
                </_14>
                <_15 Value="TBasicTextGrammarItem">
                    <ElementStr Value="SPEED"/>
                    <IsRegExp Value="True"/>
                    <Text Value="SPEED\.[0-9]+"/>
                </_15>
                <_16 Value="TBasicTextGrammarItem">
                    <ElementStr Value="tool"/>
                    <IsRegExp Value="True"/>
                    <Text Value="tool\.[0-9]+"/>
                </_16>
                <_17 Value="TBasicTextGrammarItem">
                    <ElementStr Value="DIRECTORY"/>
                    <IsRegExp Value="True"/>
                    <Text Value="DIRECTORY\.[0-9]+"/>
                </_17>
            </Grammar>
            <Mask Value=".cdtbuild"/>
        </TTextFormat>