Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 79f4d8c

Browse files
committed
[[Feature]] Add OS and Platforms to LCB Metadata
Update *Extending LiveCode* guide with note and example about adding metadata for OS and/or Platforms if the module uses code that is only available on specific machines. Updated `__fetchMetadatum` to include the new keys in the manifest.xml file.
1 parent 018b6af commit 79f4d8c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Documentation/guides/Extending LiveCode.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,16 @@ in the IDE and in the online portal.
107107
metadata title is "My Pink Circle"
108108
metadata author is "Benjamin Beaumont"
109109
metadata version is "1.0.0"
110+
metadata platforms is "desktop,mobile"
110111

111112
end widget
112113

114+
> **Note:** If the module makes use of external code that is only
115+
> available on specific Operating Systems or Platforms, use the "os"
116+
> and/or "platforms" metadata keys. The values are the same as can be
117+
> found in the LiveCode Documentation Format Reference. This data will
118+
> also appear in the dictionary.
119+
113120
#### Importing libraries
114121
The LiveCode builder syntax is broken down into **modules**. There are 3
115122
classes of module:
@@ -830,7 +837,7 @@ pseudo-randomly generated UUID as a string:
830837

831838
metadata title is "Java UUID"
832839
metadata author is "LiveCode"
833-
metadata version is "1.0.0"
840+
metadata version is "1.0.0"
834841

835842
// Bind to the static randomUUID() method of the java.util.UUID class
836843
__safe foreign handler JNI_RandomUUID() returns JObject \

Toolset/libraries/revidedeveloperextensionlibrary.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ end revIDEDeveloperExtensionNew
568568
private function __fetchMetadatum pXmlId, pKey
569569
local tNode
570570

571-
if pKey is among the items of "name,type,title,author,description,version" then
571+
if pKey is among the items of "name,type,title,author,description,version,platforms,os" then
572572
-- Some metadata are placed into specifically-named top-level XML
573573
-- elements in the manifest. This list must be kept up-to-date
574574
-- with the list of special-cased metadatum keys listed in the

0 commit comments

Comments
 (0)