Decentraland Creator Hub is an Electron-based application designed for creating, editing, and deploying Decentraland scenes. This application is distributed for both Windows and MacOS, supporting both x64 and ARM architectures.
@dcl/inspector
allows visual editing and the scene is ran under the hood using @dcl/sdk-commands
to allow previewing while editing.npm install
npm start
npm run build
.exe
in windows, .app
in MacOS)npm run compile
.dmg
on MacOS)npm run compile:installer
There are three packages each compiled individually:
renderer
: This is the webapp that runs on the browser, all the UI lives here.preload
: This package run in a context with most of NodeJS APIs enabled. It's where we interact with the file system for example through the fs
module. Modules exported from this package can be imported from the renderer
by importing from the special path #preload
, and all the wiring necessary to connect these two packages (namely the Electron's exposeInWorld
APIs) are going to be done automatically by the bundler.main
: Runs the app's NodeJS process. Communication between preload and main process is handled via IPC. This is used for invoking APIs not available in the preload package, such as Electron's APIs or forking new processes required by the Decentraland CLI.While developing locally you will get the Browser's logs on the DevTools and the NodeJS logs on the console running the npm start
.
When debugging the production build (executables) you can open the DevTools via View > DevTools and the NodeJS logs are available on a logs file.
On Windows (PowerShell):
Get-Content -Path "$env:APPDATA\creator-hub\logs\main.log" -Wait
On MacOS:
tail -f ~/Library/Logs/creator-hub/main.log
The Decentraland Creator Hub requires several binaries to be available, including Node.js, npm, and sdk-commands. Due to Apple's requirements for app distribution, the application must be packaged into an .asar
file for proper signing and notarization. However, some binaries within the node_modules
directory cannot be used from inside the .asar
file. Therefore, certain components are left outside the .asar
file, including package.json
and npm binaries.
NodeJS Binary:
node
, pointing to the Electron binary..cmd
file in the app's unpacked directory called node
, pointing to the Electron binary.NPM Binaries:
.asar
file.Other Binaries from node_modules
:
package.json
unpacked outside the .asar
file.node
binaries from point 1 and npm
binaries from point 2 into the forked process $PATHpackage.json
.To minimize installation time for the end user, package.json
should include only the dependencies used on the Node.js side (main and preload packages). Dependencies used by the renderer should be listed as devDependencies
, as they are not required by the end user (the web application is already bundled and does not need to be built by the end user).
The Decentraland Creator Hub uses electron-updater
to automatically update the production app to the latest version.
Auto Update Check:
electron-updater
fetches the latest version from this GitHub repository.Download and Notification:
Installation:
This ensures that users always have the latest features and fixes without manual intervention.
The CI pipeline is configured to automate the release process for the Decentraland Creator Hub.
Pre-release Creation:
Artifact Generation:
Publishing the Release:
This streamlined process ensures that updates are consistently and accurately deployed to users.