This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to manage templates?

Tags: None
(comma "," separated)
renyhp
Registered Member
Posts
2
Karma
0

How to manage templates?

Thu Sep 05, 2019 10:27 pm
Hello everyone,

I am trying to create a template. In the attempt, I have created two invalid ones, which I seem to be unable to remove.

Also, I can't actually make the template work in any way. This is my folder:
Code: Select all
root_macro/
  root_macro.kdevtemplate
  %{PROJECTDIRNAME}.kdev4
  CMakeLists.txt
  %{APPNAMELC}.cpp


This is root_macro.kdevtemplate:
Code: Select all
# KDE Config File
[General]
Name=ROOT Macro
Name[it]=Macro per ROOT
Comment=A macro for ROOT
Category=ROOT/Macro
ShowFilesAfterGeneration=%{APPNAMELC}.cpp
ValidProjectName=^[a-zA-Z_][a-zA-Z0-9_]+$

and this is %{PROJECTDIRNAME}.kdev4:
Code: Select all
[Project]
Name=%{APPNAMELC}
Manager=KDevCMakeManager
VersionControl=%{VERSIONCONTROLPLUGIN}


I have tried both importing root_macro.kdevtemplate from Project > New from Template > Load Template from File, and compressing the content of the folder and putting it into .kde/share/apps/kdevappwizard/templates. In both cases, when I actually create the new project from this template, it doesn't ask for a build configuration, and instead creates a folder with only the .kdev4 file, and no cpp file, and no CMakeLists.txt file.

By the way it is unclear to me what is the difference between %{PROJECTDIRNAME} and %{APPNAMELC}, since the user is prompted for only one name, which is the one inserted at the bottom of the Project > New from Template screen.

Thanks in advance!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell