[Scummvm-devel] OSystem::displayLogFile()

Willem Jan Palenstijn wjp at usecode.org
Sat Jun 4 16:45:26 CEST 2011


On Sat, Jun 04, 2011 at 01:33:55PM +0000, Willem Jan Palenstijn wrote:
> On Sat, Jun 04, 2011 at 11:14:55AM +0200, Max Horn wrote:
> > 
> > Am 04.06.2011 um 03:33 schrieb Johannes Schickel:
> > 
> > >> 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
> > >> 
> > > 
> > > xterm is not installed on the distribution (Arch) on my desktop per default. 
> > > At least I can't remember deleting it, so I guess it wasn't installed when 
> > > installing Xorg for example.
> > 
> > Well, do you have xdg-open? Then that is used anyway.
> > 
> > You have neither of the two? WEll, then you are not worse off than now :) And
> > we could still install a third fallback.
> > 
> > *If* any Linux devs, or Windows devs, show any interest in implementing this
> > feature, anyway :)
> 
> I committed a second attempt at this just now.
> 
> The first attempt used system but that handled a missing xdg-open less than
> gracefully, outputting errors about a missing xdg-open in the terminal.
> Handling this properly and also avoiding any quoting issues would take more
> work than simply calling fork and execlp manually, so that's what I did.
> 
> 
> Fuzzie also reminded me on IRC that we may want to rename the log file to have
> a .txt extension to make file type detection safer. It currently works fine for
> me on XFCE in Gentoo and Gnome in Fedora (12) with the .log extension, though.
> 
> 
> Testing on as many unix-like platforms as possible would be appreciated.


There's also a number of FIXMEs and TODOs in the code, if anybody feels like
tackling them... (Two more since the original commit after a comment from Max.)


-Willem Jan




More information about the Scummvm-devel mailing list