Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Commandline builds (linux)
Commandline builds (linux) [message #22453] |
Fri, 17 July 2009 00:35 |
|
Hi,
Today I wanted to build a package on a remote linux machine, using TheIde from a command line. From what I found in manual and in this thread, TheIde should compile the specified package without invoking GUI.
But it's not completly accurate. TheIde doesn't show up at all, as expected, but windows about updating codebase and Assist++ still appear on start.
I was trying this over ssh and it works only if X forwarding is permitted. If it's not then following error appears:No protocol specified
No X11 display, errno = 0, Succes
X11 error !
I also tried in console on my local machine and got an "couldn't open display" error.
Appart from this, everything works perfectly. It's just a bit annoying, because I was on a very slow connection and the forwarding of those two dialog boxes took longer than the rest of compilation...
|
|
|
|
Re: Commandline builds (linux) [message #22455 is a reply to message #22454] |
Fri, 17 July 2009 08:51 |
|
Novo wrote on Fri, 17 July 2009 03:43 | Try "ssh -XC user@host".
|
Thanks for hint. Didn't even know about this option. Anyway, even with -XC it takes more than 3 and a half minute to index the help. Assist++ initialization is quite fast, about 4s.
But anyway, I presume there is no need to initialize help and Assist++ if one is not going to use the GUI at all. I'll try to look into source codes of TheIde and propose a patch soon. I believe there should be a way to build packages even on machines where X forwarding is prohibited. If I'm not mistaken that is what the commandline parameters were designed for.
|
|
|
|
Re: Commandline builds (linux) [message #22479 is a reply to message #22468] |
Sat, 18 July 2009 03:48 |
|
You probably misunderstood me, or maybe I didn't stated the problem clear enough. I don't have problems with my application's performance, so I don't really need to profile it in valgrind.
What I was trying to tell was, that it's bit annoying that TheIde invokes two GUI windows even in command line mode. Theoreticaly, it should be posible to run it even on systems without running X11 (as long as the libraries are installed, if I understand it correctly).
|
|
|
|
Re: Commandline builds (linux) [PATCH] [message #22481 is a reply to message #22480] |
Sat, 18 July 2009 06:07 |
|
Novo wrote on Sat, 18 July 2009 05:01 | Sorry, I thought you wanted to profile TheIDE ...
|
No, it's very good as it is
Anyway, I studied the code handling commandline builds and I propose following patch:
First Ide::SetMain() in ide.cpp (and ide.h of course) would get one more optional parameter, specifying if it's called in command line mode. Assist++ and help indexing is not neccesary in this case (and probably even more functions called from there, I didn't have time to check what they all do ), so we can simply skip it:
void Ide::SetMain(const String& package,bool build=false)
{
FlushFile();
SaveWorkspace();
transferfilecache.Clear();
main = package;
export_dir = GetHomeDirFile(main);
mainconfigname.Clear();
mainconfigparam.Clear();
ScanWorkspace();
SyncWorkspace();
LoadFromFile(THISBACK(SerializeWorkspace), WorkspaceFile());
editorsplit.Zoom(0);
UpdateFormat();
String e = editfile;
editfile.Clear();
MakeTitle();
MakeIcon();
SyncMainConfigList();
AdjustMainConfig();
SyncBuildMode();
SetHdependDirs();
SetBar();
HideBottom();
if(IsNull(e))
e = GetFirstFile();
if(!build){
SyncRefs();
StartCodeBase();
}
EditFile(e);
}
Then, in idewin.cpp on line 828 (according to version 1422) it will be called like this:
ide.SetMain(arg[1],build); Variable build is already defined there.
That is the most straightforward solution I could find. Could someone from the developpers (probably Mirek I guess;-)) look at this code and check it, please? I've tested it without any problems, but I don't really know the internals of TheIde. Also as I have mentioned before, some other functions in SetMain might go into that if statement, while they are useless without GUI. Those two I picked just to eliminate ProgressIndicators from being shown.
Honza
|
|
|
Re: Commandline builds (linux) [PATCH] [message #22584 is a reply to message #22481] |
Tue, 28 July 2009 14:14 |
|
Very nice linux scripts.
Thank you! I was build svn sources for ubuntu 9.04, architecture i386.
But I think that will be glad show errors more detailed in special when check if executable files exists:
$vasiable = "'which ¶meter'"
With respect, Ion Lupascu
P.S. I can upload svn builds for ubuntu 9.04 i386.
I waiting for accept!
|
|
|
Goto Forum:
Current Time: Fri Apr 19 13:29:38 CEST 2024
Total time taken to generate the page: 0.03295 seconds
|