montoyo / mcef

Minecraft ChromiumEF (based on JCEF)
Other
193 stars 86 forks source link

Expression of Interest (Linux) #8

Open spannerman79 opened 9 years ago

spannerman79 commented 9 years ago

I would like to voice my expression of interest of a linux version so i can use your mod WebDisplays natively on linux.

I am willing to test builds for you if/when you want/need it.

My system setup; Ubuntu 15.04, x64, 16GB ram, i7 Java JDK 8u51

Update: Since creating this issue my system is now the following; Arch, x64, 64GB RAM, AMD Ryzen 3900X AdoptJDK8(LTS)

montoyo commented 9 years ago

Okay, I'll do it as soon as I'll be back home (in about 3 days). If I forget about it, please comment this post again ^^ thanks.

spannerman79 commented 9 years ago

Hi, just a friendly "bump" to remind you @montoyo :smile:

ajacobsen commented 9 years ago

Just commenting to show you that there are at least two people desperately waiting for a linux build. I already tried to do it myself but I failed to figure out what version of jcef I need to get the latest MC 1.7.10 version of mcef running.

montoyo commented 9 years ago

Alright guys. I'm finishing up something and I'll try to do it today. If I don't post any news tomorrow at 5am (France's time) then kill me ;)

spannerman79 commented 9 years ago

Nah no one will kill you lol

Its more to show that at least one (now two) people would be interested in linux capability for your mods thats all mate.

Usually when someone quotes a time its best if they state the time zone (UTC) they are in.

For example when you made your comment that was (approx) 8.55pm (UTC+10). If anyone else is watching this issue what @montoyo meant was 5am (UTC+2)

montoyo commented 9 years ago

Okay :D I successfully compiled JCEF for linux64 today. Let me run some tests to make sure that everything is compatible with MCEF, and then compile it for linux32 too. If everything goes fine, I'll release it tomorrow!

spannerman79 commented 9 years ago

Just a gentle "bump" to see how your getting on

spannerman79 commented 9 years ago

Is there something that I can do to help @montoyo ?

Not trying to be pushy but the last comment was 10 days ago with your success with JCEF for linux x64

montoyo commented 9 years ago

Hello Hello... :) Sorry if I didn't answer, studies resumed and I have been busy moving stuff to "my new home"... So uhm, as I said, compiling was the easy part. But there's a few problems with the linux port right now, that I need to fix:

Anyway, here's a little screenshot: http://montoyo.net/ShareX/MCEF%20Linux.png

spannerman79 commented 9 years ago

You have to copy icutdl.dat in your java/bin folder, which requires admin rights

This is a little bit of a worry (only for security reasons). Couldn't minecraft (java) be executed with a "security" type flag? For example -Djava.security.policy=some.file and some.file has the required commands to allow loading of icutdl.dat from its default location?

Sorry if I didn't answer, studies resumed and I have been busy moving stuff to "my new home"...

I know exactly whats that like so I hear you

spannerman79 commented 8 years ago

Just a gentle bump as it's been a month since any sort of update

Bricklou commented 8 years ago

Hello, I would like know when you will publish a version stable of JCEF. (Excuse me for spelling and grammar ,I do not speak really good English).

LokeYourC3PH commented 8 years ago

Any news on this @montoyo ? Been a while.

montoyo commented 6 years ago

Hello, we're two years later, everything is fine :) I'm working on porting everything to 1.12.2, and re-writing WebDisplays. I didn't forget about the Linux port and will try to do it after I updated WebDisplays.

Thanks for your very very very good patience. P.S.: Didn't mean to close the issue, that's why I re-opened it. Sorry :/

spannerman79 commented 6 years ago

Well I am very keen on seeing about getting this working on Linux if at all possible @montoyo

If i don't have to use my Win7 VM for gaming I won't. (bit off topic but if your curious as to how google for "arch pci passthrough" and you'll see it is possible)

ghost commented 6 years ago

I have gotten a 1.12.2 version to build for linux64 but I was curious if there was a way to get 1.7.10?

Tank-Missile commented 6 years ago

He doesn't plan to support 1.7.10 since backporting from 1.12.2 to 1.7.10 would require a complete rewrite. You should make a pull request since this mod could definitely use linux support. I'm curious to know how you got it working.

ghost commented 5 years ago

I'd also like to see Linux support.

FunProgramer commented 5 years ago

@montoyo Can you say my when you release mcef for Linux? Thank you, webdisplayfan

FrankiMC commented 5 years ago

Dont worry about it then Ill fine some OTHER MOD F U!!!

spannerman79 commented 5 years ago

Dont worry about it then Ill fine some OTHER MOD F U!!!

Seriously @FrankiMC ? You resort to abuse to someone that is doing this out of their own free will for others enjoyment?!

You are an immature ungrateful brat.

Finelarme9 commented 5 years ago

FrankiMC, why did not you insult people on your Askubuntu's 1139927 post as well since you have not had an answer either ? I have reported you. Minecraft community do not want such behavior. montoyo did an incredible job, point.

Tank-Missile commented 5 years ago

Since I'm noticing more activity on here, and the fact that @binary1230's pull request was finally closed, is it safe to assume that linux is now supported, or is close to being supported? If not, what can I do to help diagnose any remaining issues?

montoyo commented 4 years ago

Got MCEF working on linux 64 bits. However, there's a caveat: the user HAS to modify LD_LIBRARY_PATH on his own...

spannerman79 commented 4 years ago

Thats quite simple to do with MultiMC - see https://github.com/MultiMC/MultiMC5/wiki/Java-settings#custom-commands

Tank-Missile commented 4 years ago

@montoyo What exactly does LD_LIBRARY_PATH need to be set to? How should it be set? Why does it need to be manually set?

montoyo commented 4 years ago

@spannerman79 That sounds good @Tank-Missile You need to append the Minecraft folder to LD_LIBRARY_PATH. It has to be manually set because changing it at runtime has no effect (as far as I know, but I'll try to do it, just in case...), so you need to set it before you start Minecraft. This would look like this:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.minecraft
java -jar ./minecraft.jar #Or whatever the command is to start Minecraft on your linux...

But please note that this won't work yet since I haven't uploaded the linux-compiled binaries. First I need to make sure everything is working properly (including keyboard input; which apparently doesn't work well even on Windows)

spannerman79 commented 4 years ago

Reference: From the MultiMC discord; https://discordapp.com/channels/132965178051526656/134843027553255425/471558931660144640

wrapper script with the following possible env vars;

# Set up env - filter out input LD_ variables but pass them in under different names
export GAME_LIBRARY_PATH=${GAME_LIBRARY_PATH-${LD_LIBRARY_PATH}}
export GAME_PRELOAD=${GAME_PRELOAD-${LD_PRELOAD}}
export LD_LIBRARY_PATH="${MMC_DIR}/bin":$MMC_LIBRARY_PATH
export LD_PRELOAD=$MMC_PRELOAD
Tank-Missile commented 4 years ago

This is quite exciting to hear! I eagerly await the binaries.

FunProgramer commented 4 years ago

I am really happy to hear that ! Thank you

Bricklou commented 4 years ago

I did some test on linux and I managed to get the mod to work with native compiled on my own. I still have some bugs but it's a good start.

image

montoyo commented 4 years ago

Yeah... works but as I was expecting I'll have to fix the goddamn keyboard input...

Tank-Missile commented 4 years ago

@Bricklou Did you need to modify LD_LIBRARY_PATH in your testing as well? I compiled from the master branch, but still haven't had any luck yet.

Bricklou commented 4 years ago

Yes I did it, else it crash when I try to launch the game. And it work only in IDEA and not with the production jar. Impossible to load the mod with MultiMC. I had to change the code about the update of the file mcef2.json to avoid overrides and and Linux files inside. I also have some problems with cefRouter which is always null (there: https://github.com/montoyo/mcef/blob/0c67e3466c56f8f79b3b17775f960fc55a8518bb/src/main/java/net/montoyo/mcef/client/ClientProxy.java#L295) and add a condition to avoid null error. And finally, the game don't want to stop normally, even with the args given at the end of the README. If you want I can compress my configuration and send it.

montoyo commented 4 years ago

Interesting. Except the keyboard input, everything is fine here. Did you checkout the correct jcef commit and did you apply the patches ?

Bricklou commented 4 years ago

I didn't done any patch with JCEF, I just run it by copy all compilation output in the game folder and updated the mcef2.json. What the patch does ? Edit: for JCEF I just went to the manual build page and copy all command like writed on the page.

montoyo commented 4 years ago

Actually, the patches don't do much on Linux... the most important part is to use the correct jcef commit. Check out https://github.com/montoyo/mcef/blob/master/native/README.txt

Bricklou commented 4 years ago

Oh I see, I'm currently using the latest commit of JCEF (29f220db2ec079b9270054d9be5bcdacd8113717)

Tank-Missile commented 4 years ago

@montoyo I'm a bit confused now. Do I need to do more than a gradle build on the master branch? @Bricklou Yes, I noticed that MCEF would enter virtual mode due to a missing version entry in mcef.cfg. It seems certain entries aren't being generated in the file. Also, the mod loads on MultiMC for me.

Bricklou commented 4 years ago

I fixed that problem, the latest commit of the mod is in version 1.20, so you need to add manually all entries for JCEF files. There is my version of the file: mcef2.json.txt. You will also need to edit net/montoyo/mcef/remote/RemoteConfig.java line 75:

boolean ok = Util.download("config2.json", newCfg, null);

// to
boolean ok = false;

if (!MCEF.SKIP_UPDATES)
    ok = Util.download("config2.json", newCfg, null);

This change will avoid the file overwrite by MCEF when skipUpdates is set to true in the config.

Tank-Missile commented 4 years ago

@spannerman79 @Bricklou I made the changes needed to get the mod to the point where it asks for GAME_LIBRARY_PATH to be set, but setting GAME_LIBRARY_PATH is a different story. Attempting to set it with MultiMC is an absolute pain. The wrapper script appears to be outdated, and no matter what it's set to, I always receive the following error:

Error: Could not find or load main class Displays.natives

Bricklou commented 4 years ago

What if we put this variable in our bashrc/zshrc/... ?

Tank-Missile commented 4 years ago

Under normal desktop usage, searching under the minecraft directory for libraries is unnecessary. GAME_LIBRARY_PATH only needs to be set when launching the game.

spannerman79 commented 4 years ago

I can't test until @montoyo gives an alpha (or beta) build on Linux

@Bricklou if you are using MultiMC it doesn't read or touch bashrc vars - its why you cannot use optirun bashrc var and need to hook into an actual shell script. Or just use optimus-manager.

@Tank-Missile you shouldn't have to use a shell script - it should be able to be enetered directly into Pre-launch within MultiMC. Well in theory anyway.

Tank-Missile commented 4 years ago

@montoyo Any progress on this?

xunto commented 4 years ago

I can't wait to use it for my mods.

spannerman79 commented 4 years ago

@montoyo Is there any update on this? I still am very interested in helping out testing wise

montoyo commented 4 years ago

I don't know what's happening with Linux. Somehow, it works fine when I launch it from IntelliJ, but as soon as I build the mod and start Minecraft, CEF crashes. At first I thought it was the new Minecraft launcher (which also uses CEF, and this causes a lot of issues); but I just launched it without it and I still have that crash.

It's really annoying because I don't have any log that could help me... it just crashes. Even worse, I can't attach a debugger (such as GDB) because the JVM uses SIGSEGV internally to handle exceptions.

So yeah... not sure what's going on

spannerman79 commented 4 years ago

So yeah... not sure what's going on

@montoyo Could you create a little guide - either as a .md or a wiki link on how to (easily) compile MCEF & WebDisplays?

The more eye balls on this to help the quicker to pin-point and shine a light on issues.

NB: I've been spoilt with yay lol

Tank-Missile commented 4 years ago

So I compiled mcef myself and used it with the latest web displays version, but something is screwed up with cef or multimc. The .pak files can't be found. Just to be clear, the .pak files are indeed in the .minecraft folder. Also, mcefFiles.lst was generated. The exception handling needs to be fixed for that file. Here is the full log.