Author Topic: Desktop Apps from JavaScript - Electron?  (Read 603 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3631
  • Karma: +34/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Desktop Apps from JavaScript - Electron?
« on: May 18, 2022, 02:32:24 pm »
Hi

As a theoretical exercise I want to know what would be required to port some javascript applications to run as desktop applications.

I will like to see Element, a Matrix chat tool, running as a desktop application. Currently Element is running on Dooble (You can test it here), so my guess is that we already have several of the libraries that it uses ported to OS/2.

But what is needed to have the "desktop" version of Element running on OS/2 as stand alone?
It seems that part of the trick is Electron ("If you can build a website, you can build a desktop app.")
It is needed for Electron to be ported? Is it some kind of compiler that will interpret Javascript to a desktop OS/2 app? Is it portable to OS/2 or we miss more things?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

jailbird

  • Newbie
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Desktop Apps from JavaScript - Electron?
« Reply #1 on: May 18, 2022, 08:25:42 pm »
As far as I'm aware, Electron uses Blink & V8, which are the Chromium/Chrome rendering engine and JavaScript VM.

So it would basically require porting Chromium to OS/2 :(.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 3664
  • Karma: +77/-0
    • View Profile
Re: Desktop Apps from JavaScript - Electron?
« Reply #2 on: May 18, 2022, 11:59:05 pm »
As far as I'm aware, Electron uses Blink & V8, which are the Chromium/Chrome rendering engine and JavaScript VM.

So it would basically require porting Chromium to OS/2 :(.

Dooble is Chromium based, so Blink or Webkit and V8 are available. What we would need is a framework. Looking quickly I don't see what Electron uses but I'd guess GTK.
Actually it seems to be its own framework. I see on Linux it does use GTK but a quick search doesn't show a QT version.
The equivalent under QT seems to be nodegui, https://github.com/nodegui/nodegui seems to use Mesa on Linux so 3D graphics probably needed or more porting.
« Last Edit: May 19, 2022, 08:01:17 am by Dave Yeo »

jailbird

  • Newbie
  • *
  • Posts: 40
  • Karma: +4/-0
    • View Profile
Re: Desktop Apps from JavaScript - Electron?
« Reply #3 on: May 19, 2022, 02:28:42 am »
Dooble is Chromium based, so Blink or Webkit and V8 are available. What we would need is a framework. Looking quickly I don't see what

Duh, brainfart. I knew it used Qt WebEngine, I just forgot that Qt WebEngine switched from WebKit to Blink. Teach me for replying before my morning caffeine, sorry!

Jochen Schäfer

  • Full Member
  • ***
  • Posts: 221
  • Karma: +20/-0
    • View Profile
Re: Desktop Apps from JavaScript - Electron?
« Reply #4 on: May 19, 2022, 08:18:33 am »
IF we could get a performant port of Electron, this would open the door for VS Code/VSCodium and a lot other stuff.