Skip to content

Commit

Permalink
Add support for both 32-bit and 64-bit externals
Browse files Browse the repository at this point in the history
The `architecture` key is now supported for externals.

Example:

```
externals:
  windows:
    - filename: blur-x86.dll
      name: blur
      architecture: 32
    - filename: blur-x64.dll
      name: blur
      architecture: 64
```
  • Loading branch information
trevordevore committed May 15, 2020
1 parent 93bfba5 commit 44dfc73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion framework/levure.livecodescript
Expand Up @@ -2247,7 +2247,7 @@ private command resolveHelperFolderAssets pBuildProfile, @xHelperA, pExternalPac
put xHelperA into tConfigA

if tError is empty then
local tPlatform, tTargetPlatform
local tPlatform, tTargetPlatform, tArchitecture

# stack files
repeat with j = 1 to the number of elements of tConfigA["ui"]
Expand All @@ -2256,6 +2256,11 @@ private command resolveHelperFolderAssets pBuildProfile, @xHelperA, pExternalPac
end repeat

put targetPlatform() into tTargetPlatform
if the processor is "x86" then
put 32 into tArchitecture
else
put 64 into tArchitecture
end if

set the wholematches to true

Expand All @@ -2270,6 +2275,7 @@ private command resolveHelperFolderAssets pBuildProfile, @xHelperA, pExternalPac
end if

if tPlatform is tTargetPlatform and tConfigA["externals"][tTargetPlatform][j]["name"] is not empty \
and (xHelperA["architecture"] is empty or xHelperA["architecture"] is tArchitecture) \
and tConfigA["externals"][tTargetPlatform][j]["name"] is not among the lines of pExternalPackagesInMemory then
put tConfigA["externals"][tTargetPlatform][j]["filename"] into \
line (the number of lines of sAppA["externals to load"] + 1) of sAppA["externals to load"]
Expand Down

0 comments on commit 44dfc73

Please sign in to comment.