[Screeninvader] Using luajit to bundle Lua bytecode, instead of objcopy/otool ..

Jay Vaughan seclorum at icloud.com
Fri Mar 13 21:24:28 CET 2015


So I’m trying to catch up with the Janosh changes this evening, and stumbled into this (on Darwin):


~/Documents/screeninvader/Janosh $ make
objcopy --input binary --output elf64-x86-64 --binary-architecture i386 JSON.lua JSON.o
make: objcopy: No such file or directory

This is one way to do this - but another way is to use luajit to generate a header file from .lua sources, and then include those headers in the c/c++ project.  See here for reference:

http://stackoverflow.com/questions/19416981/running-luajit-object-file-from-c

Before I fix up lua_script.h/.cpp to use this technique, I wanted to run it by you guys first .. is it a problem to have the external tool dependency in place (luajit) instead of using the objcopy/otool method?  My personal choice would be to use luajit - this means its the same tool on all platforms (no objcopy on Darwin) so I think this would be a cleaner/portable change - but it means auto-generated header (.h) files as a build step using luajit first.  No problems with that?  If no, then I’ll make the change ..


;
--
Jay Vaughan
seclorum at icloud.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.metalab.at/pipermail/screeninvader/attachments/20150313/2b2c0d2a/attachment.sig>


More information about the Screeninvader mailing list