Skip to content

decentraland/explorer-desktop-launcher

Repository files navigation

Decentraland Explorer Desktop Launcher

A launcher to auto update the unity-renderer (https://github.com/decentraland/unity-renderer)

Available Scripts

npm run start

Runs the Electron app in the development mode.

The Electron app will reload if you make edits in the electron directory.
You will also see any lint errors in the console.

Custom arguments

Use -- <args> to specify custom arguments

  • --developer-mode open the application in Developer Mode (with DevTools)
  • --custom-url <url> overrides the url, in Developer Mode it can be changed later
  • --desktop-branch <branch_name> downloads the renderer of the specified branch and uses the corresponding browser-interface
  • --desktop-version <version> downloads the renderer of the specified version and uses the corresponding browser-interface

e.g. npm run start -- --developer-mode --desktop-branch main

npm run build

Builds the Electron app package for production to the dist folder.

Your Electron app is ready to be distributed!

npm run publish

Build and publish

Project directory structure

my-app/
├── package.json
│
## render process
├── tsconfig.json
├── public/
│
## main process
├── electron/
│   ├── main.ts
│   └── tsconfig.json
│
## build output
├── build/
│   ├── index.html
│   ├── static/
│   │   ├── css/
│   │   └── js/
│   │
│   └── electron/
│      └── main.js
│
## distribution packges
└── dist/
    ├── mac/
    │   └── my-app.app
    └── my-app-0.1.0.dmg

Artifacts

Custom protocol

The custom protocol is using the prefix dcl://

We can add the following parameters to the custom protocol to change the behaviour of the Launcher.

  • DESKTOP-BRANCH=main: Downloads the renderer of the specified branch
  • DESKTOP-VERSION=1.0.325-20220517164352.commit-e28a414: Downloads the renderer of the specified version
  • DESKTOP-DEVELOPER-MODE: Open the application in Developer Mode (with DevTools)
  • PREVIEW-MODE=url: Opens in PREVIEW MODE the specified URL (confirmation needed)

If you add another parameter, it will be forwarded to the final URL. For example, if we use position=10,10&realm=thor it will be similar as opening:

https://decentraland.org/play/?position=10,10&realm=thor

Example: dcl://DESKTOP-BRANCH=main&position=10,10&realm=thor

It will use the last desktop renderer version from the main branch, and you will enter position 10,10 in the realm thor.