richp

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: substitutions in custom project templates #27214
    richp
    Participant

    Thank you so much.  This seems to work great.

    I noticed this with 5.4 and it is still a problem in this 5.5.3 build. When creating a project for a Linux shared library with a custom template the target filename doesn’t get the ‘.so’ file extension, so I’ve had to add the extension to get the build to work. I see that the template.xml file has ProjectType as SharedLibrary, but there is nothing else in it about the target file name or extension.  This is from the newly created template from a project that does have .so on the output file name under Project Makefile Settings and $(TargetExtension) is ‘.so’; but a project created from the custom template does not.

    in reply to: substitutions in custom project templates #27195
    richp
    Participant

    Trying the template renamed as zip.

    Attachments:
    You must be logged in to view attached files.
    in reply to: substitutions in custom project templates #27194
    richp
    Participant

    Thanks for the reply.

    In the “New Linux Project” wizard in 5.4, there is no longer a way to specify a template from the <VisualGDB>\ProjectTemplates\Linux folder.  The old wizard had a drop down selection of the templates that applied to Application/Shared Library/Static Library… The current wizard just has “Create a new project” with the ability to select binary type, the make tool-chain and the language standard.

    For custom project templates.  I have a template with file names ‘$$PROJECTNAMEBASE$$.cpp’ and ‘$$PROJECTNAMEBASE$$.h’ in the template zip file.  They are copied directly to the resulting project directory.  Within the files I had ‘$$PROJECTNAMEBASE_CPPID$$’ text that I expected to be replaced with the new project name.  The files were copied without any textual substitutions.  Perhaps there is some other mechanism to indicate that these changes should be done, like in the template.xml document.  I just had this in the xml document:

    <FileReference>
    <FileName>$$PROJECTNAMEBASE$$.cpp</FileName>
    <IsExternal>false</IsExternal>
    <IsExcludedFromBuild>false</IsExcludedFromBuild>
    <ItemType>ClCompile</ItemType>
    </FileReference>

    I did try ‘$(ProjectName).cpp’ for the FileName as well, but it didn’t help.

    I’ll include my custom template file.

Viewing 3 posts - 1 through 3 (of 3 total)