Skip to content

Configure Electron Forge packaging with ASAR unpack for all demos#1387

Merged
minggangw merged 3 commits intoRobotWebTools:developfrom
minggangw:fix-1386
Feb 2, 2026
Merged

Configure Electron Forge packaging with ASAR unpack for all demos#1387
minggangw merged 3 commits intoRobotWebTools:developfrom
minggangw:fix-1386

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Feb 2, 2026

This PR configures Electron Forge packaging across all four electron demos (topics, turtle_tf2, manipulator, car) to enable distributable application creation. The key enhancement is the ASAR configuration that unpacks the rclnodejs module, which requires file system access to generated code and native bindings.

Changes:

  • Added Electron Forge packaging infrastructure with ASAR unpack configuration for rclnodejs across all demos
  • Updated dependencies to rclnodejs ^1.8.1 and upgraded Electron/build tools to latest versions
  • Migrated manipulator demo from CDN-based Three.js to npm package and added GPU rendering workarounds
  • Added comprehensive packaging documentation to all demo READMEs

Fix: #1386

Copilot AI review requested due to automatic review settings February 2, 2026 07:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR configures Electron Forge packaging across all four electron demos (topics, turtle_tf2, manipulator, car) to enable distributable application creation. The key enhancement is the ASAR configuration that unpacks the rclnodejs module, which requires file system access to generated code and native bindings.

Changes:

  • Added Electron Forge packaging infrastructure with ASAR unpack configuration for rclnodejs across all demos
  • Updated dependencies to rclnodejs ^1.8.1 and upgraded Electron/build tools to latest versions
  • Migrated manipulator demo from CDN-based Three.js to npm package and added GPU rendering workarounds
  • Added comprehensive packaging documentation to all demo READMEs

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
electron_demo/turtle_tf2/package.json Added Electron Forge configuration with makers for squirrel, zip, deb, and rpm; ASAR unpack for rclnodejs
electron_demo/turtle_tf2/README.md Added packaging documentation section with instructions for distribution
electron_demo/topics/package.json Added Electron Forge configuration with makers for squirrel, zip, deb, and rpm; ASAR unpack for rclnodejs
electron_demo/topics/README.md Added packaging documentation section (with minor emoji rendering issues)
electron_demo/manipulator/package.json Added Electron Forge configuration with makers for squirrel and zip only; migrated Three.js from CDN to npm
electron_demo/manipulator/README.md Added packaging documentation section
electron_demo/manipulator/renderer.js Added Three.js import statement to support npm-based package
electron_demo/manipulator/main.js Added GPU command line switches to fix WebGL rendering issues
electron_demo/manipulator/index.html Removed Three.js CDN script tag
electron_demo/car/package.json Added Electron Forge configuration with makers for squirrel, zip, deb, and rpm; ASAR unpack for rclnodejs
electron_demo/car/README.md Added packaging documentation section with instructions for distribution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +60
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "rclnodejs_manipulator_demo"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin",
"linux"
]
}
],
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The makers configuration is inconsistent with the other demos (turtle_tf2, topics, car). This package.json is missing the DEB and RPM makers that are present in the other three demos. For consistency across all demos and to provide the same packaging options, consider adding the maker-deb and maker-rpm configurations here as well.

Copilot uses AI. Check for mistakes.
Comment on lines 189 to 197
### 2. Create Installers (Optional)

To create a `.zip` file or other platform-specific installers (deb/rpm), run:

```bash
npm run make
```

**Note**: Creating DEB/RPM installers requires system tools like `dpkg` and `fakeroot`. For ZIP files, you need `zip`.
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation mentions creating DEB/RPM installers, but the package.json makers configuration (lines 46-60) only includes squirrel and zip makers, unlike the other demos (turtle_tf2, topics, car) which include maker-deb and maker-rpm. Either add the DEB/RPM makers to the configuration, or update the documentation to remove the reference to "deb/rpm" installers and only mention ZIP files.

Copilot uses AI. Check for mistakes.
"dependencies": {
"rclnodejs": "^1.5.1"
"rclnodejs": "^1.8.1",
"three": "^0.182.0"
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Three.js version (0.182.0) differs from the turtle_tf2 demo which uses 0.155.0. While both versions should work, consider using the same Three.js version across all demos for consistency, easier maintenance, and to avoid potential version-specific issues. The turtle_tf2 demo documentation at line 360 of its README specifically mentions version 0.155.0 for troubleshooting.

Suggested change
"three": "^0.182.0"
"three": "^0.155.0"

Copilot uses AI. Check for mistakes.
@coveralls
Copy link

coveralls commented Feb 2, 2026

Coverage Status

coverage: 85.565% (-0.02%) from 85.585%
when pulling 9aebc6e on minggangw:fix-1386
into d77a05d on RobotWebTools:develop.

@minggangw minggangw merged commit 70cfe1f into RobotWebTools:develop Feb 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leverage Electron Forge for packaging and distribution demos

2 participants