Skip to main content
danielm49702136
Known Participant
September 14, 2026
Question

Lightroom lua plugin compilation

  • September 14, 2026
  • 1 reply
  • 24 views

I would like to compile a plugin in order to deliver it without the source code. There are two versions of the lua compiler with the sdk: one for windows and one for mac. I do not know how to proceed, my plugin has many files which generates tables of functions I do import. An example would be:
 

--<file1.lua>

functions={}

functions.one=function (...<function definition>...

functions.two=function (...<function definition>...


return functions
--<main.lua>

local functions=requiere "file1"
...

 

  • 1. How do I compile both files and make main.luac  import the functions of the compiled file1.luac ?
  •  2. If I compile it in windows, will the bytecode work in mac or do I need to make bytecodes for each platform?
  • 3. Is there any other way to deliver the code? I know there are some codes for reversing the luac to lua.

    Regards,
    Daniel

    1 reply

    danielm49702136
    Known Participant
    September 14, 2026

    I have been able to compile the code.

    I have used de lua compiler for windows provided with the sdk and used for the output .lua extension and not .luac    require(file1) did not find file1.luac but it was ok to use compiled file named file1.lua

    I did not compile Info.lua (just by guess, I have not been able to run the plugin if info.lua was compiled)

    Will the compiled code work in mac althought compiled with windows lua compiler?