Skip to content
This repository has been archived by the owner on Sep 1, 2019. It is now read-only.

Troposphir/troposync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

troposync

A launcher, updater, news checker and general companion to the game Atmosphir, or rather, to the Troposphir server for said game.

It uses Electron and Angular as a frontend strategy, and the shared code is just plain Node. Everything is written in TypeScript.

Installation

This project uses electron-forge as its build and deploy tool, so you'll have to install that on your system. On the project root, run:

npm install --global electron-forge
npm install

To run the application, just electron-forge start, which will take care of compiling everything properly. In development you can use Ctrl+R to reload the webpage of the current window for faster iterations (note that this does not reload any code outside the browser window environment, e.g. index.ts and the like!)

Running the server

To start the APIs up, just use:

npm run serve

Configuring filesystem in development

If you're running in development with the intention on working on the updater code, you'll need to setup the server filesystem:

Create the following directory structure:

project root/
|-depot/**/.sync/
| |-base/
|   |-status.json
|-sync.json

There are a few key parts here:

  • depot/ This is the server project root, each folder inside it is a client-module. Each folder in depot/**/.sync/is a release, and the file status.json describes the versions that each release represents. You will need at least one release configured to successfully test the updater.
  • sync.json Here lies the general launcher client configuration, you can copy a default one from sync.example.json. The server uses the example port by default.

The client structure is stored in Electron's appData special path, in the directory troposync.

The status.json files

These files configure the project, and are quite simple currently:

{
    //List of modules, order is significant: they are applied top-to-bottom.
    "modules": [
        {
            //The folder which in which the module is stored
            "name": "ExampleModule",
            
            //Current version of the contents of this module
            "version": "0.0.1",
            
            //When enabled, files will copied to the gameRoot, 
            //otherwise it's the same as omitting this module definition
            "enabled": false
        },
         
        /* ... more modules... */
    ]
}

In the depot, they have a heavily altered terminology:

  • Each folder in the depot is equivalent to a module in the client
  • Modules in the depot are release deltas (contain all changed files for that version)
  • Entries in the status.json should be ordered by version, otherwise funky things may happen