Skip to content
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8a10e2e
feat: 差分アップデートを追加
sevenc-nanashi Jul 5, 2025
c316767
feat: wip
sevenc-nanashi Jul 6, 2025
b871001
feat: とりあえず動いた
sevenc-nanashi Jul 6, 2025
42768ac
chore: ダウンロードをアプデ画面に映す
sevenc-nanashi Jul 7, 2025
d87d436
feat: アップデートボタンを追加
sevenc-nanashi Jul 7, 2025
66dc391
feat: ダウンロードのダイアログを表示
sevenc-nanashi Jul 7, 2025
4c54143
chore: 細かいところを消す
sevenc-nanashi Jul 7, 2025
655a72f
style: eslintの怒られを修正
sevenc-nanashi Jul 7, 2025
cafc5ca
chore: スナップショットを更新
sevenc-nanashi Jul 7, 2025
4ce246c
(スナップショットを更新)
github-actions[bot] Jul 7, 2025
6164b65
fix: ダークテーマのボタンを修正
sevenc-nanashi Jul 7, 2025
1b5fddb
(スナップショットを更新)
github-actions[bot] Jul 7, 2025
7f749ee
feat: huggingfaceにアップロードするように
sevenc-nanashi Jul 7, 2025
e6a412f
fix: ifを移動
sevenc-nanashi Jul 7, 2025
58e2451
fix: ifを移動
sevenc-nanashi Jul 7, 2025
58c10e6
chore: windows-2019からwindows-2022に移行 (#2700)
sevenc-nanashi Jul 5, 2025
1c683b0
fix: ifの条件を修正
sevenc-nanashi Jul 7, 2025
63c43bd
fix: typo修正
sevenc-nanashi Jul 7, 2025
8369deb
chore: DOWNLOAD_BASE_URLにversionを追加
sevenc-nanashi Jul 8, 2025
16394e5
fix: versionをURLにつける
sevenc-nanashi Jul 8, 2025
b69bb9e
chore: yml指定にする
sevenc-nanashi Jul 8, 2025
9911ffc
chore: prepackageを消す
sevenc-nanashi Jul 8, 2025
3d2abb5
fix: INSTALLER_ARTIFACT_NAMEにする
sevenc-nanashi Jul 8, 2025
d30d896
fix: version欄を治す
sevenc-nanashi Jul 8, 2025
e5ef5fe
fix: iniを動かす
sevenc-nanashi Jul 8, 2025
2036dc8
fix: voicevox -> voicevox-test
sevenc-nanashi Jul 8, 2025
1d21dc6
fix: voicevox -> voicevox-test
sevenc-nanashi Jul 8, 2025
30fec5c
fix: update_infosを差し替える
sevenc-nanashi Jul 8, 2025
cd95804
fix: app-updateが欠けているので治す
sevenc-nanashi Jul 8, 2025
b651811
fix: urlを修正
sevenc-nanashi Jul 8, 2025
2ff2d3d
chore: zip版でのエラーを追加
sevenc-nanashi Jul 8, 2025
fe2ac52
chore: テキストを修正
sevenc-nanashi Jul 8, 2025
dc8dde5
chore: iniをcopyにする
sevenc-nanashi Jul 8, 2025
57571e9
Merge: upstream/main -> poc/diff-updater
sevenc-nanashi Jul 9, 2025
915364a
chore: いったんmacosのアプデをあきらめる
sevenc-nanashi Jul 11, 2025
3f2515f
feat: ダウンロードのプログレス表示を追加
sevenc-nanashi Jul 11, 2025
3474cbb
style: nr lint:fix
sevenc-nanashi Jul 11, 2025
d9d448e
chore: progressをまとめる
sevenc-nanashi Jul 12, 2025
d52003d
chore: コメントを増やす
sevenc-nanashi Jul 12, 2025
a3dcde1
chore: アップデートできないときはボタンを無効化する
sevenc-nanashi Jul 12, 2025
de599b7
feat: Storyを足す
sevenc-nanashi Jul 12, 2025
abb37fa
(スナップショットを更新)
github-actions[bot] Jul 12, 2025
e2b1ddd
chore: prereleaseでもhfに上げるようにする
sevenc-nanashi Jul 12, 2025
3274b2d
Merge: upstream/main -> poc/diff-updater
sevenc-nanashi Jul 12, 2025
8b03f99
merge: upstream/main -> poc/diff-updater
sevenc-nanashi Jul 13, 2025
7624268
style: node protocolをつける
sevenc-nanashi Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_APP_NAME=voicevox
VITE_APP_NAME=voicevox-test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

メモ:戻す

Copy link
Member

@Hiroshiba Hiroshiba Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ここに関係ないけど、議論分けたいのでここにコメントしました)

ちょっと相談です!!
かなりシステムが複雑化するのでどう進めようか迷っています。
例えばサーバーサイドのコードもこのリポジトリで管理するとか、projectブランチ作ってわりと途中な状態でもマージしやすくするとかを考えてます。

あるいは抜本的な解決策として、先にエンジン分離をやってしまえば、差分アプデがすごく簡単になる(githubのみで完結する)ことを思いつきました。
なので差分アプデを作り込んだときの恩恵は一時的でよく、そのためにサーバーを建てるのはかなり遠回りかもとか思いました。
huggingfaceとgithubのみで完結する形か、あるいは先にエンジン分離をやってしまうのはどうでしょうか…?

現状まだ考えきれてないですが、サーバー追加周りは考えることが山ほどあるなと思ってます。
例えばapi変更するときどうするのとか、セキュリティ的なのどうするのとか、ドキュメント書かないととか、ドメイン取らないととか、dev用サーバーどう建てようとか、単一情報源の法則どうしようとか(=blogへの依存を増やすのか)…。
あとはmacだけ解決してない(ダウンロード数見るにユーザー全体の2割くらいがmac)とかも考慮ポイントかも。

まああとで考えれば良いことが多いですが、であればもうエンジン分離してしまった方が早いんじゃないかと、ふと思ったのでコメントしてみました…。
自分の中でも結論でておらず、どうすべきかかなり悩んでいますが、サーバーを追加する場合サクッと実装するのが難しいのではと気づき始めていて、先にエンジン分離するのが丸いのかもと思い始めています🙇
以前と言ってること違ってたりしたらご指摘いただければ!!🙇

VITE_DEFAULT_ENGINE_INFOS=`[
{
"uuid": "074fc39e-678b-4c13-8916-ffca8d505d1d",
Expand All @@ -10,5 +10,5 @@ VITE_DEFAULT_ENGINE_INFOS=`[
}
]`
VITE_OFFICIAL_WEBSITE_URL=https://voicevox.hiroshiba.jp/
VITE_LATEST_UPDATE_INFOS_URL=https://voicevox.hiroshiba.jp/updateInfos.json
VITE_LATEST_UPDATE_INFOS_URL=https://random-files.sevenc7c.com/update_infos.json
VITE_GTM_CONTAINER_ID=GTM-DUMMY
94 changes: 75 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
description: "コード署名する"
type: boolean
default: false
upload_artifact:
description: "デバッグ用に成果物をartifactにアップロードするか"
upload_all_artifacts:
description: "デバッグ用にすべての成果物をartifactにアップロードするか"
type: boolean
default: false

Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
- artifact_name: linux-nvidia-prepackage
artifact_path: dist_electron/linux-unpacked
voicevox_engine_asset_name: linux-nvidia
package_name: voicevox
package_name: voicevox-test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

メモ:ここら辺も戻す

compressed_artifact_name: voicevox-linux-nvidia
app_asar_dir: prepackage/resources
installer_artifact_name: linux-nvidia-appimage
Expand All @@ -65,7 +65,7 @@ jobs:
- artifact_name: linux-cpu-x64-prepackage
artifact_path: dist_electron/linux-unpacked
voicevox_engine_asset_name: linux-cpu-x64
package_name: voicevox-cpu
package_name: voicevox-test-cpu
compressed_artifact_name: voicevox-linux-cpu-x64
app_asar_dir: prepackage/resources
installer_artifact_name: linux-cpu-x64-appimage
Expand All @@ -77,7 +77,7 @@ jobs:
- artifact_name: linux-cpu-arm64-prepackage
artifact_path: dist_electron/linux-arm64-unpacked
voicevox_engine_asset_name: linux-cpu-arm64
package_name: voicevox-cpu
package_name: voicevox-test-cpu
compressed_artifact_name: voicevox-linux-cpu-arm64
app_asar_dir: prepackage/resources
installer_artifact_name: linux-cpu-arm64-appimage
Expand All @@ -89,7 +89,7 @@ jobs:
- artifact_name: windows-nvidia-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-nvidia
package_name: voicevox-cuda
package_name: voicevox-test-cuda
compressed_artifact_name: voicevox-windows-nvidia
app_asar_dir: prepackage/resources
installer_artifact_name: windows-nvidia-nsis-web
Expand All @@ -99,7 +99,7 @@ jobs:
- artifact_name: windows-cpu-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-cpu
package_name: voicevox-cpu
package_name: voicevox-test-cpu
compressed_artifact_name: voicevox-windows-cpu
app_asar_dir: prepackage/resources
installer_artifact_name: windows-cpu-nsis-web
Expand All @@ -109,7 +109,7 @@ jobs:
- artifact_name: windows-directml-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-directml
package_name: voicevox
package_name: voicevox-test
compressed_artifact_name: voicevox-windows-directml
app_asar_dir: prepackage/resources
installer_artifact_name: windows-directml-nsis-web
Expand All @@ -119,7 +119,7 @@ jobs:
- artifact_name: macos-cpu-x64-prepackage
artifact_path: dist_electron/mac
voicevox_engine_asset_name: macos-x64
package_name: voicevox-cpu
package_name: voicevox-test-cpu
compressed_artifact_name: voicevox-macos-cpu-x64
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-cpu-x64-dmg
Expand All @@ -129,7 +129,7 @@ jobs:
- artifact_name: macos-cpu-arm64-prepackage
artifact_path: dist_electron/mac-arm64
voicevox_engine_asset_name: macos-arm64
package_name: voicevox-cpu
package_name: voicevox-test-cpu
compressed_artifact_name: voicevox-macos-cpu-arm64
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-cpu-arm64-dmg
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
# so different package/product names should be used for CPU/DirectML/GPU builds.
- name: Replace package name & version
run: |
$sed -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
$sed -i 's/"name": "voicevox-test"/"name": "${{ matrix.package_name }}"/' package.json
# $sed -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js

$sed -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
Expand Down Expand Up @@ -255,6 +255,7 @@ jobs:
LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }}
LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }}
MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }}
INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }}

# https://github.com/electron-userland/electron-builder/issues/3179
USE_HARD_LINKS: false
Expand Down Expand Up @@ -342,7 +343,7 @@ jobs:
rm $name.tar

- name: Upload Linux tar.gz (without nvidia) to Artifacts
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true'
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_all_artifacts == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-targz
Expand Down Expand Up @@ -372,7 +373,7 @@ jobs:
7z rn $name.zip prepackage/ VOICEVOX/

- name: Upload Windows & Mac zip (without nvidia) to Artifacts
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true'
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_all_artifacts == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-zip
Expand Down Expand Up @@ -412,20 +413,32 @@ jobs:
THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt
SIGNTOOL_PATH_PATH: /tmp/signtool_path.txt

- name: Create app-update.yml
run: |
# prepackageを使うとapp-update.ymlが生成されないので、手動で作成する
cat <<YAML > ${{ matrix.app_asar_dir }}/app-update.yml
provider: generic
url: https://vv-update-api.sevenc7c.workers.dev/${{ matrix.installer_artifact_name }}
useMultipleRangeRequest: false
updaterCacheDirName: ${{ matrix.package_name }}-updater
YAML
Comment on lines +412 to +420
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはワークアラウンドって感じでしょうか?
これ、変更があった時に気づけなくて、結構バグになりやすそうな気がしました 😇

ちょっと大掛かりになっちゃうんですけれども、そもそもprepackageがもういらない気がしてきました。
prepackageを使わないようにしてここをなくす・・・というのはどうでしょう・・・?

ちょっとさすがにしんどすぎますかね・・・・? 🙇

(もしprepackageなくす場合、今のコードでprepackageなくしても問題ないかを @aoirint さんにもコメントいただけると心強そう。お忙しそうであれば僕と @sevenc-nanashi さんの判断だけで進んじゃって良さそう!)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ビルドフックでエンジン差し込みを行うって感じですかね?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よくわかってないのですが、そんな感じな気がしました!
まあどんな方法でも良さそうだけど、署名周りとか、コマンドの権限とか、気にしないといけないこといろいろありそう。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRとしてはここどうするかも考えどころですねぇ。
どっちルート行きますかね・・・?

Copy link
Member Author

@sevenc-nanashi sevenc-nanashi Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今作業中ですが、そこそこ大きくなりそうなので一旦別PRにしたほうが良さそう。このPRでは変更しない(一旦prepackageのまま or 先にprepackageをやめるPRが完成してマージされたらそっち)みたいな感じで行こうと思います。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おお、失礼しました!!! お待ちしています!!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review request頂いたけど、ここどうしましょう?👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このPRでは変更しない(一旦prepackageのまま or 先にprepackageをやめるPRが完成してマージされたらそっち)みたいな感じで行こうと思います。

これの気持ちですね。一旦これでレビューしてもらえると...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほどです。
レビューは進めますが、たぶんこのプルリクはシステム変更が大きく、マージに凄まじい時間がかかるので、途中で別PRもらえると助かるかもです。


# NOTE: prepackage can be removed before splitting nsis-web archive
- name: Build Electron
if: endsWith(matrix.installer_artifact_name, '-nsis-web') || endsWith(matrix.installer_artifact_name, '-appimage') # windows and linux
env:
NSIS_WEB_ARTIFACT_NAME: ${{ matrix.nsis_web_artifact_name }}
LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }}
LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }}
INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }}
run: |
pnpm run electron:build --prepackaged prepackage/

- name: Build Electron (for macOS)
if: endsWith(matrix.installer_artifact_name, '-dmg') # macOS
env:
MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }}
INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }}
run: |
pnpm run electron:build --prepackaged prepackage/VOICEVOX.app

Expand Down Expand Up @@ -460,13 +473,14 @@ jobs:
mv archives.txt "${{ matrix.installer_artifact_name }}.7z.txt"
done

- name: Upload Linux AppImage split to Artifacts
if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact == 'true'
- name: Upload Linux AppImage to Artifacts
if: endsWith(matrix.installer_artifact_name, '-appimage')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.7z.*
dist_electron/*.AppImage
dist_electron/*.yml

- name: Upload Linux AppImage split to Release Assets
if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != ''
Expand All @@ -479,12 +493,13 @@ jobs:
target_commitish: ${{ github.sha }}

- name: Upload macOS dmg to Artifacts
if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact == 'true'
if: endsWith(matrix.installer_artifact_name, '-dmg')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.dmg
dist_electron/*.yml

- name: Upload macOS dmg to Release Assets
if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != ''
Expand All @@ -496,14 +511,21 @@ jobs:
dist_electron/*.dmg
target_commitish: ${{ github.sha }}

- name: Copy Windows NSIS ini
if: endsWith(matrix.installer_artifact_name, '-nsis-web')
run: |
cp dist_electron/nsis-web/out/*.ini dist_electron/nsis-web/

- name: Upload Windows NSIS Web to Artifacts
if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact == 'true'
if: endsWith(matrix.installer_artifact_name, '-nsis-web')
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/nsis-web/out/*.7z.*
dist_electron/nsis-web/*.7z
dist_electron/nsis-web/*.exe
dist_electron/nsis-web/*.ini
dist_electron/nsis-web/*.yml

- name: Upload Windows NSIS Web to Release Assets
if: endsWith(matrix.installer_artifact_name, '-nsis-web') && (github.event.release.tag_name || github.event.inputs.version) != ''
Expand All @@ -515,3 +537,37 @@ jobs:
dist_electron/nsis-web/out/*.7z.*
dist_electron/nsis-web/*.exe
target_commitish: ${{ github.sha }}

upload-to-huggingface:
needs: build-and-upload
runs-on: ubuntu-latest
if: (github.event.release.tag_name || github.event.inputs.version) && github.event.inputs.prerelease == 'false'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: "*-release"
path: ./artifacts

- name: Organize artifacts
run: |
cd artifacts
for file in *; do
# -releaseを消す
mv "$file" "${file//-release/}"
done

- name: Upload to Hugging Face
run: |
if [ -z "${{ secrets.HUGGINGFACE_TOKEN }}" ]; then
# NOTE: if内ではsecretsは展開されないので、run内でチェックする
echo "Hugging Face token is not set. Skipping upload."
exit 0
fi

pip3 install huggingface_hub[cli]

huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN }}
huggingface-cli upload \
sevenc-nanashi/vv-poc-editor-update-storage \
artifacts $VOICEVOX_EDITOR_VERSION
75 changes: 44 additions & 31 deletions build/funcs.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,45 @@
Push $0 ; Stack $0
Push $1 ; $1 $0

; electron-builder のスクリプトに基づいたハッシュ値と対象ファイル名の取得
; https://github.com/electron-userland/electron-builder/blob/28cb86bdcb6dd0b10e75a69ccd34ece6cca1d204/packages/app-builder-lib/templates/nsis/include/installer.nsh#L17-L70
!ifdef APP_64_NAME
!ifdef APP_32_NAME
!ifdef APP_ARM64_NAME
${if} ${IsNativeARM64}
StrCpy $0 "${APP_ARM64_NAME}"
StrCpy $1 "${APP_ARM64_HASH}"
${elseif} ${IsNativeAMD64}
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
${else}
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
${endif}
${StdUtils.GetParameter} $0 "package-file" ""
; 引数でパッケージのパスが指定されている場合はそれを優先する(electron-updater用)
${If} $0 != ""
; ハッシュチェックは省略する(electron-updater がすでに行っているため)
StrCpy $1 "__DANGEROUS_SKIP_HASH_CHECK__"
${Else}
; electron-builder のスクリプトに基づいたハッシュ値と対象ファイル名の取得
; https://github.com/electron-userland/electron-builder/blob/28cb86bdcb6dd0b10e75a69ccd34ece6cca1d204/packages/app-builder-lib/templates/nsis/include/installer.nsh#L17-L70
!ifdef APP_64_NAME
!ifdef APP_32_NAME
!ifdef APP_ARM64_NAME
${if} ${IsNativeARM64}
StrCpy $0 "${APP_ARM64_NAME}"
StrCpy $1 "${APP_ARM64_HASH}"
${elseif} ${IsNativeAMD64}
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
${else}
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
${endif}
!else
${if} ${RunningX64}
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
${else}
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
${endif}
!endif
!else
${if} ${RunningX64}
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
${else}
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
${endif}
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
!endif
!else
StrCpy $0 "${APP_64_NAME}"
StrCpy $1 "${APP_64_HASH}"
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
!endif
!else
StrCpy $0 "${APP_32_NAME}"
StrCpy $1 "${APP_32_HASH}"
!endif
${EndIf}

; Stack $1 $0
Exch $1 ; <ResultHash> $0
Expand Down Expand Up @@ -225,11 +232,17 @@
Exch 2 ; <Hash> $1 $0
Exch $2 ; $2 $1 $0

${StdUtils.HashFile} $0 "$1" "$0"
${If} $0 == $2
${If} $2 == "__DANGEROUS_SKIP_HASH_CHECK__"
; ハッシュチェックをスキップする。
; electron-updater などの、すでにハッシュが検証済みのものを使う場合にのみ使用すること。
StrCpy $0 "OK"
${Else}
StrCpy $0 "Failed"
${StdUtils.HashFile} $0 "$1" "$0"
${If} $0 == $2
StrCpy $0 "OK"
${Else}
StrCpy $0 "Failed"
${EndIf}
${EndIf}

; Stack $2 $1 $0
Expand Down
Loading
Loading