Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: daniloz on April 27, 2012, 10:43:55 am

Title: Clean new build from latest trunk (r7945)
Post by: daniloz on April 27, 2012, 10:43:55 am
Hi All,

I'm just trying to make a fresh new clean build from r7945 on Win7 64 using "gcc version 4.5.2 (tdm-1)" 32 bits.

I have three problems:

1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case

2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

Code
-------------- Build: Scripted wizard in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 10.0%] Compiling: plugins\scriptedwizard\wiz.cpp
[ 20.0%] Compiling: plugins\scriptedwizard\genericsinglechoicelist.cpp
[ 30.0%] Compiling: plugins\scriptedwizard\buildtargetpanel.cpp
[ 40.0%] Compiling: plugins\scriptedwizard\wizpage.cpp
[ 50.0%] Compiling: plugins\scriptedwizard\infopanel.cpp
[ 60.0%] Compiling: plugins\scriptedwizard\compilerpanel.cpp
[ 70.0%] Compiling: plugins\scriptedwizard\projectpathpanel.cpp
[ 80.0%] Compiling: plugins\scriptedwizard\filepathpanel.cpp
[ 90.0%] Compiling: plugins\scriptedwizard\genericselectpath.cpp
[100.0%] WARNING: Target 'Code::Blocks wx2.8.x - Scripted wizard': Unable to resolve 1 external dependencies:
devel\libcodeblocks.a
Linking dynamic library: devel\share\CodeBlocks\plugins\scriptedwizard.dll
Output size is 2.68 MB
Process terminated with status 0 (2 minutes, 30 seconds)

3- resources.zip is also not automagically generated.

Thanks!

Edit: Added point 3
Title: Re: Clean new build from latest trunk (r7945)
Post by: ollydbg on April 27, 2012, 11:40:46 am
1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case
The ZIP files of the "normal plugins" are constructed and copied when you run update.bat. I'm not sure why they are different with the contributed plugins. Any one can explain?


Quote
2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

Code
-------------- Build: Scripted wizard in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[ 10.0%] Compiling: plugins\scriptedwizard\wiz.cpp
[ 20.0%] Compiling: plugins\scriptedwizard\genericsinglechoicelist.cpp
[ 30.0%] Compiling: plugins\scriptedwizard\buildtargetpanel.cpp
[ 40.0%] Compiling: plugins\scriptedwizard\wizpage.cpp
[ 50.0%] Compiling: plugins\scriptedwizard\infopanel.cpp
[ 60.0%] Compiling: plugins\scriptedwizard\compilerpanel.cpp
[ 70.0%] Compiling: plugins\scriptedwizard\projectpathpanel.cpp
[ 80.0%] Compiling: plugins\scriptedwizard\filepathpanel.cpp
[ 90.0%] Compiling: plugins\scriptedwizard\genericselectpath.cpp
[100.0%] WARNING: Target 'Code::Blocks wx2.8.x - Scripted wizard': Unable to resolve 1 external dependencies:
devel\libcodeblocks.a
Linking dynamic library: devel\share\CodeBlocks\plugins\scriptedwizard.dll
Output size is 2.68 MB
Process terminated with status 0 (2 minutes, 30 seconds)
I'm also asked about that before, they need to be fixed, but some devs said this is not a big deal. ;)
Title: Re: Clean new build from latest trunk (r7945)
Post by: daniloz on April 27, 2012, 11:47:33 am
1- all plugins generate the dll in the right dir, i.e. [trunk]\src\devel\share\CodeBlocks\plugins , but they don't write the manifest ZIP files in [trunk]\src\devel\share\CodeBlocks, so that C::B can't load them at start-up. I've looked and there's no post-build step to make the zip file, as in the contrib-plugins case
The ZIP files of the "normal plugins" are constructed and copied when you run update.bat. I'm not sure why they are different with the contributed plugins. Any one can explain?

Ok, fair enough, but when I want to debug CodeBlocks, then it runs from the devel dir, so IMHO it would make sense to generate the zip-files along as a post-build step of each core plugin, as in the case of the contrib plugins, as well as the resources.zip file.

I'd still be able to run/debug it from devel, without compromising my output dir... :-)

What do the devs thinks about it?
Title: Re: Clean new build from latest trunk (r7945)
Post by: ollydbg on April 27, 2012, 11:50:59 am
so IMHO it would make sense to generate the zip-files along as a post-build step of each core plugin, as in the case of the contrib plugins, as well as the resources.zip file.
I have the same point with you.  :)
Title: Re: Clean new build from latest trunk (r7945)
Post by: oBFusCATed on April 27, 2012, 11:51:49 am
Just run src/update or src/update.bat and be done with it.
If you really need it provide a patch, but I don't see why it is needed.
Title: Re: Clean new build from latest trunk (r7945)
Post by: daniloz on April 27, 2012, 11:53:18 am
As I said in my post:
I'd still be able to run/debug it from devel, without compromising my output dir... :-)

