Fix bsconst plugin

This commit is contained in:
Brahim Hadriche committed 2023-01-30 08:35:00 -05:00
1 parent 5aac07d36c
commit 1faec073f0
4 files changed
+19 -33

No files matched your search

@@ -19,9 +19,9 @@ function GetPlayletLibUrls() as object
embedded = { type: "embedded", link: ReadManifestValue("playlet_lib_embedded_url") }
registry = { type: "registry", link: ReadRegistryKey("playlet_lib_url", "Playlet") }
if IsDebugMode()
#if DEBUG
return [embedded]
end if
#end if
urls = []
+2 -2
View File
@@ -42,14 +42,14 @@ function Main(args as object) as void
input = CreateObject("roInput")
input.setMessagePort(m.port)
if IsDebugMode()
#if DEBUG
' The following comment is to enable the SceneGraph inspector
' on the VSCode BrightScript plugin.
' vscode_rdb_on_device_component_entry
' The following comment is to enable RALE tracking
' vscode_rale_tracker_entry
end if
#end if
while true
msg = wait(0, m.port)
-23
View File
@@ -1,26 +1,3 @@
function IsDebugMode() as boolean
bsConst = GetBsConstValues()
return bsConst["DEBUG"]
end function
function GetBsConstValues() as object
result = {}
bsConst = ReadManifestValue("bs_const")
symbols = bsConst.Tokenize(";")
for each symbol in symbols
keyValuePair = symbol.Tokenize("=")
if keyValuePair.Count() <> 2
continue for
end if
result[UCase(keyValuePair[0])] = UCase(keyValuePair[1]) = "TRUE"
end for
return result
end function
function ReadManifestValue(key as string) as string
appInfo = CreateObject("roAppInfo")
return appInfo.GetValue(key)