DeskGap is a framework for building cross-platform desktop apps with web technologies (JavaScript, HTML and CSS).

Overview

DeskGap

DeskGap is a framework for building cross-platform desktop apps with web technologies (JavaScript, HTML and CSS).

To enable native capabilities while keeping the size down, DeskGap bundles a Node.js runtime and leaves the HTML rendering to the operating system‘s webview.

Build Status Build Status

Supported Platforms

macOS Windows Linux
Version 10.11+ 7 SP11 - 10 version 1803 10 version 1809+ Tested on Ubuntu 16.04 LTS
Rendering Engine WebKit Trident EdgeHTML2 WebKit
  1. Internet Explorer 11 is required for Node.js interop to work
  2. Trident is also available if specified explicitly.

Downloads

Prebuilt Binaries

npm install --save-dev deskgap

API Demos

The DeskGap API Demos app shows some of the DeskGap features and APIs with interactive scripts.

macOS Windows Linux Source Code
Download Download Download GitHub

Pym: A Real-Life App Built With DeskGap

To test DeskGap on field, squoosh is wrapped into a desktop app "Pym" with DeskGap and submitted to the app stores.

macOS Windows Source Code
Download on Mac App Store Download on Microsoft Store GitHub

Getting Started

Creating a Node.js Package for your app

hello-deskgap/
├── package.json
├── index.js
└── index.html

package.json points to the app's entry file and provides the script that starts your app:

{
  "name": "hello-deskgap",
  "main": "index.js",
  "scripts": {
    "start": "deskgap ."
  }
}

index.js is the entry file that creates a window which will render an HTML page:

const { app, BrowserWindow } = require('deskgap');

app.once('ready', () => {
    const win = new BrowserWindow();
    win.loadFile('index.html');
});

index.html is the page to render:

>
<html>
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>Hello DeskGaptitle>
head>
<body>
  <h1>Hello DeskGaph1>
body>
html>

Installing DeskGap

npm install --save-dev deskgap

Starting Your App

npm start

Documentation

Work in Progress

FAQ

What’s the difference between DeskGap and Electron?

DeskGap is designed to be a more lightweight alternative to Electron. It does not bundle Chromium or any other web engines. Instead, the ability of rendering HTML pages comes from the webview provided by the operating system, specifically, WKWebView on macOS, IWebBrowser2 or WebViewControl (if available) on Windows, and WebKitWebView on Linux.

DeskGap is at its early stage. The API is still quite limited compared to Electron. Many functionalities are under development and some of them will probably never be possible. See this and this for more information.

There are already similar attempts (electrino and Quark for instance) out there. What makes DeskGap different?

With a Node.js runtime bundled, DeskGap comes with support for npm packages and all the battle-tested native capabilities in Node.js such as fs, net, http. The price is a larger executable size (about 8 MB zipped and 20 MB unzipped).

Can I port my Electron app to DeskGap without much modification?

Probably no. The DeskGap API is still quite limited.

