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

fix(deps): Update 7zip-bin to support Windows on ARM #7829

Merged
merged 1 commit into from Nov 1, 2023
Merged

fix(deps): Update 7zip-bin to support Windows on ARM #7829

merged 1 commit into from Nov 1, 2023

Conversation

lutzroeder
Copy link
Contributor

@lutzroeder lutzroeder commented Oct 15, 2023

Update 7zip-bin to 5.2.0 which includes win\arm64\7za.exe.

Fixes error below when running npx electron-builder --win on Windows on ARM.

  ⨯ Exit code: ENOENT. spawn x\node_modules\app-builder-lib\node_modules\7zip-bin\win\arm64\7za.exe ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT.

@changeset-bot
Copy link

changeset-bot bot commented Oct 15, 2023

🦋 Changeset detected

Latest commit: 476d50f

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

This PR includes changesets to release 10 packages
Name Type
app-builder-lib Patch
builder-util Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
dmg-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch
electron-publish Patch

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

netlify bot commented Oct 15, 2023

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

Name Link
🔨 Latest commit 476d50f
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/653eb5fb3d51b80009cb933b
😎 Deploy Preview https://deploy-preview-7829--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.

@lutzroeder lutzroeder changed the title Update 7zip-bin to support Windows on ARM fix(deps): Update 7zip-bin to support Windows on ARM Oct 15, 2023
@mmaietta
Copy link
Collaborator

Looks like there's an issue with the binary?

Exit code: EACCES. spawn /Users/runner/work/electron-builder/electron-builder/node_modules/.pnpm/7zip-bin@5.2.0/node_modules/7zip-bin/mac/x64/7za EACCES

Exit code: EACCES. spawn /project/node_modules/.pnpm/7zip-bin@5.2.0/node_modules/7zip-bin/linux/x64/7za EACCES

@lutzroeder
Copy link
Contributor Author

lutzroeder commented Oct 21, 2023

@develar @mmaietta the +x flag is present in 7zip-bin@5.1.1 and missing in 7zip-bin@5.2.0.

wget https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.1.1.tgz
gunzip 7zip-bin-5.1.1.tgz
tar --list -v --file=7zip-bin-5.1.1.tar | grep x64/7za
-rwxr-xr-x  0 0      0     1457384 Oct 26  1985 package/linux/x64/7za
-r-xr-xr-x  0 0      0     2941888 Oct 26  1985 package/mac/x64/7za
-rw-r--r--  0 0      0     1152000 Oct 26  1985 package/win/x64/7za.exe

wget https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.2.0.tgz
gunzip 7zip-bin-5.2.0.tgz
tar --list -v --file=7zip-bin-5.2.0.tar | grep x64/7za
-rw-r--r--  0 0      0     1457384 Oct 26  1985 package/linux/x64/7za
-rw-r--r--  0 0      0     2941888 Oct 26  1985 package/mac/x64/7za
-rw-r--r--  0 0      0     1231360 Oct 26  1985 package/win/x64/7za.exe

Can you update the package or recommend a fix? develar/7zip-bin#19

@github-actions github-actions bot added the nsis label Oct 28, 2023
@lutzroeder
Copy link
Contributor Author

@mmaietta pushed an update to make the path executable using chmod before exec.

@mmaietta
Copy link
Collaborator

Still receiving an error unfortunately 😢

cannot execute  cause=fork/exec /project/node_modules/.pnpm/7zip-bin@5.2.0/node_modules/7zip-bin/linux/x64/7za: permission denied
                    command=/project/node_modules/.pnpm/7zip-bin@5.2.0/node_modules/7zip-bin/linux/x64/7za x -bd /root/.cache/electron-builder/appimage/561258428.7z -o/root/.cache/electron-builder/appimage/561258428

@develar can you please fix the permissions on 7zip-bin, it's not executable and not something we can upgrade to
Ref: develar/7zip-bin#19

@mmaietta
Copy link
Collaborator

mmaietta commented Oct 31, 2023

@lutzroeder well done! All tests are passing. What did you change if I may ask? (The force push hides the commit history) 😅

@lutzroeder
Copy link
Contributor Author

What did you change if I may ask?

@mmaietta added chmod(..., 0o755) for the node_modules/7zip-bin/7x.sh path as well.

@mmaietta mmaietta merged commit 1af7447 into electron-userland:master Nov 1, 2023
12 checks passed
@github-actions github-actions bot mentioned this pull request Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants