Team-CC-Corp / JVML-JIT

A continuation of JVML which JITs Java bytecode to Lua bytecode rather than interpreting.
MIT License
30 stars 4 forks source link

Installer not working #27

Closed ElvishJerricco closed 10 years ago

ElvishJerricco commented 10 years ago

I'm aware. I just needed to push stuff to Github to even test it. Working on fixing...

ElvishJerricco commented 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...

ElvishJerricco commented 10 years ago

Apparently it has to do with a bug in LuaJ not letting binary strings work very well...

Yevano commented 10 years ago

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.

ElvishJerricco commented 10 years ago

Yea I'm working on making it use base64

Yevano commented 10 years ago

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.

ElvishJerricco commented 10 years ago

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...

ElvishJerricco commented 10 years ago

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

ElvishJerricco commented 10 years ago

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?

ElvishJerricco commented 10 years ago

Well it worked once. Tried it again and it's not working again -_-

urielsalis commented 10 years ago

For me, is still not working. Can you post how to install it just in case im doing something wrong?

Yevano commented 10 years ago

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.

urielsalis commented 10 years ago

Working in cc-emu redux, not working in computercraft 1.6.4. There is the same error with pastebin. string:1378 Could not connect

Yevano commented 10 years ago

Check your http whitelist. The script connects to github, so that could be your problem.

urielsalis commented 10 years ago

my http whitelist is set to *

Yevano commented 10 years ago

Just tried it again and it works. This is my config file. http://yevano.me/shr/2014-09-28_11-07-30.txt

urielsalis commented 10 years ago

you are not using computercraft 1.6.4, the config file have id numbers, this is my config http://pastebin.com/ekFqcYhv

urielsalis commented 10 years ago

And can you explain how to run the tests, I have compiled them already with ant and i have every class and a jar

Yevano commented 10 years ago

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.

urielsalis commented 10 years ago

Try erasing your config file so it generates a new one

urielsalis commented 10 years ago

Thats how im doing it http://imgur.com/AZnmn3T

ElvishJerricco commented 10 years ago

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

ElvishJerricco commented 10 years ago

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

urielsalis commented 10 years ago

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

http://i.imgur.com/Enc8Igh.png

ElvishJerricco commented 10 years ago

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