Maybe that's just me, but I'd like to keep everything in the output dir the way it is, but still have the zip files there... I'll do a patch and submit...
Title: Re: Clean new build from latest trunk (r7945)
Post by: daniloz on May 01, 2012, 04:30:08 pm
Maybe that's just me, but I'd like to keep everything in the output dir the way it is, but still have the zip files there... I'll do a patch and submit...

I need some help in generating the patch, I have a local git repository (and use git svn reabase to keep in sync with trunk). I know there's a way to generate an SVN compatible patch, but I couldn't find again in the forum.

So, the question, how to do it?
Title: Re: Clean new build from latest trunk (r7945)
Post by: MortenMacFly on May 01, 2012, 04:59:17 pm
So, the question, how to do it?
http://stackoverflow.com/questions/708202/git-format-patch-to-be-svn-compatible

http://codeprairie.net/blogs/chrisortman/archive/2008/01/14/creating-subversion-patches-with-git.aspx
Title: Re: Clean new build from latest trunk (r7945)
Post by: headkase on May 01, 2012, 10:19:49 pm
Hi All,

...<snip>...

2- there's a warning that devel\libcodeblocks.a cannot be found when building the plugins. I see that this dependency was introduced in r7088. Is this lib needed/generated at all on Win systems? An example is below.

...<snip>...


Have you tried rebuilding with a SVN version at or above SVN 7949?  See this thread:

Discussion (http://forums.codeblocks.org/index.php/topic,16199.msg110061.html#msg110061).

Basically, from SVN 7940 to SVN 7948 there was a regression in file-handling in Code::Blocks.  SVN 7949 fixed the issue.  So, go back to a good SVN, like SVN 7932 Nightly, and build your later version using that.
Title: Re: Clean new build from latest trunk (r7945)
Post by: daniloz on May 02, 2012, 08:35:12 am
So, here is the patch adding a post-build step to make all resources needed, i.e. zip files with manifest's, *.xrc and images inside for each target.

Also below is a script to generate SVN-like scripts from git (also attached as a zip file).
Code
#!/bin/sh
#
# usage: git-svn-diff [files]
# Generate an SVN-compatible diff against the tip of the tracking branch
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'`
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)`
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* |
sed -e "s/^+++ .*/&    (working copy)/" -e "s/^--- .*/&    (revision $REV)/" \
-e "s/^diff --git [^[:space:]]*/Index:/" \
-e "s/^index.*/===================================================================/"

It would be a good idea to have this script and some description somewhere else, for easy access... maybe the Wiki, what do you think? If this is ok, my next question is: can I modify the Wiki, or there's some special permission needed?

Thx,
daniloz

[attachment deleted by admin]
Title: Re: Clean new build from latest trunk (r7945)
Post by: MortenMacFly on May 02, 2012, 07:54:47 pm
can I modify the Wiki, or there's some special permission needed?
Sure, otherwise it wouldn't be a wiki, right? Just login using your forum's account.
BTW: This script is Linux only... So at least I cannot try.

For the patch: I'll do some testing...
Title: Re: Clean new build from latest trunk (r7945)
Post by: daniloz on May 03, 2012, 01:01:58 pm
Sure, otherwise it wouldn't be a wiki, right? Just login using your forum's account.
ok, I'll do it in the near future....

BTW: This script is Linux only... So at least I cannot try.
That's true, I use msysgit, so I have a bash shell to run it. :-)

For the patch: I'll do some testing...
Thank you. Btw, this is just the Window's version of it. ;-)
Title: Re: Clean new build from latest trunk (r7945)
Post by: stahta01 on May 03, 2012, 04:02:51 pm
Just login using your forum's account.

Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.

So, Daniloz instead of daniloz.

Tim S.
Title: Re: Clean new build from latest trunk (r7945)
Post by: oBFusCATed on May 03, 2012, 04:13:03 pm
Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.
Mine is the same, no upper case first letter required.
Title: Re: Clean new build from latest trunk (r7945)
Post by: stahta01 on May 03, 2012, 04:50:19 pm
Unless it has changed the first letter of your username needs to be upper case to login to the wiki page.
Mine is the same, no upper case first letter required.

So, the original wiki page requirement for a capital has been changed.

Good to know.

Tim S.
Title: Re: Clean new build from latest trunk (r7945)
Post by: ollydbg on June 12, 2012, 08:11:50 am
I see an issue, currently, when I do not change any thing of the core c::b targets, when I click the build button, all the zip command will run.

Can we avoid this kind of update? I mean, run zip command only after some XRC files were updated.

Thanks.
Title: Re: Clean new build from latest trunk (r7945)
Post by: MortenMacFly on June 12, 2012, 08:22:26 am
Can we avoid this kind of update? I mean, run zip command only after some XRC files were updated.
Uncheck the option "run pre-/ post-build steps even if target is up-to-date".
Title: Re: Clean new build from latest trunk (r7945)
Post by: ollydbg on June 14, 2012, 06:36:55 am
Can we avoid this kind of update? I mean, run zip command only after some XRC files were updated.
Uncheck the option "run pre-/ post-build steps even if target is up-to-date".
Aha, it works fine, thanks.