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

kdev4 project configuration files

Tags: None
(comma "," separated)
twadoux
Registered Member
Posts
7
Karma
0

kdev4 project configuration files

Fri Jan 26, 2018 4:18 pm
Hi,

I have been now working for a few months with Kdevelop 5.1.2 for C++ and so far it is okay to me :)
First of all, the project files are far more readable than what i had with eclipse CDT.

However, there are some things I don't understand, and can't find any documentation (forum, wiki, whatsoever) about it.

My projects are using Makefiles to compile with an arm cross-compiler (+ Autotools).
I imported the project from the Makefiles.
Because I don't work alone, I had to version the project file so it apply to anyone.
Also, I am now trying to create class and project templates, so I want to prepare those files upon creation of the project

typically, it created :
- project.kdev4 (very simple information with project name)
- .kdev4/project.kdev4 with the following content :

Code: Select all
[Buildset]
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00$\x000\x000\x000\x00-\x00F\x00r\x00a\x00m\x00e\x00w\x00o\x00r\x00k\x00T\x00e\x00s\x00t\x00s)

[CustomDefinesAndIncludes][ProjectPath0]
Path=.
parseAmbiguousAsCPP=true
parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11
parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99

[CustomDefinesAndIncludes][ProjectPath0][Compiler]
Name=GCC

[CustomDefinesAndIncludes][ProjectPath0][Includes]
1=/home/thibautwa/saic/testlib_for_linux/TestFramework/TestRunner/include
2=/home/thibautwa/saic/testlib_for_linux/TestLibrary/000-FrameworkTests/include
3=/home/thibautwa/saic/testlib_for_linux/TestFramework/TestLogger/include

[Project]
VersionControlSupport=kdevgit

[SourceFileTemplates]
LastUsedTemplate=/home/thibautwa/.local/share/kdevfiletemplates/template_descriptions/cpp_testclass.desktop


BuildSet :
What is it for ? Is there anything important ?

Includes :
include path are all absolute.
In order to version them and share with others, I had to create shell scripts to version a special copy of those files with keywords replacing absolute paths.
I saw in this topic, that a variable "ProjectRootRelative" exists, but googling it gives nothing.
Has anyone a clue of how to use it ?

SourceFileTemplates :
I started creating some templates this morning, and found out this line had been added to the configuration.
Since this is with absolute path, I will need to update the scripts to also remove it. :/


Thanks ;)


(If anyone interested for those versioning scripts without absolute path, here it is :
Code: Select all
#!/bin/sh
dirs=$(find -name .kdev4)
for d in $dirs
do
   files=$(find $d -type f -name *.kdev4)
   for f in $files
   do
      newFile=${f%.kdev4}
      sed "s#$(absolute_path_to_replace)#KEYWORD#" $f > $newFile
      git add -f $newFile
   done   
done
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: kdev4 project configuration files

Fri Jan 26, 2018 11:22 pm
Hi,

this config file contains your personal preferences for the project and is not intended to be shared or edited.

I have not tried recently, but I think with the custom project manager, you can put your include paths into a file called ".kdev_include_paths" one each line. That is a file you could potentially share.

The build set is just the set of projects which are built when you click build all.

Greetings,
Sven


I'm working on the KDevelop IDE.
twadoux
Registered Member
Posts
7
Karma
0
I have not tried recently, but I think with the custom project manager, you can put your include paths into a file called ".kdev_include_paths" one each line. That is a file you could potentially share.


Interesting :)

Where is to be located this file ? in ./project/ directory or in ./project/.kdev4/ directory ?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Should be in the project dir, i.e. the former.


I'm working on the KDevelop IDE.
twadoux
Registered Member
Posts
7
Karma
0
Found a mention to this file here :
https://userbase.kde.org/KDevelop4/FAQ

I removed the former ./.dkev4/myproject.kdev4 file and added .kdev_include_paths.


So now I opened Kdev again, it works and good thing, it is using relative path ! :)
However, if I open the configuration of my project with kdevelop UI, I don't see my include paths.

Other question : can i use environment variable in those files ? (for example, to give sysroot path of the cross compiler)
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
I don't think you can use env vars, but try it. You could eventually have your build system generate them (e.g. cmake's configure_file). Yes, the paths added there are not listed in the GUI.


I'm working on the KDevelop IDE.
twadoux
Registered Member
Posts
7
Karma
0

Re: kdev4 project configuration files

Fri Feb 02, 2018 10:13 am
Is there a roadmap of the next release/feature you plan to implement in Kdevelop ?

Where could I contribute with suggestions/ideas or bug report ?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
You can submit bug reports or wishes on bugs.kde.org, however do not expect that each wish is actually implemented. Maybe somebody thinks it's great and picks it up, but chances are it just lies around there waiting for somebody interested in the topic.

There is no roadmap or similar, sorry, we do not have enough plannable developer resources for that.


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]