Open Delta2Force opened 3 years ago
I have started work on a custom JNI hook to VirtualBox on the branch jni
. (https://github.com/Delta2Force/MCVmComputers/tree/jni) This will bring better performance to the table too, since this directly accesses VirtualBox's SDK over C calls.
I've been having issues getting it to work on Windows, so far it works on Linux pretty fine.
Everytime I try to start the VirtualBox Glue API in the JNI library, this error prints:
glue error LoadLibraryEx(C:\Program Files\Oracle\VirtualBox/VBoxCAPI.dll): 126
I have VirtualBox installed and the dll at that location exists. So I tried running a Dependency Walker on it, and there you go: OLEAUT32.dll is missing. What the dll is, I do not know, but this might just be an issue with my setup. I'll investigate.
Update: OLEAUT32.dll is not missing, it is solely missing imports, that being combase.dll which is also missing imports, which is ws2_32.dll which is also missing imports....... this is very confusing.
Okay, I've got the little few bits that are coded in working now! It works!!! The issue was that some .dll's in the VirtualBox directory weren't included in the dll search path. So I included them manually. The way I found this weird problem was finally using Process Monitor, with which I could go step-by-step through the DLL loading process, with which I could see that Glue was looking for a VirtualBox .dll in tons of folders. Phew, now that that problem is gone, I can focus on developing the hook further again :D
The big issue right now is the display. I have attempted overriding the Framebuffer, with the results being that the method of the overridden Framebuffer to update the screen with image data is never called. I have e-mailed a person who has asked on a forum about this, who also hasn't gotten it to work yet. Screenshotting is also a weird issue, as on Windows I can't get a SAFEARRAY's size. No idea why. I'll try to get it working.
Okay, VirtualBox stuff isn't working out, I'm thinking about finally fully switching to QEMU.
@Delta2Force Any news about 1.17 support?
@Delta2Force How is QEMU support coming along?
I haven't worked on this for a really long time, but I'll pick it back up sometime in the near future. I'm really busy right now so please don't wait for anything, I'll just pick it up once I get a little more free time.
@Delta2Force Can you make compatibility with vbox and QEMU (if u can also do vmware pls)
I reverted the entire 1.17 branch commit since the master branch didn't actually compile until now.
Currently rewriting code for 1.17 from the master branch.
Related to #143
I will work on this tomorrow at evening. The master build right now might work in your IDE, but it will not work once built. This is due to Minecraft's decision to update their Java version to 16, which completely breaks compatability with the VirtualBox API. I'm looking for ways to circumvent this, one might be just importing the old libraries which are no longer included with Java, I'll try my best.