Cannot add stack in Standalone Application settings
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Cannot add stack in Standalone Application settings
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
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
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
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
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
with the library stack in the same directory.

I am just using
Code: Select all
start using stack "sunnYrexLibrary"
Kaveh
Re: Cannot add stack in Standalone Application settings
Pretty sure you need a path, not just the stack name.

Re: Cannot add stack in Standalone Application settings
Yes, and that does not work!kaveh1000 wrote: ↑Thu Sep 05, 2019 2:18 pmI am just usingwith the library stack in the same directory.Code: Select all
start using stack "sunnYrexLibrary"

The macOS Application folder structure is a tad more complicated, please test with my pathname above!
Re: Cannot add stack in Standalone Application settings
Hi all
SOME SUCCESS
Thanks for your patience and help again...
First I tried this:
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:
When opening the stack in IDE I get error because this path is resolving to:
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!!
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
Then I put in Klaus's version:
Code: Select all
put specialFolderPath("engine") & "/sunnYrexLibrary.livecode" into tPath
start using stack tPath
Code: Select all
/Applications/LiveCode Indy 9.0.4 (rc 3).app/Contents/MacOS/sunnYrexLibrary.livecode
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!!
Kaveh
Re: Cannot add stack in Standalone Application settings
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
Just for reference, I previously had the system running fine with just
(without the extension or path) and it also loaded always showed up in the Standalone Application Settings. Something has changed along the way...
Code: Select all
start using stack "sunnYrexLibrary"
Kaveh
Re: Cannot add stack in Standalone Application settings
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
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?
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?
Kaveh
Re: Cannot add stack in Standalone Application settings
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!
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
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!!
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!!
Kaveh
Re: Cannot add stack in Standalone Application settings
"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")!
Hallelujah!

Re: Cannot add stack in Standalone Application settings
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?"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")!
Kaveh
Re: Cannot add stack in Standalone Application settings
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!
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!
Kaveh