Как использовать электронный строитель с целевой переносной? - PullRequest
0 голосов
/ 22 апреля 2019

Я пытаюсь сгенерировать exe-файл с electron-builder , а не установщиком , поэтому я пытаюсь установить целевое значение для переносного

{
  "name": "hello-world",
  "version": "1.0.0",
  "description": "a hello world",
  "main": "index.js",
  "scripts": {
    "start": "electron .",
    "dist": "build"
  },
  "author": "KR",
  "license": "ISC",
  "devDependencies": {
    "electron": "^4.1.4",
    "electron-builder": "^20.39.0"
  },
  "build":{
     "appId": "com.whatever.helloworld",
     "win":{
        "target": ["portable"],
         "icon" :   "build/icon.ico"            
     }


  }
}

Однако, когда я пытаюсь npm run distЯ получаю

Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
  • electron-builder version=20.39.0
  • loaded configuration file=package.json ("build" field)
  • writing effective config file=dist\builder-effective-config.yaml
  • no native production dependencies
  • packaging       platform=win32 arch=x64 electron=4.1.4 appOutDir=dist\win-unpacked
  • default Electron icon is used reason=application icon is not set
  • building        target=portable file=dist\hello-world 1.0.0.exe archs=x64

и программа застревает навсегда.Когда я ломаю его (ctrl-c), он говорит:

 Error: Exit code: 255. Command failed: D:\electrontest\hello-world\node_modules\7zip-bin\win\x64\7za.exe a -bd -mx=9 -mtc=off -mtm=off -mta=off D:\electrontest\hello-world\dist\hello-world-1.0.0-x64.nsis.7z .

Так что я думаю, что программа застряла в 7za сжатии.

Я искал, и нет примера использования электронного компоновщикас портативным только несколько с nsis.Я буду признателен за некоторую помощь здесь.(У меня есть другой вопрос, но сначала я хотел бы запустить основной)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...