Fly Application Creation - kitkatzecat/fly GitHub Wiki

Creating an application for Fly is a fairly straightforward process. This page covers the basic structure of a Fly application and the different components that are utilized.

Basic Structure

Every Fly application has the same basic structure.

images/Fly_Application_Structure_1.png

This structure is the bare minimum for a Fly application to run, with a few exceptions.

Application Manifest

The application manifest is a JSON (formerly XML, now deprecated) file that describes all attributes of the application to Fly. This file is essential to the application's ability to run. See the Application Manifest section of this document for the specifics on what goes in this file.

Index

The index is the main page for the application. This file is the main handler for what to do when the application is opened, and is specified in the Application Manifest. See the Pages section of this document for how to design an application's page.

Icon

The icon is a visual representation of the application that is shown next to the application title in many different places. See the Icon section of this document for specifics on icon design.

Application Manifest

The application manifest, as stated before, is a JSON file that describes the attributes, operations, and appearance of the application to Fly. This file is essential to the operation of any application in Fly.

Application Manifests used to be a XML-based format, which is now deprecated. However, this format may still be in use in some applications that have not been updated. Under no circumstances should the XML-based Application Manifest format be used for new application development. Opening an application that uses only a XML manifest will display a warning.

The following is an example of a simple Application Manifest file included with an Example application:

{
    "id": "SprocketComputers.Example",
    "name": "Example",
    "publisher": "Sprocket Computers",
    "version": "1.0",
    "icon": "%FLY.RESOURCE.URL.ICONS%application.svg",
    "date": 1608410162,
    "index": "index.php",
    "description": "An example application.",
    "window": {
        "position": {
            "x": "auto",
            "y": "auto"
        },
        "size": {
            "width": "60%",
            "height": "60%"
        },
        "title": "Example",
        "expand": true,
        "resize": true
    }
}

This manifest does not cover every property available in the Application Manifest, but is a good starting point for most applications. The following sections describe each property in more detail.

id

The ID of the application. This is (will be) used during installation to create the folder for the application in the system apps folder, and will also be used to refer to the application in commands. Should have the format Publisher.Application.

name

The name of the application. This should be a user-recognizable name, as it will be used to represent the application in places such as the Applications menu of the Jump list, in Options, and more.

publisher

The publisher of the application. As with the name, this should be a user-recognizable string of the application publisher's name, used to represent the application in places such as Options.

version

The application's version. Can be in any versioning format style, as this property is designed to be a user-friendly representation of the application's version, and not used by the system directly.

description

A short description of the application's functions. Currently only used on the application's Options page and on icon subtitles in File Manager's Applications view, but planned for more use.

icon

A URL to the icon to be used for the application. Ideally a SVG image, but could be any image format supported by Fly. This URL supports %-variables and can access any file within the scope of any %-variable, including its own files or the system icons resource folder.

Application icons may be shown in a variety of sizes ranging from 16x16px up to 256x256px or larger. For this reason, scalable vector formats such as SVG are strongly recommended.

Although an icon could theoretically be any file in the system, it is recommended that it only use its own files or the system icons, as other files may not be available on all systems. If a system icon is used, be aware that the appearance may vary between Fly versions.


...more to come...