Launcher for GUI Node.js applications using libui-node.
Although native desktop applications can run in the standard Node.js environment, it is recommended to use LaunchUI to package and distribute them to end users.
Thanks to LaunchUI, users don't need to install any packages using npm or to use the command line. They don't even need to have Node.js installed. They can simply download the package, unzip it and run the application by double-clicking its icon.
LaunchUI wraps Node.js with a small executable which automatically runs the application. No console window is opened and in case of a fatal error, it is reported using a message box.
LaunchUI was created for Vuido, but it should also work with Proton Native and applications using vanilla libui-node.
The easiest way to create a package for your application is to use the LaunchUI Packager. It provides an API for creating packages for Windows, Linux and OS X.
You can also manually download the binary package for the target platform from LaunchUI releases, unpack it and replace the example app/main.js
script with your application script.
Usually there is no need to install LaunchUI, because during development you can use standard Node.js to run your application, and for creating packages it's recommended to use LaunchUI Packager which provides a more robust API.
You can install LaunchUI locally if you want to download the binary packages in your custom build scripts:
npm install --save-dev launchui
LaunchUI provides an API for downloading the binary packages for the given platform and architecture.
const launchui = require( 'launchui' );
launchui.download( {
version: '0.1.0',
platform: 'win32',
arch: 'ia32',
cache: './.cache'
}, function ( err, zipPath ) {
// zipPath will be the path of the downloaded or existing package
} );
The download()
function supports the following options:
version
: Version of the binary package to download. The default value is the current version of the launchui module.platform
: The platform of the package. The default value isprocess.platform
. The supported values arewin32
,darwin
(OS X) andlinux
.arch
: The architecture of the package. The default value isprocess.arch
. The supported values arex64
(on all platforms) andia32
(on win32/linux only).cache
: Path of the directory where the downloaded package is stored. The default cache location is~/.launchui
.
The current version of the launchui module is available as launchui.version
.
- Windows 7 or newer (32-bit and 64-bit)
- OS X 10.8 or newer (64-bit)
- Linux (32-bit and 64-bit)
Building LaunchUI is only necessary if you need to make some customizations. In most cases it's enough to use the binary packages provided in the LaunchUI releases.
Use the following command to download and extract the source codes of Node.js, libui and libui-node to the deps/
subdirectory:
npm run download
You can edit tools/download-deps.json
to change the versions of downloaded packages.
Use the following command to build all dependencies and the LaunchUI executable in 32-bit or 64-bit mode:
npm run build --arch=[ia32|x64]
The --arch
option is only supported on Windows. It makes it possible to select 32-bit or 64-bit target architecture. On Linux and OS X the target architecture is the same as the host architecture.
To build LaunchUI on Windows, you will need the following prerequisites:
- Visual Studio 2017 with C++ support
- CMake 3.0 or newer
- Python 2.6 or 2.7
- NASM
- Unix tools (they are installed as part of Git for Windows)
To build LaunchUI on Linux, you will need:
- build-essential
- GTK+3
- CMake 3.0 or newer
To build LaunchUI on OS X, you will need:
- Xcode
- CMake 3.0 or newer
Use the following command to create a binary package in the packages/
subdirectory:
npm run package --arch=[ia32|x64]
The --arch
option is only supported on Windows.
LaunchUI is licensed under the MIT license
Copyright (C) 2018 Michał Męciński