[Scummvm-devel] consoles, warnings, errors and so forth

Filippos Karapetis bluegr at gmail.com
Thu Jun 2 12:26:01 CEST 2011


On Thu, Jun 2, 2011 at 1:05 PM, Max Horn <max at quendi.de> wrote:

>
> Am 01.06.2011 um 16:23 schrieb Max Horn:
> [...]
>
> >>
> >>> That would be nice. And easily doable on Mac, probably on Windows, not
> so sure on Linux. Alas, this would be encapsulated in an OSystem API, and I
> think it would be good to have this, at least everywhere we can implement
> it.
> >>
> >>> For Unices in general, I see no alternative to providing the path to
> the log in the dialog / providing instructions to find it, sadly. But for
> Windows & Mac, an "open log" button would clearly superior. Let's do it ;).
> >>
> >> I was thinking we could just name the log files with ".txt" and then
> call
> >> xdg-open, which I hope is present on most Linux machines, or Notepad on
> >> Windows, or TextEdit on Mac, or whatever the equivalent is on other
> OSes.
> >
> > Sure, why not. So, we'd add a new OSystem API for that? Like
> >  virtual void OSystem::openLogFileInEditor() {}
> > or so...
> >
>
> So... do we do this? Any yeahs or nays?
>
> Note I specifically decided against an "openFileInEditor(FSNode )" because
> then we'd have to add a way to obtain an FSNode for the logfile. So, I
> figured, let's keep it simple. If we ever need this for other files, let's
> worry about that then :).
>
> Cheers,
> Max
>

Sounds like a good idea to me :)

For Windows, you don't need to call Notepad... you merely want to tell the
OS to open the TXT file you require, and the appropriate program that is
associated with the TXT extension in the user's system (Notepad, Notepad++,
EditPlus, UltraEdit or whatever) will open. This is done using the
ShellExecute or ShellExecuteEx functions:
http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/bb762154(v=vs.85).aspx

Regards
Filippos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20110602/1523aebf/attachment.html>


More information about the Scummvm-devel mailing list