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

Commit c8eb359

Browse files
authored
Merge pull request #1925 from livecode/bugfix-extension_support_files
[[ Bug ]] Ensure support files are full paths when compiling
2 parents 886f418 + 94851aa commit c8eb359

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Toolset/libraries/revidedeveloperextensionlibrary.livecodescript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private function __revIDEDeveloperExtensionCompileAndFetchDetails pFolder, \
205205
if tType is "lcb" then
206206
# The compiled module or manifest is not up to date, so compile.
207207
__revIDEDeveloperExtensionLog "Compiling module" && pFolder & slash & tSource
208-
__revIDEDeveloperCompileModule pFolder & slash & tSource, tSupport, pFolder
208+
__revIDEDeveloperCompileModule pFolder, tSource, tSupport, pFolder
209209
if the result is not empty then
210210
# This may be better as a warning, and try to parse info direct from the file.
211211
__revIDEDeveloperExtensionSendError the result
@@ -589,8 +589,8 @@ private function __fetchMetadatum pXmlId, pKey
589589
return textDecode(revXMLNodeContents(pXmlId, tNode), "utf-8")
590590
end __fetchMetadatum
591591

592-
private command __revIDEDeveloperCompileModule pFile, pSupportFiles, pTargetFolder
593-
revIDEExtensionCompile pFile, pSupportFiles, pTargetFolder
592+
private command __revIDEDeveloperCompileModule pFolder, pFile, pSupportFiles, pTargetFolder
593+
revIDEExtensionCompile pFolder, pFile, pSupportFiles, pTargetFolder
594594

595595
if the result is not empty then
596596
__revIDEDeveloperCompilationError the result

Toolset/libraries/revideextensionlibrary.livecodescript

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ private command __revIDELCBExtensionLoad pID, pFolder, pVersion, pStatus, \
11021102
-- If we have an error loading, try to recompile the extension
11031103
if pError is not empty then
11041104
if not pIsIDEExtension and pSourceFile is not empty then
1105-
revIDEExtensionCompile pFolder & slash & pSourceFile, tSupportFiles, pFolder, \
1105+
revIDEExtensionCompile pFolder, pSourceFile, tSupportFiles, pFolder, \
11061106
revIDEExtensionBytecodeFilename(true)
11071107
if the result is empty then
11081108
local tNewError
@@ -1468,10 +1468,16 @@ on revIDEExtensionUpdateAPI pFolder, pExtensionSource
14681468
end if
14691469
end revIDEExtensionUpdateAPI
14701470

1471-
command revIDEExtensionCompile pFile, pSupportFiles, pTargetFolder, pOutputFilename
1471+
command revIDEExtensionCompile pFolder, pFile, pSupportFiles, pTargetFolder, pOutputFilename
1472+
// Make file paths full paths
1473+
repeat with tLine = 1 to the number of lines in pSupportFiles
1474+
put pFolder & slash before line tLine of pSupportFiles
1475+
end repeat
1476+
put pFolder & slash before pFile
1477+
14721478
extensionCompile "", pFile, pSupportFiles, "", \
1473-
revIDESpecialFolderPath("user extensions") & slash & \
1474-
"interface", pTargetFolder, pOutputFilename
1479+
revIDESpecialFolderPath("user extensions") & slash & \
1480+
"interface", pTargetFolder, pOutputFilename
14751481

14761482
if the result is not empty then
14771483
return the result for error

0 commit comments

Comments
 (0)