-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Programmatically receive progress events #3493
Comments
You can use app-builder-lib module directly and listen artifactCreated event. If you need publish, don't forget to create publish manager — https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/index.ts#L51 |
Thank you @develar, really appreciate your pointers. A few more questions which I would love your help on.
If you like, I can submit a PR with some documentation on this when I have a decent understanding? |
@davej To ensure that I don't waste my time, could you please explain what do you want to achieve and for what do you need so tight integration?I want to understand your purpose to provide more concise tips. |
Of course. I'm working on an online tool that converts URLs into fully-built electron desktop apps that are ready for distribution. The online builder currently reports progress events (and a progress bar) from the builder to the UI using Web Sockets. The current version doesn't use electron-builder and I call different packages (e.g.. So, to summarise: I would like to switch to |
I hope you are aware about https://github.com/electron-userland/electron-build-service. Ok, so, indeed you should use the same approach as electron build service — see first link, https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/remoteBuilder/builder-cli.ts#L74 Do you see? Private method
There are 2 approaches: A. build exactly as CLI version does. electron build service uses App can be build in several distributable formats in parallel. So, what I want to say — if you will use fine-grained control over build, you don't need Ok, ok, maybe it is too complicated and if your app does the whole job in one session on one machine, you can simply use app-builder-lib (again, I suggest to not use electron-builder directly programmatically to avoid yargs dependency). I will add events till tomorrow morning CET. |
No, I'm not aware of
Ok, I understand. Privacy is not such an issue for me, because I am building from publicly accessible resources anyway (i.e.. the website has to be hosted on a publicly accessible URL). I think eventually I will split out the build process so it can be parallelized more easily. For now, though, I want to keep it simple because I'm on a schedule and I want to rely on well-tested libraries because I have to ensure it works across 3 different build servers: Windows (because of EV hardware dongle signing), Mac and Linux.
Thank you, this is much appreciated! Will you be adding them as config hooks or events on packager out of interest? |
artifactBuildStarted and artifactBuildCompleted added (released 3 days ago, forgot to comment here). |
Thanks for this @develar. Are there plans to add |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I would like to consume the progress events of
electron-builder
programmatically. Currently, it looks like all I can do is try to parse the output fromstdout
. Is there a way to consume progress events without resorting to parsingstdout
? If not, would this be considered as a feature request?The text was updated successfully, but these errors were encountered: