Page 2 of 3
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 1:57 pm
by Klaus
How do you address the stack?
From the pic it looks like this should be -> specialfolderpath("engine") & "/sunnYrexLibrary.livecode"
If you like, I can take a look at your problem-stack.
Maybe it is just a(nother) glitch in the Project Browser.
Just send your stack and the "sunnYrexLibrary.livecode" file to: klaus AT major-k.de
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 1:59 pm
by bogs
Well, this is a question only someone that dev's on a mac would probably know the answer to or not, but I think when your adding something to the app package folder manually, you need to modify the plist file to take the added file into account.
Otherwise, I'm out of theories for the moment.
*Edit - I see Klaus popped in with probably the better answer

Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 2:18 pm
by kaveh1000
Klaus thank you so much for the offer. Let me see if I can fix without bothering you. Also I have to get permission in order to send the stack out.
I am just using
Code: Select all
start using stack "sunnYrexLibrary"
with the library stack in the same directory.
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 2:21 pm
by bogs
Pretty sure you need a path, not just the stack name.
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 2:38 pm
by Klaus
kaveh1000 wrote: Thu Sep 05, 2019 2:18 pmI am just using
Code: Select all
start using stack "sunnYrexLibrary"
with the library stack in the same directory.
Yes, and that does not work!
The macOS Application folder structure is a tad more complicated, please test with my pathname above!
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 4:04 pm
by kaveh1000
Hi all
SOME SUCCESS
Thanks for your patience and help again...
First I tried this:
Code: Select all
put specialFolderPath("desktop") & "/sunnYrexLibrary.livecode" into tPath
start using stack tPath
And it worked! So even though the Standalone does not contain sunnYrex, it knows it is on the desktop. Of course this is not a viable solution for distribution.
Then I put in Klaus's version:
Code: Select all
put specialFolderPath("engine") & "/sunnYrexLibrary.livecode" into tPath
start using stack tPath
When opening the stack in IDE I get error because this path is resolving to:
Code: Select all
/Applications/LiveCode Indy 9.0.4 (rc 3).app/Contents/MacOS/sunnYrexLibrary.livecode
I could create such a folder but does not seem the correct way.
When I create the standalone, then manually put back the library in the App using Package contents, the App works.
So I have a workaround now, except I have to remember to do this every time. And I have not tried it for the Linux standalone yet. That needs to be done to.
So many thanks so far. I would still love to be able to have sunnYrex automatically saved into the App as it was always doing before something changed!!
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 4:18 pm
by bogs
kaveh1000 wrote: Thu Sep 05, 2019 4:04 pm
When opening the stack in IDE I get error because this path is resolving to:
That is because in the IDE, the 'engine' is the IDE, not your application. What you might do to restore some sanity is run a check on which environment you are working in, perhaps in the pre-open stack handler something like :
Code: Select all
if the environment is "development" then
// your in the IDE, use the path you were using or probably just start using stack "sunnYrex"
else
// all other cases, since you are now running from the standalone....
end if
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 4:42 pm
by kaveh1000
Just for reference, I previously had the system running fine with just
Code: Select all
start using stack "sunnYrexLibrary"
(without the extension or path) and it also loaded always showed up in the Standalone Application Settings. Something has changed along the way...
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 4:46 pm
by bogs
So, in that case, what I wrote would be more like this...
Code: Select all
if the environment is "development" then
start using stack "sunnYrexLibrary"
else
put specialFolderPath("engine") & "/sunnYrexLibrary.livecode" into tPath
start using stack tPath
end if
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 5:00 pm
by kaveh1000
Wonderful. That works Bogs.
So I have a workaround to move forward. One question remaining is where I add the sunnYrex module in the Linux version. I am not a Linux user but Mac. Do I put it in the top directory, next to the mainstack?
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 5:03 pm
by Klaus
All this stuff should definitively go into -> specialfolderpath("resources") which also works in the IDE.
So we first HAVE TO find out why you cannot add that stack file to your standalone via the "Copy files" tab in the "Standalone Application Settings"!
Please send me the stacks or we will still be discussing this until christmas!

Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 5:08 pm
by kaveh1000
Klaus, "Copy files" or "Stacks"?
I have always added through "Stacks". I just tried through Copy Files. It does add the stack. I cannot see it in the Standalone package contents, but the standalone works!!
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 5:28 pm
by Klaus
kaveh1000 wrote: Thu Sep 05, 2019 5:08 pm
Klaus, "Copy files" or "Stacks"?
"Copy files" so it ends up in -> specialfolderpath("resources") in your standalone.
If you keep the library in the same stack as your (later standalone) stack, you can also access it in the IDE with specialfolderpath("resources")!
kaveh1000 wrote: Thu Sep 05, 2019 5:08 pmI have always added through "Stacks". I just tried through Copy Files. It does add the stack. I cannot see it in the Standalone package contents, but the standalone
works!!
Hallelujah!

Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 5:36 pm
by kaveh1000
"Copy files" so it ends up in -> specialfolderpath("resources") in your standalone.
If you keep the library in the same stack as your (later standalone) stack, you can also access it in the IDE with specialfolderpath("resources")!
Sorry Klaus, did not get this. Every time I create a Standalone it produces a new Directory, so where do I put the library so specialfolderpath("resources") can access it?
Re: Cannot add stack in Standalone Application settings
Posted: Thu Sep 05, 2019 6:01 pm
by kaveh1000
Bogs and Klaus
I just want to thank you for your patience. It has been immensely helpful to get this working again. I admit I have to learn lots in this area. I have just concentrated on writing scripts but forgotten about the infrastructure.
And a special thanks to Thierry for a great software that allows full regex to be used in LiveCode.
Thanks again, and I am sure I will be back to bother you soon!