Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into electron-updater
Browse files Browse the repository at this point in the history
  • Loading branch information
raa0121 committed Mar 23, 2022
2 parents f5d3746 + 62e7b36 commit b486418
Show file tree
Hide file tree
Showing 57 changed files with 3,402 additions and 350 deletions.
5 changes: 2 additions & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ENGINE_PATH=run.exe
VUE_APP_ENGINE_URL=http://127.0.0.1:50021
VUE_APP_GTM_CONTAINER_ID=GTM-DUMMY
DEFAULT_ENGINE_INFOS=[{"key":"074fc39e-678b-4c13-8916-ffca8d505d1d","executionEnabled":true,"executionFilePath":"run.exe","host":"http://127.0.0.1:50021"}]
VUE_APP_GTM_CONTAINER_ID=GTM-DUMMY
57 changes: 30 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ on:

env:
VOICEVOX_ENGINE_REPO_URL: "https://github.com/VOICEVOX/voicevox_engine"
VOICEVOX_ENGINE_VERSION: 0.10.4
VOICEVOX_RESOURCE_VERSION: 0.10.0
VOICEVOX_EDITOR_VERSION: |- # releaseのときはタグが、それ以外は0.0.0がバージョン名に
${{ github.event.release.tag_name != '' && github.event.release.tag_name || '0.0.0' }}
VOICEVOX_ENGINE_VERSION: 0.11.4
VOICEVOX_RESOURCE_VERSION: 0.11.4
VOICEVOX_EDITOR_VERSION:
|- # releaseのときはタグが、それ以外は999.999.999がバージョン名に
${{ github.event.release.tag_name != '' && github.event.release.tag_name || '999.999.999' }}

jobs:
build-noengine-prepackage:
Expand All @@ -37,37 +38,37 @@ jobs:
- artifact_name: linux-noengine-prepackage
artifact_path: dist_electron/linux-unpacked
package_name: voicevox
linux_artifact_name: 'VOICEVOX.${ext}'
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
sed_name: sed
os: ubuntu-18.04
# Linux CPU
- artifact_name: linux-noengine-cpu-prepackage
artifact_path: dist_electron/linux-unpacked
package_name: voicevox-cpu
linux_artifact_name: 'VOICEVOX.${ext}'
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
sed_name: sed
os: ubuntu-18.04
# Windows NVIDIA GPU
- artifact_name: windows-noengine-prepackage
artifact_path: dist_electron/win-unpacked
package_name: voicevox
nsis_web_artifact_name: 'VOICEVOX Web Setup ${version}.${ext}'
nsis_web_artifact_name: "VOICEVOX Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# Windows CPU
- artifact_name: windows-noengine-cpu-prepackage
artifact_path: dist_electron/win-unpacked
package_name: voicevox-cpu
nsis_web_artifact_name: 'VOICEVOX-CPU Web Setup ${version}.${ext}'
nsis_web_artifact_name: "VOICEVOX-CPU Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# macOS CPU
- artifact_name: macos-noengine-cpu-prepackage
artifact_path: dist_electron/mac
package_name: voicevox-cpu
macos_artifact_name: 'VOICEVOX.${ext}'
macos_artifact_name: "VOICEVOX.${ext}"
sed_name: gsed
os: macos-11

