forge icon indicating copy to clipboard operation
forge copied to clipboard

fix(plugin-local-electron): Make the plugin compatible on Windows, and can live with other plugins

Open reitowo opened this issue 2 years ago • 3 comments

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] The changes are appropriately documented (if applicable).
  • [x] The changes have sufficient test coverage (if applicable).
  • [x] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

The plugin-local-electron currently cannot work with plugin-vite (or any other plugin) because it claims startLogic, which is unnecessary because it just merely set the ELECTRON_OVERRIDE_DIST_PATH env var.

This PR:

  1. Moved this logic to init function instead of startLogic
  2. Changed function locateElectronExecutable to detect this ELECTRON_OVERRIDE_DIST_PATH env var to make the project directly starts the binary in the wanted path. (Because on Windows this env variable makes no effect and still launch the binary under node_modules...)

reitowo avatar Jun 22 '23 07:06 reitowo

@caoxiemeihao Can I bother you review this?

reitowo avatar Jun 24 '23 11:06 reitowo

@VerteDinde Can you review this PR?😘

reitowo avatar Jun 28 '23 07:06 reitowo

@reitowo please can you resolve conflicts?

rtritto avatar Sep 22 '24 11:09 rtritto

https://github.com/electron/forge/pull/3720 should resolve the issues with conflicting startLogic

brianlyn avatar Mar 13 '25 15:03 brianlyn

@brianlyn thanks for pointing that out!

erickzhao avatar Mar 14 '25 19:03 erickzhao