Exploring A Single File Deploy on Windows

Mark Waddingham mark at livecode.com
Thu Jun 22 03:38:35 EDT 2017


On 2017-06-21 22:47, J. Landman Gay via use-livecode wrote:
> Could you expand on this a little bit? StandaloneSaving/Saved are only
> sent during a build, so I'm not sure how I'd use those to intercept a
> startup message.

Yes but they could be used at standalone building time (probably will 
require a little bit of reordering of processes slightly) so stacks 
could embed their resources in a stackfile.

> Also, when do the externals actually load? If they load at startup
> before any messages are sent, then won't the externals already be done
> with before the stack receives the startup message?

At present they are bound before the startup message - which is the 
problem as there is no opportunity for script to run.

Currently, you can do the suck up and spit out method - you just mustn't 
mark the externals as 'included' in the s/b... And then add code to 
standaloneSaving / standaloneSaved:

standaloneSaving (to augment your stackfile with what is needed)
    create a substack of your mainstack file which contains the externals 
you want in custom props
    a library stack handler in the substack which spits out and sets the 
externals property of itself

standaloneSaved (to reset your stackfile to what it was before)
   delete the substack

Then in the startup handler of your standalone mainstack, 'start using' 
the substack if it is present. That should then load the externals which 
you've spat out to disk in an appropriate place.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list