Expand All @@ -93,7 +94,7 @@ jobs:
"${{ matrix.sed_name }}" -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# "${{ matrix.sed_name }}" -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js
"${{ matrix.sed_name }}" -i 's/"version": "0.0.0"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
"${{ matrix.sed_name }}" -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
# NOTE: The extraFiles of electron-builder uses VOICEVOX.app/Contents/ as the file copy destination.
# However, since the executable file is located in VOICEVOX.app/Contents/MacOS/,
Expand Down Expand Up @@ -156,14 +157,6 @@ jobs:
run: |
df -h
- name: Overwrite .env.production for Linux and macOS
if: startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'macos-')
shell: bash
run: |
echo "ENGINE_PATH=./run" > .env.production
echo "VUE_APP_ENGINE_URL=http://127.0.0.1:50021" >> .env.production
echo "VUE_APP_GTM_CONTAINER_ID=GTM-DUMMY" >> .env.production
- name: Checkout Product Version Resource
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -223,6 +216,19 @@ jobs:
cp resource/editor/PRIVACYPOLICY.md public/privacyPolicy.md
- name: Overwrite .env.production for Linux and macOS
if: startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'macos-')
shell: bash
run: |
"${{ matrix.sed_name }}" -i 's|run.exe|./run|g' .env.production
- name: Replace .env.production infomations
shell: bash
run: |
# GTM ID
gtm_id=$(jq -r '.VUE_APP_GTM_CONTAINER_ID' resource/editor/metas.json)
"${{ matrix.sed_name }}" -i 's/VUE_APP_GTM_CONTAINER_ID=.*/VUE_APP_GTM_CONTAINER_ID='"$gtm_id"'/' .env.production
- name: Generate public/licenses.json
shell: bash
run: npm run license:generate -- -o public/licenses.json
Expand All @@ -249,7 +255,6 @@ jobs:
path: |
${{ matrix.artifact_path }}
build-engine-prepackage:
env:
cache-version: v2
Expand Down Expand Up @@ -483,7 +488,6 @@ jobs:
name: ${{ matrix.artifact_name }}-zip
path: "${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip"


build-distributable:
if: github.event.release.tag_name != '' # If release
needs: [build-engine-prepackage]
Expand All @@ -506,37 +510,37 @@ jobs:
- artifact_name: linux-nvidia-appimage
engine_artifact_name: linux-nvidia-prepackage
package_name: voicevox
linux_artifact_name: 'VOICEVOX.${ext}'
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
sed_name: sed
os: ubuntu-18.04
# Linux CPU
- artifact_name: linux-cpu-appimage
engine_artifact_name: linux-cpu-prepackage
package_name: voicevox-cpu
linux_artifact_name: 'VOICEVOX.${ext}'
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
sed_name: sed
os: ubuntu-18.04
# Windows NVIDIA GPU
- artifact_name: windows-nvidia-nsis-web
engine_artifact_name: windows-nvidia-prepackage
package_name: voicevox
nsis_web_artifact_name: 'VOICEVOX Web Setup ${version}.${ext}'
nsis_web_artifact_name: "VOICEVOX Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# Windows CPU
- artifact_name: windows-cpu-nsis-web
engine_artifact_name: windows-cpu-prepackage
package_name: voicevox-cpu
nsis_web_artifact_name: 'VOICEVOX-CPU Web Setup ${version}.${ext}'
nsis_web_artifact_name: "VOICEVOX-CPU Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# macOS CPU
- artifact_name: macos-cpu-dmg
engine_artifact_name: macos-cpu-prepackage
package_name: voicevox-cpu
macos_artifact_name: 'VOICEVOX ${version}.${ext}'
macos_artifact_name: "VOICEVOX ${version}.${ext}"
macos_executable_name: VOICEVOX
sed_name: gsed
os: macos-11
Expand Down Expand Up @@ -568,7 +572,7 @@ jobs:
"${{ matrix.sed_name }}" -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# "${{ matrix.sed_name }}" -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js
"${{ matrix.sed_name }}" -i 's/"version": "0.0.0"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
"${{ matrix.sed_name }}" -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
- name: Download and extract engine-prepackage artifact
uses: actions/download-artifact@v2
Expand Down Expand Up @@ -714,7 +718,6 @@ jobs:
path: |
nsis-web-artifact/*
upload-distributable-to-release:
if: github.event.release.tag_name != '' # If release
needs: [build-distributable]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ npm ci

## 実行

`.env.production`をコピーして`.env`を作成し、`ENGINE_PATH``voicevox_engine`があるパスを指定します。
`.env.production`をコピーして`.env`を作成し、`DEFAULT_ENGINE_INFOS`内の`executionFilePath``voicevox_engine`があるパスを指定します。
とりあえず [製品版 VOICEVOX](https://voicevox.hiroshiba.jp/) のディレクトリのパスを指定すれば動きます。

```bash
Expand Down
2 changes: 1 addition & 1 deletion openapi.json

Large diffs are not rendered by default.

Loading

0 comments on commit b486418

Please sign in to comment.