Go to file
fossabot b083811960 Add license scan report and status
Signed-off-by: fossabot <badges@fossa.io>
2018-07-22 11:13:03 -07:00
app Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
build Begining to transition over to electron-builder for building the app. Currently in a testing phase for this, gradually refining the build options. Once electron-builder has been fully implemented, the electron-packager scripts will be removed. Also updated electron to address a security issue. 2018-01-24 01:08:29 -05:00
docs Updated Distribution Index spec and impl. 2018-07-22 11:40:15 -04:00
libraries/java Various optimizations related to library extraction. 2018-04-28 23:34:23 -04:00
.eslintrc.json Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
.eslintrc.scripts.json Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
.gitignore Begining to transition over to electron-builder for building the app. Currently in a testing phase for this, gradually refining the build options. Once electron-builder has been fully implemented, the electron-packager scripts will be removed. Also updated electron to address a security issue. 2018-01-24 01:08:29 -05:00
.nvmrc Upgraded dependencies, pinned Node.js version. 2018-07-05 21:06:06 +02:00
.travis.yml Updated Distribution Index spec and impl. 2018-07-22 11:40:15 -04:00
dev-app-update.yml Added basic auto update implementation. 2018-04-28 16:26:38 -04:00
index.js Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
package-lock.json Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
package.json Added eslint. To lint, npm run lint. 2018-07-22 13:31:15 -04:00
README.md Add license scan report and status 2018-07-22 11:13:03 -07:00

Getting Started

System Requirements:

This repository is dedicated to the development of the new custom launcher for the WesterosCraft server. This project is developed primarily with Node.js and the Electron framework. For further reference you may view the repository of the new launcher written in JavaFX/Java which was discontinued. You may also view the repository of the current launcher, a modified fork of MCUpdater.

For authentication with Mojang, we are currently planning on using node-mojang. This will automatically be downloaded if you follow the simple installation instructions below.

The recommended IDE for this project is VS Code, an open source code editor by Microsoft. This editor is available on nearly every major platform (Windows, macOS, Linux). If you choose to use another editor, such as Atom, please gitignore the IDE specific settings directory, if it hasn't been already.

Installation

To begin working on this project clone the repository and open run the following command on the command line. This will download all of the required dependencies.

npm install

Launching

Command Line

There are several different ways to launch this project. One way is simply to run the following command on the command line.

npm start

Visual Studio Code

If you use VS Code, you can run this directly from the IDE. Copy the following code into your launch.json file. This will require you to also install Debugger for Chrome.

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug Main Process",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
      "windows": {
        "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
      },
      "args": ["."],
      "console": "integratedTerminal",
      "protocol": "inspector"
    },
    {
      "name": "Debug Renderer Process",
      "type": "chrome",
      "request": "launch",
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
      "windows": {
        "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
      },
      "runtimeArgs": [
        "${workspaceRoot}/.",
        "--remote-debugging-port=9222"
      ],
      "webRoot": "${workspaceRoot}"
    }
  ]
}

This will create two launch configurations from which you can debug the launcher. The first configuration, Debug Main Process, will allow you to debug the main Electron process. The second configuration, Debug Renderer Process, will allow you to debug the rendering of web pages (ie the UI).

You can find more information here.

Notes on DevTools Window

Once you run the program, you can open the DevTools window by using the following keybind.

ctrl + shift + i

Please note that if you are debugging the application with VS Code and have launched the program using the Debug Renderer Process configuration you cannot open the DevTools window. If you attempt to do so, the program will crash. Remote debugging cannot be done with multiple DevTools clients.

Building

Run either of the build scrips noted below. Note that each platform can only be build when running on the specific operating system. Currently investigating ways to run multi-platform builds efficiently.

Build for Current Platform

  • npm run dist

Platforms Specifc Builds

  • Windows x64 (win32 x64)
    • npm run dist:win
  • MacOS (darwin x64)
    • npm run dist:mac
  • Linux (linux x64)
    • npm run dist:linux

Issues / Further Support

If you run into any issue which cannot be resolved via a quick google search, create an issue using the tab above.

Much of the discussion regarding this launcher is done on #launcherdev in Discord, feel free to join us there.

DiscordFOSSA Status

License

FOSSA Status