electron 一个动态链接库(dll)初始化例程失败当建立电子

lrl1mhuk  于 2023-01-18  发布在  Electron
关注(0)|答案(1)|浏览(215)

错误,当我运行builded电子程序

该程序在我的电脑运行良好,但当我建立由'电子建设者-赢便携式'和移动到其他计算机然后发生错误.(编码在窗口11,测试在窗口10)我该如何修复它?
package.json

"scripts": {
        "build:renderer": "webpack --config ./client/webpack.config.renderer.js",
        "build:main": "tsc --project ./client/tsconfig.json",
        "build": "npm run build:main && npm run build:renderer",
        "build:addon:x86": "(cmake-js -G \"Visual Studio 16 2019\" -A Win32 -O build_Win32)",
        "build:addon:x64": "(cmake-js -G \"Visual Studio 16 2019\" -A x64 -O build_x64)",
        "start": "electron . --enable-logging",
        "copy_binary": "copy_binary.bat",
        "dist": "electron-builder --win portable"
    },
    "devDependencies": {
        "cmake-js": "^7.0.0",
        "electron-rebuild": "^3.2.7",
        "ts-loader": "^9.4.1",
        "typescript": "^3.1.0",
        "webpack": "^5.74.0",
        "electron": "16.0.10",
        "webpack-cli": "^4.10.0"
    },
    "dependencies": {
        "node-addon-api": "^4.1.0"
    },
    "cmake-js": {
        "runtime": "electron",
        "runtimeVersion": "16.0.10"
      }

我试过了。
1.添加“安装后”:package.json中的“电子构建器安装应用程序部署”
1.在cmakelists.txt中添加集合(延迟加载挂钩“挂钩/win延迟加载挂钩.cc”)

mhd8tkvw

mhd8tkvw1#

我设法修复它复制旧的binding.gyp文件,并运行电子重建,新的.node文件将在这里.\electron-overlay\bin\win32-x64-109

相关问题