C++Builder project file(s)

This is the forum to discuss the Journal's content, article suggestions, etc.

Moderator: 2ffat

C++Builder project file(s)

Postby S0mbre » Wed May 23, 2012 5:10 am

Time and again I have to manually edit my *.cbproj files - chiefly to eliminate unwanted libraries and runtime packages. I am positive I'm not alone here, eh what? So I think it would be great if anyone here undertook to write an article about the structure of BCB project files (preferably, for all BCB versions). Personally, I am confused about the difference between 'LinkPackageStatics' and 'AllPackageLibs'... also it's not quite clear to me what values the 'Condition' attribute in the 'PropertyGroup' nodes can take, etc. etc.

Anyone for it? :)
S0mbre
Active Poster
Active Poster
 
Posts: 11
Joined: Wed Jun 08, 2011 9:36 pm

Re: C++Builder project file(s)

Postby HsiaLin » Tue Apr 29, 2014 6:15 am

I agree, i recently got XE6 and its causing all kinds of issues due to the changes in project files.
HsiaLin
BCBJ Master
BCBJ Master
 
Posts: 280
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Postby rlebeau » Tue Apr 29, 2014 7:05 pm

I take it that you have not disabled all installed packages by default and edited the default project template to remove all package references? That way, you start with a clean project each time. Each project should contain references to only the packages that you have enabled and use for that specific project. A classic mistake is to leave everything enabled by default, that is what ends up causing the IDE to add so many unused references to every project.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1408
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: C++Builder project file(s)

Postby HsiaLin » Sun May 04, 2014 7:25 am

Would be nice if they had something similar to a project editor/viewer/converter where changes could be made more easily. For instance, most of my projects were from the 2009 version and theres so much different now that i have to make a new project and save it and just add the old forms to it. Same with a lot of component packages although most of those do still work fine if they are simple components.

And what is the logic behind them making default new projects include dynamic RTL and links to packages? Sure it will make a smaller exe but it wont run anywhere but the pc it was made on unless you include a load of libraries.
HsiaLin
BCBJ Master
BCBJ Master
 
Posts: 280
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Postby 2ffat » Sun May 04, 2014 9:29 am

And what is the logic behind them making default new projects include dynamic RTL and links to packages? Sure it will make a smaller exe but it wont run anywhere but the pc it was made on unless you include a load of libraries.


AFAIK, that's been the case since BCB 3 (1998). Take a look at these articles: Using packages in C++Builder 3 and Building stand-alone EXEs.

When I build my program for release, I always uncheck the dynamic RTL and packages to make it a stand-alone program. I do agree that it would be nice for an article or two on the new compilers and how to "upgrade" old programs written on older compilers.
James P. Cottingham

Look at me still talking
when there is science to do.
User avatar
2ffat
Forum Mod
Forum Mod
 
Posts: 427
Joined: Wed Jun 23, 2004 7:07 am
Location: South Hill, VA

Re: C++Builder project file(s)

Postby HsiaLin » Mon May 05, 2014 7:01 am

Thanks 2ffat, yes i know how to make standalone exe, we need a way to edit the default project file, i do think thats where the problems come from.

gambit47 wrote:I take it that you have not disabled all installed packages by default and edited the default project template to remove all package references? That way, you start with a clean project each time.


Do you have a link to an article or other information on how to do that?
HsiaLin
BCBJ Master
BCBJ Master
 
Posts: 280
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Postby rlebeau » Tue May 06, 2014 11:16 am

HsiaLin wrote:most of my projects were from the 2009 version and theres so much different now that i have to make a new project and save it and just add the old forms to it.


That is what you are supposed to do anyway whenever you upgrade to a newer IDE version. You cannot just open an old project in a newer IDE version and expect it to work as-is, that has never worked.

HsiaLin wrote:And what is the logic behind them making default new projects include dynamic RTL and links to packages?


That has always been the default for as long as I can remember.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1408
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: C++Builder project file(s)

Postby HsiaLin » Tue May 06, 2014 12:28 pm

gambit47 wrote:That is what you are supposed to do anyway whenever you upgrade to a newer IDE version. You cannot just open an old project in a newer IDE version and expect it to work as-is, that has never worked.


If thats the case it should tell you that you need to do that instead of saying its upgrading a project.
HsiaLin
BCBJ Master
BCBJ Master
 
Posts: 280
Joined: Sun Jul 08, 2007 6:29 pm

Re: C++Builder project file(s)

Postby rlebeau » Wed May 07, 2014 8:02 pm

HsiaLin wrote:If thats the case it should tell you that you need to do that instead of saying its upgrading a project.


The IDE does *attempt* to upgrade the project. That has always been true. But the upgrade *rarely* ever works correctly, which is why you should not rely on it. The IDE may restructure the project, convert from MAKEFILE to XML, etc, But it has never been smart enough to update outdated/redundant package references, for instance.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1408
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA


Return to Articles

Who is online

Users browsing this forum: No registered users and 1 guest

cron