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

Feature request: HTML compiler for GUIs #69

Closed
34r7h opened this issue May 17, 2020 · 19 comments
Closed

Feature request: HTML compiler for GUIs #69

34r7h opened this issue May 17, 2020 · 19 comments
Assignees

Comments

@34r7h
Copy link

34r7h commented May 17, 2020

Hi, really great work here. I'm curious what kind of effort it would take to take a standard markup language, like xml or html, to compile native guis. Probably a monumental task, eh?

@adrien-thierry
Copy link
Contributor

hi @34r7h , in the objective to have something working fast, there is some c++ libs we can integrate as modules, i will check it
In a near future, it could be really great for NectarJS to have its own html engine

@34r7h
Copy link
Author

34r7h commented May 21, 2020

Yea, that would be an amazing near future. What can I do to help?

@adrien-thierry
Copy link
Contributor

You could try to integrate this lib as a nectar module : https://github.com/litehtml/litehtml

@34r7h
Copy link
Author

34r7h commented May 21, 2020

ok, i'll take a stab at this next week. is there a resource guide to follow for modules or should i use something like std-fs as a starting point?

@adrien-thierry
Copy link
Contributor

I will update the documentation for creating modules,

Else, yes, fs-std is a good start

@34r7h
Copy link
Author

34r7h commented May 24, 2020

ok, i'll make time to jump in. will ping w qs

@adrien-thierry
Copy link
Contributor

@34r7h I added the njs-http module, it could be easily integrated with a webview

Furthermore, i started the Android iPhone integration with a webview and events

@adrien-thierry
Copy link
Contributor

Maybe with this webview : https://github.com/zserge/webview

@adrien-thierry
Copy link
Contributor

adrien-thierry commented Jun 1, 2020

@34r7h i made it : nectar_modules/webview
It currently works on linux, you need pkg-config, gtk+-3.0 and webkit2gtk-4.0
webview

@34r7h
Copy link
Author

34r7h commented Jun 1, 2020

oh haha nice one!
i had just started a skeleton for the task but really i'm out of my depth with c https://github.com/34r7h/nectarjs/tree/master/nectar_modules/njs-webview

@34r7h
Copy link
Author

34r7h commented Jun 1, 2020

I'm using mac, where in nectar would we add the appropriate cocoa flag? i.e. from webview.h
or is this more complicated?

//
// ====================================================================
//
// This implementation uses Cocoa WKWebView backend on macOS. It is
// written using ObjC runtime and uses WKWebView class as a browser runtime.
// You should pass "-framework Webkit" flag to the compiler.
//
// ====================================================================
//

@adrien-thierry
Copy link
Contributor

In the package.json file of the module, in lib, override the pkg-config

@adrien-thierry
Copy link
Contributor

I will modify lib to accept différent arguments like compiler, platform etc

@34r7h
Copy link
Author

34r7h commented Jun 1, 2020

ur a legend mate. i'll tinker and give feedback

@adrien-thierry
Copy link
Contributor

Thx, i will update tomorrow the lib json property

@adrien-thierry
Copy link
Contributor

It's ok, you can setup libs regarding which platforms and which compilers will compile a module, check the njs-http package.json for example

lib:
{
   "default": "-defaultLib",
   "linux": "-linuxLib",
   "darwin": "-darwinLib",
   "win32": 
   {
      "default": "-gccWinLib",
      "cl": "/L crtLib"
   }
}

@adrien-thierry
Copy link
Contributor

Hi @34r7h , any news ?

@34r7h
Copy link
Author

34r7h commented Jul 11, 2020 via email

@adrien-thierry
Copy link
Contributor

Ok, thank you, I close this issue

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

No branches or pull requests

2 participants