How define inclusions of a standalone by script ?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1986
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

How define inclusions of a standalone by script ?

Post by jmburnod » Sun Oct 08, 2017 2:03 pm

Hi All,
Is there a way to define inclusions of a standalone by script (before compilation) ?
Something like that (pseudocode):

Code: Select all

on initInclusionForStandalone
   if the environment = "mobile"  then
      -- disable InternetInclusion
   else
      -- enable InternetInclusion
   end if
end initInclusionForStandalone
Best regards
Jean-Marc

Klaus
Posts: 9579
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How define inclusions of a standalone by script ?

Post by Klaus » Sun Oct 08, 2017 2:33 pm

Hi Jean-Marc,

I think you can manipulate the custom property set "cRevStandaloneSettings" before compiling.

A quick test show that without a checked "Internet" inclusion:
the cRevStandaloneSettings["scriptLibraries"] of stack "your standalone here" = EMPTY
Otherwise (Internet checked):
the cRevStandaloneSettings["scriptLibraries"] of stack "your standalone here" = "Internet"

Of course you need to parse the prop, since there may be other inclusions added.
Format of this prop = CR delimited list of inclusions like:
Internet
Printing
etc...

Hope that gets you started!


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1986
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: How define inclusions of a standalone by script ?

Post by jmburnod » Sun Oct 08, 2017 2:44 pm

Hi Klaus,
Thanks. One more, exactly what I need. 8)
Kind regards
Jean-Marc

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”