News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Compilation Monitoring Plugin

Started by threeS, September 02, 2014, 08:13:02 PM

Previous topic - Next topic

threeS

Good Day!

I don't have any experience in creating plugins and I'm an average (maybe) C/C++ Programmer and a Code::Blocks IDE user when doing my assignments in school.

I'm planning to create a plugin and i know it's a good one:
A plugin that save the .cpp/.c++ (+ the system timestamp ex: *2014-09-03 2:07AM)  file every time I hit the compile/run button in the IDE and save it to my postgresql database.

Platform: Ubuntu 14.04 64 bit
Compiler: gcc version 4.8
PostgreSQL: 9.3

Is there any plugin yet created or related to this one?
Can somebody give me the link?  :)

A big thanks to all!
More Power!  :)

Alpha

#1
This description sounds like it is more the job for something like git or svn.

(Assuming you have already build Code::Blocks from source - if not, see the wiki for directions.)
However, if you will be the only user, an easy hack would be inserting a few PostgreSQL api calls into plugins/compilergcc/compilergcc.cpp in the function CompilerGCC::DoPrepareQueue() (around line 1560-ish +/- whatever changes in your local rev.).  If you are distributing, use RegisterEventSink() subscribe to cbEVT_COMPILER_STARTED (edit: from within your own plugin) and execute your code there.  Use find in files with C::B's source for these identifiers if you need code examples.
(Note: Specifics on PostgreSQL api are out of scope of this forum.)

oBFusCATed

Writing a plugin will be far easier...
There are events for compilation started or finished.
A plugin can listen for them and then do its job.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

teto