Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Compiling plugins

New Here ,
Mar 25, 2009 Mar 25, 2009
How does one do this? The facebook plugin (http://regex.info/blog/lightroom-goodies/facebook) seems to be compiled or at least obfuscated, however, when I attempt to compile my own, it gives me an error. The error given is "Info.lua: bad header in pre-compiled chunk." and I have no idea how to fix this.

I tried compiling one of the demo plugins, specifically hello world, but it still gave me the same problem. Do I need to use a different version of Lua or do I have to do something completely different? I tried both 5.0 and 5.1.

All I'm doing is:
luac -o compiled/Info.lua Info.lua

Is that good enough, or do I need to do more?

Thanks a lot.
TOPICS
SDK
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 07, 2010 Jun 07, 2010

I got the same error with every file I tried to compile and after few frustrating hours I found a workaround.

I'm using OSX 10.6 and I had installed Lua 5.1.4 from MacPorts. At first I thought that something was wrong with my ports install and I removed the MacPorts install and downloaded new 5.1.4 binaries from Lua.org. The luac from those binaries produced the same "Info.lua: bad header in pre-compiled chunk." error (the bad header error came in all compiled files).

I found some posts in other forums mentioning encoding / locale settings causing this type of problem. I opened up my Windows XP (virtual machine) and downloaded the Lua binaries from Lua.org to the windows machine. After compiling the plugins lua-files in windows it worked without a flaw in Windows and Mac.

Something sucks in Luac 5.1.4 + OSX 10.6 + Lightroom 2.8 combination when trying to compile plugins.

So no real answers and only a bad workaround for Mac users....

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 08, 2010 Jun 08, 2010

It's 5.1 AFAIK.

I usually dupe the folder then overwrite each file. To be more precise I copy the directory listing into a text file and create all the compile commands there and then paste the whole thing into the CLI.

Sean McCormack. Author of 'Essential Development 3'. Magazine Writer. Former Official Fuji X-Photographer.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 11, 2010 Jun 11, 2010
LATEST

It's 5.1.2 to be precise ... same version we've used across all versions of Lightroom so far. That said, I don't think it matters which of the 5.1.x versions you use when compiling.

You should stay away from the Lua 5.2 prerelease versions as far as Lightroom is concerned. There are some new language features and I would not expect the byte codes from one to work in the other.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines