Page 2 of 10
Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 11:59 am
by mihd
zoelechat wrote:... Every external source already have a direct existing key to access it, it's just needed to search a bit..
It's all clear. But what about USB disk, Virt.USB and DLNA-sources ?
Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 12:11 pm
by zoelechat
Run allshare/samsung link widget

Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 12:19 pm
by mihd
zoelechat wrote:Run allshare/samsung link widget

Not suitable. I need direct access to specific source. Otherwise it will not differ from "Source-Right-Right-..-Right-Ok"
Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 12:26 pm
by zoelechat
Sorry then

Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 4:12 pm
by smart_lover
I use your provided 'rcRemap_runWidget_EF' and it works great.
I use following libRCremap.config:
Code: Select all
[
{
"KEY_VOLUP": "KEY_VOLUP"
},
{
"KEY_PLAY": "CMD:/mnt/opt/privateer/usr/bin/rcRemap_runWidget_EF"
}
]
And whenever I press my KEY_PLAY, my widget runs successfully.
But I need more flexibility, I need to run my widget whenever my TV power on. How can I do?
Actully I fear to edit 99_95_RCremap.init file! Please as always help me to find my way.
Re: [App] libRunWidget D/E/F/H
Posted: Sun Jul 19, 2015 4:56 pm
by zoelechat
Just add injection command to any startup script start) case:
Code: Select all
samyGOso -d -A -B -l /mnt/opt/privateer/usr/libso/libRunWidget.so ID:widgetID
Or create a dedicated startup from another (change lib name and args, that's all

)
You can even simply rename rcRemap_runWidget_EF script to something
.init and put it in /mnt/etc/init.d
(don't forget chmod +x !!)
Re: [App] libRunWidget D/E/F/H
Posted: Mon Jul 20, 2015 11:03 am
by smart_lover
Or create a dedicated startup from another (change lib name and args, that's all

Very simple and effective way. What about numbers like '99_95' at beginning of .init files? Is it about execution order?
How can I make sure all init files are executed before running my widget? (I need to run my widget as late as possible in init file execution order)
You mean, Every .init file with any name will execute at run time?! Sounds great.
Re: [App] libRunWidget D/E/F/H
Posted: Mon Jul 20, 2015 12:05 pm
by zoelechat
Yes, scripts are executed alphabetically, and any /mnt/etc/*.init having execution rights will be executed on startup , so if you want script to be executed as last, call it for example 99_99_zzzRunWidget.init or even use letters which are sequentially after numbers.
Re: [App] libRunWidget D/E/F/H
Posted: Mon Jul 20, 2015 7:18 pm
by smart_lover
zoelechat wrote:Yes, scripts are executed alphabetically, and any /mnt/etc/*.init having execution rights will be executed on startup , so if you want script to be executed as last, call it for example 99_99_zzzRunWidget.init or even use letters which are sequentially after numbers.
It executed at the right place during startup. Thanks for your great help.
Re: [App] libRunWidget D/E/F/H
Posted: Mon Jul 20, 2015 9:12 pm
by smart_lover
zoelechat wrote:Yes, scripts are executed alphabetically, and any /mnt/etc/*.init having execution rights will be executed on startup , so if you want script to be executed as last, call it for example 99_99_zzzRunWidget.init or even use letters which are sequentially after numbers.
I've no experience with sh!
I need to do following steps in below .init file:
1:first if there is no
MyWidget folder in
/mtd_rwcommon/widgets/normal/MyWidget then copy entire content of folder(and of course create MyWidget folder) to
/mtd_rwcommon/widgets/normal/MyWidget from
/dtv/usb/sda1/MyWidget
2:Run MyWidget
Code: Select all
#!/bin/sh
. /dtv/SGO.env
SODIR=$SYSROOT/opt/privateer/usr/libso # D/E only, on F/H environment LIBSO_DIR is used
stop_bootloop()
{
for USB in /dtv/usb/sd* ; do
echo "checking $USB"
[ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1
done
}
case $1 in
start)
stop_bootloop
[ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
samyGOso -d -A -B -l $SODIR/libRunWidget.so ID:MyWidget
;;
stop)
;;
status)
[ -f /dtv/RunWidget.log ] && cat /dtv/RunWidget.log || echo "Not started"
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
Above script works like a charm at startup and run MyWidget as late as possible successfully, as you kindly help me to write it before. but I want to run
samyGOso -d -A -B -l $SODIR/libRunWidget.so ID:MyWidget ONLY if MyWidget folder is existed as I described above(If not, Create/Copy content and run widget).
thanks as always for your great help and tips in advance.