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.64k stars 1.74k forks source link

Cant build win nsis with electronuserland/builder:wine #5395

Closed josx closed 3 years ago

josx commented 3 years ago

Building linux works well but Trying to build from linux to win nsis target, and using electronuserland/builder:wine image i am getting errors. BTW i am usign gitlab-ci for doing it:

gitlab-ci.yml:

stages:
  - deploy

deploy_packages:
  stage: deploy
  image: electronuserland/builder:wine
  before_script:
    - mkdir -p ~/.ssh
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
    - chmod 600 ~/.ssh/id_rsa
    - ssh-keyscan -H 'XXX.camba.coop' >> ~/.ssh/known_hosts
  script:
    - yarn install --network-concurrency 1
    - yarn package --win
  only:
    - develop

Error:

 [1] yarn build-renderer --no-sandbox exited with code 0
   • electron-builder  version=22.9.1 os=4.9.0-8-amd64
   • artifacts will be published if draft release exists  reason=CI detected
   • loaded configuration  file=package.json ("build" field)
   • packaging       platform=win32 arch=x64 electron=8.5.2 appOutDir=release/win-unpacked
   ⨯ wine is required, please see https://electron.build/multi-platform-build#linux  
   • Above command failed, retrying 3 more times
   ⨯ wine is required, please see https://electron.build/multi-platform-build#linux  
   • Above command failed, retrying 2 more times
   ⨯ wine is required, please see https://electron.build/multi-platform-build#linux  
   • Above command failed, retrying 1 more times
   ⨯ wine is required, please see https://electron.build/multi-platform-build#linux  
   • Above command failed, retrying 0 more times
   ⨯ /root/builds/UbTxs_sx/0/name/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE  stackTrace=

Error: /root/builds/UbTxs_sx/0/name/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

at ChildProcess.<anonymous> (/root/builds/UbTxs_sx/0/name/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:421:26)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

From previous event:
at processImmediate (internal/timers.js:461:21)

From previous event:
at WinPackager.signApp (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/winPackager.ts:357:27)
at WinPackager.doPack (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/platformPackager.ts:244:16)
at WinPackager.pack (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/platformPackager.ts:115:5)
at Packager.doBuild (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/packager.ts:444:9)
at executeFinally (/root/builds/UbTxs_sx/0/name/node_modules/builder-util/src/promise.ts:12:14)
at Packager._build (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/packager.ts:373:31)
at Packager.build (/root/builds/UbTxs_sx/0/name/node_modules/app-builder-lib/src/packager.ts:337:12)
at executeFinally (/root/builds/UbTxs_sx/0/name/node_modules/builder-util/src/promise.ts:12:14)
 error Command failed with exit code 1.
stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

josx commented 3 years ago

Still happen to me, any clue? anyone had this problem?

justinjdickow commented 3 years ago

I have the same problem

josx commented 3 years ago

I have tested electronuserland/builder:wine locally and it is working pretty well, but not on the gitlab-runner. After dealing with this, i have opted for a workaround. My gitlab-ci working file:

stages:
  - deploy

deploy_packages:
  stage: deploy
  image: yobasystems/alpine-docker
  script:
    - git checkout $CI_COMMIT_REF_NAME
    - git pull origin $CI_COMMIT_REF_NAME
    - >
      docker run --rm -t
      --env ELECTRON_CACHE="/root/.cache/electron"
      --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder"
      -v ${PWD}:/project
      -v ${PWD##*/}-node-modules:/project/node_modules
      -v ~/.cache/electron:/root/.cache/electron
      -v ~/.cache/electron-builder:/root/.cache/electron-builder
      electronuserland/builder:wine
      /bin/bash -c "yarn install --network-concurrency 1 && yarn run package-win && yarn run package-linux"
  only:
    - develop
stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.