Open paulrouget opened 6 years ago
fwiw, resources can be copied from here: https://github.com/servo/servo/tree/master/resources
That's how init is called now:
pub extern "C" fn init(
wakeup: extern fn(),
resources_path: *const c_char
width: u32
height: u32
}
Yeah. It's already in the repo https://github.com/paulrouget/servofocus/tree/master/xamarin/resources Found a way to include them in the shared project (referenced by all apps) as Embed Resources. Now looking into how to find the correct path on each platform.
I don't know if that helps, but usually we use externalDataPath / internalDataPath to access these resources on Android.
So yeah, it's not possible to access resources with an absolute path. So a workaround is to copy the resources to the sdcard at startup. That sucks.
For now, we can just copy the resources folder manually, but a long term solution is for Servo to not use an absolute path but a stream.
I posted on dev-servo about this issue.
Yeah I got the workaround implementation somewhere in my stash. Still want it?
Nope. Thanks. Let's do that manually for now.
I need the absolute path of the resources directory, where we put the Servo resources files.
No need to pass it to init just yet, I just need to know how to get it, as a
char *
./cc @mfkl