Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linuxでのビルドエラー #227

Closed
takana-v opened this issue Sep 14, 2021 · 2 comments · Fixed by #262
Closed

Linuxでのビルドエラー #227

takana-v opened this issue Sep 14, 2021 · 2 comments · Fixed by #262
Labels

Comments

@takana-v
Copy link
Member

不具合の内容

linuxでビルドすると、エラーが出る

現象・ログ

 INFO  Building app with electron-builder:
  • electron-builder  version=22.10.5 os=5.11.0-34-generic
  • description is missed in the package.json  appPackageFile=/home/takana/voicevox/dist_electron/bundled/package.json
  • writing effective config  file=dist_electron/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=12.0.8 appOutDir=dist_electron/linux-unpacked
  • Unpacking electron zip  zipPath=undefined
  • building        target=snap arch=x64 file=dist_electron/voicevox_0.5.2_amd64.snap
  • building        target=tar.gz arch=x64 file=dist_electron/voicevox-0.5.2.tar.gz
  • application Linux category is set to default "Utility"  reason=linux.category is not set and cannot map from macOS docs=https://www.electron.build/configuration/linux
Split file.
 DONE  Build complete!
Error: ENOENT: no such file or directory, open '/home/takana/voicevox/dist_electron/nsis-web/voicevox-0.5.2-x64.nsis.7z'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! voicevox@0.5.2 electron:build: `vue-cli-service electron:build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the voicevox@0.5.2 electron:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/takana/.npm/_logs/2021-09-14T09_35_11_304Z-debug.log

再現手順

期待動作

エラーが出ずに終了

VOICEVOXのバージョン

0.5.2

OSの種類/ディストリ/バージョン

Ubuntu 20.04 64bit

その他

https://github.com/Hiroshiba/voicevox/blob/93c72beb7c9c53c97a4ce6629bac88e43221864e/build/splitResources.js#L13-L22
この処理が原因と思われます
https://github.com/Hiroshiba/voicevox/blob/93c72beb7c9c53c97a4ce6629bac88e43221864e/vue.config.js#L30-L34
ここで上のファイルが実行されてしまうのですが、windowsビルドの時のみ実行するよう変更が必要です

https://github.com/takana-v/voicevox/blob/add-linux-build/vue.config.js
試しにwinの中に入れてみましたがエラーで通らず...
ちなみにきちんとバイナリは生成されているのでこのエラーに目をつぶればlinux向けにもビルド出来ます

@Hiroshiba
Copy link
Member

issueありがとうございます!

なるほど、nsisはwindows専用だからたしかにlinuxでは使えなさそうですね・・・
そもそもどのインストーラーが良いのか気になります。

@aoirint
Copy link
Member

aoirint commented Sep 23, 2021

Linux用実行バイナリの作成にあたって、修正が必要になるため、修正するためのPRを作成しようと思います。

Hiroshiba pushed a commit that referenced this issue Sep 24, 2021
* explicit nsis include path and installer.nsh path

* add afterAllArtifactBuild.js

* rename splitResources to splitNsisArchive

* split js dir per os

* split buildResources and build script directory

* nop after build instead of warning

* revert split dir

* revert split dir

* add await
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants