IMAGINARY / applauncher2

A graphical application launcher based on web technologies Mk2
Apache License 2.0
5 stars 1 forks source link

IMAGINARY AppLauncher Mark II

A graphic menu for launching applications. Based on HTML technologies! This is a rewrite of the IMAGINARY Application launcher.

This is a complete rewrite of the first AppLauncher that is fully configurable, translatable, supports from 1 to 18 applications that can be either HTML apps that run in an iframe or regular executable apps.

Goals

It should aim towards very clean layering:

The browser itself and the applications are out of the scope of this project. Facilities for integrating the three parts might be given in a separate repository, document, etc.

Installation

Just make the root directory accesible with a web server. You should also configure it... if you have no plans to configure this program then it's not the one you want.

Configuration

The configuration file is at cfg/config.yml. It is fully commented so it documents its own format. (NOTE: The JSON schema used for validation is also available at src/schemas/cfg.schema.json.)

The default configuration provided is for demo purposes and offers a number of CindyJS applications found in the internet. A sample configuration that accesses the apps locally is also provided (sample-local-cindy.config.yml).

Multiple configurations can be created using the name cfg/<prefix>.config.yml where prefix is an identifier made of a combination of uppercase and lowercase ascii letters, digits, underscores or dashes (e.g. cfg/cindy.config.yml). The active configuration can be set passing the config identifier through the cfg query string parameter (e.g. http://localhost/appLauncher/?cfg=cindy).

Applications

Applications are added to the AppLauncher by indicating the paths where they're installed in the config file. The indicated path should contain:

app.json

The app.json should contain the following keys:

Extra options can be set depending on the type of application.

iframe apps

These are web apps that will be launched inside an iframe within the appLauncher.

iframe apps can have the following keys:

executable apps

These are OS-level executable programs (can only be launched when running appLauncher within the electron browser).

remote apps

These are apps handled by a "Remote Launcher" registered by a Plug-In (see sample-remote-launcher.js).

API

Iframe apps have access to an API that allows them to execute operations and get information from the host appLauncher. API methods and properties are accesible through window.IMAGINARY.AppLauncher, check src/applauncher-api.js for documentation.

Themes

Themes allow overriding default CSS styles and images. Each theme has a directory inside themes where its default.css file and any extra assets are placed. If a theme is specified in the config.yml file its default.css file will be loaded dynamically when the appLauncher starts.

Note that the theme CSS files are precompiled from SASS files placed in sass/themes/<theme name>.

Plugins

Plugins allow injecting JS and CSS into the AppLauncher. Put plugins in the plugins directory. Each plugin should have a directory and a plugin.js file with the following format:

{
  "id":  "my-plugin-id",
  "version": "v1.0",
  "scripts": [
    "js/path-to-js-file.js"
  ],
  "stylesheets": [
    "css/path-to-css-file.css"
  ]
}

Both scripts and stylesheets are optional arrays. Each script and stylesheet specified will get loaded after the AppLauncher is built. Plugins can interact with the AppLauncher through the IMAGINARY.AppLauncher global object and the events published through IMAGINARY.AppLauncher.events.

Compilation

This app is built using several compilable languages:

To make any modifications re-compilation is necessary. You should install:

Afterwards run the following in the command line:

yarn

After it runs succesfuly you can compile as needed:

Credits

Designed and developed by Eric Londaits (eric.londaits@imaginary.org) for IMAGINARY.

License

Copyright 2017 IMAGINARY gGmbH

Licensed under the Apache License, Version 2.0.

See the LICENSE and NOTICE files for more details.