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

Commit 3ef7fbe

Browse files
committed
[[ ExtensionUtils ]] Don't load externals in standalone mode
1 parent 44e0ba7 commit 3ef7fbe

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

extensions/script-libraries/extension-utils/extension-utils.livecodescript

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,32 @@ private command __EnsureExternal pExternal
147147
exit __EnsureExternal
148148
end if
149149

150-
-- If we are running in the IDE we should have externals available
151-
if the environment begins with "development" then
152-
exit __EnsureExternal
153-
end if
150+
local tEnvironment
151+
put the environment into tEnvironment
152+
switch tEnvironment
153+
case "development"
154+
case "development command line"
155+
-- If we are running in the IDE we should have externals available
156+
exit __EnsureExternal
157+
case "standalone application"
158+
case "command line"
159+
-- In a build standalone externals should have been included
160+
-- If we are running tests, externals should be loaded.
161+
exit __EnsureExternal
162+
case "server"
163+
default
164+
break
165+
end switch
154166

155-
-- If we are running on server with an 'externals' folder, assume
167+
-- If we are running with an 'externals' folder, assume
156168
-- the externals are loaded
157-
if the environment is "server" then
158-
local tHomeFolder
159-
put $REV_HOME into tHomeFolder
160-
if tHomeFolder is empty then
161-
put $LIVECODE_SERVER_HOME into tHomeFolder
162-
end if
163-
if tHomeFolder is empty then
164-
put specialfolderpath("engine") into tHomeFolder
165-
end if
169+
local tHomeFolder
170+
put $REV_HOME into tHomeFolder
171+
if tHomeFolder is empty then
172+
put $LIVECODE_SERVER_HOME into tHomeFolder
173+
end if
174+
if tHomeFolder is empty then
175+
put specialfolderpath("engine") into tHomeFolder
166176
end if
167177

168178
local tFileExtension

0 commit comments

Comments
 (0)