There's a fundamental problem in that the code must be decrypted on the customer's machine. So it's a question of how well you can obfuscate the process, rather than making it impossible for the customer to access unencrypted code.
Distributing compiled code (in the way that Xcache and APC store compiled code) will go some way to obfuscating. That means the customer has to reverse engineer the code to get source without variable names, and possible with incorrect structure as well (due to optimizations or ambiguous object code).
Then if you're serious you can have code which decrypts code which decrypts the real program. That's the kind of thing programmers would do on the old Apple II and similar PCs to stop people copying their games. Rarely will people have the knowledge and time to go through two layers, only to find that they get compiled code that they have to decompile.
Then you can go extreme and write your own self-modifying assembly code to decrypt the program .. that will drive people crazy

Even when they view that code, they can't see what it really does until they run it (or simulate running it).
These are all obfuscation ideas, because that's what you need here, rather than foolproof encryption.
keeB, you're making the assumption that your clients know what's best for them
