Well this situation doesn't occur that often, so it begs a question WHY?
I'll give you a simple example: I was developing a Qt HTML 5 desktop app. HTML 5 was chosen due to its flexibility and... well... It looked fun to try that. However I came to conclusion, that I want to have possibility to use app offline, so I was forced to store all that HTML 5 code locally. It lead me to few problems:
- User is provided with not just binary, but whole bunch of folders (html/ js/ css/).
- Users are able to view and modify most of the app's logics. (Well there were no security risks, but still...)
At quick glimpse I couldn't found nothing to solve these problems, so I've wrote a very simple Python script which goes through dependecy tree and add everything to single file and encrypts it (Used a very simple base64 encryption just to prove the point). Script itself can be found here: https://gist.github.com/zaibacu/9412574 (hopefully more up to date version)
Nothing very fancy and not optimized, but seems to do the job.
Maybe it will be helpful for somebody