montoyo / mcef

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

Compiling Natives for Mac #7

Open BenjaminLawson opened 9 years ago

BenjaminLawson commented 9 years ago

Hi Montoyo,

I'm interested in doing whatever it takes to help you compile the JCEF natives for Mac. I have access to a Mac and I have some programming experience in Java and C++.

I know you made some changes from the original natives, so can give me some guidance on what natives I need to compile / what changes I need to make?

I assume I can follow the instructions at https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding to compile them, and I know you used rev 113 from the Google code svn.

Cheers!

montoyo commented 9 years ago

Hello, I am glad to finally meet somone who can help with the Mac stuff. However keep in mind that I never used XCode nor any iOS IDEs, so I won't be able to help you with the configuring stuff...

I recently moved from the rev 113 to a newer git revision but unfortunately I am in vacations (far away from my main computer) and I can't remember which rev I used. The latest release will probably work, but I'm not sure.

Anyway; Like you said, basic instructions for manual compiling are here: https://bitbucket.org/chromiumembedded/java-cef/wiki/BranchesAndBuilding You can find modified native files here: https://github.com/montoyo/mcef/tree/master/native All modified/added functions are marked with a comment starting with "//montoyo: ". Just copy & paste/replace them into your sources. Also don't forget to remove/comment out outdated JAWT stuff (linked libraries, includes and functions). If a function returns a jawt-related value just replace it by NULL or something random.

I hope I didn't forget anything!

BenjaminLawson commented 9 years ago

I have a lot of experience with Xcode, it won't be a problem.

Okay, I downloaded the latest release of JCEF, but it looks like I need to build the binary for the 3.2357.1286.gf615d24 release of CEF in order to compile JCEF (it's missing from https://cefbuilds.com). It is taking a long time.

I guess I'll post my changed files and the build to a git repo when I'm done.

BenjaminLawson commented 9 years ago

Haha, after 5 hours the build of CEF failed.

I will instead use JCEF from commit 153ef9e, with CEF 3.2357.1276.gd4b589c because it is already built. I just built it successfully, so I will edit the files and rebuild it.

EDIT: It's building fine, but the tests aren't working properly: they load the web page source code, and the cursor changes over elements, but it appears blank. I'm guessing this might mean something is wrong with the build, so it would be best to make sure this is working before we go through changing the files and trying to use the Mac build in MCEF.

EDIT 2: I think it is actually building correctly, but there might be a bug in this version of JCEF. Check out this issue: https://bitbucket.org/chromiumembedded/java-cef/issues/166/content-in-browser-not-visible-at-startup that's the problem I'm having. Seems to be partially fixed in commit 3a80f05.

montoyo commented 9 years ago

Yeah, I also failed at compiling CEF so I took it already compiled from cefbuilds.com (sorry I completely forgot to mention that :anguished: )

Anyway, I've never heard about this bug, maybe try another commit (they should all be compatible with MCEF). Also keep in mind that MCEF is using off-screen rendering, which is different from the rendering used by the tests. (Btw, MCEF resizes the view at the beginning so this bug shouldn't affect MCEF).

One last thing: You can't force MCEF to use a custom native. You'll have to setup a custom HTTP mirror which will look like this: (root) ++++|- config2.json ++++|- current_mcef_version (Latest is 0.7) ++++++++|- mac64 ++++++++++++|- resource1 ++++++++++++|- resource2 ++++++++++++|- resource3... ++++++++|- mac32 ++++++++++++|- resource1 ++++++++++++|- resource2 ++++++++++++|- resource3...

Here's an example: http://montoyo.net/jcef And then, change the "forcedMirror" option in the MCEF config file. If you can't setup an HTTP server for some reasons I'll write a custom MCEF version for you ;)

BenjaminLawson commented 9 years ago

Oh well, it was worth a try.

I'll keep trying with the same commit for now then.

I have made the same changes to the natives as you and built a release version, as well as generated a binary distribution. What is it exactly that MCEF needs? The windows files are substantially different from the Mac files.

build

screenshot_191

What is config2.json?

I will just set up an HTTP server on my local machine.

By the way, CEF only supports Mac 64 bit. Which is fine. It just means there is only 1 folder.

EDIT: Here are some of the same files I found in the jcef_app package: jcef-app

montoyo commented 9 years ago

Well... to be honest... I have no idea; I thought it would generate something called jcef.so... config2.json is a JSON file that contains the SHA-1 checksums of every MCEF resource files. It looks like this: http://montoyo.net/jcef/config2.json

The "locales" directory is renamed as "MCEFLocales" and stored as zip. The resource files list on windows looks like this: http://montoyo.net/jcef/0.7/win64/

I'll probably be more able to help when I'll be back home, in about 4 days ^^

BenjaminLawson commented 9 years ago

Okay, so we might have to take a different approach to adding the Mac JCEF to MCEF.

Here's a stackoverflow answer that explains using JCEF on a Mac: http://stackoverflow.com/questions/26991843/how-can-i-create-java-project-using-java-chromium-embedded-framework-in-mac-os-x

Here's the CEF documentation for the Mac CEF bundle pictured in my last post: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-mac-os-x

By the way, I found a thread that confirms that off screen rendering you use in MCEF fixes the bug: http://www.magpcss.org/ceforum/viewtopic.php?f=17&t=13172 ! :smile:

Alright, let's work on this when you get back. Enjoy the rest of your vacation!

EDIT: Yeah, https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage#markdown-header-windows explains the Windows and Mac CEF applications and shows you that the the jcef_app package is basically the same as your Windows directory for JCEF, just with more sub-directories.

Also, I don't think I did this: "Do not forget to remove the JAWT.lib from the linkers options", so I'm leaving a note here to remind us if that is a problem.

I also successfully built the right version of CEF (1286) this time for the latest version of JCEF.

jbdman commented 9 years ago

Any further movement on this, i'm really looking forward to web screens on mac, for now, ... BootCamp.

montoyo commented 9 years ago

Hi! Back home! So I've read some of your links @JordekFluffball + some other stuff about .so and .dylib on Mac. What I understood is that they are basically the same thing (dynamic libraries), and that they should work outside of the .framework archive (is it actually an archive?).

I've also read that the following libraries are enough for Mac:

What MCEF does is System.loadLibrary("jcef") and on Windows and Linux loading the jcef DLL/SO will also load dependant DLLs, that is, cef and ffmpeg. Apparently it does the same on Mac, so that's cool :D However, you still need to provide the following resources:

So you'll need to put all of these in the config2.json file. There's one more problem: locales should be in a common directory; but on Mac they seems to be stored several .lproj directories. Could you tell me what's in there? Thanks!

BenjaminLawson commented 9 years ago

Awesome! Glad to have you back!

Yes, I believe they are just libraries. ".framework" is just a special folder.

"libcef.dylib" does not exist.

screenshot_195

Each .lproj directory has a locale.pak file in it. screenshot_194

