I am writting a code that could be useful for some people. The program will be free but I would like to protect the code. As I am not good at explaining myself I will simply illustrate my question with an example:
Let's say that I make the following code:
CreateDialog[
Column[{Row[{InputField[Dynamic[a]], InputField[Dynamic[b]]}],
Button["Calculate SUM", c = a + b], "\n", "Result:", Dynamic[c],
"\n", Button["Plot c*x+5",
CreateDialog[Plot[c*x + 5, {x, -1, 1}]]]}]]
It allows you to calculate the sum of a number and to display the "y=c*x+5" function, where "a" is the sum of the previous values.
Anyway, I would like to somehow create a protected file (opening with a text editor would show something unreadable) and that, when doubling clicking on it, it opens Mathematica but evaluating it, without displaying the code. Something similar to an executable file that can be opened with mathematica (or the OS).
So, I should not able to see or modify the code but I want to solely display the Dialog.
I hope that someone can understand my question...
I have been reading stuff about "Encode", protecting functions but I did not understand it.... should I waste more time looking into it or is it not going to help me? any tips?
Why is that difficult to create an executable that only Mathematica could read and evaluate?
Is there a simple solution? if not, I have been thinking in creating millions and millions of not useful functions or/and text, inserting some in between the code and so on, with the hope of making it hard to uncode if someone would like to. My logic is that if one person can differenciate the non-useful code then it means that he/she knows how to program and if so, he/she can create a code. If it takes that person more time to get to the useful code discarding the non-usuful one than to make it from scratch, then I should be safe because they won't waste time on reading it?
Any ideas? perhaps it is simpler that I think?
Thanks in advance,