electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

feat: add `afterExtract` hook #8194

Closed rafaberaldo closed 2 months ago

rafaberaldo commented 2 months ago

Add a hook that triggers after the prebuilt Electron binary has been extracted to the output directory.

What I was looking for is a beforeAsar (or afterCopy) hook, but looks like the file copying function is tightly coupled with asar transformation, this is the next best option.

Partially solves https://github.com/electron-userland/electron-builder/issues/8188 + https://github.com/electron-userland/electron-builder/issues/5619 + https://github.com/electron-userland/electron-builder/issues/4422 + https://github.com/electron-userland/electron-builder/issues/5709

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 7b7e699762f0e5627335ce20e2f88c8869dda850

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages | Name | Type | | --------------------------------- | ----- | | app-builder-lib | Major | | dmg-builder | Major | | electron-builder-squirrel-windows | Major | | electron-builder | Major | | electron-forge-maker-appimage | Major | | electron-forge-maker-nsis-web | Major | | electron-forge-maker-nsis | Major | | electron-forge-maker-snap | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 2 months ago

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
Latest commit 7b7e699762f0e5627335ce20e2f88c8869dda850
Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/6634da27880c5900081e3fe3
Deploy Preview https://deploy-preview-8194--car-park-attendant-cleat-11576.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

rafaberaldo commented 2 months ago

Not sure why changeset detected major version bump, I've commited a minor change

mmaietta commented 2 months ago

@rafaberaldo not too sure either why it's flagged as major, but since we're in an alpha release state, I think it should be fine. Thanks for your contribution!

rafaberaldo commented 2 months ago

Have any idea why is it failing on mac?

mmaietta commented 2 months ago

I deactivated the mac test on master. For some reason, all previous versions of electron-builder for FilesTest on mac are broken now. I think a mac update occurred since the test failures randomly appeared last week with no changes to electron-builder.