Possible to target x64 architecture #120
Replies: 5 comments 2 replies
-
@mdodge-ecgrow the generated blobs are platform independent (as long as you're not using code cache etc). Once you have the blob, you can download the official Node.js binary for your target platform and inject the blob into that regardless of what platform you're running from. I've created a tool that does this for you and you can either use that or look at the source code for reference: https://github.com/BYK/fossilize |
Beta Was this translation helpful? Give feedback.
-
Wow, thanks! Anything to make this task easier! I've spent all day fighting with the native SEA option and the nexe library. For some reason, my EXE created with nexe never works once I move it out of the default folder. My boss has tasked me with creating an exe that will read data from our database and create PDF's from the data. If fossilize will make this easier, I will definitely give it a try. |
Beta Was this translation helpful? Give feedback.
-
So I got it work with a basic node app that does nothing. But once I try and include my pdfGenerator file that uses pdflib, I get this error: So I'm thinking I need to figure out this line in your main page: "It also supports embedding assets either file by file, from a directory, or through a Vite manifest." Do you have more details on how to do that? |
Beta Was this translation helpful? Give feedback.
-
Look at the command line options which will show you how to embed an asset. Then on program start, you read that asset using the built-in sea module with one of these methods: https://nodejs.org/api/single-executable-applications.html#seagetassetkey-encoding You can then either extract them to the file system or just use them directly. |
Beta Was this translation helpful? Give feedback.
-
Download the x64 Node.js binary on your ARM device and then inject the generated SEA blob into that x64 binary. That's how pkg handles it under the hood. Use https://github.com/yao-pkg/pkg instead of pkg. That is the most active and updated fork of pkg. |
Beta Was this translation helpful? Give feedback.
-
I quickly learned when I built an EXE on my new ARM computer that that will not work as is. After some digging I learned it created an ARM compatible EXE and will not run on every other computer in our company. So I'm wondering if there is a way in native NodeJS to target x64 architecture when building the EXE? From my research I can see that pkg can do that. But it also looks like that library has been archived and no longer being developed.
Beta Was this translation helpful? Give feedback.
All reactions