Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon to packaged apps #26

Open
piranna opened this issue Jul 6, 2016 · 10 comments
Open

Add icon to packaged apps #26

piranna opened this issue Jul 6, 2016 · 10 comments

Comments

@piranna
Copy link

piranna commented Jul 6, 2016

Since it's possible to generate a standalone static build of cduke with musl to combine it with a zip app, it would be good if possible to be able to set it an icon like on Windows and Mac, and make it a portable app. Don't know if Linux (more exactly ELF binaries) support this someway and if it's supported on general desktops, so this would needs some investigation before.

@creationix
Copy link
Member

Neat idea. Now to see if we can find a minimal gui library that can optionally be embedded.

Personally I'd be find with something like webgl + mouse/keyboard/touch inputs. Midi, serial, bluetooth, etc would also be awesome.

@piranna
Copy link
Author

piranna commented Jul 6, 2016

Neat idea

Thanks :-)

Now to see if we can find a minimal gui library that can optionally be embedded.

Personally I'd be find with something like webgl + mouse/keyboard/touch inputs. Midi, serial, bluetooth, etc would also be awesome

AFAIK there are Node.js modules for all of them, including a portable GUI one using native widgets... Anyway this should be up to the developer, isn't it? We can give them some orientation for best practices, too...

@creationix
Copy link
Member

Of course it's up to the developer, but with static musl binaries you can't dlopen binary addons. So the plan is to have a set of optional addons that you chose at compile time when making your binary prefix and then the userspace ecosystem can depend on them.

As an intial starting point, I'm just trying to think of the most minimal way to get some graphical ability.

@creationix
Copy link
Member

This choice can be automated. My dream is to have a service somewhere where you specify through an interface what platform/architecture you need as well as what binary libraries/versions you need and it builds a custom binary and sends it down. This build server can obviously cache common versions as well as have a local caching client.

In the luvit ecosystem I have metadata in the package.lua file where you can specify what version and flavor of luvi an app needs embedded. There are only two flavors currently and this is a problem. Thus the idea of having a system that builds on-demand for custom configurations.

@piranna
Copy link
Author

piranna commented Jul 6, 2016

This choice can be automated. My dream is to have a service somewhere where you specify through an interface what platform/architecture you need as well as what binary libraries/versions you need and it builds a custom binary and sends it down. This build server can obviously cache common versions as well as have a local caching client.

That looks nice :-)

@parro-it
Copy link

Hi, I'm pointed here by @piranna. You may be interested in embedding libui-node.

It is an addon that provide node binding for libui, a multiplatform (macOS, Linux, Windows) minimalistic GUI library written in C by @andlabs.

I noticed nucleus-js some time ago, and I'm watching your progress with seaduk, the project is really interesting! But I don't yet find the time to study it in details, so I don't exactly understand what are your needs, so I'll give you some sparse info:

  • I guess seaduck doesn't support the V8 C++ API, but if you need a C++ interface, since libui-node is using nbind, it consists primarily of plain C++ class. The V8 code could be easily abstracted away.
  • If you instead have to use a C api, you maybe better use libui directly...
  • The native GUI event loop is integrated with that of node using a libuv background thread. See unix implementation for example. If you are already using libuv, it could be adapted (or maybe it work as is)
  • There is also an ongoing rust binding project by @pcwalton that he plan to use for servo engine. You may find it useful for rustyduk

@creationix
Copy link
Member

@parro-it Thanks, this looks really promising!

@creationix
Copy link
Member

creationix commented Jul 22, 2016

@parro-it and yes, I have no intentions of using C++ or V8 binding APIs, the C APIs in duktape, lua, and mujs are much simpler and easy to use for me.

@parro-it
Copy link

As I said, if you want to use C you can directly use libui, for lua there are two independent bindings: https://github.com/zevv/libuilua and https://github.com/mdombroski/libui-lua.

You also may extract and reuse the event loop logic from libuv-node: I'm sure you'll find ways to enhance them, let me know if you do! The Windows implementation is particularly difficult, is driving me crazy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants