Skip to content

Commit

Permalink
Merge: upstream追従 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba authored Oct 28, 2023
2 parents 8d2dc8f + 4d2d65a commit 168c87d
Show file tree
Hide file tree
Showing 78 changed files with 1,941 additions and 1,364 deletions.
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VITE_DEFAULT_ENGINE_INFOS=`[
"uuid": "074fc39e-678b-4c13-8916-ffca8d505d1d",
"name": "VOICEVOX Engine",
"executionEnabled": true,
"executionFilePath": "run.exe",
"executionFilePath": "vv-engine/run.exe",
"executionArgs": [],
"host": "http://127.0.0.1:50021"
}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,26 +278,24 @@ jobs:
- name: Merge VOICEVOX ENGINE into prepackage/
if: startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'linux-')
run: |
mv voicevox_engine/* prepackage/
rm -rf voicevox_engine
mv voicevox_engine/ prepackage/vv-engine/
- name: Merge VOICEVOX ENGINE into prepackage/VOICEVOX.app/Contents/MacOS/
if: startsWith(matrix.artifact_name, 'macos-')
run: |
mv voicevox_engine/* prepackage/VOICEVOX.app/Contents/MacOS/
rm -rf voicevox_engine
mv voicevox_engine/ prepackage/VOICEVOX.app/Contents/MacOS/vv-engine/
- name: Recover file permissions
if: startsWith(matrix.artifact_name, 'linux-') # linux
run: |
chmod +x "prepackage/${{ matrix.linux_executable_name }}"
chmod +x "prepackage/run"
chmod +x "prepackage/vv-engine/run"
- name: Recover file permissions for macOS build
if: startsWith(matrix.artifact_name, 'macos-') # macOS
run: |
chmod +x "prepackage/VOICEVOX.app/Contents/MacOS/${{ matrix.macos_executable_name }}"
chmod +x "prepackage/VOICEVOX.app/Contents/MacOS/run"
chmod +x "prepackage/VOICEVOX.app/Contents/MacOS/vv-engine/run"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (GPU).app/Contents/MacOS/VOICEVOX Helper (GPU)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Plugin).app/Contents/MacOS/VOICEVOX Helper (Plugin)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Renderer).app/Contents/MacOS/VOICEVOX Helper (Renderer)"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ npm ci

## 実行

`.env.production`をコピーして`.env`を作成し、`VITE_DEFAULT_ENGINE_INFOS`内の`executionFilePath``voicevox_engine`のフルパスを指定します
`.env.production`をコピーして`.env`を作成し、`VITE_DEFAULT_ENGINE_INFOS`内の`executionFilePath``voicevox_engine`のパスを指定します

[製品版 VOICEVOX](https://voicevox.hiroshiba.jp/) のディレクトリのパスを指定すれば動きます。

Expand Down
60 changes: 32 additions & 28 deletions build/installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,43 @@ EOS
fi
echo "[-] 7z command: ${COMMAND_7Z}"

echo "[+] Checking runtime prerequisites..."
LATEST_RELEASE_URL=$REPO_URL/releases/latest

PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin
if ! command -v ldconfig &> /dev/null; then
cat << EOS && exit 1
if [ -z "${VERSION}" ]; then
echo "[+] Checking the latest version..."

# releases/tag/{version}
RELEASE_TAG_URL=$(curl -fsSL -o /dev/null -w '%{url_effective}' "${LATEST_RELEASE_URL}")

# extract version (release tag name) from URL
VERSION=$(echo "${RELEASE_TAG_URL}" | sed 's/.*\/\(.*\)$/\1/')
echo "[-] Install version: ${VERSION} (latest)"
else
echo "[-] Install version: ${VERSION}"
fi

IFS=" " read -r -a VERSION_ARRAY <<< "${VERSION//[.+-]/ }"
if [ "${VERSION_ARRAY[0]}" -eq 0 ] && [ "${VERSION_ARRAY[1]}" -le 14 ]; then
# Check when version < 0.15
echo "[+] Checking runtime prerequisites..."

PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin
if ! command -v ldconfig &> /dev/null; then
cat << EOS && exit 1
[!] Command 'ldconfig' not found
Required to check existence of required libraries.
You must add a directory of contain ldconfig command to PATH environment variable.
EOS
fi
fi

if { ldconfig -p | grep 'libsndfile\.so';} &>/dev/null; then
echo "[-] libsndfile: OK"
elif [ -d /usr/local/Cellar/libsndfile ]; then
echo "[-] libsndfile: OK"
else
cat << 'EOS'
if { ldconfig -p | grep 'libsndfile\.so';} &>/dev/null; then
echo "[-] libsndfile: OK"
elif [ -d /usr/local/Cellar/libsndfile ]; then
echo "[-] libsndfile: OK"
else
cat << 'EOS'
[!] libsndfile: not found
Required to run VOICEVOX ENGINE
Expand All @@ -160,26 +178,12 @@ Arch Linux
MacOS:
brew install libsndfile
EOS
if [ "${IGNORE_RTCOND}" != "1" ]; then
exit 1
if [ "${IGNORE_RTCOND}" != "1" ]; then
exit 1
fi
fi
fi

LATEST_RELEASE_URL=$REPO_URL/releases/latest

if [ -z "${VERSION}" ]; then
echo "[+] Checking the latest version..."

# releases/tag/{version}
RELEASE_TAG_URL=$(curl -fsSL -o /dev/null -w '%{url_effective}' "${LATEST_RELEASE_URL}")

# extract version (release tag name) from URL
VERSION=$(echo "${RELEASE_TAG_URL}" | sed 's/.*\/\(.*\)$/\1/')
echo "[-] Install version: ${VERSION} (latest)"
else
echo "[-] Install version: ${VERSION}"
fi

RELEASE_URL=${REPO_URL}/releases/download/${VERSION}
ARCHIVE_LIST_URL=${RELEASE_URL}/${NAME}.7z.txt

Expand Down
6 changes: 4 additions & 2 deletions docs/res/終了シーケンス図.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ flowchart TD
916552 -->|"true"| 655722["何もしない"]
end
subgraph subgraph_2["app.before_quit"]
c["willQuit"] -->|"false"| node_9
c{{"willQuit"}} -->|"false"| node_9
c -->|"true"| 454139
454139 --> 177756
177756 -->|"false"| node_13["event.preventDefault"]
node_13 --> 322763["await"]
322763 --> node_15
925653["configManager.ensureSaved"] --> 177756
454139 --> 177756
c -->|"true"| 925653
end
subgraph subgraph_1["win.close"]
a -->|"false"| 442878
Expand Down
1 change: 1 addition & 0 deletions docs/コードの歩き方.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ TODO
- openapi ディレクトリ ・・・ エンジンの API を叩くためのコードのディレクトリ。OpenAPI で自動生成される。
- router ディレクトリ ・・・ Vue Router 用のディレクトリ。
- helpers ディレクトリ ・・・ 便利な関数を置くディレクトリ。
- shared ディレクトリ ・・・ UI と Electron 両方から参照されるコードを置くディレクトリ。
- public
- アプリのリソースファイルが置かれるディレクトリ。
- build
Expand Down
4 changes: 2 additions & 2 deletions electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const dotenvPath = path.join(process.cwd(), ".env.production");
dotenv.config({ path: dotenvPath });

const VOICEVOX_ENGINE_DIR =
process.env.VOICEVOX_ENGINE_DIR ?? "../voicevox_engine/run.dist/";
process.env.VOICEVOX_ENGINE_DIR ?? "../voicevox_engine/dist/run/";

// ${productName} Web Setup ${version}.${ext}
const NSIS_WEB_ARTIFACT_NAME = process.env.NSIS_WEB_ARTIFACT_NAME;
Expand Down Expand Up @@ -90,7 +90,7 @@ const builderOptions = {
},
{
from: VOICEVOX_ENGINE_DIR,
to: extraFilePrefix,
to: path.join(extraFilePrefix, "vv-engine"),
},
{
from: path.resolve(__dirname, "build", "vendored", "7z", sevenZipFile),
Expand Down
Loading

0 comments on commit 168c87d

Please sign in to comment.