LC on Web

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

LC on Web

bhattigurjot
I've set up emscripten-qt on an older system with older versions of libraries as follows:
System: Mint 13
Clang: 3.2
LLVM: 3.2
Node: 0.10.0
Emscripten: 1.4.9
Emscripten-qt: Latest (last updated on Jan 2014)

I've had Mozilla Firefox version 10 on Mint 13, where the exported html crashed.
Then I ran the same in Firefox version 45.0, and it runs but seems little slow to me.

# If Qt is to be used for GUI
I do not know if Qt5 will work with this emscripten-qt as well. I will create a Qt5 based simple project and will try to convert with emscripten-qt and run in browser.

# Else
If Qt is not to be used for GUI, then how else are we going to create a GUI? I guess we will use the LC v3 engine and convert into JS using emscripten and then somehow use this library in a web application.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

dxli
Have a look at v3 gui, it's essentially nothing about GUI, except a proof of concept of the engine.

Basically, show the engine can run on web.

Emscripten qt seems to be a bad idea, if upstream is dead.

bhattigurjot wrote
I've set up emscripten-qt on an older system with older versions of libraries as follows:
System: Mint 13
Clang: 3.2
LLVM: 3.2
Node: 0.10.0
Emscripten: 1.4.9
Emscripten-qt: Latest (last updated on Jan 2014)

I've had Mozilla Firefox version 10 on Mint 13, where the exported html crashed.
Then I ran the same in Firefox version 45.0, and it runs but seems little slow to me.

# If Qt is to be used for GUI
I do not know if Qt5 will work with this emscripten-qt as well. I will create a Qt5 based simple project and will try to convert with emscripten-qt and run in browser.

# Else
If Qt is not to be used for GUI, then how else are we going to create a GUI? I guess we will use the LC v3 engine and convert into JS using emscripten and then somehow use this library in a web application.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

bhattigurjot
Then we will drop emscripten-qt and will only use emscripten to port c++ code. We need to build a web GUI, then we will connect c++ and JS using one of the methods as described here:
http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/

To create a GUI we can use some external framework.
Some open source frameworks like:
Semantic UI http://semantic-ui.com/
UI Kit http://getuikit.com/
OpenUI5 http://openui5.org/

Or non-open but free
jQWidgets http://www.jqwidgets.com/license/

Or if you already have another idea, please share that.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

dxli
Try to minimize the GUI, focus on the idea of the engine and script support, and what's in my mind:

1, no need to create buttons like in v2;
2, there's one canvas for 2D drawing rendering;
3, there's one input area for Scripts for commands to the engine. Similar to the current Lua support in v3, but probably be in JavaScript.

bhattigurjot wrote
Then we will drop emscripten-qt and will only use emscripten to port c++ code. We need to build a web GUI, then we will connect c++ and JS using one of the methods as described here:
http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/

To create a GUI we can use some external framework.
Some open source frameworks like:
Semantic UI http://semantic-ui.com/
UI Kit http://getuikit.com/
OpenUI5 http://openui5.org/

Or non-open but free
jQWidgets http://www.jqwidgets.com/license/

Or if you already have another idea, please share that.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

bhattigurjot
Alright.
I will test run a small c++ program with emscripten first and then understand the flow a little better. It is important to see how JS will load on the browser, how it affects the performance of the application.

The emscripten-qt example that I compiled, it produced 13mb .html file. Although it could probably because of Qt GUI interface. But anyhow, now that we are concentrating on the engine, I'll update some results soon.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

bhattigurjot
Hi dxli,

I ran few basic examples and emscripten works nicely. :)

I am now trying slightly complicated examples with make build system. Also
looking into Embind and WebIDL Binder for exposing C++ functions to Javascript.
https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#interacting-with-code-binding-cpp

Any thoughts on this?
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

dxli
Can you also start adding building scripts for v3 to build with emscripten?

bhattigurjot wrote
Hi dxli,

I ran few basic examples and emscripten works nicely. :)

I am now trying slightly complicated examples with make build system. Also
looking into Embind and WebIDL Binder for exposing C++ functions to Javascript.
https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#interacting-with-code-binding-cpp

Any thoughts on this?
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

bhattigurjot
Sure. I'll start with that.
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

bhattigurjot
In reply to this post by dxli
I have been able to build v3 with emscripten cmake. The boost library could not be dynamically linked, so it had to be included and compiled with v3.

Although so far only .o files are generated, and I was able to run librecad as usual. I guess I only build lcv3 with emscripten toolchain instead of gcc.

I will generate js files next.

For the minimalist approach, only lckernel and lcviewernoqt is required?
Reply | Threaded
Open this post in threaded view
|

Re: LC on Web

dxli
no, let's exclude anything Qt related for the time being, and we will create a viewer rendering to HTML canvas.

feel free to send in pull requests.


bhattigurjot wrote
I have been able to build v3 with emscripten cmake. The boost library could not be dynamically linked, so it had to be included and compiled with v3.

Although so far only .o files are generated, and I was able to run librecad as usual. I guess I only build lcv3 with emscripten toolchain instead of gcc.

I will generate js files next.

For the minimalist approach, only lckernel and lcviewernoqt is required?