From 44dfc73ce9951a624b73247e21cb051a9b1d71c6 Mon Sep 17 00:00:00 2001 From: Trevor DeVore Date: Fri, 15 May 2020 03:14:57 -0500 Subject: [PATCH] Add support for both 32-bit and 64-bit externals 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 ``` --- framework/levure.livecodescript | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/levure.livecodescript b/framework/levure.livecodescript index 9a0b55f..6f6287c 100644 --- a/framework/levure.livecodescript +++ b/framework/levure.livecodescript @@ -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"] @@ -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 @@ -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"]