Author Topic: CB project: integrated 'update'  (Read 4223 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
CB project: integrated 'update'
« on: March 06, 2018, 08:53:49 am »
Hello, :-X
to compile a last version of 'Code :: Blocks', I use as IDE a previous version.
After compiling 'Code :: Blocks', it is tedious to open a console to launch 'update (.bat)'.

I tested the following solution with VISTA and OpenSuse :
1- create a real target 'Update' , 'Command only' type,  'Pos-built steps' with a call to 'update.bat' or './update'
2- in the virtual target 'All': add in last this target 'Update'

This makes it possible to integrate the update into the construction process.

I may have forgotten some things ?




« Last Edit: March 06, 2018, 06:20:32 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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CB project: integrated 'update'
« Reply #1 on: March 06, 2018, 03:54:07 pm »
This is a good idea, great!
My question is: When will the target named "Update" to be "built"? I mean You just manually click the "build" button to "build" the "Update" target?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: CB project: integrated 'update'
« Reply #2 on: March 06, 2018, 04:32:05 pm »
Here is the kind of interesting question.
I just did a test on 'svn11176' that I cleaned up, then I compiled the 'Update' target under VISTA.
The result is in image ...

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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: CB project: integrated 'update'
« Reply #3 on: March 06, 2018, 05:59:46 pm »
You could also add the update target it to the "All" target at the end. So it will always be running after rebuilding codeblocks.

One problem i see here is, that if you build the codeblocks workspace with all plugins you have to run this update script at the end of the build process of all plugins.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: CB project: integrated 'update'
« Reply #4 on: March 06, 2018, 06:19:15 pm »
Thank you for the information :

You say :
Quote
You could also add the update target it to the "All" target at the end.
Of course, as indicated -> 'last'
Quote
2- in the virtual target 'All': add in  last  this target 'Update'

You also indicate :
Quote
you have to run this update script at the end of the build process of all plugins

This is a good question, but I have not tested it yet.

Is it a problem ?
« Last Edit: March 06, 2018, 07:39:51 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: CB project: integrated 'update'
« Reply #5 on: March 06, 2018, 07:39:11 pm »
@BlueHazzard say :
Quote
you have to run this update script at the end of the build process of all plugins
I note that many plugins call 'update' including the latest 'Tools Plus Plugin'.
It is then possible in the project to remove the call of 'update' in the virtual target 'All'.

If we add another plugin in the end it should be expected while he calls 'update' !!
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 stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: CB project: integrated 'update'
« Reply #6 on: March 06, 2018, 07:49:00 pm »
@BlueHazzard say :
Quote
you have to run this update script at the end of the build process of all plugins
I note that many plugins call 'update' including the latest 'Tools Plus Plugin'.
It is then possible in the project to remove the call of 'update' in the virtual target 'All'.

If we add another plugin in the end it should be expected while he calls 'update' !!

There is more than a single update scripts/batch files

Some plugins have there own, instead of, or in addition to the main update script.

NOTE: Calling the  update script in the virtual target 'All' would not work for my normal build process.
Edit: This is on Windows; because in use file replacement is not supported by the OS.
I use output codeblocks to build devel codeblocks; exit codeblocks, then run main update script

Tim S.
« Last Edit: March 06, 2018, 07:53:11 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: CB project: integrated 'update'
« Reply #7 on: March 07, 2018, 08:37:39 am »
@stahta01
thank you for the clarification.

Quote
This is on Windows; because in use file replacement is not supported by the OS.
If you are using a previous version of 'Code::Block' for compilation, you can use the main 'update.bat' call in 'All' virtual target.
Ex :I used 'cb-11286' to build 'cb-11304' without difficulty ( for 'CodeBlocks.cbp'  and 'CodeBlocks-unix.cbp' )

Quote
I use output codeblocks to build devel codeblocks; exit codeblocks, then run main update script
I thought we'd first build devel codeblocks, then leaving codeblocks we launched the main update to build the output codeblocks ?

So, it sounds more complicated than I thought. But I find it sad to have to leave 'Code::Blocks' to finish building.
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