I would like to add lua-lockbox, a pure lua cryptography implementation, to OpenOS, and I am not sure how to go about doing that. I am using OC 1.6.whatever (the latest release available).
I looked through the docs, but didn't find anything.
Take a look at how programs and libraries are set up in an OpenOS installation, then adapt the lua code from lua-lockbox!
lua-lockbox is designed for luarocks installation. We have no such support in OpenOS. So an install is going to be a manual thing.
I went ahead and looked at the code you linked. The first thing you would want to do is download all the source (outside of minecraft) and copy the lockbox folder into /lib/ (inside your OpenOS instance folder). Then from any script in OpenOS, you can use require() just as they do in their tests.
Since I'm feeling oddly generous :) I thought I'd also give you some scripts to help you just in case what I wrote in the first paragraph doesn't make sense, or is not an option (e.g. not your local world or server), or is tedious ... the following code you can run from within an OpenOS 1.6 instance, and this will essentially "install" lockbox for you.
https://gist.github.com/payonel/a0ccc712c4412f8a37504ffd116c7853#file-install-lua-lockbox-lua
Or, from OpenOS, you can just:
wget https://gist.githubusercontent.com/payonel/a0ccc712c4412f8a37504ffd116c7853/raw/18a02d97181adb6679255855d23813a499f3b1e6/install-lua-lockbox.lua
./install-lua-lockbox.lua
And you're done, in a script then you could test the Base64Tests to confirm the libraries can load
wget https://raw.githubusercontent.com/somesocks/lua-lockbox/master/test/Base64Tests.lua
./Base64Tests
The tests is successful if there is NO output after running it, you should just see your prompt return.
I'll take a look at that when I get MC running again (It loads to the main menu, but creating/loading worlds seems to just hang. I waited an hour before killing the process. Twice. Once with loading, the second with creating.)
By the way, if you change the "bufferChanges" config option to false, you
can then go to the World/OpenComputers/address-of-drive/ and that is the
drive that it is running on.
Also, please keep questions to the forums/irc, the issue tracker is for
feature requests/bugs.
On Sat, 9 Apr 2016, 12:49 PM Brisingr Aerowing [email protected]
wrote:
I'll take a look at that when I get MC running again (It loads to the main
menu, but creating/loading worlds seems to just hang. I waited an hour
before killing the process. Twice. Once with loading, the second with
creating.)—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/MightyPirates/OpenComputers/issues/1759#issuecomment-207688598
For future reference, for general support and questions, please use the forums or IRC, thanks!
Most helpful comment
lua-lockbox is designed for luarocks installation. We have no such support in OpenOS. So an install is going to be a manual thing.
I went ahead and looked at the code you linked. The first thing you would want to do is download all the source (outside of minecraft) and copy the lockbox folder into /lib/ (inside your OpenOS instance folder). Then from any script in OpenOS, you can use require() just as they do in their tests.
Since I'm feeling oddly generous :) I thought I'd also give you some scripts to help you just in case what I wrote in the first paragraph doesn't make sense, or is not an option (e.g. not your local world or server), or is tedious ... the following code you can run from within an OpenOS 1.6 instance, and this will essentially "install" lockbox for you.
https://gist.github.com/payonel/a0ccc712c4412f8a37504ffd116c7853#file-install-lua-lockbox-lua
Or, from OpenOS, you can just:
wget https://gist.githubusercontent.com/payonel/a0ccc712c4412f8a37504ffd116c7853/raw/18a02d97181adb6679255855d23813a499f3b1e6/install-lua-lockbox.lua
./install-lua-lockbox.lua
And you're done, in a script then you could test the Base64Tests to confirm the libraries can load
wget https://raw.githubusercontent.com/somesocks/lua-lockbox/master/test/Base64Tests.lua
./Base64Tests
The tests is successful if there is NO output after running it, you should just see your prompt return.