Comments
  • Suggestion about linux implementation

    Suggestion about linux implementation

    Hey! Great work on this, super excited to try DeskGap on a personal project.

    Perhaps you could find some ideas on how to add linux from this project: https://github.com/zserge/webview

    opened by jaredreich 5
  • window.location.reload() breaks window.deskgap and drag

    window.location.reload() breaks window.deskgap and drag

    Using window.location.reload() in code removes the window.deskgap reference and all of the drag functionality from elements with the data-deskgap-drag attribute.

    Reloading with BrowserWindow works fine.

    wontfix 
    opened by TorstenDittmann 4
  • Can't run deskgap on Linux because of line endings

    Can't run deskgap on Linux because of line endings

    Hello,

    I was following the guide in the README on Ubuntu Linux 19.04. When I tried to run yarn start I encountered the following error:

    $ yarn start
    yarn run v1.16.0
    warning package.json: No license field
    $ deskgap .
    /usr/bin/env: ‘node\r’: No such file or directory
    error Command failed with exit code 127.
    

    If I execute /usr/bin/env node directly it works as expected:

    $ /usr/bin/env node
    Welcome to Node.js v12.4.0.
    Type ".help" for more information.
    > 
    

    Eventually I was able to resolve the issue by running dos2unix on the cli.js file:

    $ dos2unix ./node_modules/deskgap/cli.js
    dos2unix: converting file ./node_modules/deskgap/cli.js to Unix format...
    

    The file command shows that cli.js (and it looks like the rest of the files too) has CRLF line terminators:

    $ file ./node_modules/deskgap/cli.js    
    ./node_modules/deskgap/cli.js: a /usr/bin/env node script, ASCII text executable, with CRLF line terminators
    
    opened by matt-allan 3
  • feat: add 'will-finish-launching'

    feat: add 'will-finish-launching'

    Add support for 'will-finish-launching': https://electronjs.org/docs/api/app#event-will-finish-launching.

    For what I analysed of the code, this seems right. I'm really interested in this project. We're build a tray app and we're just using Electron because of its cross-platform flexibility but I'm feeling it as an overkill. There are some APIs you don't support yet, but I'd like to help with some 😄

    opened by hacdias 3
  • Window doesn't go on top on MacOS

    Window doesn't go on top on MacOS

    Hello!

    I'm noticing that when I run DeskGap on MacOS, the created window stays below terminal.. Is there a way to force newly opened window to be on top?

    opened by sheerun 2
  • Unable to load localhost with loadUrl()

    Unable to load localhost with loadUrl()

    Hello,

    I'm currently trying to run a Vue CLI 4 project inside DeskGap 0.3.0 using the following code:

    const { app, BrowserWindow } = require('deskgap');
    
    app.on('ready', () => {
        const win = new BrowserWindow({
          frame: false
        });
        // win.loadFile('index.html');
        win.loadURL('http://localhost:8080/')
    });
    

    Problem is that the URL is not loaded and instead I get about:blank. This only happens when I load localhost. When loading an external URL (example.com) everything works. I also have the exact same code in electron and it works.

    Platform is Win 10 20H1 and Node 13.10.

    opened by Blaconix 1
  • Bump pyyaml from 3.13 to 5.1 in /docs

    Bump pyyaml from 3.13 to 5.1 in /docs

    Bumps pyyaml from 3.13 to 5.1.

    Changelog

    Sourced from pyyaml's changelog.

    5.1 (2019-03-13)

    Commits
    • e471e86 Updates for 5.1 release
    • 9141e90 Windows Appveyor build
    • d6cbff6 Skip certain unicode tests when maxunicode not > 0xffff
    • 69103ba Update .travis.yml to use libyaml 0.2.2
    • 91c9435 Squash/merge pull request #105 from nnadeau/patch-1
    • 507a464 Make default_flow_style=False
    • 07c88c6 Allow to turn off sorting keys in Dumper
    • 611ba39 Include license file in the generated wheel package
    • 857dff1 Apply FullLoader/UnsafeLoader changes to lib3
    • 0cedb2a Deprecate/warn usage of yaml.load(input)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies python 
    opened by dependabot[bot] 1
  • Double windows created

    Double windows created

    This snippet create two window, one blank (mainWindow.show()) and one with the website loaded (mainWindow.loadURL())

    const { app, BrowserWindow } = require('deskgap');
    
    app.once('ready', () => {
        const win = new BrowserWindow();
    	
    	mainWindow = new BrowserWindow({
            show: false,
            width: 1280, height: 720,
        }).once('ready-to-show', () => {
            mainWindow.show();		
    		// mainWindow.maximize();
        });	   
    	mainWindow.loadURL("https://discordapp.com");
    	
    	mainWindow.on('closed', () => {
            mainWindow = null;
        });
    });
    

    My guess: loadURL should take effect inside the associated window instead of creating a new one

    opened by Armaldio 1
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • Inverse slash lose in NAPI cpp

    Inverse slash lose in NAPI cpp

    Currently, I'm ramping up with the project. I'm trying to add showItemInFolder support on Windows (just "copying" electron implementation). I encounter a strange issue that when the path string pass into the NAPI side:

    shellObject.Set("showItemInFolder", Napi::Function::New(env, [](const Napi::CallbackInfo& info) {
            std::string pathName = info[0].As<Napi::String>();
            UISync(info.Env(), [&]() {
            	Shell::ShowItemInFolder(pathString);
            });
    }
    

    The js part pass-in the C:\\Users, but the pathName here is C:User (From debugger view). The inverse slashes are lost. I tried to add more inverse slashes, but none of them shows up here.

    I'm a noob in CPP and NAPI. Is this a NAPI issue? I cannot find relative issue around NAPI topic.

    The showItemInFolder implantation works... If I hardcode the pathName

    shellObject.Set("showItemInFolder", Napi::Function::New(env, [](const Napi::CallbackInfo& info) {
           Napi::Env env = info.Env();
           std::string pathString = Napi::String::New(env, "C:\\Users");
           UISync(info.Env(), [&]() {
            	Shell::ShowItemInFolder(pathString);
           });
    }
    

    The folder shows up correctly.

    opened by ci010 0
  • [question]: js entry point

    [question]: js entry point

    been looking though the project to build a more native application than electron, i was looking to remove the requirement for a package.json but for the life of my cant find where the entry point is loaded (resources/app/package.json/main)

    any chance you can point me the right direction before i lose my mind? ^^;

    thanks

    opened by Ahriana 0
  • How to upgrade version of Node

    How to upgrade version of Node

    I understand that this project is no longer maintained and is pretty much dead. But the Electron like APIs and vastly reduced bundle size and support for vibrancy are a must for me. Only thing holding me back is the Node 12.x. I've built the project but can't work out how to upgrade Node. Anyone able to help on this..?

    opened by vpress-admin 1
  • Doesn't install. I get errors.

    Doesn't install. I get errors.

    C:\Users\azlan>npm install deskgap npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

    [email protected] postinstall C:\Users\azlan\node_modules\deskgap node install.js

    Downloading deskgap-v0.2.0-win32-ia32.zip Error: GET https://dl.bintray.com/patr0nus/DeskGap/deskgap-v0.2.0-win32-ia32.zip returned 403 Error: GET https://dl.bintray.com/patr0nus/DeskGap/deskgap-v0.2.0-win32-ia32.zip returned 403 at Request. (C:\Users\azlan\node_modules\nugget\index.js:169:61) at Request.emit (events.js:376:20) at Request.onRequestResponse (C:\Users\azlan\node_modules\request\request.js:1059:10) at ClientRequest.emit (events.js:376:20) at HTTPParser.parserOnIncomingClient (_http_client.js:647:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17) at TLSSocket.socketOnData (_http_client.js:515:22) at TLSSocket.emit (events.js:376:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\azlan\package.json' npm WARN azlan No description npm WARN azlan No repository field. npm WARN azlan No README data npm WARN azlan No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

    npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\azlan\AppData\Roaming\npm-cache_logs\2021-06-06T18_19_54_847Z-debug.log

    opened by Babyyoda777 1
  • Save dialog doesn't show with options

    Save dialog doesn't show with options

    Platform: Win64 Version: 0.2

    Wanted to post this for anyone that runs into this issue. When you show a save dialog on the UI, none of the options will do anything (title, file list, etc...) it will be a generic save dialog with no way to customize.

    To fix this you need to clone the project (make sure you download the v0.2 tag - it looks like 0.3 uses a new architecture of some sort without ipcMain & ipcRenderer), look for lib/src/platform/win/dialog.cpp in void Dialog::ShowSaveDialog function add PrepareDialog(saveDialog, options.commonOptions) just as it exists in the showOpenDialog function.

    Then to rebuild the 0.2 version, you need to make 1 change in node/CMakeLists.txt where it says FetchContent_Declare(nod...) simply add a reference to the old version of this repository as of v0.2 so it pulls the older code from when 0.2 was current.

    This is how it should look in CMakeLists.txt:

    set(NOD_NODE_VERSION v12.13.0) FetchContent_Declare( nod GIT_REPOSITORY https://github.com/patr0nus/nod GIT_TAG b65ed548f363d1bd5fab5fe68e3a776351813c61 )

    And then everything should rebuild and you can have custom save dialogs 👍

    opened by bep713 0
  • Installing on Ubuntu 20.04 LTS fails

    Installing on Ubuntu 20.04 LTS fails

    I'm trying to install deskgap from scratch on Ubuntu 20.04. but the npm install already fails during the installation script.

    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
    npm ERR! code 1
    npm ERR! path /home/maurice/Dokumente/Beruf/creactive/Bluepic/toolpic-editor/node_modules/deskgap
    npm ERR! command failed
    npm ERR! command sh -c node install.js
    Downloading deskgap-v0.2.0-linux-x64.zip
    npm ERR! Error: GET https://dl.bintray.com/patr0nus/DeskGap/deskgap-v0.2.0-linux-x64.zip returned 403
    npm ERR! Error: GET https://dl.bintray.com/patr0nus/DeskGap/deskgap-v0.2.0-linux-x64.zip returned 403
    npm ERR!     at Request.<anonymous> (/home/maurice/Dokumente/Beruf/creactive/Bluepic/toolpic-editor/node_modules/nugget/index.js:169:61)
    npm ERR!     at Request.emit (node:events:369:20)
    npm ERR!     at Request.onRequestResponse (/home/maurice/Dokumente/Beruf/creactive/Bluepic/toolpic-editor/node_modules/request/request.js:1059:10)
    npm ERR!     at ClientRequest.emit (node:events:369:20)
    npm ERR!     at HTTPParser.parserOnIncomingClient (node:_http_client:646:27)
    npm ERR!     at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
    npm ERR!     at TLSSocket.socketOnData (node:_http_client:512:22)
    npm ERR!     at TLSSocket.emit (node:events:369:20)
    npm ERR!     at addChunk (node:internal/streams/readable:313:12)
    npm ERR!     at readableAddChunk (node:internal/streams/readable:288:9)
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/maurice/.npm/_logs/2021-05-06T09_44_51_461Z-debug.log
    
    

    This looks like an iussue not just with the system's version but with the sources that throw a 403

    opened by MauriceConrad 6
Releases(v0.3.0-beta2)
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. 🚀

NodeGui Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. ?? NodeGUI is powered by Qt5 ?? which make

NodeGui 8.1k Dec 30, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Pietro Gagliardi 10.4k Jan 2, 2023
RmlUi - The HTML/CSS User Interface library evolved

RmlUi - The HTML/CSS User Interface Library Evolved RmlUi - now with added boosters taking control of the rocket, targeting your games and application

Michael R. P. Ragazzon 1.6k Jan 7, 2023
A small C library for building user interfaces with C, XML and CSS

LCUI A small C library for building user interfaces with C, XML and CSS. Table of contents Table of contents Introduction Features Screenshots Related

Liu 3.9k Dec 27, 2022
A library for creating native cross-platform GUI apps

Yue A library for creating native cross-platform GUI apps. Getting started Documentations FAQ Development Examples Sample apps (with screenshots) Muba

Yue 2.8k Jan 7, 2023
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 21 Dec 3, 2022
Neutralinojs is a lightweight and portable desktop application development framework

Neutralinojs is a lightweight and portable desktop application development framework. It lets you develop lightweight cross-platform desktop applications using JavaScript, HTML and CSS.

Neutralinojs 6.3k Dec 30, 2022
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Ashampoo Systems GmbH & Co KG 1.6k Dec 27, 2022
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Ultimate++ 564 Jan 8, 2023
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

null 4.8k Jan 7, 2023
Create macOS universal binaries of your Qt apps

With Apple transition from Intel to Apple Silicon (arm64) CPUs, developers have to deal with Universal binaries in macOS (again) in order to support t

CrystalIDEA Software 60 Dec 25, 2022
Radio.Garden desktop app and game overlay

Radio.Garten A radio.garden desktop client and overlay written with SDL2 and ImGui Overlay Example Overlay Compatibility Please check the compatibilit

null 12 Dec 8, 2022
AirPods desktop user experience enhancement program

AirPodsDesktop AirPods desktop user experience enhancement program

Sprite 381 Jan 5, 2023
Modern Window Sitter for X11 based Desktop Environments

Modern Window Sitter for X11 based Desktop Environments (Coming to Wayland, Windows and Mac soon-ish). But using with a terminal emulator is recommended.

Antony Jr 40 Nov 30, 2022
Lagrange is a desktop GUI client for browsing Geminispace.

Lagrange is a desktop GUI client for browsing Geminispace. It offers modern conveniences familiar from web browsers, such as smooth scrolling, inline image viewing, multiple tabs, visual themes, Unicode fonts, bookmarks, history, and page outlines.

Jaakko Keränen 954 Jan 1, 2023
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell, C# bindings and Java bindings available.

webview 10.8k Jan 9, 2023
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Immediate Mode UIs, Nuklear, etc. 6.7k Dec 24, 2022
Cross-platform malware development library for anti-analysis techniques

The Anti-Analysis Menagerie Cross-platform malware development library for anti-analysis techniques. Design Goals Provide a rich and convenient interf

Alan 21 Sep 16, 2022
Taitank is a cross platform lightweight flex layout engine implemented in C++.

Taitank is a cross platform lightweight flex layout engine implemented in C++.

Tencent 446 Dec 21, 2022