Regarding config2.json- is it possible to list no files in it and instead manually put the files in the directory where they are called from (is that Minecraft's instance directory)? I got MCEF working fine with a local server, but generating the checksums for files that might be wrong is annoying! :stuck_out_tongue_closed_eyes:

BenjaminLawson commented 9 years ago

Also, I tried out MCEF on Forge and I noticed that it incorrectly initializes as MCEF 0.6, so it gets files from the 0.6 directory on the web server.

Also, the current MCEF on github is for Forge for Minecraft 1.8, right?

vico93 commented 9 years ago

@JordekFluffball for 1.7.10

montoyo commented 9 years ago

There's an option to disable updates in the MCEF config file ;) The file called "Chromium Embedded Framework" in the "Chromium Embedded Framework.framework" directory; isn't this a .dylib/.so file? I'll have to read more about the locales directory stuff; I can't understand how it works on Mac... Also, the source on github is MCEF 0.7 for 1.8 :D

BenjaminLawson commented 9 years ago

So if I disable updates I can manually place the JCEF files?

"Chromium Embedded Framework" is a binary Unix Executable File (like an exe for Mac). Now that I think about it, that is probably the CEF library we need. (EDIT: it's also 64MB, does that sound right?)

Yeah, it's not all in one directory like on Windows unfortunately. But I think they are all the same files as Windows, just in different directories.

Got it, that would explain the 0.6 behavior from the compiled mod. I'll get Forge for 1.8...

montoyo commented 9 years ago

Yes, after disabling updates you can safely replace MCEF files, they shouldn't be replaced :D The 64 MB sounds perfectly right to me, the libcef Windows DLL is about 54 MB ;)

BenjaminLawson commented 9 years ago

Okay I gave it a go.

# Configuration file

main {
    # Set this to false if you don't want to enable the F10 browser. [default: true]
    B:exampleBrowser=true

    # A URL that contains every MCEF resources; for instance http://montoyo.net/jcef. [default: ]
    S:forcedMirror=http://localhost:8080/

    # Do not update binaries. [default: false]
    B:skipUpdates=true

    # Tells in the chat if a new version of MCEF is available. [default: true]
    B:warnUpdates=false
}

Note: I had the forced mirror set to my local server with config2.json and other directories. (EDIT: the server was not running for this test!)

screenshot_196

Added files selected in blue.

Console Error:

[23:06:45] [Client thread/INFO] [MCEF]: Loading MCEF config...
...
[23:06:46] [Client thread/INFO] [MCEF]: Now initializing MCEF v0.6...
[23:06:47] [Client thread/ERROR] [MCEF]: Couldn't download mcef2.new! Couldn't even get the HTTP response code!
[23:06:47] [Client thread/WARN] [MCEF]: Couldn't read remote config. Using local configuration file.
[23:06:47] [Client thread/INFO] [MCEF]: Detected platform: mac64
[23:06:47] [Client thread/WARN] [MCEF]: NOT downloading resources as specified in the configuration file
[23:06:47] [Client thread/INFO] [MCEF]: Now adding "/Users/.../eclipse" to java.library.path
[23:06:47] [Client thread/INFO] [MCEF]: Done without errors.
[23:06:47] [Client thread/ERROR] [MCEF]: Going in virtual mode; couldn't initialize CEF.
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.UnsatisfiedLinkError: /Users/.../eclipse/libjcef.dylib: dlopen(/Users/.../eclipse/libjcef.dylib, 1): Library not loaded: @loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
  Referenced from: /Users/.../eclipse/libjcef.dylib
  Reason: image not found
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.Runtime.loadLibrary0(Runtime.java:849)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.System.loadLibrary(System.java:1088)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.<init>(CefApp.java:165)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.getInstance(CefApp.java:252)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.getInstance(CefApp.java:239)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.client.ClientProxy.onInit(ClientProxy.java:102)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.MCEF.onInit(MCEF.java:44)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.post(EventBus.java:275)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.post(EventBus.java:275)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.Minecraft.run(Minecraft.java:942)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.main.Main.main(Main.java:164)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
[23:06:47] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at GradleStart.main(Unknown Source)
BenjaminLawson commented 9 years ago

So I think the key is this:

Library not loaded: @loader_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework

Which suggests it is looking in the wrong place for the "Chromium Embedded Framework".

BenjaminLawson commented 9 years ago

Now if I put the framework where it expects, along with everything else in the framework folder, I get a missing file error for icudtl.dat:

[23:28:48] [AWT-EventQueue-0/INFO] [STDOUT]: [org.cef.CefApp$5:run:497]: initialize on Thread[AWT-EventQueue-0,6,main] with library path /Users/.../eclipse
[23:28:48] [AWT-AppKit/INFO] [MCEF]: Scheme mod:// registered.
[0818/232848:ERROR:icu_util.cc(150)] icudtl.dat not found in bundle
[0818/232848:FATAL:content_main_runner.cc(697)] Check failed: base::i18n::InitializeICU(). 

Here are some threads about this issue: https://code.google.com/p/javachromiumembedded/issues/detail?id=109 http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=13099 http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12823 https://bitbucket.org/chromiumembedded/cef/issues/1532/use-api-to-find-out-the-path-to-cef (possible patch?) http://www.magpcss.org/ceforum/viewtopic.php?f=17&t=12968 https://bitbucket.org/chromiumembedded/java-cef/issues/109/linux-mac-fix-discovery-of-icudtldat

It seems there is a bug in chromium. "the path to icudtl.dat is hard-coded in Chromium relative to the executable and cannot be configured via resources_dir_path"

EDIT: I tried the bad fix in thread 1 and now:

[0818/234755:FATAL:isolate_holder.cc(70)] Couldn't mmap v8 natives data file

So I found this thread: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/75J9Y1vIc_E and applied the same bad fix as for the first error.

EDIT2: Now I get this error, on initialization, but Minecraft actually launches:

[0818/235317:WARNING:resource_bundle.cc(286)] locale_file_path.empty()
[0818/235317:ERROR:main_delegate.cc(641)] Could not load locale pak for en-US
[0818/235317:ERROR:main_delegate.cc(648)] Could not load cef.pak
[0818/235317:ERROR:main_delegate.cc(665)] Could not load cef_100_percent.pak
[0818/235317:ERROR:main_delegate.cc(674)] Could not load cef_200_percent.pak
[0818/235317:WARNING:resource_bundle.cc(483)] locale resources are not loaded
[23:53:17] [Client thread/INFO] [MCEF]: JCEF Version = 3.2357.116
CEF Version = 3.2357.1276
Chromium Version = 43.0.2357.81
[23:53:18] [Client thread/INFO] [MCEF]: volatile boolean Minecraft.running => running
[23:53:18] [MCEF-Shutdown/INFO] [MCEF]: Minecraft shutdown detection thread started.
[0818/235318:ERROR:icu_util.cc(150)] icudtl.dat not found in bundle
[0818/235318:FATAL:content_main_runner.cc(697)] Check failed: base::i18n::InitializeICU(). 
[23:53:18] [Client thread/INFO] [MCEF]: MCEF loaded successfuly.

And when I press F10 in game Minecraft crashes with this error:

[23:53:29] [Client thread/ERROR] [FML]: Exception caught during firing event cpw.mods.fml.common.gameevent.TickEvent$ClientTickEvent@1acc0cb2:
java.lang.AbstractMethodError: net.montoyo.mcef.client.ClientProxy.createBrowser(Ljava/lang/String;)Lnet/montoyo/mcef/api/IBrowser;
    at net.montoyo.mcef.example.BrowserScreen.initGui(BrowserScreen.java:32) ~[BrowserScreen.class:?]
    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294) ~[GuiScreen.class:?]
    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865) ~[Minecraft.class:?]
    at net.montoyo.mcef.example.ExampleMod.onTick(ExampleMod.java:94) ~[ExampleMod.class:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_ExampleMod_onTick_TickEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
    at cpw.mods.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:325) [FMLCommonHandler.class:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1678) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_45]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_45]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_45]
    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_45]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
