[Scummvm-devel] OSystem::displayLogFile()

Alex Bevilacqua alexbevi at gmail.com
Fri Jun 3 18:15:51 CEST 2011


On Fri, Jun 3, 2011 at 11:57 AM, Max Horn <max at quendi.de> wrote:

>
> Am 03.06.2011 um 17:22 schrieb Alex Bevilacqua:
>
> > Couldn't you do something along the lines of:
> >
> > xterm -e less $PATH_TO_SCUMMVM_LOG
> >
> > I'm assuming both commands are available (by default) on all *NIX
> distros. I was going to recommend a GUI message + xclip, but xclip isn't
> installed by default :P
>
> Sure, that could be one of the fallbacks. But I know that *I* certainly
> would prefer if xdg-open was tried first... but then, I am not primarily a
> Linux user anyway ;).
>
> Anyway, I imagine something like this could work:
>
> bool OSystem_POSIX::hasFeature(Feature f) {
>  if (f == kFeatureDisplayLogFile)
>    return true;
>  return OSystem_SDL::hasFeature(f);
> }
>
> bool OSystem_POSIX::displayLogFile() {
>  if (_logFilePath.empty())
>    return false;
>  int res = system("xdg-open '%s' || xterm -e less '%s'",
> _logFilePath.c_str(), _logFilePath.c_str());
>  return res != 0;
> }
>
>
> Anyway, we can just implement one solution now, and fine tune it later.
> Let's build the bikeshed before we argue how to paint it ;).
>
>
... I want to paint my bikeshed blue :D

xterm -e 'echo -ne "\033]10;#0000ff\007" && echo -ne "\033]11;#000000\007"
&& less $LOGFILE

(sorry, couldn't resist :P)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20110603/ebd1176d/attachment.html>


More information about the Scummvm-devel mailing list