Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: MortenMacFly on December 28, 2013, 09:13:42 pm

Title: New plugin: Project options
Post by: MortenMacFly on December 28, 2013, 09:13:42 pm
A new plugin has arrived: Project Options (maybe not a very nice title, but wtf...)

What does it do?
It allows mass-manipulation of project and/or target options in a workspace or a specific project.
It is intended to cleanup projects in a workspace.

Possible use-cases:

Source code attached, place it in the "plugin" -> "contrib" folder and compile against C::B as usual.

I would welcome feedback - if people find it useful I might add it to the plugins in SVN.
Title: Re: New plugin: Project options
Post by: gd_on on December 29, 2013, 07:14:09 pm
Thanks.
I tried it.
Somme suggestions here after :
1) : you should use the macro _ instead of wxT in ProjectOptions.cpp at lines 164, 180, 242, 247, 263, 268 to allow the translation of the strings in the result window.
2) : when there are no results, nothing is displayed. It could be nice to have a windows containing the string "No results" or something more elaborated.
3) : when a result window has been displayed, could it be possible to restart directly the plugin (for example with a specific button), because if I want to try an other set of options I have to go trough the menus Extensions/Project Options.
4) : when you delete an option, it could be nice to have a summary in the result window to know exactly where the option has been deleted.
5) : the string menu "Search for NOT w/ option" is not very clear for me. I think that it's to display the results with and without this option and only for compiler options (because I don't see any difference with link options).
Nevetheless, thanks

gd_on
Title: Re: New plugin: Project options
Post by: killerbot on December 29, 2013, 07:38:00 pm
add it to trunk, people can play with it (contrib plugins), much easier to get feedback.

what do you think ?
Title: Re: New plugin: Project options
Post by: oBFusCATed on December 29, 2013, 07:42:34 pm
Some comments on the project file/naming:
1. please use lower case plus underscores to prevent any OS porting issues.
2. external dependencies are not needed here (I think), because C::B should detect them auto-magically.
3. the post build action should use devel/codeblocks instead of devel/CodeBlocks (I know we have to have two sets of projects).
Title: Re: New plugin: Project options
Post by: oBFusCATed on December 29, 2013, 07:56:24 pm
4. The code style needs fixing
!!! 5. You've named you dialog ProjectOptionsDlg which is the same as the ProjectOptionsDlg in src/src. This causes symbols collision on linux and thus a crash. You'll have to rename your dialog for now. Later we should begin using -fvisibility=hidden!
Title: Re: New plugin: Project options
Post by: oBFusCATed on December 29, 2013, 08:08:11 pm
6. The results dialog should probably use a listctrl instead of textctrl (this will make the output a bit clearer)
6.1. When you switch to listctrl and it will be if you make double click on an item to open the build options dialog.
7. The results dialog should probably be an editor, allowing multiple instances
Title: Re: New plugin: Project options
Post by: MortenMacFly on December 29, 2013, 08:22:38 pm
Oh well... sure it can be enhanced. :-)

I actually needed it to clean-up the Unix project files related to a specific linker flag that is no longer supported on MacOSX.
Title: Re: New plugin: Project options
Post by: ouch on December 30, 2013, 09:56:06 pm
heh, well I can me using this. But it would be nice if it didn't disappear after a search is done. I would like to hammer in multiple searches to make sure I got everything set correctly.
Title: Re: New plugin: Project options
Post by: MortenMacFly on January 03, 2014, 03:13:29 pm
...added to SVN. Hopefully I didn't screw the (unix) build system... ???

However, patches for additional features are welcome. :-)
Title: Re: New plugin: Project options
Post by: killerbot on January 03, 2014, 03:42:14 pm
Code
make[5]: Leaving directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/profiler'
make[4]: Leaving directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/profiler'
Making all in ProjectOptionsManipulator
make[4]: Entering directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/ProjectOptionsManipulator'
make[4]: *** No rule to make target `all'.  Stop.
Title: Re: New plugin: Project options
Post by: Jenna on January 03, 2014, 03:45:44 pm
Code
make[5]: Leaving directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/profiler'
make[4]: Leaving directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/profiler'
Making all in ProjectOptionsManipulator
make[4]: Entering directory `/home/killerbot/CodeBlocks/sf/trunk/src/plugins/contrib/ProjectOptionsManipulator'
make[4]: *** No rule to make target `all'.  Stop.
I just fixed this in trunk.
Title: Re: New plugin: Project options
Post by: killerbot on January 03, 2014, 03:57:00 pm
fix confirmed
Title: Re: New plugin: Project options
Post by: killerbot on January 03, 2014, 04:01:23 pm
little feedback : result window can be bigger :

Code
Project 'General': Contains compiler option '-std=c++0x'.
Project 'TinyXml': Contains compiler option '-std=c++0x'.
Project 'DetectionLibrary': Contains compiler option '-std=c++0x'.
Project 'DetectionApplication': Contains compiler option '-std=c++0x'.

I searched for -std=c++0x ;-)

thing were already wrapping after :
- the first 2 : word "compiler"
- the last 2 : word "Contains"
Title: Re: New plugin: Project options
Post by: MortenMacFly on January 03, 2014, 04:12:28 pm
little feedback : result window can be bigger :
Well you can resize the dialog as you like (hopefully - never tried, but usually I create dialogs resizeable).

And concerning the features: As I mentioned:
However, patches for additional features are welcome. :-)

There are many more things that would be nice: For example: Include directories, libraries and so on...

Maybe we should collect the wish-list in a file within the plugin sources - I am already lost with the feedback from here.
Title: Re: New plugin: Project options
Post by: Jenna on January 03, 2014, 04:15:05 pm
The most useful at the moment (for me) would be to manipulate the "Custom variables" especially to make the wx30 projectfiles useful for wx-svn which is 3.1 and normally not build in standard path.

That's what I will try first.
Title: Re: New plugin: Project options
Post by: killerbot on January 03, 2014, 04:19:51 pm
I will look into enlarging the dialog, because it does not remember the enlarged setting, and next time again such wrapped stuff .
Title: Re: New plugin: Project options
Post by: MortenMacFly on January 03, 2014, 04:26:09 pm
...I am looking forward to see a raising number of SVN conflicts due to the many devs busy with enhancing this nifty thing. 8)

But what Jens said is what I have in mind, too: This plugin should allow to easily manipulate all important settings so that one can easily switch between SDK's (being wxWidgets or anything else...).

This also includes compiler/linker folder manipulation, maybe even object folder, output folder, lib folder...
Title: Re: New plugin: Project options
Post by: MortenMacFly on January 03, 2014, 04:35:45 pm
Maybe we should collect the wish-list in a file within the plugin sources
I've done that in SVN. Feel free to add stuff directly or by providing patches to this file... hehe...