Stand Alone Applications - Unlock Code

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Stand Alone Applications - Unlock Code

Post by warrenk » Tue Sep 23, 2008 2:24 pm

I created a Stand Alone Application and am looking at setting up a trial version (limited function) with a unlock code for the full version. I have a few questions:

Are there any tutorials or articles on how to do this?

Do developers usually create an algorithim based off the the user name?

When a user enters the correct unlock code, how is this stored so the user doesn't have to re-enter the unlock code everytime they use the software?

Also...I read about password protected stacks. What is this and when is this used?

Thanks for any help!
Warren

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10055
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Wed Sep 24, 2008 4:15 pm

Hello Warren -

Welcome aboard.

For where to store the files, the specialFolderPath function is your friend. I store reg into in Preferences on Mac and Application Data on Windows, e.g.:

Code: Select all

if the platform is "MacOS" then
   put specialFolderPath("preferences") into tPath
else
   put specialFolderPath(26) into tPath
end if
put "/MyApp/prefs.dat" after tPath
"What's 26?"

Each OS provides constants for special folders like "Applications", "Application Data", etc. Rev provides constants for some of these like "preferences", "desktop", etc., but there are more. Many more. Ken Ray took the time to test them all and documented his findings in this extraordinarily useful tip:
http://sonsothunder.com/devres/revoluti ... ile010.htm

I don't create my reg codes based on user info, but some do and that method is considered somewhat more secure. I have distributors so, like Adobe and others I use reg codes pre-generated without user info.

The scripts in a stack can be protected by password, so that anyone who drops the app on a raw binary editor won't be able to read your scripts. There's a setting for this in Rev's Standalone Maker, but you can also do this via script:

Code: Select all

set the password of stack "MyStack" to "password"
To edit scripts just set the passkey:

Code: Select all

set the passkey of stack "MyStack" to "password"
Note that setting a password for a stack protects the scripts in that stack only. To protect substacks within the stack file you'll want to set the password for each.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2949
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Sat Sep 27, 2008 1:07 pm

Mark is obviously too modest to have mentioned that the topic of registrations would be coming up in the RevUp newsletter:

http://www.runrev.com/newsletter/septem ... W57S445981

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10055
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Sun Sep 28, 2008 6:13 am

Nice article, Mark - good work!
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Oct 21, 2008 1:26 pm

Hi Richard,

Thanks, I'm glad you like the article. Part II should become available soon.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply