Jump to content
Ywa

Lua interpreter not using VirtualFileSystem

Recommended Posts

Hi,

 

I'm trying to protect only my Lua files by using an passworded ZIP. I load the ZIP via the package method and I'm passing the correct parameter. It seems the Lua files are loaded fine, but I can't execute them with Interpeter::ExecuteFile. The files are simply not found.

 

I've tried to put my main Lua file in the scripts folder and protect the rest (so it uses the 'import' directive from the main Lua file). But that isn't working either.

 

How come this doesn't work with protected ZIPs? (all of this works fine as long as it isn't protected!)

 

Thanks in advance.

Share this post


Link to post

If you just publish the game it will automatically zip and encrypt everything for you. That should work.

Share this post


Link to post

If you just publish the game it will automatically zip and encrypt everything for you. That should work.

I'm using incremental updates for public testing. Putting everything in 1 ZIP won't work. And the sound-engine which I use has no support for the Leadwerks VirtualFileSystem. So I really just want to protect my scripts, or at least most of them.

Share this post


Link to post

Well, the real answer is that passworded zip files, other than what the editor creates, are not a supported feature at this time.

Share this post


Link to post

Well, the real answer is that passworded zip files, other than what the editor creates, are not a supported feature at this time.

I understand that, but I've seen you posting about the package feature a couple times. And seeing it only breaks for password protected files, isn't it possible for you to look into this?

Share this post


Link to post

Of course. But this is still a bug, even though it's not a supported feature. And I can't imagine this taking a lot of time to fix. Seeing it already works with the normal publishing method.

 

I would really appreciate it. And else I will need to publish my game with all the Lua code, so anyone can pretty much make their own game with it without buying a Leadwerks license.

Share this post


Link to post

For anyone that has the same issue: I'm currently looking into compiling/converting my Lua code to bytecode. It seems to work good. Although I'm not sure how safe it really is.

Share this post


Link to post

Not much is safe in the world of interpretation. People can easily decompile Unity 3D code. I knew nothing about how to do it and in about 5 mins I did it with The Forest game on Steam. Not much can be hidden.

Share this post


Link to post

Lua byte code is pretty good. Just named the compiled file .luac and Leadwerks will load it preferentially. There is a Lua byte code decompiler, but I don't think the results are really usable.

 

Leadwerks encrypted zip files are unbreakable for all practical purposes.

Share this post


Link to post

Not much is safe in the world of interpretation. People can easily decompile Unity 3D code. I knew nothing about how to do it and in about 5 mins I did it with The Forest game on Steam. Not much can be hidden.

True that. :) Just need to protect a couple files.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...