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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
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
https://alternatic.ch

Klaus
Posts: 13806
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: 2718
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
https://alternatic.ch

trevix
Posts: 958
Joined: Sat Feb 24, 2007 11:25 pm
Location: Italy
Contact:

Re: How define inclusions of a standalone by script ?

Post by trevix » Sun Oct 10, 2021 9:36 pm

Hello.
Suppose I need to have an inclusion working or not according to the device type? (post compilation)
For example, I would like my standalone to have push notification working on a android cell phone but not on a Tv Box.
Can it be that the only way is to bare with it and, on the TvBox, just ignore the pushNotificationReceived?

Thanks
Trevix
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”