Linux / Qt4.6.3
I want to run a shell script which I've placed in a .qrc resource.
Code:
Do I have to explicitly get the script out of the qrc, create a file and then execute it - or is there a really easy way to do this?
Thanks for any thoughts.
Printable View
Linux / Qt4.6.3
I want to run a shell script which I've placed in a .qrc resource.
Code:
Do I have to explicitly get the script out of the qrc, create a file and then execute it - or is there a really easy way to do this?
Thanks for any thoughts.
I don't think, that this is possible, because resources are compilied into the binary.
I suppose you could start bash in interactive mode and dump the script on its standard input, but this would be ugly, error-prone, and you would have to use the native API since QProcess only allows you to redirect the standard input to a file, not an arbitrary QIODevice.
Thanks for the thoughts people.
I suspect I'm better off just running an external script as normal. In the back of my mind I seem to remember doing something similar with Qt a few years ago; but then, I'm getting old.
Perhaps ugly, but that seams to work: