Page 1 of 1

Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 10:47 am
by Brudders
I notice that if I have windows app with say 2 top level stacks (not substacks design intention).
When I create a standalone build, the primary top level stack gets merged into the exe, but the remainder stacks are named individually as stackname .livecode is there anyway to change the default file extension .livecode. I have tried changing the name/filename of the stack before I build a standalone but it just appends .livecode to the end of the stack file name.

Thanks for any assistance.

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 10:57 am
by richmond62
I suspect your problem is that your other stacks are NOT substacks of your main stack.

https://livecode.fandom.com/wiki/Substacks

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 11:25 am
by Brudders
Thanks for the response but 2 stacks that are not substacks that is not my problem but my design intention.
1st stack is launcher performs security/update tasks before launching 2nd stack main application.

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 11:56 am
by Klaus
Hi Brudders,

welcome to the forum!

How do you open/reference the "second" stack from the first one?
Actaully Livecode files do not need any suffxix, as long it is a valid stack.

You could do this:
1. Remove the suffix from the second mainstack
2. Add this file (the stack from 1. now without the suffix) via the "Add files" tab in the "Standalone Application Settings".***
3. Open that second stack from the first stack:

Code: Select all

...
put specialfolderpath("resources") & "/name_of_lc_stack_without_suffix" into tTargetStack
go stack tTargetStack
...
***You will find everything added here in that specialfolderpath("resources") on ANY PLATFORM!

Best

Klaus

Resolved Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 12:51 pm
by Brudders
Thanks Klaus, I like it that will work.

Just guessing as the 2nd stack is added via the add files route which means it would not be encrypted, but possibly could use an already encrypted version, will have a play.

You have already helped my many times having read previous posts so thanks again.

Re: Resolved Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 1:06 pm
by Klaus
Hi Brudders,
Brudders wrote:
Thu Sep 08, 2022 12:51 pm
Just guessing as the 2nd stack is added via the add files route which means it would not be encrypted, but possibly could use an already encrypted version, will have a play.
yes, just add an password protected stack!
Whatever you add, will be found later in the runtime in -> specialfolderpath("resources")


Best

Klaus

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 1:46 pm
by Brudders
Perfect thank you, just one more related question if I may. When distributing your app does exposing the albeit encrypted and password protected stack cause any security concerns. Is there any gotchas I should be aware of or is this generally a safe/secure practice.

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 2:03 pm
by Klaus
Brudders wrote:
Thu Sep 08, 2022 1:46 pm
Perfect thank you, just one more related question if I may.
No! :D
Brudders wrote:
Thu Sep 08, 2022 1:46 pm
When distributing your app does exposing the albeit encrypted and password protected stack cause any security concerns. Is there any gotchas I should be aware of or is this generally a safe/secure practice.
No idea HOW safe this is in the end, but it prevents users of LC to look at your scripts!
And yes, this is common and safe practise for LC developers.

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 2:16 pm
by Brudders
Your a star thank you Klaus.

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 2:33 pm
by Klaus
Brudders wrote:
Thu Sep 08, 2022 2:16 pm
Your a star
I know! :-D
Brudders wrote:
Thu Sep 08, 2022 2:16 pm
thank you Klaus.
You're welcome!

Re: Standalone stack file name .livecode

Posted: Thu Sep 08, 2022 2:51 pm
by stam
Brudders wrote:
Thu Sep 08, 2022 1:46 pm
When distributing your app does exposing the albeit encrypted and password protected stack cause any security concerns. Is there any gotchas I should be aware of or is this generally a safe/secure practice.
Not really - i think most use this with no issues (just don't forget your password ;) )

You may also find this blog post from Mark Waddingham interesting: https://livecode.com/best-practice-for- ... -security/