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

Migrate: vue-cliからviteに移行 #1207

Merged
merged 32 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6f8b3a0
Add: ViteをdevDependencyに追加
sevenc-nanashi Feb 15, 2023
1e32948
Update: scriptsを更新
sevenc-nanashi Feb 15, 2023
2e371d0
Add: とりあえずserveが動くように
sevenc-nanashi Feb 15, 2023
26f0cf6
Add: Electronビルドできるように
sevenc-nanashi Feb 16, 2023
5af5293
Merge: main -> migrate/vite
sevenc-nanashi Feb 16, 2023
8af49b1
Change: VITE_PUBLIC_からVITE_に
sevenc-nanashi Feb 16, 2023
7a918be
Add: IS_ELECTRONを追加
sevenc-nanashi Feb 16, 2023
116d0cd
Migrate: 単体テストをvitestに移行
sevenc-nanashi Feb 16, 2023
aa0b541
Fix: e2eテストが動くように
sevenc-nanashi Feb 16, 2023
ee1f655
Delete: FIXMEを削除
sevenc-nanashi Feb 16, 2023
cd995e3
Fix: Lintを修正
sevenc-nanashi Feb 16, 2023
76bccbc
Change: MacOS用のパッチをelectron-builder.config.js内で行うように
sevenc-nanashi Feb 16, 2023
fb42129
Fix: ビルドが落ちるのを修正
sevenc-nanashi Feb 16, 2023
ecaffa0
Fix: パスの変更し忘れを修正
sevenc-nanashi Feb 16, 2023
83ee9ed
Fix: dmg-licenseをoptionalDependenciesに追加
sevenc-nanashi Feb 17, 2023
cddea94
Merge branch 'migrate/vite' of github.com:sevenc-nanashi/voicevox int…
sevenc-nanashi Feb 17, 2023
257e5be
Update: package-lock.jsonを更新
sevenc-nanashi Feb 17, 2023
d1a369d
Fix: prepackage周りを修正
sevenc-nanashi Feb 17, 2023
c41ab9a
Fix: --publish neverを指定
sevenc-nanashi Feb 17, 2023
c4bc922
Merge branch 'main' of github.com:voicevox/voicevox into migrate/vite
sevenc-nanashi Feb 17, 2023
622b8b6
Add: ESLintのチェックを追加
sevenc-nanashi Feb 18, 2023
7963b20
Fix: ビルドできないのを修正
sevenc-nanashi Feb 18, 2023
c17f739
Fix: .env.productionの置き換えを修正
sevenc-nanashi Feb 18, 2023
5583cd0
Change: キーを変更
sevenc-nanashi Feb 18, 2023
e65a7cf
Fix: Macでウィンドウが出ないのを修正
sevenc-nanashi Feb 19, 2023
9e2a609
Code: extraFilesのMacOSでの挙動を共通化
sevenc-nanashi Feb 20, 2023
3308b7e
Change: scriptsの名前を変更
sevenc-nanashi Feb 20, 2023
e6e621d
Merge: upstream/main -> migrate/vite
sevenc-nanashi Feb 20, 2023
e02edaf
Merge: main -> migrate/vite
sevenc-nanashi Feb 20, 2023
7e0355e
Delete: 不要なimportを削除
sevenc-nanashi Feb 20, 2023
c969613
Fix: Windowsでのビルドを修正
sevenc-nanashi Feb 20, 2023
3659000
Fix: コマンドを修正
sevenc-nanashi Feb 21, 2023
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
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ DEFAULT_ENGINE_INFOS=`[
"host": "http://127.0.0.1:50021"
}
]`
VUE_APP_GTM_CONTAINER_ID=GTM-DUMMY
VITE_PUBLIC_GTM_CONTAINER_ID=GTM-DUMMY
VV_OUTPUT_LOG_UTF8=1
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ pnpm-debug.log*
*.sln
*.sw?

#Electron-builder output
/dist_electron
# Electron-builder output
/dist-electron

# data
data/
Expand Down
117 changes: 117 additions & 0 deletions electron-builder.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import type { Configuration } from "electron-builder";
import path from "path";

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

// ${productName} Web Setup ${version}.${ext}
const NSIS_WEB_ARTIFACT_NAME = process.env.NSIS_WEB_ARTIFACT_NAME;

// ${productName}-${version}.${ext}
const LINUX_ARTIFACT_NAME = process.env.LINUX_ARTIFACT_NAME;

// ${packageName}
const LINUX_EXECUTABLE_NAME = process.env.LINUX_EXECUTABLE_NAME;

// ${productName}-${version}.${ext}
const MACOS_ARTIFACT_NAME = process.env.MACOS_ARTIFACT_NAME;

const isMac = process.platform === "darwin";

// preload: "src/electron/preload.ts",
const builderOptions: Configuration = {
fileAssociations: [
{
ext: "vvproj",
name: "VOICEVOX Project file",
description: "VOICEVOX Project file",
role: "Editor",
icon: "icons/vvproj." + (isMac ? "icns" : "ico"),
},
{
ext: "vvpp",
name: "VOICEVOX Plugin package",
description: "VOICEVOX Plugin package",
role: "Editor",
icon: "icons/vvpp." + (isMac ? "icns" : "ico"),
},
{
ext: "vvppp",
name: "VOICEVOX Plugin package (part)",
description: "VOICEVOX Plugin package (part)",
role: "Editor",
icon: "icons/vvpp." + (isMac ? "icns" : "ico"),
},
],
extraFiles: [
{ from: "build/README.txt", to: "README.txt" },
{ from: ".env.production", to: ".env" },
{
from: VOICEVOX_ENGINE_DIR,
to: "",
},
],
// electron-builder installer
productName: "VOICEVOX",
appId: "jp.hiroshiba.voicevox",
copyright: "Hiroshiba Kazuyuki",
afterAllArtifactBuild: path.resolve(
__dirname,
"build",
"afterAllArtifactBuild.js"
),
win: {
icon: "public/icon.png",
target: [
{
target: "nsis-web",
arch: ["x64"],
},
],
},
directories: {
buildResources: "build",
},
nsisWeb: {
artifactName:
NSIS_WEB_ARTIFACT_NAME !== "" ? NSIS_WEB_ARTIFACT_NAME : undefined,
include: "build/installer.nsh",
oneClick: false,
allowToChangeInstallationDirectory: true,
},
publish: {
provider: "github",
repo: "voicevox",
vPrefixedTagName: false,
},
linux: {
artifactName: LINUX_ARTIFACT_NAME !== "" ? LINUX_ARTIFACT_NAME : undefined,
executableName:
LINUX_EXECUTABLE_NAME !== "" ? LINUX_EXECUTABLE_NAME : undefined,
icon: "public/icon.png",
category: "AudioVideo",
mimeTypes: ["application/x-voicevox"],
target: [
{
target: "AppImage",
arch: ["x64"],
},
],
},
mac: {
artifactName: MACOS_ARTIFACT_NAME !== "" ? MACOS_ARTIFACT_NAME : undefined,
icon: "public/icon-mac.png",
category: "public.app-category.utilities",
target: [
{
target: "dmg",
arch: ["x64"],
},
],
},
dmg: {
icon: "public/icon-dmg.icns",
},
};

export default builderOptions;
Loading