Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: jomeggs on April 09, 2008, 04:26:17 pm

Title: Scripting, get the path of the currently active project
Post by: jomeggs on April 09, 2008, 04:26:17 pm
Hi,

I'm trying to write a script to generate doxygen dokumentation for my projects. I need to know, how to figure out the path of the actually activated project in my workspace. Please, have the kindness to help me
 
Title: Re: Scripting, get the path of the currently active project
Post by: Biplab on April 09, 2008, 04:47:21 pm
Code: [Select]
GetProjectManager().GetActiveProject().GetCommonTopLevelPath();
Also refer-

Quote
http://wiki.codeblocks.org/index.php?title=Scripting_commands
Title: Re: Scripting, get the path of the currently active project
Post by: jomeggs on April 09, 2008, 07:01:02 pm
Code: [Select]
GetProjectManager().GetActiveProject().GetCommonTopLevelPath();
Quote
http://wiki.codeblocks.org/index.php?title=Scripting_commands

Many thanks for responding!
Unfortunately, your tip doesnt work. Before posting this message, I investigated your wikipages and had an additionally  look to the scripts in the codeblocks script directory and found, what you told me.

There are five projects in my workspace. I activated every project one by one and typed print( GetProjectManager().GetActiveProject().GetCommonTopLevelPath()); in your Script console. After that I had correct results for three of them. Two failed, I got the parentpath of the project.

Both named projects are using files, wich are stored above the project directory. So, the GetCommonTopLevelPath() will (correctly) return the highest point in the whole path. The codeblocks script make_dist.script from Yiannis struggles with the same problem.

After thinking about the problem, it would be better to have a list about all the files in the current activated project. This way I can write a doxygen config file and simply execute this.

Do you have any other suggestions?