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

Commit 75daccf

Browse files
Merge pull request #1923 from livecode/bugfix-extension_loading
[[ Bug ]] Ensure ide extension lib can find extension-utils
2 parents e0d62f9 + def23d2 commit 75daccf

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Toolset/libraries/revideextensionlibrary.livecodescript

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
script "revideextensionlibrary"
22
local sExtensions, sExtensionProperties, sModuleVersion
33

4+
constant kExtensionUtils = "com.livecode.library.extension-utils"
5+
private function __PathToExtensionUtils
6+
set the itemdelimiter to "."
7+
return revIDESpecialFolderPath("extensions") & slash & \
8+
kExtensionUtils & slash & item -1 of kExtensionUtils & "." & \
9+
"livecodescript"
10+
end __PathToExtensionUtils
11+
412
on extensionInitialize
5-
if the target is me then
6-
insert script of me into back
13+
if the target is not me then
14+
pass extensionInitialize
715
end if
816

9-
# Explicitly load extension utils first
10-
revInternal__LoadLibrary "extension-utils"
17+
insert script of me into back
1118

19+
# Explicitly load extension utils first
20+
revInternal__LoadLibrary "extension-utils", __PathToExtensionUtils()
21+
22+
if the result is not empty then
23+
throw the result
24+
end if
25+
1226
# Load all the extensions ready for use
1327
__extensionsLoad
1428
end extensionInitialize
@@ -844,7 +858,6 @@ private command addToList pElement, @xArray
844858
put pElement into xArray[the number of elements in xArray + 1]
845859
end addToList
846860

847-
constant kExtensionUtils = "com.livecode.library.extension-utils"
848861
on __extensionsLoad
849862
local tDataA
850863
# Fetch all the available data about extensions in the search paths

0 commit comments

Comments
 (0)