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

unknown variable/constant "{productName}" detected #8287

Open Buzhifanji opened 3 days ago

Buzhifanji commented 3 days ago

⨯ C:\Users\1\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE Exit code: 1 Output: Command line defined: "APP_ID=xyz.886886.bookwise" Command line defined: "APP_GUID=b54d6e05-1e6e-56de-9a22-1cd95fce46d1" Command line defined: "UNINSTALL_APP_KEY=b54d6e05-1e6e-56de-9a22-1cd95fce46d1" Command line defined: "PRODUCT_NAME=book-wise" Command line defined: "PRODUCT_FILENAME=${productName}" Command line defined: "APP_FILENAME=book-wise" Command line defined: "APP_DESCRIPTION=A modern cross-platform e-book reader" Command line defined: "VERSION=1.0.0" Command line defined: "PROJECT_DIR=D:\project\BookWise" Command line defined: "BUILD_RESOURCES_DIR=D:\project\BookWise\resources" Command line defined: "APP_PACKAGE_NAME=book-wise" Command line defined: "APP_64=D:\project\BookWise\dist\book-wise-1.0.0-x64.nsis.7z" Command line defined: "APP_64_NAME=book-wise-1.0.0-x64.nsis.7z" Command line defined: "APP_64_HASH=B4F1CB607E40BDE6B3A3A601B6FFA6B646B7861E5D728DE5D6380EBE06694A1EF231D491754B95B0F314BB758A7F3CC100D07C40F21E20AE435EE919820E77FA" Command line defined: "APP_64_UNPACKED_SIZE=5115501" Command line defined: "COMPANY_NAME=app by Buzhifanji" Command line defined: "APP_PRODUCT_FILENAME=${productName}" Command line defined: "APP_INSTALLER_STORE_FILE=book-wise-updater\installer.exe" Command line defined: "COMPRESSION_METHOD=7z" Command line defined: "REQUEST_EXECUTION_LEVEL=user" Command line defined: "UNPACK_DIR_NAME=2ih0p5zAAigh38z8sWz69rmuv6S" Command line defined: "ESTIMATED_SIZE=5115501" Command line defined: "COMPRESS=auto" Command line defined: "UNINSTALLER_OUT_FILE" Processing config: C:\Users\1\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh Processing script file: "" (UTF8)

Error output: File: failed creating mmap of "D:\project\BookWise\dist\book-wise-1.0.0-x64.nsis.7z" Error in macro x64_app_files on macroline 1 Error in macro compute_files_for_current_arch on macroline 7 Error in macro extractEmbeddedAppPackage on macroline 8 Error in script "" on line 149 -- aborting creation process failedTask=build stackTrace=Error: C:\Users\1\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

Please Help!. The PRODUCT_NAME can find productName.

But the PRODUCT_FILENAME and APP_PRODUCT_FILENAME can't find it. I don't understand what's going on here!

I have try to in github action, but the problem still exists

mmaietta commented 4 hours ago

Looks like you were able to get it working? https://github.com/Buzhifanji/BookWise/actions/runs/9782372259/job/27008524337

What changes did you make for that github action to pass?