Skip to content

teymurbikbaeff-ctrl/qmjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

QMJS

A lightweight, native desktop runtime for Arch Linux and KDE Plasma designed to run web-based games (such as RPG Maker MV/MZ) and HTML5 applications natively. It serves as a modern, high-performance alternative to NW.js, utilizing Qt 6 QML (QtWebEngine) for hardware-accelerated UI rendering and Bun as a lightning-fast backend server.


Features

  • Dynamic Window Configuration: Reads metadata (title, window size, custom window icons) directly from the application's package.json.
  • NW.js & Node.js Compatibility Layer: Exposes key Node.js globals (require, process, Buffer) and filesystem APIs (fs, path, os, nw.gui) inside the browser context, enabling seamless execution of legacy desktop web games.
  • Synchronous Filesystem Operations: Intercepts fs operations (like reading/writing save files) and forwards them to a local Bun-powered HTTP backend using synchronous XMLHttpRequests.
  • Built-in Developer Tools: Press F12 inside the app window to toggle the Chrome DevTools panel side-by-side.
  • KDE Menu Shortcut Integration: Installs web applications natively, creating customized desktop launchers (.desktop) and menu entries in KDE Plasma.
  • Unified CLI SDK: Manage all applications with a single, standalone compiled tool (qmjs).

Prerequisites

Ensure you are running Arch Linux with KDE Plasma and have the necessary Qt 6 libraries installed:

sudo pacman -S qt6-declarative qt6-webengine qt6-webchannel

Installation

To compile and install the global QMJS CLI tool to your user space (~/.local/bin/qmjs), run:

make install

Ensure that ~/.local/bin is in your system's PATH. The installation script automatically appends the export line to your ~/.bashrc if it's not present. Remember to reload your terminal session or run:

source ~/.bashrc

Usage

Once installed, the qmjs command is available globally.

1. Run in Development Mode

Launch any application directory (it should contain package.json directly or inside a www/ subfolder):

qmjs run /path/to/project

Note: If no directory is specified, it defaults to the current directory.

2. Build/Package Application

Compiles the application into a standalone folder named after the project (or falls back to qjs_1 if unnamed):

qmjs build /path/to/project

The output directory will contain a self-contained runtime wrapper and all required game resources.

3. Install Natively to KDE Menu

Compile and register the app in your KDE Plasma application menu:

qmjs install /path/to/project

4. List Installed Applications

View all installed applications and their installation folders:

qmjs list

5. Uninstall Application

Removes the persistent bundle folder, the .desktop launcher, icon assets, and database registry entries:

qmjs uninstall <app_identifier>

6. Clean Up Build Files

Removes all temporary binaries, dist/ folders, and build outputs in the workspace:

make clean
# or
qmjs clean

File Structure

qmjs/
├── Makefile          <- Builds and installs the SDK globally
├── src/
│   ├── cli.js        <- Standalone JavaScript CLI application manager
│   ├── main.qml      <- QML scene graph container (coordinates WebEngineView)
│   ├── Backend.qml   <- KDE process manager for the server execution
│   ├── server.js     <- Bun HTTP static and filesystem bridge API server
│   └── bun/          <- Embedded Bun binaries
└── www/              <- Default welcome screen / developer workspace

About

A lightweight, native desktop runtime for Arch Linux and KDE Plasma designed to run web-based games (such as RPG Maker MV/MZ) and HTML5 applications natively

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors