Skip to content

Latest commit

 

History

History
131 lines (96 loc) · 4.97 KB

README.md

File metadata and controls

131 lines (96 loc) · 4.97 KB

Nine Chronicles Launcher

Game Launcher with embedded NCG Wallet

Discord Planetarium-Dev Discord Invite

Overview

9c-launcher is a game launcher to run Nine Chronicles, with embedded private key management & NCG wallet capabilities. The launcher is written in Typescript, and uses GraphQL, Electron, React.

Features

  • Game execution and update, with multiple release channel support.
  • Automatically selects optimized RPC server for user's network
  • Private key creation, import from QR code or raw secp256k1 key, encrypt using Web3 Secret Storage specs.
  • NCG wallet: Send NCG to other addresses or swap to WNCG.
  • Supports Windows, macOS, Linux.

Setup

Note The repository is under refactor process, v2 changes will be still migrated, but if you want to participate in new version, but if you want to participate ongoing refactoring check out v3/dev and related branches.

First, install all dependencies required for development.

yarn

After, run the following command.

yarn codegen
yarn dev

Development

The basic frontend has webpack-hot-reload, which automatically reflects code changes. Developing the renderer process does not require electron relaunch. However, when there's a change in the main process, electron relaunch is required.

Build

yarn
yarn codegen
yarn build  # development build
yarn build-prod  # production build

Packaging

Note This section hasn't been used in production and it's likely outdated.

# generate/sign a new APV with the given private key and pack
APV_SIGN_KEY=... yarn pack-all
# generate/sign a specific APV with the given private key and pack
APV_SIGN_KEY=... APV_NO=1234 yarn pack-all
# pack with the given APV
APV=... yarn pack-all
# pack without APV (for reusing the APV of the latest release)
yarn pack-all

Packaging requires the following environment variables. If both the APV and APV_SIGN_KEY are ommited, APV(App Protocol Version) signing will not take place.

Replacing config.json content after packaging

Note This section hasn't been used in production and it's likely outdated.

For replacing the configuration content of config.json in the already packed Windows.zip or macOS.tar.gz, it's convenient to use the scripts/extract-config.sh and scripts/replace-config.sh scripts.

# extract config.json content from package (supports Windows.zip and macOS.tar.gz)
scripts/extract-config.sh path/Windows.zip > config.json
# replace config.json content in package (supports Windows.zip and macOS.tar.gz)
scripts/replace-config.sh path/Windows.zip < config.json

Packaging with electron-builder

Note that building with electron-builder is experimental.

# Windows (nsis)
# macOS (dmg, zip)
yarn pack-all:electron-builder

Log Path

Logs are saved in the following paths:

- on macOS: ~/Library/Logs/Nine Chronicles/{process type}.log
- on Windows: %USERPROFILE%\AppData\Roaming\Nine Chronicles\logs\{process type}.log

Visual Studio Code Extensions

Install the following extensions in the Visual Studio Code extensions page(Windows: ⇧⌃X, macOS: ⇧⌘X):