Creating Closed Source Apps

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9833
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Creating Closed Source Apps

Post by FourthWorld » Sun Mar 25, 2018 6:17 am

The "Encrypt" box in the Standalone Builder is a graphical interface for the "set the password" command shown above.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

rumplestiltskin
Posts: 222
Joined: Wed Jun 21, 2006 7:33 pm
Location: West of the Pecos
Contact:

Re: Creating Closed Source Apps

Post by rumplestiltskin » Sun Mar 25, 2018 9:18 pm

Richard,

Thanks for your reply. However, I am still a bit confused. The Dictionary says this about a password-encrypted stack:
If the password property of a stack is not empty, all the text in the stack is encrypted (so that it cannot be read in another program, such as a text editor). Scripts, custom properties, text in fields or buttons, and object names in a password-protected stack are all encrypted. However, you can still open the stack, see the contents, and get object properties.
(My bold, italics)
Doesn't this mean that the standalone will not be able to open the encrypted stack for writing and saving without using the password? If so, that is not my intent; I just want to protect my scripts.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Creating Closed Source Apps

Post by jacque » Sun Mar 25, 2018 9:41 pm

The text of an encrypted stack can't be read by others without knowing the password. That is, they can't open the stack file in a text editor and see what's in there and they can't open the stack scripts in LC without the password. However, LC itself will run the stack normally, as will your standalone launcher. Passwords do not affect opening or running stacks, and only prevent viewing scripts in the IDE.

Test it to see how it works. Make an insignificant stack with, for example, a single button with a trivial script, and set the password using the message box (no need to build a standalone.) Try to view it in a text editor. Close and remove it from memory in LC, then try to open it in the IDE. It will run normally, but if you try to see the scripts it will ask for the password.

To view the script in the IDE so you can work with it, set the passkey in the message box or type in the password when asked by the script editor. The passkey allows temporary access to the stack as long as it remains in RAM. If you close and remove it, you'll need to set the passkey again if you want to access the scripts.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

rumplestiltskin
Posts: 222
Joined: Wed Jun 21, 2006 7:33 pm
Location: West of the Pecos
Contact:

Re: Creating Closed Source Apps

Post by rumplestiltskin » Sun Mar 25, 2018 10:23 pm

Richard,

Thanks very much for your explanation. I did what you suggested with two test stacks. One became the standalone which called the second stack which was encrypted. As you noted, this second stack was read/write and all changes to the field were able to be saved with a simple "save this stack" handler in a button. When I opened it in LC and asked to see that script, I was prompted for the password which, when provided, exposed the scripts. Perfect. Exactly what I needed.

Dare I say that the Dictionary isn't very clear on this topic? :(

But you were. :D

Appreciate your help!

Barry

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9833
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Creating Closed Source Apps

Post by FourthWorld » Sun Mar 25, 2018 11:23 pm

Glad that worked out, Barry.

LC stack files have many useful roles as documents. In some ways LC delivers nearly everything Apple's old OpenDoc project once promised but never completed. With LC we get a simpler language and more platforms than OpenDoc ever dreamed of.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”