Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Performing a command line build of IDE projects: (12 Items)
   
Performing a command line build of IDE projects  
I am interested in how to build the projects in an IDE workspace from the command line.

For a simple standalone project, one can simply enter 'make'.

However for a large build, with multiple dependencies, 'make' doesn't work. The make files do not have the include paths
 properly defined. The include path variables used by the make files are defined in the IDE, not the make files.
The dependency order of building projects is also in the IDE, not the make files when using QNX Projects

I found the following statement for Eclipse, and it works for Eclipse Ganymede (after installing JDT)

eclipse -data . -application org.eclipse.jdt.apt.core.aptBuild -vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.
core.systemConsole

When I try this with the Momentics IDE 4.5.1 buildID 20081204

%QNX_HOST%\usr\qde\eclipse\qde -data . -application org.eclipse.jdt.apt.core.aptBuild -vmargs -Dorg.eclipse.c
dt.core.console=org.eclipse.cdt.core.systemConsole

I get a log entry

Application "org.eclipse.jdt.apt.core.aptBuild" could not be found in the registry

Also in the log it states that there is an application called

com.qnx.tools.ide.builder.core.CommandLineBuilder

Is this the substitute for aptBuild?

When I try using CommandLineBuilder instead of aptBuild I get a JVM error 1.

How can I get Momentics to perform a command line build of IDE QNX projects?
Attachment: Text 1235853158718.log 12.08 KB
Re: Performing a command line build of IDE projects  
To use appBuilder you need to install JDT on top of Momentics IDE. You 
can do it through update site.

There is another way to invoke project build using eclipse, using ant  
builder, but I have to try it out first before posting here.

To build qnx project from command line, using extra makefiles, there is 
faq available here: 
http://community.qnx.com/sf/wiki/do/viewPage/projects.ide/wiki/IDEBuildFAQ


Keith Smith wrote:
> I am interested in how to build the projects in an IDE workspace from the command line.
>
> For a simple standalone project, one can simply enter 'make'.
>
> However for a large build, with multiple dependencies, 'make' doesn't work. The make files do not have the include 
paths properly defined. The include path variables used by the make files are defined in the IDE, not the make files.
> The dependency order of building projects is also in the IDE, not the make files when using QNX Projects
>
> I found the following statement for Eclipse, and it works for Eclipse Ganymede (after installing JDT)
>
> eclipse -data . -application org.eclipse.jdt.apt.core.aptBuild -vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.
core.systemConsole
>
> When I try this with the Momentics IDE 4.5.1 buildID 20081204
>
> %QNX_HOST%\usr\qde\eclipse\qde -data . -application org.eclipse.jdt.apt.core.aptBuild -vmargs -Dorg.eclipse.c
> dt.core.console=org.eclipse.cdt.core.systemConsole
>
> I get a log entry
>
> Application "org.eclipse.jdt.apt.core.aptBuild" could not be found in the registry
>
> Also in the log it states that there is an application called
>
> com.qnx.tools.ide.builder.core.CommandLineBuilder
>
> Is this the substitute for aptBuild?
>
> When I try using CommandLineBuilder instead of aptBuild I get a JVM error 1.
>
> How can I get Momentics to perform a command line build of IDE QNX projects?
>
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23165
>   
Re: Performing a command line build of IDE projects  
Thanks for the info on JDT. I was able to add JDT to Momentics and I no longer get an error from starting Momentics 
using the command line.

What I can't seem to find out, now that Momentics is running headless, is when is the build done?

What signal does one look for to know when the build is finished?
Re: Performing a command line build of IDE projects  
I assume eclipse (qde) process would go down. I don't think any other signals you can get from it.

Keith Smith wrote:
> Thanks for the info on JDT. I was able to add JDT to Momentics and I no longer get an error from starting Momentics 
using the command line.
> 
> What I can't seem to find out, now that Momentics is running headless, is when is the build done?
> 
> What signal does one look for to know when the build is finished?
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23292
> 
Re: Performing a command line build of IDE projects  
Yes the qde process goes down when it is done,
but when the command line is run, the command comes back immediately. It is not blocked. qde is run as an independent 
process.

