-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to skip building etcher-util binary #4256
Comments
Finally, I solved this myself. Here is my patch. diff --git a/forge.sidecar.ts b/forge.sidecar.ts
index fc34809..00d644f 100644
--- a/forge.sidecar.ts
+++ b/forge.sidecar.ts
@@ -77,23 +77,8 @@ function build(
commands.push(['npm', ['rebuild', 'mountutils', `--arch=${arch}`]]);
commands.push([
- 'pkg',
- [
- path.join(sourcesDir, 'util', 'api.js'),
- '-c',
- 'pkg-sidecar.json',
- // `--no-bytecode` so that we can cross-compile for arm64 on x64
- '--no-bytecode',
- '--public',
- '--public-packages',
- '"*"',
- // always build for host platform and node version
- // https://github.com/vercel/pkg-fetch/releases
- '--target',
- `node20-${arch}`,
- '--output',
- binPath,
- ],
+ "install",
+ ['-Dm644', '/dev/null', binPath,]
]);
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I'm one of the maintainers of the AUR package
balena-etcher
, And I built etcher from source for archlinux utilizing systemwideelectron
andnode
.The build scripts are in AUR repo, mainly in the PKGBUILD
Below are the details:
package
commandout/
, within itbalenaEtcher-linux-*
looks like the package structure fordeb
andrpm
etcher-util
appears in bothout/balenaEtcher-linux-*/resources/
andout/sidecar
.There is also a
src
dir inout/sidecar
. From the compiling process belowetcher/forge.sidecar.ts
Lines 79 to 98 in c748c2a
It is equivalent to
node util/api.js
. So I wrote a wrapper namedetcher-util
to replace the binary file and it works fine.Here is my problem: even though I can get rid of
etcher-util
binary in the built package, I have to build it in the building procedure. Is there any way that I can build only js scripts inout/sidecar/src
but not the final binary file?Thanks
The text was updated successfully, but these errors were encountered: