Building Your First Standalone

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

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Building Your First Standalone

Post by bidgeeman » Wed Aug 02, 2017 9:11 am

Hi.
I am almost ready to make a standalone version of my stack. I have all the icons for Windows and Mac icns ready except for where it says "Mac application icon" and the "Mac small application icon" in standalone settings.
I don't know what these are size wise or file type?

Any help would be much appreciated.
Thanks
Bidge

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Wed Aug 02, 2017 9:36 am

Hi I have found the sizes for these and the format i case anyone wants to know.
"Mac application icon" is 64 x 64 pixels .png
"Mac small application icon" is 32 x 32 pixels .png

Cheers
Bidge

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 864
Joined: Fri Feb 06, 2015 4:03 pm

Re: Building Your First Standalone

Post by LiveCode_Panos » Wed Aug 02, 2017 3:26 pm

Hi Bidge,

Thanks for the update.

Did you manage to build the standalone?

Best,
Panos
--

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 11:41 am

Hi Panos.
I am still debugging! I didn't realize it was going to be so complicated.
One question you have probably heard many times before....is there a
simple way to limit a standalone from working for more than a week?
I realize there are hackers that can rip it to pieces in minutes but it's just
to stop someone sharing it around. It doesn't have to be hack proof just
a polite reminder.

Thanks
Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Building Your First Standalone

Post by Klaus » Fri Aug 04, 2017 12:13 pm

Hi David,

easy-peasy solution:
Write "the seconds" to a file with a not so obvious name in the prefs folder when the app starts the first time.
Then check this file at every start up of your app and compare with the current date.

Best

Klaus

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 12:17 pm

Thanks Klaus.
Nice idea. I will give it a shot :)

Bidge

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 12:42 pm

Hi.
I looked through the dictionary and found the date function.

Code: Select all

  put the short system date into field "Today's Date"
So I can make a dialogue box and some code that pops up to say
"This trial has expired" when it hits that date no problem there
but what happens if they open it the next day? The date will have changed
so the program will function again as the dialogue box will not pop up till
same time next year :)

What I am asking is what do you do to disable the stack and keep making
the answer dialogue pop up?
I don't need the code just advice on what is the normal thing to do in this case?

Thanks again :)
Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Building Your First Standalone

Post by Klaus » Fri Aug 04, 2017 12:48 pm

What about:
...
answer "This trial has expired!"
quit
...
?

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 12:52 pm

LOL oh so obvious. :oops:
I was planning to match the date for the quit function to kick in....but if they open the stack the next day the date will have changed so the
stack will work again.

EDIT: I guess I could create a field that has a password embedded in it that needs to be in place for the stack to work and once that date
is reached it could write in a different word that stops things from working?

Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Building Your First Standalone

Post by Klaus » Fri Aug 04, 2017 1:09 pm

Hi David,
bidgeeman wrote:I was planning to match the date for the quit function to kick in....but if they open the stack the next day the date will have changed so the
stack will work again.
Really? Come on! :D

You need to check:

Code: Select all

...
if today_in_seconds - the_stored_seconds >= seven_days_in_seconds then
  answer "This trial has expired!"
  quit
end if
...
This will work for EVERY day after the demo has exspired!
bidgeeman wrote:EDIT: I guess I could create a field that has a password embedded in it that needs to be in place for the stack to work and once that date
is reached it could write in a different word that stops things from working?
Sorry, don't get it?


Best

Klaus

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 1:13 pm

It's a clumsier way than yours but it would work.
I have a hidden field with a word in it and my startup code checks
that word otherwise it quits. When the date is reached the code
writes a new word into that field and the stack quits.

Bidge

EDIT: Sorry Klaus...I always forget about storing things. It's all very
new to me and I am slowly getting better at it.

Bidge

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Building Your First Standalone

Post by Klaus » Fri Aug 04, 2017 1:22 pm

Remember that standalones can NOT save themselfes!
You will always need an external file for this.

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Fri Aug 04, 2017 1:31 pm

Thanks Klaus.
I appreciate your effort. I am learning though it's taking time ;)

Bidge

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Building Your First Standalone

Post by bogs » Sat Aug 05, 2017 5:14 am

Klaus wrote:Remember that standalones can NOT save themselfes!
You will always need an external file for this.
Possibly using the splash stack technique as has been bandied about so much as of late [ am guilty of helping bandy 8) ].

Either of the two ways thought up will work, as you pointed out, Klaus's is just the easier method of the two, and I am a big fan of K.I.S.S.

Good luck with it :)
Image

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Re: Building Your First Standalone

Post by bidgeeman » Sat Aug 05, 2017 9:22 am

Hi.
I just thought I should share this with you from a complete beginners point of view.

Spent the whole day trying to understand what was going on in Klaus's example code
for a trial time expiry date.

Code: Select all

if today_in_seconds - the_stored_seconds >= seven_days_in_seconds then
  answer "This trial has expired!"
  quit
end if
today_in_seconds ???? What the hell was that?

Being a newbie I did not know what the "seconds" part of the code was referring to until
I found a reference in the dictionary that told me "seconds" are a set value that is calculated
from the start of the eon.
Once I knew this it all fell into place.

I don't feel stupid for asking basic questions just slightly uninformed :)
Thanks
Bidge

Post Reply