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

Offline LETARTARE

  • Regular
  • ***
  • Posts: 353
  • L'ami de l'homme.The friend of man.
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 »
C::B  : svn11313, wxwidgets2.8,  plugins : QtPregen-2.3.0
1-Vista Business Pack 2 32bits :  TDM-GCC 4.7.1, 
2-OpenSuse-42.3-Leap 64bits :  g++-4.8.5,
=> !! The messages are translated by GOOGLE !!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5028
  • 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

  • Regular
  • ***
  • Posts: 353
  • L'ami de l'homme.The friend of man.
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 ...

C::B  : svn11313, wxwidgets2.8,  plugins : QtPregen-2.3.0
1-Vista Business Pack 2 32bits :  TDM-GCC 4.7.1, 
2-OpenSuse-42.3-Leap 64bits :  g++-4.8.5,
=> !! The messages are translated by GOOGLE !!

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1846
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

  • Regular
  • ***
  • Posts: 353
  • L'ami de l'homme.The friend of man.
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 »
C::B  : svn11313, wxwidgets2.8,  plugins : QtPregen-2.3.0
1-Vista Business Pack 2 32bits :  TDM-GCC 4.7.1, 
2-OpenSuse-42.3-Leap 64bits :  g++-4.8.5,
=> !! The messages are translated by GOOGLE !!

Offline LETARTARE

  • Regular
  • ***
  • Posts: 353
  • L'ami de l'homme.The friend of man.
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' !!
C::B  : svn11313, wxwidgets2.8,  plugins : QtPregen-2.3.0
1-Vista Business Pack 2 32bits :  TDM-GCC 4.7.1, 
2-OpenSuse-42.3-Leap 64bits :  g++-4.8.5,
=> !! The messages are translated by GOOGLE !!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6221
    • 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 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline LETARTARE

  • Regular
  • ***
  • Posts: 353
  • L'ami de l'homme.The friend of man.
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.
C::B  : svn11313, wxwidgets2.8,  plugins : QtPregen-2.3.0
1-Vista Business Pack 2 32bits :  TDM-GCC 4.7.1, 
2-OpenSuse-42.3-Leap 64bits :  g++-4.8.5,
=> !! The messages are translated by GOOGLE !!