maneac / go-ultralight

Unofficial Golang bindings for the C++ Ultralight UI library
https://ultralig.ht
MIT License
32 stars 1 forks source link

could not determine kind of name for C.ulConfigSetDeviceScaleHint #9

Open ryanerwin opened 4 years ago

ryanerwin commented 4 years ago

I think this looks similar to your final comments on issue in #1

 ~/go/src/github.com/maneac/go-ultralight/examples/browser git:master / 87d 9h 8m
 ❯ go build
# github.com/maneac/go-ultralight
../../config.go:46:2: could not determine kind of name for C.ulConfigSetDeviceScaleHint
../../config.go:39:2: could not determine kind of name for C.ulConfigSetUseBGRAForOffscreenRendering

Same thing happened when trying to build any of the example/tutorials... Note that I did run try various rpath and LD_LIBRARY_PATH permutations, but still the same result each time.

 ❯ go version
go version go1.13.8 linux/amd64

 ❯ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 ❯ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
dzcpy commented 4 years ago

Same issue, on a Windows machine

ryanerwin commented 4 years ago

go-ultralight and muon have the same issue right now... the Ultralight binary libraries are not up to date with with go sourcecode... Personally, I think tying to a binary library makes this more difficult - seems when compiling against the source the breakage is a bit more graceful.

Anyway I was able to fix it for go-ultralight with the exact same procedure as for muon.

Just download the December 14th 2019 release of Ultralight.

Ultralight doesn't yet have much release history in their github releases, they just provided a link to an XML file of their S3 "Ultralight SDK" bucket hosted on digital ocean...

https://ultralight-sdk.sfo2.cdn.digitaloceanspaces.com/

For me on Linux x64 that's:

https://ultralight-sdk.sfo2.cdn.digitaloceanspaces.com/ultralight-sdk-09a3d2e-linux-x64.7z

For Darwin x64, I believe that would be:

https://ultralight-sdk.sfo2.cdn.digitaloceanspaces.com/ultralight-sdk-09a3d2e-mac-x64.7z

For Windows x64:

https://ultralight-sdk.sfo2.cdn.digitaloceanspaces.com/ultralight-sdk-09a3d2e-win-x64.7z

Using this libs and checking against the build errors that people reported on https://github.com/maneac/go-ultralight/issues/1 you should be able to build and run the examples.

Tutorial 1 - Render to PNG

image

Tutorial 2 - Basic App

image

Tutorial 3 - Resizable App

image

Tutorial 4 - Javascript

image

ryanerwin commented 4 years ago

I also looked at Sciter. They've actually done a much better job on their SEO than Ultralight. I didn't find Ultralight until much later.

However Sciter doesn't use regular JavaScript, so if you implement your UI for Sciter you're 100% locked into Sciter forever.

https://github.com/sciter-sdk/go-sciter/issues/125#issuecomment-375625835

Ultralight is obviously not feature complete, but if it can't meet your needs you can always switch to Electron, Webview, or just let people open a link to localhost in their browser. Definitely have a lot more options.

Gurkengewuerz commented 4 years ago

I dont know how lightweight you want to be, but as an alternative you can use cef. I've written go bindings for cef a while ago. I would personally switch back to ultralight if ultralight has more features and is ready for production. https://github.com/Gurkengewuerz/cefgo