-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 23.02.2012 23:18, schrieb skeezix:
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?
Which is problematic with eg the new kernel. After a suspend to ram all apps are rescanned. Now imagine one old "test prog" that a user almost forgot about leading to those messages after every scan. IMO it is more sane to only issue the warning when a user tries to launch the application. The best way for this is probably storing the information in a file which is parsed/used by pnd_run.sh meaning the generated .desktop files. Just store the version in there and eg grep for the correct entries in the commented out area.
Eg we could add this at the end of each .desktop file:
# automatically extracted OS version requirement information: # REQUIRED_OS_MAJOR=1 # REQUIRED_OS_MINOR=7 # REQUIRED_OS_RELEASE=0 # REQUIRED_OS_BUILD=0
In pnd_run.sh we could simply grep using these terms:
grep "REQUIRED_OS_MAJOR" application.desktop | cut -d "=" -f2 grep "REQUIRED_OS_MINOR" application.desktop | cut -d "=" -f2 grep "REQUIRED_OS_RELEASE" application.desktop | cut -d "=" -f2 grep "REQUIRED_OS_BUILD" application.desktop | cut -d "=" -f2
In case there is some error for one of the fields of osversion either set it to '0' or don't extract the os version requirement stuff into the .desktop file at all.
Cheers, Nils Kneuper aka Ivanovic