nucleus-js / design

This repo is for the core design, discussion, spec, and tests for nucleus implementations.
Other
110 stars 20 forks source link

Add icon to packaged apps #26

Open piranna opened 8 years ago

piranna commented 8 years ago

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.

piranna commented 8 years ago

Ok, seems it's possible! :-D

http://www.compholio.com/elfres/ https://wiki.ubuntu.com/ELFIconSpec https://www.reddit.com/r/LinuxActionShow/comments/2a7d5c/need_help_with_annoying_elf_binary_icons/

creationix commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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:

creationix commented 8 years ago

@parro-it Thanks, this looks really promising!

creationix commented 8 years ago

@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 commented 8 years ago

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!