montoyo / mcef

Minecraft ChromiumEF (based on JCEF)
Other
191 stars 85 forks source link

Mac Version #53

Open nicholasjackson opened 4 years ago

nicholasjackson commented 4 years ago

Hi there,

I have been looking at building a Mac version of the plugin so that web displays would be compatible on OSX.

So far so good I have the CEF building and was just looking at getting mcef to work with it. For the moment I am working round the resources when building locally but was wondering if you would accept a PR for this when done?

Kind regards,

Nic

nicholasjackson commented 4 years ago

I now have this all working, dependencies are contained in a single bundle which is built from the JCEF project. Need to tidy up a few things but so far so good.

Screen Shot 2020-04-14 at 12 00 03

You can see a video of this operation below, the audio qualiy is due to quicktime on my mac using the mic to record audio rather than record the output from minecraft.

https://drive.google.com/file/d/1vFRJzQcE9QTV-OvT4CLEoTbfOqgfzj2P/view?usp=sharing

Geertiebear commented 4 years ago

Hi, it's cool to see you got it working on Mac. I am interested in a Mac build too and I was wondering if there were any special build steps you had to take to get it working, and if so, if you would mind sharing them so I can try and compile a version for mac too. Thanks in advance.

killercatfish commented 4 years ago

Where are we on this? I am happy to donate a 2009 iMac to the cause to make this official :-)

mptorz commented 3 years ago

@nicholasjackson Is it possible to download your built from anywhere?

RomualdYT commented 3 years ago

Hello @nicholasjackson, any news about the mac version? :)

nicholasjackson commented 3 years ago

Hey sorry I thought I had already posted this, seems like I replied directly to an email.

I never found the time to finish tidying this up but I am happy to share where I am at with this.

The following branch is where I am building mcef from. There are quite a few changes in there, most of the code is to update to the latest version of JCEF library and to temporarily simplify configuration only for mac. https://github.com/montoyo/mcef/compare/master...nicholasjackson:mac

JCEF did not compile right out of the box for me, the script which runs post compilation of the JNI part failed on my mac, I worked round this by manually running the build.

To get things working I made a few changes to JCEF, the main change is to specify the location of the JCEF.app bundle, the framework should auto detect this but I could not get it to work, I think there is also another way of passing this information in but just to get things working, not as a lasting solution I exposed an existing parameter for framework location through the settings object.

https://github.com/chromiumembedded/java-cef/compare/master...nicholasjackson:mcef-hack

You can find the compiled jar for mcef along with the JCEF framework in the following location.

https://drive.google.com/drive/u/0/folders/1oSkcQzbp2iaw4gsok4-S3tQOW1TwmvTu

There is not really a great deal of work need to bring this up to a final state, it is mostly uncomment the other platform code and correctly determine how to configure the JCEF.app path without needing to change the JCEF source. The framework would also needs to be hosted in Montoyo's server as this is where the native binaries are downloaded from.

montoyo commented 3 years ago

Wow amazing work! I ended up thinking it was impossible.... A few things if you want to create a PR:

Anyway, like I said: amazing work. I believe a lot of people were waiting for this! Looking forward to your PR ;)

P.S.: Looks like I can't access the compiled binaries from your google drive link :/

nicholasjackson commented 3 years ago

Hey, sorry I have just fixed the permissions on the link.

https://drive.google.com/drive/folders/1oSkcQzbp2iaw4gsok4-S3tQOW1TwmvTu?usp=sharing

Ah yes, that branch is just a hack, I will reformat it and do a PR, will also see if there is a nicer way to get round JCEF application bundle without patching. I tried a million things when I first started experimenting and this was the only way to get it to load correctly.

I will try and work through through a PR this week, I am loving MCEF dude, such a cool project.

Nic

montoyo commented 3 years ago

Thanks. To be honest I don't really like to work on it because JCEF is unstable af. Cross-platform is a real challenge (as you can see 😆) and the new Minecraft launcher (which also relies on CEF) also creates a TON of issues.

mptorz commented 3 years ago

Amazing work @nicholasjackson 👍 I am really looking forward for your PR :)

mptorz commented 3 years ago

Also which version of WebDisplay are you using with it? When I a trying to load your compiled mcef with webdisplay I get this error:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from WebDisplays (webdisplays)
Caused by: java.lang.NoSuchMethodError: net.montoyo.mcef.api.API.registerScheme(Ljava/lang/String;Ljava/lang/Class;ZZZ)V
    at net.montoyo.wd.client.ClientProxy.preInit(ClientProxy.java:129)
geumu commented 3 years ago

yeah i have same error is there mac webdisplay mod exist?

Rubrizar commented 3 years ago

How is the procedure to install it? Can someone explain to me, please? :(

xueyeshengdan commented 3 years ago

Could you plz also provide a mcef.jar which compiles with FFmpeg?

lukaplayz commented 3 years ago

Hey sorry I thought I had already posted this, seems like I replied directly to an email.

I never found the time to finish tidying this up but I am happy to share where I am at with this.

The following branch is where I am building mcef from. There are quite a few changes in there, most of the code is to update to the latest version of JCEF library and to temporarily simplify configuration only for mac. master...nicholasjackson:mac

JCEF did not compile right out of the box for me, the script which runs post compilation of the JNI part failed on my mac, I worked round this by manually running the build.

To get things working I made a few changes to JCEF, the main change is to specify the location of the JCEF.app bundle, the framework should auto detect this but I could not get it to work, I think there is also another way of passing this information in but just to get things working, not as a lasting solution I exposed an existing parameter for framework location through the settings object.

chromiumembedded/java-cef@master...nicholasjackson:mcef-hack

You can find the compiled jar for mcef along with the JCEF framework in the following location.

https://drive.google.com/drive/u/0/folders/1oSkcQzbp2iaw4gsok4-S3tQOW1TwmvTu

There is not really a great deal of work need to bring this up to a final state, it is mostly uncomment the other platform code and correctly determine how to configure the JCEF.app path without needing to change the JCEF source. The framework would also needs to be hosted in Montoyo's server as this is where the native binaries are downloaded from.

hi I downloaded that mcef mod file from the google drive folder you provided and it still doesn't fix the mac issue. by the way, what do I have to do with that jcef_app.app

Gauthierrrr commented 3 years ago

Hello ! With Erasmus + and therefore the European Commission, the French Ministry for Europe and Foreign Affairs, Fonjep Solidarité Internationale, ISIT, and the University of Poitiers, (yes, yes, you read all these names correctly…) we are working on developing a Minecraft MEU. I'm not going to take the time to explain what it is because I'm being asked to return all my work on the project soon, so basically it's a mock European decision-making process where over 300 young people come from the whole of the European Union embody members of the European Parliament, ministers of the Council of the European Union, lobbyists, journalists, judges and citizens' representatives, for almost a week. Two years ago this happened in the National Assembly and 3 years ago in the European Parliament. This year we can't see the circumstances so we want to do it on Minecraft. I'll pass you all the details, except that it will be free for people, that we made an incoryable map and all ... But in fact at the beginning of the project we were asked if we could put screens capable of go to Minecraft. We immediately thought of the Web Displays mod. So we started the project because we had all the keys in hand, we finished the project, the event will take place at the end of July, the beginning of August, and we have just realized that the mod does not work on mac .. . We found this issue, but we don't understand what to do to get the final version of @nicholasjackson work. So please, can someone explain to me how to do this, or make me a video, or do the last manipulations and send a final file, that would be great! If @nicholasjackson or someone else is willing to help us, that would be great!! Our project could be successful! Thank you very much in advance !

ds58 commented 3 years ago

Hello ! With Erasmus + and therefore the European Commission, the French Ministry for Europe and Foreign Affairs, Fonjep Solidarité Internationale, ISIT, and the University of Poitiers, (yes, yes, you read all these names correctly…) we are working on developing a Minecraft MEU. I'm not going to take the time to explain what it is because I'm being asked to return all my work on the project soon, so basically it's a mock European decision-making process where over 300 young people come from the whole of the European Union embody members of the European Parliament, ministers of the Council of the European Union, lobbyists, journalists, judges and citizens' representatives, for almost a week. Two years ago this happened in the National Assembly and 3 years ago in the European Parliament. This year we can't see the circumstances so we want to do it on Minecraft. I'll pass you all the details, except that it will be free for people, that we made an incoryable map and all ... But in fact at the beginning of the project we were asked if we could put screens capable of go to Minecraft. We immediately thought of the Web Displays mod. So we started the project because we had all the keys in hand, we finished the project, the event will take place at the end of July, the beginning of August, and we have just realized that the mod does not work on mac .. . We found this issue, but we don't understand what to do to get the final version of @nicholasjackson work. So please, can someone explain to me how to do this, or make me a video, or do the last manipulations and send a final file, that would be great! If @nicholasjackson or someone else is willing to help us, that would be great!! Our project could be successful! Thank you very much in advance !

@Gauthierrrr Hi! I am very interested in your project and would like to help with your issue.

I have recent experience integrating CEF with Minecraft and could easily update MCEF to work with the latest versions of CEF on both Windows, MacOS, and Linux (if also required).

(For anyone else -- I will post forks of MCEF here that have been updated if and when I complete them)

ds58 commented 3 years ago

@Gauthierrrr I've updated my fork of MCEF to work on macOS. Please try it here: https://github.com/Ruinscraft/mcef/releases/tag/1.12.2-1.30

I would appreciate testing by anyone else as well

Gauthierrrr commented 3 years ago

Hello @dextonanderson ! I didn't answer earlier because we couldn't test what you did ... Our mac tester is busy this week and our entire organization team is on Windows ... But I'm still getting back to you now to thank you for your work! 👍 When our tester is back, we'll think about giving you a little paypal ... Just a quick question ... Would it be possible to remove the step on macOS to do at first launch? A big thank you again !!! 😊

ds58 commented 3 years ago

Just a quick question ... Would it be possible to remove the step on macOS to do at first launch?

Unfortunately without an Apple developer license ($100/yr) and a proper code signing certificate, there isn't a way to get around this.

If its an absolute requirement, shoot me an email and I'll see what I can do.

ds58 commented 3 years ago

@Gauthierrrr I should also mention that I will be getting an M1 Mac for other projects soon. Probably by next week.

I will be using it to compile CEF for M1 based Macs and updating my fork of MCEF to support them.

Just an FYI if this was also a concern you had since my current fork only supports Intel Macs.

Gauthierrrr commented 3 years ago

Malheureusement, sans licence de développeur Apple (100 $/an) et un certificat de signature de code approprié, il n'y a aucun moyen de contourner ce problème.

Let's say that for personal use it's not disturbing but to send it to the participants of our event it would be good because we have to justify ourselves on the fact that it is not a virus and that they can allow execution etc ... If there really is no way but to pay for a license, which we cannot, we will have to do without ...

Gauthierrrr commented 3 years ago

@Gauthierrrr Je dois également mentionner que je vais bientôt obtenir un Mac M1 pour d'autres projets. Probablement d'ici la semaine prochaine.

Je vais l'utiliser pour compiler CEF pour les Mac basés sur M1 et mettre à jour mon fork de MCEF pour les prendre en charge.

Juste une info si c'était aussi une préoccupation que vous aviez puisque mon fork actuel ne prend en charge que les Mac Intel.

Ohhhhhh! Niceeeee !!! 😍

ds58 commented 3 years ago

https://github.com/Ruinscraft/mcef/releases/tag/1.12.2-1.31

0o0kuki0o0 commented 2 months ago

hey @nicholasjackson when i want to start minecraft with ur mcef file it says that it cant find mcef even though i have your jar in the folder. is there any fix?