Closed ElvishJerricco closed 10 years ago
I'm not sure what's going on here. The downloaded zip file appears to be almost (but not exactly) twice as large as expected. Not making much sense...
Apparently it has to do with a bug in LuaJ not letting binary strings work very well...
Oh yeah. It garbles anything above '\x127' unfortunately. The only way to fix it is to either encode the zip in a special way (so that no downloaded char is greater than max), or just bypass the zip and download the source files recursively.
Yea I'm working on making it use base64
If you want a bit of a challenge:
I once devised a system where you would encode binary files into 7-bit bytes. To encode, you read the file as a bit stream, reading 7 bits at a time per byte into your output stream of bytes. Then all that's needed to decode is to know the size in bits of the binary stream and to reconstruct the file back into its normal bytes.
I've never written code for that, but it seems really easy to implement.
Well base64 is pretty easy anyway. I'm pretty sure I've got it working, but I'm still having trouble getting the unzipping to work. Not sure why...
Btw, certutil is the command line utility on windows for encoding base64, right? On unix/linux there's just a command called base64, but I wasn't sure what the windows equivalent would be. Need it for the build file that will construct jvml.zip.base64
Ok so I got it decoding base64 into a zip file that it extracts. All that seems fine. And I tuned the build.xml file to mostly only include the files necessary to install. But the installed jvml can't find any classes... Did I forget something in the build.xml?
Well it worked once. Tried it again and it's not working again -_-
For me, is still not working. Can you post how to install it just in case im doing something wrong?
pastebin run NzNwtBQy
seems to work for me. The first time I ran it I got a too long without yielding
error, but after trying for a second time it worked. Try it once more and tell us what error you're getting.
Working in cc-emu redux, not working in computercraft 1.6.4. There is the same error with pastebin. string:1378 Could not connect
Check your http whitelist. The script connects to github, so that could be your problem.
my http whitelist is set to *
Just tried it again and it works. This is my config file. http://yevano.me/shr/2014-09-28_11-07-30.txt
you are not using computercraft 1.6.4, the config file have id numbers, this is my config http://pastebin.com/ekFqcYhv
And can you explain how to run the tests, I have compiled them already with ant and i have every class and a jar
jvml ClassName
I'm not really sure how it differs with a jar though as I haven't tried that yet.
And no I'm definitely running it on 1.6.4. I think the IDs have always been a thing even before that.
Try erasing your config file so it generates a new one
Thats how im doing it http://imgur.com/AZnmn3T
Just running the test_jvml.lua file should run all of the tests. Running test_jvml.lua followed by any number of the tests' names should run only those tests
Also, you're in the root folder expecting it to find the classes magically. You need to run with a class path argument for the tests build files. Or just run the test_jvml.lua program
When running test_jvml.lua(btw i had to download it from github manually and compile a jar) placed in the jvml folder(in root doesnt work) cant find jvml because is missing a "/" in the start. Here is an screenshot, the first line is some debug code i added to print the variable program
http://i.imgur.com/88U4l5n.png
And the code showing the line I added
I see. The installation you get from the installer doesn't include stuff like the build system or tests. It only includes the necessities to keep size down since computers have a space limit. You need to clone the github repo to use the build and test system
I'm aware. I just needed to push stuff to Github to even test it. Working on fixing...