Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow a custom out dir from forge config #2714

Closed
wants to merge 1 commit into from

Conversation

jeanbmar
Copy link

@jeanbmar jeanbmar commented Feb 8, 2022

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • 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:

Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

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

@jeanbmar In general, I'm fine with this change! Could we please add some test coverage for the custom outDir option here? A good place to add them would be here: https://github.com/electron-userland/electron-forge/blob/master/packages/api/core/test/fast/forge-config_spec.ts

Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

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

Moving this to "request changes" - please add tests here! 🙂

@jeanbmar
Copy link
Author

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

@adminy
Copy link

adminy commented Dec 15, 2022

electron/packager#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.

@akash07k
Copy link

akash07k commented Dec 8, 2023

Is there any plan to merge this PR anytime soon?

@AlexDev404
Copy link

AlexDev404 commented Dec 18, 2023

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
Copy link

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 😕

@jeanbmar
Copy link
Author

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.

@lutzroeder
Copy link
Contributor

Duplicate of #3458

@dsanders11
Copy link
Member

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

@dsanders11 dsanders11 closed this Feb 7, 2024
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.

7 participants