[23:53:29] [Client thread/ERROR] [FML]: Index: 3 Listeners:
[23:53:29] [Client thread/ERROR] [FML]: 0: NORMAL
[23:53:29] [Client thread/ERROR] [FML]: 1: ASM: codechicken.core.internal.CCCEventHandler@10def5c clientTick(Lcpw/mods/fml/common/gameevent/TickEvent$ClientTickEvent;)V
[23:53:29] [Client thread/ERROR] [FML]: 2: ASM: net.montoyo.mcef.client.ClientProxy@538f2166 onTick(Lcpw/mods/fml/common/gameevent/TickEvent;)V
[23:53:29] [Client thread/ERROR] [FML]: 3: ASM: net.montoyo.mcef.example.ExampleMod@4aefa37f onTick(Lcpw/mods/fml/common/gameevent/TickEvent;)V
[23:53:30] [Server thread/INFO]: Stopping server
[23:53:30] [Server thread/INFO]: Saving players
[23:53:30] [Server thread/INFO]: Saving worlds
[23:53:30] [Server thread/INFO]: Saving chunks for level 'New World1'/Overworld
[23:53:30] [Server thread/INFO]: Saving chunks for level 'New World1'/Nether
[23:53:30] [Server thread/INFO]: Saving chunks for level 'New World1'/The End
[23:53:30] [Server thread/INFO] [FML]: Unloading dimension 0
[23:53:30] [Server thread/INFO] [FML]: Unloading dimension -1
[23:53:30] [Server thread/INFO] [FML]: Unloading dimension 1
[23:53:30] [Server thread/INFO] [FML]: Applying holder lookups
[23:53:30] [Server thread/INFO] [FML]: Holder lookups applied
[23:53:30] [Client thread/FATAL]: Unreported exception thrown!
java.lang.AbstractMethodError: net.montoyo.mcef.client.ClientProxy.createBrowser(Ljava/lang/String;)Lnet/montoyo/mcef/api/IBrowser;
    at net.montoyo.mcef.example.BrowserScreen.initGui(BrowserScreen.java:32) ~[BrowserScreen.class:?]
    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294) ~[GuiScreen.class:?]
    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865) ~[Minecraft.class:?]
    at net.montoyo.mcef.example.ExampleMod.onTick(ExampleMod.java:94) ~[ExampleMod.class:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_ExampleMod_onTick_TickEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
    at cpw.mods.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:325) ~[FMLCommonHandler.class:?]
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1678) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_45]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_45]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_45]
    at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_45]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]
[23:53:30] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 8/18/15 11:53 PM
Description: Unexpected error

java.lang.AbstractMethodError: net.montoyo.mcef.client.ClientProxy.createBrowser(Ljava/lang/String;)Lnet/montoyo/mcef/api/IBrowser;
    at net.montoyo.mcef.example.BrowserScreen.initGui(BrowserScreen.java:32)
    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294)
    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
    at net.montoyo.mcef.example.ExampleMod.onTick(ExampleMod.java:94)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_ExampleMod_onTick_TickEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at cpw.mods.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:325)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1678)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)
    at net.minecraft.client.Minecraft.run(Minecraft.java:962)
    at net.minecraft.client.main.Main.main(Main.java:164)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at net.montoyo.mcef.example.BrowserScreen.initGui(BrowserScreen.java:32)
    at net.minecraft.client.gui.GuiScreen.setWorldAndResolution(GuiScreen.java:294)
    at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:865)
    at net.montoyo.mcef.example.ExampleMod.onTick(ExampleMod.java:94)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_11_ExampleMod_onTick_TickEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at cpw.mods.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:325)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Player895'/195, l='MpServer', x=-260.50, y=65.62, z=103.50]]
    Chunk stats: MultiplayerChunkCache: 25, 25
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (-252,64,96), Chunk: (at 4,4,0 in -16,6; contains blocks -256,0,96 to -241,255,111), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 772 game time, 772 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Forced entities: 25 total; [EntityCreeper['Creeper'/68, l='MpServer', x=-290.59, y=44.00, z=64.06], EntityWitch['Witch'/69, l='MpServer', x=-292.50, y=40.00, z=91.50], EntityCreeper['Creeper'/70, l='MpServer', x=-298.50, y=30.00, z=97.50], EntityBat['Bat'/71, l='MpServer', x=-294.88, y=17.34, z=104.46], EntityClientPlayerMP['Player895'/195, l='MpServer', x=-260.50, y=65.62, z=103.50], EntityZombie['Zombie'/72, l='MpServer', x=-290.66, y=15.00, z=126.34], EntityZombie['Zombie'/73, l='MpServer', x=-295.72, y=14.00, z=124.47], EntityZombie['Zombie'/74, l='MpServer', x=-289.66, y=36.00, z=120.34], EntitySkeleton['Skeleton'/75, l='MpServer', x=-296.50, y=36.00, z=123.50], EntityZombie['Zombie'/90, l='MpServer', x=-287.66, y=36.00, z=113.34], EntitySheep['Sheep'/102, l='MpServer', x=-261.59, y=67.00, z=69.81], EntitySheep['Sheep'/103, l='MpServer', x=-263.38, y=65.00, z=70.81], EntitySheep['Sheep'/100, l='MpServer', x=-260.47, y=68.00, z=68.47], EntitySheep['Sheep'/101, l='MpServer', x=-265.88, y=64.00, z=70.09], EntityCreeper['Creeper'/98, l='MpServer', x=-261.50, y=48.00, z=76.50], EntitySkeleton['Skeleton'/99, l='MpServer', x=-261.50, y=48.00, z=78.50], EntityCreeper['Creeper'/104, l='MpServer', x=-266.50, y=39.00, z=116.50], EntityZombie['Zombie'/105, l='MpServer', x=-263.50, y=41.00, z=135.22], EntityZombie['Zombie'/119, l='MpServer', x=-230.47, y=13.00, z=68.28], EntityCow['Cow'/115, l='MpServer', x=-250.64, y=71.00, z=68.29], EntityCow['Cow'/114, l='MpServer', x=-252.50, y=70.00, z=64.50], EntityZombie['Zombie'/123, l='MpServer', x=-239.50, y=37.00, z=138.69], EntityEnderman['Enderman'/122, l='MpServer', x=-229.56, y=29.00, z=128.69], EntitySkeleton['Skeleton'/121, l='MpServer', x=-231.25, y=13.00, z=72.28], EntityZombie['Zombie'/120, l='MpServer', x=-229.66, y=13.00, z=74.34]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
    at net.minecraft.client.Minecraft.run(Minecraft.java:991)
    at net.minecraft.client.main.Main.main(Main.java:164)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)
BenjaminLawson commented 9 years ago

And now I have come back to this stackoverflow thread that I think we have to try: http://stackoverflow.com/questions/26991843/how-can-i-create-java-project-using-java-chromium-embedded-framework-in-mac-os-x

But in step 4 of the answer, I'm not sure how to change the working directory because it has to be the Minecraft folder! Maybe I could rename the Minecraft folder to trick it into thinking it's an app bundle? :confounded:

BenjaminLawson commented 9 years ago

I tried putting all of the Minecraft files in the jcef.app bundle, setting it as my workspace in Eclipse, and running it. Minecraft launches fine, but with this error:

[14:02:13] [Client thread/INFO] [MCEF]: Now initializing MCEF v0.6...
[14:02:13] [Client thread/ERROR] [MCEF]: Couldn't download mcef2.new! Couldn't even get the HTTP response code!
[14:02:13] [Client thread/WARN] [MCEF]: Couldn't read remote config. Using local configuration file.
[14:02:13] [Client thread/INFO] [MCEF]: Detected platform: mac64
[14:02:13] [Client thread/WARN] [MCEF]: NOT downloading resources as specified in the configuration file
[14:02:13] [Client thread/INFO] [MCEF]: Now adding "/Users/.../eclipse/jcef.app" to java.library.path
[14:02:13] [Client thread/INFO] [MCEF]: Done without errors.
[14:02:13] [Client thread/ERROR] [MCEF]: Going in virtual mode; couldn't initialize CEF.
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.UnsatisfiedLinkError: no jcef in java.library.path
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.Runtime.loadLibrary0(Runtime.java:849)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.System.loadLibrary(System.java:1088)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.<init>(CefApp.java:156)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.getInstance(CefApp.java:243)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at org.cef.CefApp.getInstance(CefApp.java:230)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.client.ClientProxy.onInit(ClientProxy.java:102)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.MCEF.onInit(MCEF.java:44)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.post(EventBus.java:275)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at com.google.common.eventbus.EventBus.post(EventBus.java:275)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.Minecraft.run(Minecraft.java:942)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.client.main.Main.main(Main.java:164)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at java.lang.reflect.Method.invoke(Method.java:606)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
[14:02:13] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at GradleStart.main(Unknown Source)

I think it finally found all the resources it needed, but not the jcef library. I think the error is the stack trace from this MCEF code:

CefSettings settings = new CefSettings();
        settings.windowless_rendering_enabled = true;
        settings.background_color = settings.new ColorType(0, 255, 255, 255);
        settings.locales_dir_path = (new File(ROOT, "MCEFLocales")).getAbsolutePath();
        settings.cache_path = (new File(ROOT, "MCEFCache")).getAbsolutePath();
        //settings.log_severity = CefSettings.LogSeverity.LOGSEVERITY_VERBOSE;

        try {
            cefApp = CefApp.getInstance(settings);
            cefApp.myLoc = ROOT.replace('/', File.separatorChar);

            CefApp.addAppHandler(new AppHandler());
            cefClient = cefApp.createClient();
        } catch(Throwable t) {
            Log.error("Going in virtual mode; couldn't initialize CEF.");
            t.printStackTrace(); //THIS IS THE STACK TRACE

            VIRTUAL = true;
            return;
        }

Then I tried adding the .jars from the screenshot I previously posted to the java build path, but I'm not sure I did it correctly: Project->Properties->Java Build Path->Libraries, and added the jars. This didn't work. Then I added "-Djava.library.path=${workspace_loc}/jcef.app/Contents/Java" to the client launch configuration arguments. This didn't work.

jbdman commented 9 years ago

I dont know much about java, but it looks like you have to add jcef to java.library.path, I will google this, and update you on any further progress.

BenjaminLawson commented 9 years ago

I put libjcef.dylib in jcef.app which is in java.library.path, and it found it. Then it gave me a framework not found error, since libjcef.dylib looks 2 directories up to find it (libjcef.dylib is supposed to be 2 directories deep). So I put the framework there, and it found it. Next, I get this error:

[Client thread/INFO] [MCEF]: Now initializing MCEF v0.6...
[14:42:37] [Client thread/ERROR] [MCEF]: Couldn't download mcef2.new! Couldn't even get the HTTP response code!
[14:42:37] [Client thread/WARN] [MCEF]: Couldn't read remote config. Using local configuration file.
[14:42:37] [Client thread/INFO] [MCEF]: Detected platform: mac64
[14:42:37] [Client thread/WARN] [MCEF]: NOT downloading resources as specified in the configuration file
[14:42:37] [Client thread/INFO] [MCEF]: Now adding "/Users/.../eclipse/jcef.app" to java.library.path
[14:42:37] [Client thread/INFO] [MCEF]: Done without errors.
[14:42:37] [Client thread/ERROR] [MCEF]: Going in virtual mode; couldn't initialize CEF.
[14:42:37] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.NoSuchFieldError: myLoc
[14:42:37] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.client.ClientProxy.onInit(ClientProxy.java:103)
[14:42:37] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]:     at net.montoyo.mcef.MCEF.onInit(MCEF.java:44)
cefApp.myLoc = ROOT.replace('/', File.separatorChar);

But you added the myLoc to CefApp.java, which is included in the MCEF mod, didn't you?

public class CefApp extends CefAppHandlerAdapter {

