paulrouget / servofocus

Experimenting with a Xamarin.Forms + Servo
5 stars 2 forks source link

How to build on Mac and other platforms? #44

Open corliss opened 6 years ago

corliss commented 6 years ago

Hello, the README has instructions for building libservobridge.so on Android, but not for the other platforms. I'm trying to build for Mac, iOS and UWP but don't know how. Would really appreciate some information about this - the README is the perfect place for it.

Just FYI, I've taken a couple of days off to get into this in my spare (vacation) time so a timely answer would really help :)

Thanks!

corliss commented 6 years ago

I was able to get the Mac version to build by:

At this point, the mac app runs, and the initial screen appears. However when I enter a URL and press enter, nothing happens. I've verified that _servo.LoadUrl(url) is getting called in MainViewModel.cs. Will continue to dig further, but do you have any idea what the issue might be?

mfkl commented 6 years ago

Hi,

I'm trying to build for Mac, iOS and UWP but don't know how.

iOS and UWP are not currently supported.

However when I enter a URL and press enter, nothing happens. Will continue to dig further, but do you have any idea what the issue might be?

Any logs from servo? Some webpages can have issues displaying, try duckduckgo or servo.org.

corliss commented 6 years ago

@mfkl, here's the stderr.log. There seem to be a few relevant errors. Any advice? Thanks!

thread 'ResourceManager' panicked at 'Could not find Servo HSTS preload file: Error { repr: Os { code: 2, message: "No such file or directory" } }', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'Constellation' panicked at 'assertion failed: mach_sys::mach_port_mod_refs(mach_task_self(), self.port,
                             MACH_PORT_RIGHT_SEND, 1) == KERN_SUCCESS', /Users/corliss/.cargo/registry/src/github.com-1ecc6299db9ec823/ipc-channel-0.9.0/src/platform/macos/mod.rs:336:12
thread 'StorageManager' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Custom(Custom { kind: ConnectionReset, error: StringError("No senders exist for this port.") }) })', src/libcore/result.rs:906:4
paulrouget commented 6 years ago

Hmm, yeah the issue is that, for now, Servo will looks for its resources directory in /tmp/resources. Just copy https://github.com/servo/servo/tree/master/resources in /tmp.