So from the DOS command line, how does one know when the independent qde process goes down?
Re: Performing a command line build of IDE projects  
In Unix you can use waid $pid to wait for process to terminate. Don't know about dos/windows.
I assume you can write something in cmd shell which would loop until given process is gone from task list.
Process commands on windows:
http://www.robvanderwoude.com/processes.php


Why did building qnx projects from command line failed?



Keith Smith wrote:
> Yes the qde process goes down when it is done,
> but when the command line is run, the command comes back immediately. It is not blocked. qde is run as an independent 
process.
> 
> So from the DOS command line, how does one know when the independent qde process goes down?
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23382
> 
Re: Performing a command line build of IDE projects  
You asked me the question

'Why did building qnx projects from command line failed?"

In my original post the qnx projects didn't build because I hadn't installed JDT.

I'm not sure what other failure you are referring to.

Now that I can launch qde from the commmand line, I'm trying to find out how to determine when qde stops as it doesn't 
block at the command line.

This is required for an automatic build process.
Re: Performing a command line build of IDE projects  
I wouldn't like to move you away from the chosen path, but if you in a 
big rush now and don't have a time to experiment with Eclipse building, 
you can do it easier. Just create xxxxx.mk file with the following content:

export PROJECT_ROOT_proj1=<full path>
...
export PROJECT_ROOT_projN=<full path>

where proj1...projN are the names of projects in your workspace.
and launch your build as:

make MAKEFILES=<xxxxxx.mk> -f <project_to_build> <parameter...>

Should work, at least for the nightly build. Of course, there is a lot 
of other variations.
I'm not insist that this is a solution forever, just another option for now.

On 03/03/2009 5:16 PM, Keith Smith wrote:
> You asked me the question
>
> 'Why did building qnx projects from command line failed?"
>
> In my original post the qnx projects didn't build because I hadn't installed JDT.
>
> I'm not sure what other failure you are referring to.
>
> Now that I can launch qde from the commmand line, I'm trying to find out how to determine when qde stops as it doesn't
 block at the command line.
>
> This is required for an automatic build process.
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23407
>
>    
Re: Performing a command line build of IDE projects  
Already did that.

We are trying to get around the dual copy maintenance issue that using export causes.
Re: Performing a command line build of IDE projects  
Well I already answered how you can try to determine that background process does not run on windows anymore. It is not 
qnx specific.

Keith Smith wrote:
> You asked me the question
> 
> 'Why did building qnx projects from command line failed?"
> 
> In my original post the qnx projects didn't build because I hadn't installed JDT.
> 
> I'm not sure what other failure you are referring to.
> 
> Now that I can launch qde from the commmand line, I'm trying to find out how to determine when qde stops as it doesn't
 block at the command line.
> 
> This is required for an automatic build process.
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23407
> 
Re: Performing a command line build of IDE projects  
I'm sorry, maybe it's too late to give an advice, however I try. Which 
include paths did you mention in your first message? Have you been 
talking about QNX project and macros PROJECT_xxxxx?

Regards,

Alex


On 02/03/2009 8:39 PM, Keith Smith wrote:
> Thanks for the info on JDT. I was able to add JDT to Momentics and I no longer get an error from starting Momentics 
using the command line.
>
> What I can't seem to find out, now that Momentics is running headless, is when is the build done?
>
> What signal does one look for to know when the build is finished?
>
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post23292
>
>    
Re: Performing a command line build of IDE projects  
Yes I am talking about QNX projects and macros PROJECT_xxx

We have already hand built a batch file that 'emulates' the IDE build environment requiring its own dependency lists, 
etc.

What we want to do is to remove our hand built make system and not have to update the dependency lists when new 
dependencies are introduced to the IDE projects.