New feature suggestion

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Gimlao
Posts: 19
Joined: Wed Dec 27, 2006 9:08 am
Contact:

New feature suggestion

Post by Gimlao »

Have you ever though to add an Update button that could show the last versions of ScummVM ?

It could show a box with something like that in it :

Code: Select all

[ ] 0.11.1 ( You're using it ! )
[x] Daily Snapshot ( June 18, 2008, 7:30 am )

          [Download selected]
That's just an idea, ok ? ^^;
skotafactor
Posts: 32
Joined: Tue Jun 17, 2008 11:04 pm

Post by skotafactor »

I see how this could make things easier, but things like that tend to annoy me (especially when iTunes asks me if I want to update it everytime I open it.) It might be a nice addition to the program, who knows?
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

Well he just suggested a button to check rather than a nagger.
User avatar
sanguinehearts
Posts: 378
Joined: Mon Oct 31, 2005 12:42 am
Location: Hampshire, United Kingdom

Post by sanguinehearts »

what about non windows/unix systems?
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

It's not hard to make the button do a check of an XML file on a site and just check if the local version id is current with a separate set of values for builds for each platform. Just requires someone to update it each time it occurs. Though really is it really necessary? Most SCUMM VM users check the site pretty regularly I think for updated support lists on games at least.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

Ceri Cat wrote:It's not hard to make the button do a check of an XML file on a site and just check if the local version id is current with a separate set of values for builds for each platform. Just requires someone to update it each time it occurs. Though really is it really necessary? Most SCUMM VM users check the site pretty regularly I think for updated support lists on games at least.
It is hard. First, it has to be cross platform as mentioned. Second, XMLs are not free, and you should write a parser.


Eugene
Arantor
Posts: 89
Joined: Mon Apr 02, 2007 11:10 pm

Post by Arantor »

sev wrote:It is hard. First, it has to be cross platform as mentioned. Second, XMLs are not free, and you should write a parser.
Although I agree the cross-platform part is the hardest, the other two issues don't seem to me to be as big.

Sure, you need to have a parser, but there are parsing libraries out there that are suitable (e.g. expat), and you can write and maintain XML files without expensive software - one of the web projects I'm working on has an XML format I designed, complete with DTD to help validate it using PHP, and both an XML file and the DTD file were constructed in Notepad in my lunchbreak at work one day.

The question then would be the "worthwhile-ness" of it in the suggested format - although it is a very nice idea, it isn't necessarily so practical to implement.

Even if it is implemented, it's going to be a large chunk of code that many people will either disable or simply not use, and for folks who build their own, using the above mentioned library simply adds a dependency (it's not always easy as it is to find all the dependencies when building from source, let alone *another* dependency)
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Err, and we also would have to add networking code to ScummVM. Besides the problem of making that portable (which is a far bigger issue than writing a trivial parser for a file containing a version string -- which BTW requires no XML at all), I simply don't think it's worth the effort. I rather spend all those hours on fixing bugs and implementing more important features :)
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

Let's just add a nag pop-up, saying "Go download ScummVM" if the executable is older than 6 months. j/k


Eugene
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

*digs out the 30 lines of C++ that executes an API call and parses an XML file from a website*

Sorry to poke fun like that but it isn't a large piece of coding (though agreed cross platform it isn't usually), it isn't a lot but like I said already it really isn't a necessary feature for the GUI IMO, I don't even really think it's on the 'nice to have' list.

And fin I only said XML because it tends to be the way everyone is doing it at present, though in all fairness it's not really much different from a txt file with
Win-stable=xx.yy.zz
Mac-stable=xx.yy.zz
...

Either way you're just defining variables to test. XML just applies a supposedly uniform structure. *tries not to laugh*
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

For windows users it should be pretty trivial to create a loader which checks sf.net or whatever for the current version and runs ScummVM and notifies people if it found a newer ScummVM version. People would just need to run the loader instead of ScummVM.

The downside is that it's not portable.
The upside is that you don't even need to clutter ScummVM's code so anyone with a bit of programming knowledge could do it and the devs could put the effort into ScummVM. Also since it's an extra program nobody is forced to use it.

But then again I'm not really a programmer, so excuse this rant :)
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

Ceri Cat wrote:*digs out the 30 lines of C++ that executes an API call and parses an XML file from a website*
Huh?

TinyXML 2.5.3 library: 4,642 physical lines of C++ code (comments and emtpy lines are not counted).

But that's not a full DOM.

libxml2 2.6.32 (a proper one): 166,879 physical lines of C code.

Remember, those tons of code are buried in those 30 lines of API calls. And .NET exists only under Windows (Mono doesn't count, it's not built-in).


Eugene
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

sev the only API calls relate to getting the file. The rest of the 30 lines is to parse and analyze the version file. There are no external calls involved except to the configuration file, and I should know I coded it for the updater routine we used originally at CS for our games. It reads the current version id from the config, whether or not the beta branch was enabled to be checked (test versions only, in deployment it was normally removed), and which server was to be used.

I do not work with .net as a matter of principle, I like tight code and I find the .net frameworks to be inefficient resource wise. I suppose this is a legacy of starting coding before CDs and Windows became the norm on personal computers.

I don't make use of tinyXML in those lines for the simple fact the parser even with error detection didn't need all the additional aspects related to XML that TinyXML covers that aren't necessary in a version identifying routine.

Anyway I'm not going to argue with you sev. We seem to come from different backgrounds as far as coding goes, while I tend to wind up coding my own from the beginning you look at premade alternatives first. Both ways have their pros and cons.

And if I was going to go for available network code I'd probably look at the SDL net libs in the interest of cross platform compatibility not .net
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

The problem here is not the XML parser itself I believe, since the file in the other end can simply be a text file, or an ini file (like ScummVM's ini file). The main problem is making the whole networking part cross platform
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Relax :)

I fully agree (and that was one of the two main points of my previous post) that parsing a file for a "scummvm current version" string is trivial. In fact, using XML for that certainly is possible, but we don't even need that (as you also discovered): There are many formats which can be parsed with less extra code needed. That is: XML is fine, but we don't want to include an XML lib just to parse a simple file. But, this is not a blocking problem for this feature (as we could use an .ini like format, for which we already have parsing code, or simply an easy custom format).

However: The true portability stumbling block is implementing the required network access code. We could of course choose to only implement this feature on a few platforms (any *nix system with sockets, Windows, essentially), and disable the feature on the rest (unless the resp. porters can add networking support themselves). We are talking here about.

So, this certainly would be possible, via a new OSystem::fetchContentOfHTTPUrl(String url) method, which returns a "not found" error by default.

All in all, I wouldn't mind too much if somebody submited a patch for this (implementing something like the above API for Windows & Unix, and a neat UI for it). If somebody is interested, go and submit a patch; alternatively, go and submit a well-written feature request ;).

However, don't hold your breath, and please understand that at least for me, this is a feature with a very low priority compared to many other more useful (in my personal view, at least) features and tasks on our TODO list :)
Post Reply