forge icon indicating copy to clipboard operation
forge copied to clipboard

feat: allow a custom out dir from forge config

Open jeanbmar opened this issue 3 years ago • 1 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.
  • [ ] 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:

This PR allows using a custom outDir when packaging and making an app. A new top-level outDir optional string property is added to the forgeConfig object to do so.

This PR aims to:

  • help people who don't like (or are not allowed) to mix binaries with code
  • help Windows users to manage the ~~electron-winstaller~~ Squirrel infamous issue with long paths since files can be relocated easily
  • help monorepo users who can't use asar to solve the long path issue because of symlink issues (which should anyway be a design decision)

Related issues:

  • https://github.com/electron-userland/electron-forge/issues/1041
  • https://github.com/electron-userland/electron-forge/issues/214
  • https://github.com/electron/windows-installer/issues/219
  • https://github.com/electron/windows-installer/issues/301

jeanbmar avatar Feb 08 '22 11:02 jeanbmar

Hey, will do when i can find some time for it :)

jeanbmar avatar Jun 24 '22 07:06 jeanbmar

https://github.com/electron/electron-packager/issues/1460

This issue actually started off as electron forge issue.

An unhandled rejection has occurred inside Forge:
Error: The main entry point to your app was not found. Make sure "/home/magic/out/main/index.js" exists and does not get ignored by your ignore option
at Object.validateElectronApp (/home/magic/node_modules/electron-packager/src/common.js:115:13)
    at async MacApp.buildApp (/home/magic/node_modules/electron-packager/src/platform.js:135:5)
    at async MacApp.initialize (/home/magic/node_modules/electron-packager/src/platform.js:127:7)
    at async MacApp.create (/home/magic/node_modules/electron-packager/src/mac.js:377:5)
    at async Promise.all (index 0)
    at async packager (/home/magic/node_modules/electron-packager/src/index.js:204:20)

But maybe if that one can be fixed soon, this PR could come in handy.

adminy avatar Dec 15 '22 15:12 adminy

Is there any plan to merge this PR anytime soon?

akash07k avatar Dec 08 '23 20:12 akash07k

Is there any plan to merge this PR anytime soon?

Yeah, someone (or @jeanbmar ) just needs to add some tests to it first it seems 😕

AlexDev404 avatar Dec 18 '23 02:12 AlexDev404

Oh, ok :(

Is there any plan to merge this PR anytime soon?

Yeah, someone (or @jeanbmar ) just needs to add some tests to it first it seems 😕

akash07k avatar Dec 18 '23 05:12 akash07k

Sorry I've moved on and won't implement the missing tests. On the other hand interfaces are unchanged with this PR so I don't see why additional tests would be relevant.

jeanbmar avatar Dec 18 '23 10:12 jeanbmar

Duplicate of #3458

lutzroeder avatar Jan 10 '24 01:01 lutzroeder

Closing as #3458 has picked up the discussion on this.

dsanders11 avatar Feb 07 '24 18:02 dsanders11