LunaLua Concept - Improved Launcher

From Moondust Wiki
Revision as of 13:06, 12 November 2015 by Kevsoft (talk | contribs) (Created page with "This is a concept description about the new launcher. Please note that this is '''not''' LunaLoader. The new SMBX Launcher is an extra application which should replace the old...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a concept description about the new launcher. Please note that this is not LunaLoader. The new SMBX Launcher is an extra application which should replace the old launcher window.

Features which are implemented

  • Loading custom HTML files in the Chromium engine
  • Via C++/JS bridge you can specify which episode you want to autoload. In addition you can also set the saveslot and the character you want to play.


Features I want to implement/change

  • Hardcoding a default template page for those Episodes, which don't come with a custom html page. Horikawa already provided such a template.
  • Hardcoding the control bar and embed the main html in an iframe.
  • Handling settings via JSON on per Episode basis.
    • Adding a field in the JSON Episode file for update checking

Details: The Episode JSON file

{
    "general":
    {
        "main-page": "index.html",
        "update-check-website": "http://example.org/getVersion.php",
        "version-1": 0,
        "version-2": 7,
        "version-3": 9,
        "version-4": 1        
    },
    "custom":
    {
        "random-data": "Some random data"
    }
}

This JSON file must be called "episode.json" and must be in the episode folder.

The "general" JSON object will be parsed directly by the launcher.
The "custom" JSON object is accessible via Javascript.

The function getEpisodeInfo(String episodeSubDir, String jsonFile) will be changed to getEpisodeInfo() and returns the currrent "custom" JSON object of the current loaded episode page.

Details: The Update Checker

The update checker can be manually called by Javascript.
The function "boolean Launcher.checkUpdate()" can be called an will return true if the current episode has an update.

The update webpage must return following result:

{
    "current-version":
    {
        "version-1": 0,
        "version-2": 7,
        "version-3": 9,
        "version-4": 1        
    }
}

If the format is invalid or the server can not be contacted then false is returned.

Status

Planning