    //montoyo: Added this field to force him to use a defined location.
    public String myLoc = null;

Maybe it's looking at a different CefApp?

Edit: It is using jcef.jar, which doesn't have the myLoc field. Will try recompiling it with the change.

Edit2: After patching jcef.jar, I'm back at this error:

[0830/155910:ERROR:icu_util.cc(150)] icudtl.dat not found in bundle
[0830/155910:FATAL:content_main_runner.cc(697)] Check failed: base::i18n::InitializeICU(). 

I think this is because I had to move the Framework out of the app bundle to get this to work. The solution would be to add the app bundle location of libjcef.dylib and the .jars to the java.libary.path, but I don't know how to do that.

montoyo commented 9 years ago

Hello again :D, Like I said in issue #8, I apologize if I didn't answer, studies resumed and I have been busy moving stuff to "my new home"... First, I don't think you have to change anything in the java code: only the C++ part has to be patched (This means you should use the public MCEF JAR without modifying it :p)

Also, every libraries (.so or .dylib) should be in the .minecraft folder, which is already in java.library.path. About your base::i18n::InitializeICU(), there's a Mac/Linux bug in JCEF: See https://bitbucket.org/chromiumembedded/java-cef/issues/109.

Thanks!

BenjaminLawson commented 9 years ago

No worries, glad to hear from you!

Are you sure you didn't make changes to the jcef.jar that is in the MCEF jar? There are changes in this git repository, and MCEF seems to be looking for the myLoc field. MCEF isn't using its own jcef files like in Windows because of the Mac cef bundle issue (it looks inside the bundle for jcef.jar).

I am still using the public MCEF jar for 1.7.

See, I think it is different for Mac. The CEF framework needs all the Mac CEF resources to be in a .app bundle, but this means that they aren't in java.library.path (but the .app bundle can still be in the minecraft folder). Otherwise it looks in java/bin like in Linux for icutdl.dat and other resources and it can't find some resources regardless.

mloparco commented 8 years ago

Hello guys, Thank you for trying to MCEF to work on a Mac, I appreciate all the effort involved! It would be so awesome to have a Mac version of MCEF running – putting a browser inside MC would enable a whole new universe of experiences for us Mac folk. I'm going to give it a shot myself and I'll let you know if I'm able to make any progress in the coming days. Bonne chance!

DomAmato commented 8 years ago

@JordekFluffball I can't seem to get past the framework issue you faced though my error is slightly different. I built the CEF binaries from what I believe is the newest version and the output I get looks like this:

Library not loaded: @executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework

I tried setting the path to an app bundle with the proper folder structure as well as just having the dylib and framework outside the bundle but it never can find the framework...

This is the dylib outside an app bundle

java.lang.UnsatisfiedLinkError: /Users/domamato/Desktop/MCEFBuilder/run/libs/jcef/libjcef.dylib: dlopen(/Users/domamato/Desktop/MCEFBuilder/run/libs/jcef/libjcef.dylib, 1): Library not loaded: @executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
  Referenced from: /Users/domamato/Desktop/MCEFBuilder/run/libs/jcef/libjcef.dylib

This is with an app bundle

java.lang.UnsatisfiedLinkError: /Users/domamato/Desktop/MCEFBuilder/run/libs/jcef.app/Contents/Java/libjcef.dylib: dlopen(/Users/domamato/Desktop/MCEFBuilder/run/libs/jcef.app/Contents/Java/libjcef.dylib, 1): Library not loaded: @executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework
  Referenced from: /Users/domamato/Desktop/MCEFBuilder/run/libs/jcef.app/Contents/Java/libjcef.dylib
  Reason: image not found

I am trying to figure out a bit more about your process so that I can essentially X out some things and try something else maybe

DomAmato commented 8 years ago

I think I made progress thanks to this post: http://www.magpcss.org/ceforum/viewtopic.php?f=17&t=13856

I did that part at the bottom and ran this command on a libjcef.dylib that I built from source: install_name_tool -change "@executable_path/Chromium Embedded Framework" "@loader_path/Chromium Embedded Framework" libjcef.dylib

Note that the dylib is on the same level as the chromium embedded framework but that can be changed accordingly

Now I am getting this error but I know that is related to the native cpp files and can alter them accordingly. Ill let you know about any more updates. hs_err_pid9997.txt

DomAmato commented 8 years ago

Now I have this error: Assertion failed: (false), function SetJavaClassLoader, file /Users/domamato/Desktop/JCEF/java-cef/native/jni_util.cpp, line 66.

Which stems from here:

void SetJavaClassLoader(JNIEnv *env, jobject javaClassLoader) {
  ASSERT(!g_javaClassLoader); //this is not null?
  g_javaClassLoader = env->NewGlobalRef(javaClassLoader);
}

Strange since its the same code that windows compiled with and ran with but perhaps ill set it back to the edits made here instead of the updates made on the bitbucket jcef repo

DomAmato commented 8 years ago

The edits get me a bit farther but now I run into this error when it tries to initialize:

[0522/155439:FATAL:command_line_ctocpp.cc(330)] Check failed: !value.empty(). 

0   Chromium Embedded Framework         0x00000001786f1b83 cef_time_delta + 436099
1   Chromium Embedded Framework         0x0000000178707eb9 cef_time_delta + 527033
2   Chromium Embedded Framework         0x0000000178666a65 cef_log + 85
3   libjcef.dylib                       0x00000001264509df _ZN3cef7logging10LogMessageD2Ev + 95
4   libjcef.dylib                       0x0000000126479c57 _ZN20CefCommandLineCToCpp21AppendSwitchWithValueERK13CefStringBaseI20CefStringTraitsUTF16ES4_ + 311
5   libjcef.dylib                       0x000000012643959c _ZN9ClientApp29OnBeforeCommandLineProcessingERK13CefStringBaseI20CefStringTraitsUTF16E9CefRefPtrI14CefCommandLineE + 732
6   libjcef.dylib                       0x0000000126451326 _ZN12_GLOBAL__N_137app_on_before_command_line_processingEP10_cef_app_tPK19_cef_string_utf16_tP19_cef_command_line_t + 326
7   Chromium Embedded Framework         0x00000001785b4fef cef_api_hash + 4735
8   Chromium Embedded Framework         0x0000000178673e0b cef_get_current_platform_thread_handle + 54139
9   Chromium Embedded Framework         0x000000017b906c1e catch_exception_raise + 5184398
10  Chromium Embedded Framework         0x000000017860ce42 cef_zip_reader_create + 127458
11  Chromium Embedded Framework         0x000000017860cc2a cef_zip_reader_create + 126922
12  Chromium Embedded Framework         0x00000001785b17b9 cef_initialize + 281
13  libjcef.dylib                       0x00000001264a8198 _Z13CefInitializeRK11CefMainArgsRK13CefStructBaseI17CefSettingsTraitsE9CefRefPtrI6CefAppEPv + 216
14  libjcef.dylib                       0x000000012644cf47 +[CefHandler initialize:] + 247
15  Foundation                          0x00007fffa029ef5e __NSThreadPerformPerform + 279
16  CoreFoundation                      0x00007fff97280881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17  CoreFoundation                      0x00007fff9725ffbc __CFRunLoopDoSources0 + 556
18  CoreFoundation                      0x00007fff9725f4df __CFRunLoopRun + 927
19  CoreFoundation                      0x00007fff9725eed8 CFRunLoopRunSpecific + 296
20  HIToolbox                           0x00007fff96101935 RunCurrentEventLoopInMode + 235
21  HIToolbox                           0x00007fff9610176f ReceiveNextEventCommon + 432
22  HIToolbox                           0x00007fff961015af _BlockUntilNextEventMatchingListInModeWithFilter + 71
23  AppKit                              0x00007fff9449fefa _DPSNextEvent + 1067
24  AppKit                              0x00007fff9449f32a -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
25  libosxapp.dylib                     0x0000000117f8d3aa -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
26  AppKit                              0x00007fff94493e84 -[NSApplication run] + 682
27  libosxapp.dylib                     0x0000000117f8d14d +[NSApplicationAWT runAWTLoopWithApp:] + 156
28  libawt_lwawt.dylib                  0x000000011988555b -[AWTStarter starter:] + 905
29  Foundation                          0x00007fffa029ef5e __NSThreadPerformPerform + 279
30  CoreFoundation                      0x00007fff97280881 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
31  CoreFoundation                      0x00007fff9725ffbc __CFRunLoopDoSources0 + 556
32  CoreFoundation                      0x00007fff9725f4df __CFRunLoopRun + 927
33  CoreFoundation                      0x00007fff9725eed8 CFRunLoopRunSpecific + 296
34  java                                0x00000001012a7463 CreateExecutionEnvironment + 871
35  java                                0x00000001012a31ac JLI_Launch + 1952
36  java                                0x00000001012a94c0 main + 101
37  java                                0x00000001012a2a04 start + 52
38  ???                                 0x0000000000000006 0x0 + 6
DomAmato commented 8 years ago

I got it working but it required copying icudtl.dat, natives_blob.bin, and snapshot_blob.bin to the java home location. Not exactly an ideal setup, still looking into making some kind of reasonable bundle or folder setup that will allow this to be done painlessly

Edit: It stopped working and now its broken again, not sure what I changed either, moving the files to that java home location doesnt fix it either...

sudo-apt-get-install commented 7 years ago

Did Montoyo and everybody working on this project die?

vico93 commented 7 years ago

Maybe yes; i've even requested for somebody on MMD discord server to make an alternative mod for page rendering

montoyo commented 7 years ago

It's not dead. I was just working on different projects these last months. Also both Mac and Linux ports are much harder than you would think of : one of the main feature of MCEF (the mod:// protocol) is broken on non-Windows platforms.

sudo-apt-get-install commented 7 years ago

Holy crap you're not dead! I have an iMac if you need more support, since all the rest of your support is gone. I really hope you can get this working and if you need a tester just give me the build through Github.

jbdman commented 7 years ago

I'm also willing to do anything you need.

DomAmato commented 7 years ago

I am also not dead but had to move on to working on other things instead of fighting with chromium. It is significantly harder to get it working on osx because the file locations are hard coded into CEF instead of being mutable like the windows version. I can help out a bit but mostly through the failings of my previous attempts. I can post the scripts and file changes when I get back home from the holidays

montoyo commented 7 years ago

Glad to know I can have your help folks! Anyway; it's not only about owning a Mac anymore. There are two major bugs in Mac/Linux JCEF right now:

I'll keep you updated.

cztomczak commented 7 years ago

Looks like the icudtl.dat not found in bundle error can be fixed in CEF v56 (2924) by setting CefSettings.framework_dir_path - this option was recently added in that branch and later.

DomAmato commented 7 years ago

Awesome, JCEF is still a little bit behind in terms of the chromium releases so it might take a little before that feature is available but once it does that should resolve this really annoying issue.

aaronliu0130 commented 5 years ago

I got it successfully compiled. I uploaded it here

aaronliu0130 commented 5 years ago

The app is working at least.

aaronliu0130 commented 5 years ago

There are also other files I uploaded. The only files I can't find is config2.json and ffmpegsumo.so. The cef binary is too big, and I can't upload that.

montoyo commented 5 years ago

Awesome! Have you tested it with MCEF? You don't need to upload your files, you could just setup an HTTP server on your local machine and use the "forceMirror" option in the MCEF config.

The mirror structure should be something like:

/
|-- config2.json
|-- {mod_version}
     |-- {platform}
          |-- resource1.ext
          |-- resource2.ext
          |-- ...

Also, config2.json should look like this: https://montoyo.net/jcef/config2.json

aaronliu0130 commented 5 years ago

Does mod_version stand for MCEF version or whatever's version? I don't really understand the http server thing.

aaronliu0130 commented 5 years ago

What's the ext file? Can I directly copy the config2.json?

aaronliu0130 commented 5 years ago

@montoyo I understand how to setup an http server, but I don't understand the "forceMirror" thing.

montoyo commented 5 years ago

MCEF downloads binaries from a so-called "mirror" (= an HTTP server that hosts these binaries). Right now, there's only one mirror, which is my own website: https://montoyo.net/jcef/

On startup, MCEF fetches the config2.json file from this mirror. Depending on the MCEF version and the platform its running on, it determines which binaries (= resources/files/whatever you'd like to call them) are required in order for MCEF to work. Then, it makes sure they exist and that they have the same SHA-1 checksum as the one in config2.json. If a file does not exist, or if its checksum differs, then it (re)downloads the file from https://montoyo.net/jcef/{mod_version}/{platform}/{missing_resource} where {mod_version} is the MCEF version, {platform} is the platform (one of win32, win64, linux32, linux64, mac32, mac64 if the resource is platform-specific or shared if the resource is the same across all platforms), and {missing_resource} is the filename of the missing resource.

So, it should be quite clear now that:

The config2.json format should also be quite obvious:

{
  "{mod_version}": {
    "platforms": {
      "{platform}": {
        "{resource}": "{sha1_checksum}"
      }
    },

    "extract": [ "{zip_to_extract}" ]
  },

  "latestVersions": {
    "{minecraft_version}": "{latest_mcef_version}"
  }
}

There are, however, a few tricks to this:

Also, just making sure, but: have you followed the natives instructions (https://github.com/montoyo/mcef/blob/master/native/README.txt) and applied all the patches? If you didn't, it's not going to work :/

aaronliu0130 commented 5 years ago

Thanks. And now I'm having some problems on uploading files.

aaronliu0130 commented 5 years ago

Also, how do you apply the patches?

montoyo commented 5 years ago

https://lmgtfy.com/?q=how+to+apply+patch+file Sorry but my time for MCEF/WD development is quite is limited :/ I can give you all the information you need about the internal operation of MCEF, but I can't answer every single basic dev question you might have; I'm afraid you'll have to be a little more independent...