exe icon indicating copy to clipboard operation
exe copied to clipboard

throw new TypeError('Invalid binary format')

Open tungnnt opened this issue 10 months ago • 3 comments

Describe the bug I cannot build my application with your lib image

To Reproduce The config was showed in the above picture

Expected behavior The build should be processed

Additional context I bundle with additional asset, it can be configed via assets in package.json when usingpkg, but I don't find where to add assets using this lib

tungnnt avatar Apr 06 '24 03:04 tungnnt

Hi, thanks for the report! Can you please show me the arguments you are passing to the build function? I am unable to reproduce this issue with what you've provided so far.

AngaBlue avatar Apr 06 '24 06:04 AngaBlue

Yes, I code application using Nestjs server template

const exe = require("@angablue/exe");

const build = exe({
  entry: "dist/main.js",
  out: "./build/My Cool App.exe",
  pkg: ["--compress", "Brotli"],
  version: "2.4.2",
  target: "latest-win-x64",
  icon: "./assets/icon.ico", // Application icons must be in .ico format
  executionLevel: "asInvoker",
  properties: {
    FileDescription: "My Cool App",
    ProductName: "My Cool App",
    LegalCopyright: "AngaBlue https://anga.blue",
    OriginalFilename: "My Cool App.exe",
  },
});

build.then(() => console.log("Build completed!"));

tungnnt avatar Apr 06 '24 09:04 tungnnt

I have updated the resedit package that is used internally by @angablue/exe with version v2.1.3. This addresses some bugs that could be corrupting your output. Does this update resolve your problem?

AngaBlue avatar May 02 '24 03:05 AngaBlue