Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - How can I create build container files quickly?: (6 Items)
   
How can I create build container files quickly?  
Hello,

I have a question that came from a developer at my company.  He is trying to quickly create a build container for his 
projects by copying a container for another project and modifying it for his project.  He has run into a problem when 
trying to update the container for his project.  Let's say the container references the following projects:

CommonLib1
CommonLib2
CommonLib3
OldProject1
OldProject2
NewProject1
NewProject2

This is just a small example.  We have a lot more projects than listed above.  We would like to use the IDE to update 
the container file (com.qnx.tools.ide.qde.core.prefs).  There are several make configurations in this build container.  
In this example, the new project does not use "OldProjectX" so those need to be removed.  He starts by importing the QNX
 build container to his workspace.  He unchecks the missing projects (i.e. OldProject1, OldProject2) so that the IDE 
does not try to import the missing projects.

The .prefs file still needs to be updated.  So he edits the make configuration from the IDE.  After removing OldProject1
 and OldProject2 from the make configuration window, he clicks OK but sees an error window: "Error saving updated 
project configurations:null".  The .prefs file is not updated although the make configuration shows the changes he made.
  If we restarts the IDE, his changes are gone, and the make configuration is refreshed from the .prefs file.

We tried manually deleting the OldProjectX xml entries in the .prefs file, but that causes the container file to be 
corrupted because the projects are not in sequence.

Questions:
1) Is this the best way to create build containers quickly?  Is there another alternative that involves container 
templates?  We would like to avoid creating the build container from scratch, as it involves many projects, many make 
configurations, and tedious variant configurations.
2) What caused the save error?  Is there a workaround for this error?

The save error was observed on IDE 4.6.1 and IDE 4.7 (packaged with QNX 6.5.0 release).

Rex
Re: How can I create build container files quickly?  
Hi, Rex,

See some comments in-line, below.

HTH,

Christian


On 04/08/10 01:47 PM, Rex Lam wrote:
> Hello,
>
> I have a question that came from a developer at my company.  He is trying to quickly create a build container for his 
projects by copying a container for another project and modifying it for his project.  He has run into a problem when 
trying to update the container for his project.  Let's say the container references the following projects:
>
> CommonLib1
> CommonLib2
> CommonLib3
> OldProject1
> OldProject2
> NewProject1
> NewProject2
>
> This is just a small example.  We have a lot more projects than listed above.  We would like to use the IDE to update 
the container file (com.qnx.tools.ide.qde.core.prefs).  There are several make configurations in this build container.  
In this example, the new project does not use "OldProjectX" so those need to be removed.  He starts by importing the QNX
 build container to his workspace.  He unchecks the missing projects (i.e. OldProject1, OldProject2) so that the IDE 
does not try to import the missing projects.
>
> The .prefs file still needs to be updated.  So he edits the make configuration from the IDE.  After removing 
OldProject1 and OldProject2 from the make configuration window, he clicks OK but sees an error window: "Error saving 
updated project configurations:null".  The .prefs file is not updated although the make configuration

This is a bug.  The property page for the configuration should 
understand that configurations are being removed that don't exist, anyway.


>   shows the changes he made.  If we restarts the IDE, his changes are gone, and the make configuration is refreshed 
from the .prefs file.
>
> We tried manually deleting the OldProjectX xml entries in the .prefs file, but that causes the container file to be 
corrupted because the projects are not in sequence.
>    

Can you provide more specifics of the corruption?  There is no XML in 
the container project settings (.prefs file).  If you are removing 
elements from the sequence, you should shift down the sequence numbers 
of any subsequent entries so that there are no gaps in the sequence.  
Look for the ".../build_position=<#>" entries in the file.


> Questions:
> 1) Is this the best way to create build containers quickly?  Is there another alternative that involves container 
templates?  We would like to avoid creating the build container from scratch, as it involves many projects, many make 
configurations, and tedious variant configurations.
>    

Editing the file "directly" is the only way, owing to the bug in the 
attempt to remove non-existent projects from the configuration.  It 
should be feasible to do this, as long as the sequence is maintained.


> 2) What caused the save error?  Is there a workaround for this error?
>    

No, there is no work-around.  It's just a programming error in the 
property page.


> The save error was observed on IDE 4.6.1 and IDE 4.7 (packaged with QNX 6.5.0 release).
>
> Rex
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post61608
>
>    


-- 
*Christian W. Damus*
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>;
Re: How can I create build container files quickly?  
Christian,

Thank you for creating a PR to save the modified container configuration.  I apologize for the misinformation.  It is 
not XML, as you pointed out.  The problem had to do with the incorrect 'build_position' entries after the old projects 
had been deleted.  I was hoping the IDE would be able to re-sort the projects so that it is not a manual process of 
updating the build position.  That did not happen and effectively "corrupted" the .prefs file since the IDE cannot use 
it in that state.  It is cumbersome to update by hand the build positions in five or more make configurations, each with
 about 20 projects.

Is it possible for the IDE to also remove gaps in the build position sequence (effectively correcting errors in the .
prefs file)?  This feature would save us some time.

Rex
Re: How can I create build container files quickly?  
Hi, Rex,

Replies in-line, below.

Cheers,

Christian


On 04/08/10 05:55 PM, Rex Lam wrote:
> Christian,
>
> Thank you for creating a PR to save the modified container configuration.  I apologize for the misinformation.

No apologies are needed.  XML would be easier to work with than a Java 
properties file.  :-)


> It is not XML, as you pointed out.  The problem had to do with the incorrect 'build_position' entries after the old 
projects had been deleted.  I was hoping the IDE would be able to re-sort the projects so that it is not a manual 
process of updating the build position.  That did not happen and effectively "corrupted" the .prefs file since the IDE 
cannot use it in that state.  It is cumbersome to update by hand the build positions in five or more make configurations
, each with about 20 projects.
>    

Indeed.  Scriptable, I suppose, by one better versed in Perl than I.


> Is it possible for the IDE to also remove gaps in the build position sequence (effectively correcting errors in the .
prefs file)?  This feature would save us some time.
>    

This would naturally be a part of the fix for the PR.  It shouldn't 
matter the actual indices; only the ordering.  The PR links to this 
conversation, so I won't lose any information.


> Rex
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post61651
>
>    


-- 
*Christian W. Damus*
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>;
Re: How can I create build container files quickly?  
I tried the experimental release of IDE 4.7.1 today.  It has the fix for this problem.  I want to thank you for fixing 
it so quickly.  I didn't expect such a quick turnaround so it was a pleasant surprise.  Thanks again.
Re: How can I create build container files quickly?  
Rex,

I have raised PR 78513 to track the bug in saving the modified container 
configuration.

Cheers,

Christian