1. Interesting Issue with GUI shells
- Posted by Travis Beaty <listaddy at technomajian.net> Apr 24, 2005
- 498 views
Hello everyone. I'm working on a Euphoria "script" in Linux which manages the building of a C++ shared library. As each source code file is built into an object file, and then when the object files are linked into the shared library, I print "progress" lines, like this: Building foo.o (brief description of foo here) ... done! Of course, the word "done" isn't there until it is actually done. I am calling g++ via Euphoria's system_exec() command, and for the graphics mode option, I'm using 2. I have messages sent from g++ (both messages to stdout and stderr) redirected to a log file, compile.err. Here's where the weird stuff comes in. If I login in to a non-GUI terminal and execute the application, everything works as expected. However, if I run the application in either Konsole or XTerm, the call to system_exec() apparently is causing Euphoria to switch back and forth between the ncurses screen (?) and the normal command line prompt. I performed a stress test by making the call to link the object file 10 times, and I ended up with a horrible flicker effect as the display kept switching back and forth between the two modes. This made my progress reports unreadable, and honestly, caused it to look like the application was blowing up. The flickering doesn't occur when I use 0 with the graphics mode parameter of system_exec(). But then, it shows just the command line during the entire build process, and only shows my progress information after the build is finished. Eventually, the shared library will be quite large, and will therefore take quite a while to build. I need to have the progress information there to show the user that the app isn't hung up, but at the same time, the flickering would be very bad if not completely intolerable. If anyone has run up against this before and has a fix, I would appreciate the assistance. Thanks, Travis Beaty.
2. Re: Interesting Issue with GUI shells
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Apr 24, 2005
- 478 views
Travis Beaty wrote: > > Here's where the weird stuff comes in. If I login in to a non-GUI terminal > and execute the application, everything works as expected. However, if I run > the application in either Konsole or XTerm, the call to system_exec() > apparently is causing Euphoria to switch back and forth between the ncurses > screen (?) and the normal command line prompt. I performed a stress test by > making the call to link the object file 10 times, and I ended up with a > horrible flicker effect as the display kept switching back and forth between > the two modes. This made my progress reports unreadable, and honestly, > caused it to look like the application was blowing up. > > The flickering doesn't occur when I use 0 with the graphics mode parameter of > system_exec(). But then, it shows just the command line during the entire > build process, and only shows my progress information after the build is > finished. > > If anyone has run up against this before and has a fix, I would appreciate the > > assistance. Basically, you need to wrap the linux printf calls. Here's a link to a UBoard thread where this was discussed, plus some example code: http://uboard.proboards32.com/index.cgi?board=linuxgeneral&action=display&num=1113145524 I've been saying to myself that I should wrap the basic I/O stuff for a linux console, but haven't gotten around to it yet...Maybe a good opportunity for someone to get some MicroBucks? ;) Matt Lewis
3. Re: Interesting Issue with GUI shells
- Posted by Chris Burch <chriscrylex at aol.com> Apr 24, 2005
- 481 views
Hi Just use 'make' instead. Chris http://members.aol.com/chriscrylex/euphoria.htm http://uboard.proboards32.com/
4. Re: Interesting Issue with GUI shells
- Posted by Travis Beaty <listaddy at technomajian.net> Apr 24, 2005
- 487 views
Hello! On Sunday 24 April 2005 11:04 am, Matt Lewis wrote: > Basically, you need to wrap the linux printf calls. Here's a link to > a UBoard thread where this was discussed, plus some example code: > > http://uboard.proboards32.com/index.cgi?board=linuxgeneral&action=display&n >um=1113145524 > > I've been saying to myself that I should wrap the basic I/O stuff for > a linux console, but haven't gotten around to it yet...Maybe a good > opportunity for someone to get some MicroBucks? ;) > > Matt Lewis That would probably work, although I guess I don't understand Euphoria's use of ncurses in the first place. I get the native printf() and puts() functions wrapped and put into the archives, or on my website, by the end of the week. Thanks, Travis.
5. Re: Interesting Issue with GUI shells
- Posted by Travis Beaty <listaddy at technomajian.net> Apr 24, 2005
- 479 views
Hi, On Sunday 24 April 2005 12:55 pm, Chris Burch wrote: > Hi > > Just use 'make' instead. > > Chris If I wanted to use make, I wouldn't have worried about writing the Euphoria code at all. Which would then negate the whole need for the project in the first place. The script I am working on is designed not only to build the shared library from the sources, but also generate documentation for the project, both for the C++ code and the Euphoria code. Once that is built, then the script will install the K4e library files in the location the user chooses. For that, I need it to be much more configurable than make can provide for, not to mention have a lot of user interaction, hence the need to display the progress of the installation. Besides, if Euphoria can't handle a rather menial scripting job, then how do I convince potential users that it can handle an extremely large volume of GUI code? Thus, it is rather imperative that the installation application be written in Euphoria. I don't have any code to release yet, and probably won't for a bit since I'm still really working on the project infrastructure. But if you are interested: http://www.technomajian.net/euphoria/k4e/docs will give you a vague idea of what I have up my sleeve. This is a project that I need, if nothing else, just for my personal use, although I hope others will take an interest in it. Thanks, Travis.
6. Re: Interesting Issue with GUI shells
- Posted by Chris Burch <chriscrylex at aol.com> Apr 25, 2005
- 474 views
Travis Beaty wrote: > > Hi, > > On Sunday 24 April 2005 12:55 pm, Chris Burch wrote: > > Hi > > > > Just use 'make' instead. > > > > Chris > > If I wanted to use make, I wouldn't have worried about writing the Euphoria > code at all. Which would then negate the whole need for the project in the > first place. > > The script I am working on is designed not only to build the shared library > from the sources, but also generate documentation for the project, both for > the C++ code and the Euphoria code. Once that is built, then the script will > install the K4e library files in the location the user chooses. For that, I > need it to be much more configurable than make can provide for, not to > mention have a lot of user interaction, hence the need to display the > progress of the installation. > > Besides, if Euphoria can't handle a rather menial scripting job, then how do I > > convince potential users that it can handle an extremely large volume of GUI > code? > > Thus, it is rather imperative that the installation application be written in > Euphoria. > > I don't have any code to release yet, and probably won't for a bit since I'm > still really working on the project infrastructure. But if you are > interested: <a > href="http://www.technomajian.net/euphoria/k4e/docs">http://www.technomajian.net/euphoria/k4e/docs</a> > will give you a > vague idea of what I have up my sleeve. This is a project that I need, if > nothing else, just for my personal use, although I hope others will take an > interest in it. > > Thanks, > Travis. > > Hi Fair enough. Reading your message again, unfortunately this looks like normal behaviour with ncurses, entering and leaving 'cooked' screen mode. I have similar problems with this, in both C and eu, but have paid little attention to it because the degree of problem wasn't large enough to worry about (wrapping stdio wasn't an option for me, as I need the colours) (I did think about wrapping ncurses, and may still do so, but I don't need all that it provides at the moment) Good luck with the project - looks v impressive. Chris http://members.aol.com/chriscrylex/euphoria.htm http://uboard.proboards32.com/