News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

a Qt plugin : QtPregenForCB => AddOnForQt

Started by LETARTARE, February 10, 2015, 05:53:03 PM

Previous topic - Next topic

LETARTARE

Hello,
-> new 'QtPregenForCB-0.5.0'

I deleted the state
QuotebsTargetPreGen
I renamed the two events
Quote'cbEVT_PREGEN_ALL' and
'cbEVT_PREGEN_FILE'
and methods
Quote'void DoPreGenAll();'
'void DoPreGenFile(const wxString& file);'
The structure 's_rebuild' is declared public in' compilergcc.h '

I provide a new patch to svn 10118, see to :
https://github.com/LETARTARE/QtPregenForCB

Best regards

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

compilergcc.h is not public. It is part of the compiler plugin and the CB's SDK.

Also you've not answer my last question.
(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!]

LETARTARE

@oBFusCATed
I thought it was necessary to launch the event from a state machine.

's_prebuild' is used only in 'compilergcc.cpp' and 'qtPregen.cpp', Is not that enough?
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

Quote from: LETARTARE on February 22, 2015, 02:34:05 PM
@oBFusCATed
I thought it was necessary to launch the event from a state machine.
But why have you invented another state? Why do you need it?

Quote from: LETARTARE on February 22, 2015, 02:34:05 PM
's_prebuild' is used only in 'compilergcc.cpp' and 'qtPregen.cpp', Is not that enough?
qtPregen.cpp is part of your plugin and you're accessing headers that are part of another plugin, right?
Do you think this is correct? What will happen if I want to use this event in another plugin and don't have the full source tree of codeblocks, but I'm using the headers installed in /usr/include/codeblocks?

The public SDK is comprised of the files in src/include and libcodeblocks.so anything that is not part of these two should not be used by a plugin!
(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!]

LETARTARE

@oBFusCATed
QuoteThe public SDK is comprised of the files in src/include and libcodeblocks.so anything that is not part of these two should not be used by a plugin!

do 'cbplugin.h' correct ?
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

Nope. Place it next to the corresponding event. In sdk_events.h or similar header.
(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!]

LETARTARE

Hello,
-> new 'QtPregenForCB-0.6.0'

QuoteIn sdk_events.h or similar header
The structure 's_rebuild' is declared public in 'sdk_events.h'.

I provide a new patch to svn 10118, see to :
https://github.com/LETARTARE/QtPregenForCB

Sincerely
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

OK, some more comments:
1. Why don't you use an enum instead of s_rebuild struct? An enum has the advantage that it can be extended without the need to break the api/abi.
2. The names of the events continue to be horrible. I don't know what PREGEN should mean. It has a meaning in the context of your plugin, but not as a generic event emitted by the compiler plugin.
3. Check the style guide here http://wiki.codeblocks.org/index.php?title=Coding_style and try to follow it.
4. Don't put LETARTARE everywhere. It would be removed before committing anyway.
5. Are you sure that you want to get an event when the pre-build step is executed?

@devs:
What do you think about adding an event like cbEVT_COMPILER_STEPS_STARTED?
This event will be emitted before every different step (clean, build, pre, post build, etc).
Would this make building too slow?
Also please take a look at this patch, because I have very little understanding of the compiler plugin.
(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!]

LETARTARE

#38
@ofuscated
Quote1-  Why don't you use an enum instead of s_rebuild struct
yes it's possible, as I used three boolean, I have to use eight enums par exemple :
enum cbFutureBuild
{
    fbNone = 0,
    fbBuild,
    fbClean,
    fbRebuild,
    fbWorkspaceBuild,
    fbWorkspaceClean,
    fbWorkspaceReBuild
};

Quote2-The names of the events continue to be horrible
you are right : names must remember that this happens BEFORE COMPILATION
Quote'cbEVT_BEFORE_COMPILING_ALL'
'cbEVT_BEFORE_COMPILING_FILE'
??
Quote3-Check the style guide
is corrected
Quote4-Don't put LETARTARE everywhere
this is done
Quote5-  Are you sure that you want to get an event
yes, i have to generate the files required by Qt structure, BEFORE the compilation starts : see green
http://doc.qt.digia.com/qq/34/qt-build-system.png
But I will try to use 'cbEVT_COMPILER_STARTED' instead of 'cbEVT_BEFORE_COMPILING_ALL'

I will provide the patch if you agree ?

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

#39
Hello,
-> new 'QtPregenForCB-0.7.1'

This version uses only event 'cbEVT_COMPILER_STARTED' associated with the relevant parameter.
The 'enum cbFutureBuild' replaces 'struct s_rebuild'.

I provide a new patch to svn10118, see to :
https://github.com/LETARTARE/QtPregenForCB

Sincerely

modification of the patch: error version !!
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

Hm, am I correct in thinking that know the compiler plugin will fire cbEVT_COMPILER_STARTED event twice for two separate reasons?
One at the beginning of the build and another for every project/target it starts to build.
(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!]

LETARTARE

Yes,
One at the beginning of the worspace/project/target build and another for build one file, because the parameters are different.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

Hello,
-> new 'QtPregenForCB-0.8.3'

I created a log 'PreBuild log' in log manager for posts plugin see
http://forums.next.codeblocks.org/index.php/topic,20045.msg136838.html#msg136838

I provide a patch to svn10118, svn10127 see to :
https://github.com/LETARTARE/QtPregenForCB

@devs
This patch is not specific to Qt, it can be used for any intervention BEFORE building
1- workspace
2- project
3- targets
4- a simple file

Best regards
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

#44
a new version 'QtPregenForCB-0.8.5' for sdk >= 1.25.
new patchs to  svn10253, svn10376, svn10474, svn10528, see to :
https://github.com/LETARTARE/QtPregenForCB
Best regards
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'