Non-gui build support

Discussion about CodeLite development process and patches
User avatar
jimg
CodeLite Curious
Posts: 4
Joined: Sun Jan 29, 2012 11:42 am
Genuine User: Yes
IDE Question: C++
Location: Grass Valley, California
Contact:

Non-gui build support

Post by jimg »

Hi,

I was wondering on the best approach to modifying CodeLite to be able to load a workspace and project, build a target and then exit with a return code giving success or failure. These would be very simple single target projects without dependencies. Looking through the code, it seems like the GUI is very integrated with the project and build system. Would it be better to:

1) build a separate application without a window that used the workspace and builder parts of the system, but still linked with the wxWidgets code
2) modify the existing app in some way to not open the main window, but still do a build
3) just write a separate workspace and project parser without the wxWidgets references

Thanks!

- jim
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-gui build support

Post by eranif »

jimg wrote: it seems like the GUI is very integrated with the project and build system. Would it be better to:
Indeed. This can not be done with current code base.

In addition, even if I would add some command line arguments that accepts something like:

Code: Select all

codelite --build /path/to/workspace --configuration 
It will still not be able to run in SSH Window (codelite can not be started with the presence of X server, this limitation comes from the GUI framework: wxWidgets)

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Non-gui build support

Post by eranif »

jimg wrote: it seems like the GUI is very integrated with the project and build system. Would it be better to:
Indeed. This can not be done with current code base.

In addition, even if I would add some command line arguments that accepts something like:

Code: Select all

codelite --build /path/to/workspace --configuration 
It will still not be able to run in SSH Window (codelite can not be started with the presence of X server, this limitation comes from the GUI framework: wxWidgets)

Eran
Make sure you have read the HOW TO POST thread
User avatar
jimg
CodeLite Curious
Posts: 4
Joined: Sun Jan 29, 2012 11:42 am
Genuine User: Yes
IDE Question: C++
Location: Grass Valley, California
Contact:

Re: Non-gui build support

Post by jimg »

So, no recommendation on how best to proceed? ;)

I guess what I will do is refactor the existing workspace, project and build classes to not use the wxWidgets code and build a separate app. I just thought I should check to see if anything had already been done in this area before spending much time on it.

At any rate, thanks for a great development environment! I have some other features that I would like to see added and would like to work on, but I need to get this going first.

- jim
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Non-gui build support

Post by jfouche »

I would like to say that I think it would be a great feature.
I use Continuous Integration on my project, and, if I use CodeLite for my development, I can't use it for production. So I have to maintain 2 environments : the CodeLite workspace / projects, and the VisualStudio solution / projects which can be call on command line to build (well, I know, I can use a makefile and let CodeLite use it ... but it's a long story).
Jérémie
User avatar
jimg
CodeLite Curious
Posts: 4
Joined: Sun Jan 29, 2012 11:42 am
Genuine User: Yes
IDE Question: C++
Location: Grass Valley, California
Contact:

Re: Non-gui build support

Post by jimg »

Hi Jérémie,

I assume that you would want to be able to build the workspace or multiple projects, each project-only or not. Would you want to be able to execute the code as well? I was planning on saving output to a log file, with an option to abort on the first error and return a non-zero error code if there are any errors in the build. Since you are using something similar in the VS world, would you want to take a shot at the command syntax?

Status update: I've got workspace loading and generating the '.mk' files. Just need to add in the building itself.

- jim
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Non-gui build support

Post by jfouche »

Hi Jim,
I assume that you would want to be able to build the workspace or multiple projects, each project-only or not.
You're right. What I really need is to build a workspace configuration.
Would you want to be able to execute the code as well?
I don't need to ask CodeLite to execute something, as I can't do it myself (just have to call the executable generated).
I was planning on saving output to a log file, with an option to abort on the first error and return a non-zero error code if there are any errors in the build.
Well I would rather have a output on the console (like when using makefile), because the CI tools manage and analyse the console output.
Since you are using something similar in the VS world, would you want to take a shot at the command syntax?
I use Visual Studio devenv, which have those options.
I use it this way :

Code: Select all

devenv solution.sln /Build ConfigurationName
devenv solution.sln /Clean ConfigurationName
Jérémie
User avatar
jimg
CodeLite Curious
Posts: 4
Joined: Sun Jan 29, 2012 11:42 am
Genuine User: Yes
IDE Question: C++
Location: Grass Valley, California
Contact:

Re: Non-gui build support

Post by jimg »

Hi Jérémie,

Okay, that'll work. For my use, I just need to know if it built or not, so I'll have an option to not echo the make output. All seems to be working, just need to clean it up a bit and pick a name for it. CodeLiteBuilder? CLBuild? Any thoughts Eran?

- jim
Post Reply