Copy link to clipboard
Copied
I have downloaded the latest lua here: https://www.lua.org/download.html
Initialled on my Mac and all is fine.
I then wanted to obfuscate my code so I need to compile the scripts.
I do
luac -o CompiledScriptName.lua ScriptName.lua
All seems to be ok, the new compiled file is created no issues...but then I get this error whenever I run the script in LrC.
NameOfScript.lua: bad header in precompiled chunk
Don't know what I am doing wrong here.
Any help would be appreciated.
That downloaded "luac" is version 5.4.6, while LR requires 5.1. Use the "luac" stored in the SDK subfolder "Lua Compiler/{mac,win}". I don't think that's documented anywhere.
Oh, I see it's a little geeky to install:
1. Download or re-download the Lightroom Classic SDK from here:
https://developer.adobe.com/console/servicesandapis
and unzip it.
2. In Terminal, do these commands:
cd /Users/john/Downloads/LrC_13.2_202402141005-bf1aeb84.release_SDK/Lua\ Compiler/mac
chmod +x luac
xattr -r -d com.apple.quarantine luac
cp luac /usr/local/bin
replacing the path in the first line with the path of where you downloaded the SDK.
Copy link to clipboard
Copied
That downloaded "luac" is version 5.4.6, while LR requires 5.1. Use the "luac" stored in the SDK subfolder "Lua Compiler/{mac,win}". I don't think that's documented anywhere.
Copy link to clipboard
Copied
Ok, I will uninstall 5.4.6 and install the one that comes with the SDK.
.
Copy link to clipboard
Copied
I have uninstalled lua 5.4.6
Now I don't understand how to install the luac I have in the SDK
There is no make.
I went to the Lua Binaries and I get this error when I want to download 5.1.5
The "/5.1.5/Tools Executa..MacOS1011_bin.tar.gz" file could not be found or is not available. Please select another file.
.
Copy link to clipboard
Copied
Oh, I see it's a little geeky to install:
1. Download or re-download the Lightroom Classic SDK from here:
https://developer.adobe.com/console/servicesandapis
and unzip it.
2. In Terminal, do these commands:
cd /Users/john/Downloads/LrC_13.2_202402141005-bf1aeb84.release_SDK/Lua\ Compiler/mac
chmod +x luac
xattr -r -d com.apple.quarantine luac
cp luac /usr/local/bin
replacing the path in the first line with the path of where you downloaded the SDK.
Copy link to clipboard
Copied
@John R Ellis
Thanks a million.
I get permission denied but I used
sudo cp luac /usr/local/bin
Now the compiling of my scripts is successful.
The SDK documentation has nothing on this, even worse the very latest documentation even suggests
luac53.exe can be used...ergo my total confusion and why I dowloaded 5.4.6
.