On Thu, 23 Feb 2012, Sébastien Huss wrote:
# # 2012/2/23 Nils Kneuper crazy-ivanovic@gmx.net # strings youtube-dl.pnd | grep osversion | sed -e 's/.*major="(.*)" # minor="(.*)" release="(.*)" build="(.*)".*/\1.\2.\3.\4/' # # This wont work depending on the syntax used by the dev : # <osversion # major=1 # minor=0 # release=7 /> # is valid as far as XML is concern, but wont be parsed by this command. You need to actually change libPND so it will provide that information to pnd_run.sh. # # And then, what should pnd_run.sh do with that ?
Also, "strings" is pretty ineficient (considering a pnd could be 500MB in size, say :) -- though perhaps a binary 'tail' piping to 'strings' would do it pretty quickly
An idea I had awhile back was to just not emit the application during discovery if the OS version is no good, or perhaps not spit out an executable; but thats taking it too far. (I had thought perhaps of a popup warning box somehow, or a panel in minimenu, to list off such warnings.)
But heres an idea instead -- the returned application or emitted .desktop could contain an invocation of a wrapper script (say), that would pop up zenity or whatever warning and then in turn possibly run pnd_run.sh proper; ie: pushing the effort to up front during discovery (which is already done and has parsed PXML) rather than burdening every app launch?
jeff
-- If everyone would put barbecue sauce on their food, there would be no war.