How to determine Commercial or Community versions.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to determine Commercial or Community versions.
Ok, I've search the dictionary and as far as I can see there is no way to determine if an existing stack is being opened in the Commercial or the Community version of LiveCode.
There is the version function but that returns 6.5.0 for the Commercial and the Community versions with no other info.
Any ideas or is this for Feature Requests?
There is the version function but that returns 6.5.0 for the Commercial and the Community versions with no other info.
Any ideas or is this for Feature Requests?
Andy .... LC CLASSIC ROCKS!
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How to determine Commercial or Community versions.
The engine behavior between both versions should be the same, with the exception of one feature: the ability to password-protect a stack script is in Commercial only, since of course it wouldn't make sense in a GPL-governed work. In all other respects they're the same. What do you want to do differently in each?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How to determine Commercial or Community versions.
Thanks for your reply Richard.
I'm developing a plugin for LiveCode that initially will be a commercial offering.
The demo version of this generates password protected stacks which show the result of a templated stack bild but not the scripts generated to allow evaluation of the plugin. This obviously will not be an option in the Community version.
For openess and politeness I would like to inform a Community user that the plugin is a Commercial offering and will not work in the Community version.
I'm thinking that I could prehaps trap the Password error but a built in way to determine the version would be a better option.
I'm developing a plugin for LiveCode that initially will be a commercial offering.
The demo version of this generates password protected stacks which show the result of a templated stack bild but not the scripts generated to allow evaluation of the plugin. This obviously will not be an option in the Community version.
For openess and politeness I would like to inform a Community user that the plugin is a Commercial offering and will not work in the Community version.
I'm thinking that I could prehaps trap the Password error but a built in way to determine the version would be a better option.
Andy .... LC CLASSIC ROCKS!
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How to determine Commercial or Community versions.
Your willingness to provide a nice warning is laudable, but I'm afraid the engine is less flexible: for the security of password-protected stacks, the Community Edition can't open them at all.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How to determine Commercial or Community versions.
Hmm...Yep, I should have tested (realised) that earlier
So for me that's back to my old standby of reading and writing encrypted text files to be processed by the stacks.
Thanks for your comments and insight.

So for me that's back to my old standby of reading and writing encrypted text files to be processed by the stacks.
Thanks for your comments and insight.
Andy .... LC CLASSIC ROCKS!
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How to determine Commercial or Community versions.
Of it's designed to be used only with Commercial I wouln't rewrite it just to provide a more graceful way to tell Community users it's not designed fire them. They'll figure it out soon enough when the IDE tells them as they try to open it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How to determine Commercial or Community versions.
Hi Andy,
You can make an unprotected stack with a custom property containing your protected stack. Put this handler into the stack script of the unprotected stack:
Now you can warn the user if he tries to open your stack with the community edition.
Kind regard,
Mark
You can make an unprotected stack with a custom property containing your protected stack. Put this handler into the stack script of the unprotected stack:
Code: Select all
on preOpenStack
try
set the password of this stack to "test"
set the password of this stack to empty
go the cMyProtectedStack of this stack in new window
close stack "My Unprotected Splash Stack"
catch myErr
beep
answer error "Sorry, you can't use this utility with the community version of LiveCode."
end try
end preOpenStack
Kind regard,
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: How to determine Commercial or Community versions.
Thanks Mark.
That's a good solution.
That's a good solution.
Andy .... LC CLASSIC ROCKS!
Re: How to determine Commercial or Community versions.
I came across this thread by chance and I'm glad I did. Best tip I've seen for a while - well done, Mark 

LiveCode Development & Training : http://splash21.com
Re: How to determine Commercial or Community versions.
Thanks 

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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: How to determine Commercial or Community versions.
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:35 pm, edited 1 time in total.
shiftLock happens
Re: How to determine Commercial or Community versions.
Hi,
That's a great solution, but it won't work with Revolution. I don't know if it will work with MetaCard; I suspect it won't. When RunRev changes the engine name (which will happen eventually), your script will break. If you don't want the script to be broken, you could use
Obviously, this works in the IDE only. It won't work in standalones.
Kind regards,
Mark
That's a great solution, but it won't work with Revolution. I don't know if it will work with MetaCard; I suspect it won't. When RunRev changes the engine name (which will happen eventually), your script will break. If you don't want the script to be broken, you could use
Code: Select all
function commercial
set the idemDel to slash
return (the last item of the addres contains "commercial")
end commercial
Kind regards,
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: How to determine Commercial or Community versions.
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:35 pm, edited 1 time in total.
shiftLock happens
Re: How to determine Commercial or Community versions.
Hi Hermann,
The use of slash hasn't changed since the MetaCard times.
Kind regard,
Mark
The use of slash hasn't changed since the MetaCard times.
Kind regard,
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How to determine Commercial or Community versions.
Since the one reliable difference between the Community and Commercial editions is that the former doesn't allow the setting of stack passwords, we could use that as a test:
It might also be good to have a built-in function for this. Has anyone here submitted such a request?
Code: Select all
function IsCommunityEdition
try
do "set the password of this stack to Anything"
catch tErr
return true
end try
set the password of this stack to empty -- undo
return false
end IsCommunityEdition
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn