Author Topic: a Qt plugin : QtPregenForCB => AddOnForQt  (Read 130725 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #30 on: February 22, 2015, 01:49:40 pm »
Hello,
-> new 'QtPregenForCB-0.5.0'

I deleted the state
Quote
bsTargetPreGen
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-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: a new plugin : QtPregenForCB
« Reply #31 on: February 22, 2015, 02:27:24 pm »
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!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #32 on: February 22, 2015, 02:34:05 pm »
@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-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: a new plugin : QtPregenForCB
« Reply #33 on: February 22, 2015, 03:24:29 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?

'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!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #34 on: February 22, 2015, 03:40:23 pm »
@oBFusCATed
Quote
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!

do 'cbplugin.h' correct ?
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
...
« Reply #35 on: February 22, 2015, 03:44:16 pm »
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!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #36 on: February 22, 2015, 05:03:28 pm »
Hello,
-> new 'QtPregenForCB-0.6.0'

Quote
In 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-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: a new plugin : QtPregenForCB
« Reply #37 on: February 22, 2015, 06:37:13 pm »
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!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #38 on: February 23, 2015, 04:50:30 pm »
@ofuscated
Quote
1-  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 :
Code
enum cbFutureBuild
{
    fbNone = 0,
    fbBuild,
    fbClean,
    fbRebuild,
    fbWorkspaceBuild,
    fbWorkspaceClean,
    fbWorkspaceReBuild
};
Quote
2-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'
??
Quote
3-Check the style guide
is corrected
Quote
4-Don't put LETARTARE everywhere
this is done
Quote
5-  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 ?

« Last Edit: February 23, 2015, 06:08:52 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #39 on: February 24, 2015, 10:45:35 am »
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 !!
« Last Edit: February 24, 2015, 10:54:04 am by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: a new plugin : QtPregenForCB
« Reply #40 on: February 24, 2015, 02:29:57 pm »
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!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #41 on: February 24, 2015, 03:14:13 pm »
Yes,
One at the beginning of the worspace/project/target build and another for build one file, because the parameters are different.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #42 on: February 27, 2015, 08:51:56 pm »
Hello,
-> new 'QtPregenForCB-0.8.3'

I created a log 'PreBuild log' in log manager for posts plugin see
http://forums.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-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #43 on: April 13, 2015, 04:26:43 pm »
Hello,
a new patch to svn10216, see to :
https://github.com/LETARTARE/QtPregenForCB
Best regards
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: a new plugin : QtPregenForCB
« Reply #44 on: October 17, 2015, 08:37:59 pm »
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
« Last Edit: October 17, 2015, 08:56:14 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl