LiveCode library inclusion in Standalones...

Paul Dupuis paul at researchware.com
Tue Feb 9 15:26:41 EST 2016


As a test I added a "dummy" handler to the card script of my mainstack:

on livecodeLibraryLoader
  -- This handler is never called. It exists to contain code that will
be detected by the IDE's Standalone Builder
  -- to ensure certain libraries are included in the standalone.
 
  -- ensure inclusion of libURL (Internet) library
  put url tSomeURL into tSomeVariable
  post tSomeData to URL tSomeURL
 
  -- ensure including of ...
end livecodeLibraryLoader

And now libURL gets included using auto-detection. So it look like (at
least in LC 6.7.x) that autodetection only checks the Mainstack and not
substacks? That seems like a bug, but I am not in a position to test in
LC 7.x or 8.x to see if that is also the case in those versions

On 2/9/2016 2:25 PM, Paul Dupuis wrote:
> I have run into a minor oddity. In general, when building standalones, I
> prefer to have the Standalone builder set to:
>
> Search for the required inclusions when saving the standalone application
> vs
> Select inclusions for the standalone application [and manually
> identifying the libraries to include]
>
> My reasoning (right or wrong) is that auto-detection SHOULD be the more
> effecient approach in that LiveCode would install just the bits that I
> am using and not stuff I am not, where as in a large and complex
> project, I might forget to include something I need (of accidentally
> un-selecting some library when selecting another) OR include a library I
> don't really need.
>
> What I have run into is that libURL is not being autodetected and
> included. If I manually pick my inclusions and select the "Internet",
> all is well. If choose automatic, no libURL. I already know that when
> libURL is included it is added as a hidden group in the main stack and
> so is not available until the main stack has loaded. My code executes a
> send in time call to code that then fetches a couple URLs and POSTs some
> data to another couple URLs. Again, when manually included, this code
> all works.
>
> My question is: Does anyone know HOW autodetection works? Does it only
> look for keywords in scripts in the main stack? My code for doing a
> couple put URLs and then some posts is located in two places: a
> (library) substack of the main stack, with the start using occurring
> during the 'startup' message and in an external stack that is opened
> invisible into memory, also during the 'startup' message.
>
> What code do I need where for the Standalone builder to auto detect 
> that libURL should be included?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the Use-livecode mailing list