Skip to content

Commit 3704018

Browse files
committed
Merge branch 'dev'
2 parents 8d664f9 + a27a8e9 commit 3704018

158 files changed

Lines changed: 33952 additions & 4010 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/renderer/WebSDK/**/*.ts
2+
src/renderer/MotionSync/**/*.js
3+
src/renderer/MotionSync/**/*.ts

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/build.yml

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ jobs:
6767
VERSION=$(node -e "console.log(require('./package.json').version)")
6868
echo "build-version=$VERSION" >> $GITHUB_OUTPUT
6969
70-
- name: Waiting on All checks
71-
uses: lewagon/wait-on-check-action@v0.2
72-
with:
73-
ref: ${{ github.ref }}
74-
repo-token: ${{ secrets.GITHUB_TOKEN }}
75-
running-workflow-name: 'draft'
76-
7770
- name: Delete outdated drafts
7871
uses: hugo19941994/delete-draft-releases@v1.0.0
7972
env:
@@ -142,17 +135,27 @@ jobs:
142135
- name: Compile & release Electron app
143136
uses: samuelmeuli/action-electron-builder@v1
144137
env:
138+
# AWS Credentials for S3 publishing
139+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
140+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
141+
AWS_REGION: ${{ secrets.AWS_REGION }} # Use the region secret
142+
# GitHub Token for creating GitHub releases (if still needed)
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145144
VITE_APP_VERSION: ${{ needs.draft.outputs.version }}
146145
with:
147-
build_script_name: build
148-
args: --config electron-builder.yml
149146
github_token: ${{ secrets.GITHUB_TOKEN }}
150-
release: true
147+
build_script_name: build
148+
args: --config electron-builder.yml --publish always # Ensure publishing is triggered
149+
# release: true # Set to false if you ONLY want to publish to S3 and not create a GitHub Release artifact
151150
max_attempts: 3
152151

153152
build_web:
154153
needs: [draft]
155154
runs-on: ubuntu-latest
155+
env:
156+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
157+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
158+
AWS_REGION: ${{ secrets.AWS_REGION }}
156159

157160
steps:
158161
- uses: actions/checkout@v3
@@ -168,6 +171,28 @@ jobs:
168171
- name: Build web target
169172
run: npm run build:web
170173

174+
- name: Create Web App Zip Archive
175+
run: |
176+
cd ./dist/web
177+
zip -r ../../open-llm-vtuber-web-${{ needs.draft.outputs.version }}.zip .
178+
cd ../.. # Go back to the workspace root
179+
180+
- name: Upload Web App Zip to S3
181+
run: |
182+
aws s3 cp ./open-llm-vtuber-web-${{ needs.draft.outputs.version }}.zip s3://open-llm-vtuber-frontend/open-llm-vtuber-web-${{ needs.draft.outputs.version }}.zip
183+
echo "Web app zip uploaded. Public access depends on S3 bucket policy/settings."
184+
185+
- name: Configure AWS Credentials
186+
uses: aws-actions/configure-aws-credentials@v4
187+
with:
188+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
189+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
190+
aws-region: ${{ secrets.AWS_REGION }}
191+
192+
- name: Upload web build to S3
193+
run: |
194+
aws s3 sync ./dist/web s3://open-llm-vtuber-frontend/web --delete
195+
171196
- name: Deploy to GitHub Pages
172197
uses: JamesIves/github-pages-deploy-action@v4
173198
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ packages/react-devtools-extensions/.tempUserDataDir
5858
out
5959

6060
# Cursor files
61-
.cursorrules
61+
.cursorrules

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Open-LLM-VTuber License 1.0
2+
3+
Copyright © 2025 Open LLM Vtuber. All rights reserved.
4+
5+
This software is licensed under the Apache License Version 2.0 (the "Apache License"), subject to the following Additional Conditions.
6+
7+
Additional Conditions
8+
9+
1. Definitions
10+
11+
"Software" refers to the Open-LLM-VTuber project and all of its associated components, including but not limited to source code, executable files, web applications, desktop clients, documentation, and accompanying assets.
12+
13+
2. Permitted Uses (No Additional License Required)
14+
15+
You are granted permission to use the software freely, without requiring a commercial license, under the following circumstances:
16+
17+
Non-commercial Uses: Any non-commercial activity including, but not limited to, personal projects, educational purposes, academic research, and non-profit initiatives.
18+
19+
VTuber Streaming and Content Creation: Activities involving VTuber streaming, content creation, broadcasting, and monetization on platforms such as YouTube, Twitch, Bilibili, or other streaming services, provided revenue primarily derives from content creation and not from direct sale, distribution, or subscription to the software itself.
20+
21+
3. Uses Requiring a Commercial License
22+
23+
You must obtain a separate commercial license from Open LLM Vtuber for any of the following uses:
24+
25+
Monetized Access or Hosting Services: Providing paid access to or hosting of the software—whether original, modified, or derivative—including SaaS, subscription models, pay-per-use, or paid downloads and installations.
26+
27+
Commercial Redistribution or Rebranding: Redistributing, repackaging, renaming, or otherwise commercially providing the software (original or modified versions) under any alternative brand, identity, or project name in exchange for payment or other commercial benefits.
28+
29+
Commercial Embedding or Integration: Incorporating this software, wholly or partially, into any commercial software, hardware, or physical product that is sold, licensed, or otherwise distributed for a fee.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# open-llm-vtuber-electron
1+
# Open LLM Vtuber
22

33
An Electron application with React and TypeScript
44

dev-app-update.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/i18n-usage.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# i18n (国际化) 使用指南
2+
3+
本项目使用 i18next 实现多语言支持,目前支持英语和中文。
4+
5+
## 目录结构
6+
7+
```
8+
src/renderer/src/
9+
├── i18n.ts # i18next 配置文件
10+
├── locales/ # 翻译文件目录
11+
│ ├── en/ # 英语翻译
12+
│ │ └── translation.json # 英语翻译文件
13+
│ └── zh/ # 中文翻译
14+
│ └── translation.json # 中文翻译文件
15+
```
16+
17+
## 使用方法
18+
19+
### 在组件中使用
20+
21+
```tsx
22+
import { useTranslation } from 'react-i18next';
23+
24+
function MyComponent() {
25+
// 获取翻译函数和其他国际化工具
26+
const { t, i18n } = useTranslation();
27+
28+
// 使用 t 函数翻译文本
29+
return (
30+
<div>
31+
<h1>{t('common.settings')}</h1>
32+
<p>{t('settings.general.language')}</p>
33+
34+
{/* 改变语言 */}
35+
<button onClick={() => i18n.changeLanguage('en')}>English</button>
36+
<button onClick={() => i18n.changeLanguage('zh')}>中文</button>
37+
</div>
38+
);
39+
}
40+
```
41+
42+
### 添加新的翻译
43+
44+
1. 在代码中使用 `t('your.translation.key')` 添加新的翻译键
45+
2. 运行扫描命令提取翻译键:
46+
47+
```bash
48+
npm run extract-translations
49+
```
50+
51+
3. 添加的翻译键会更新到 `src/renderer/src/locales/en/translation.json``src/renderer/src/locales/zh/translation.json` 文件中
52+
4. 编辑中文翻译文件,为每个键添加对应的中文翻译
53+
54+
## 翻译键命名规则
55+
56+
我们使用点号分隔的命名空间来组织翻译键,例如:
57+
58+
- `common.save` - 通用的"保存"按钮文本
59+
- `settings.general.language` - 设置页面中的语言设置项
60+
61+
## 嵌套翻译
62+
63+
对于包含变量的文本,可以使用插值:
64+
65+
```tsx
66+
// 在翻译文件中
67+
{
68+
"welcome": "欢迎, {{name}}!"
69+
}
70+
71+
// 在组件中
72+
t('welcome', { name: 'John' }) // "欢迎, John!"
73+
```
74+
75+
## 自动检测语言
76+
77+
系统会自动检测用户的浏览器语言设置,并使用最接近的可用语言。用户也可以手动切换语言,选择会被保存在 localStorage 中。

electron-builder.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
appId: com.electron.app
2-
productName: open-llm-vtuber-electron
2+
productName: "Open LLM Vtuber"
33
directories:
44
buildResources: resources
55
output: release/${version}
@@ -16,7 +16,7 @@ files:
1616
asarUnpack:
1717
- resources/**
1818
win:
19-
executableName: open-llm-vtuber-electron
19+
executableName: Open LLM Vtuber
2020
icon: resources/icon.ico
2121
nsis:
2222
artifactName: ${name}-${version}-setup.${ext}
@@ -45,7 +45,9 @@ appImage:
4545
artifactName: ${name}-${version}.${ext}
4646
npmRebuild: false
4747
publish:
48-
provider: github
49-
releaseType: release
48+
provider: s3
49+
bucket: open-llm-vtuber-frontend
50+
region: ap-northeast-1
51+
acl: null
5052
electronDownload:
5153
mirror: https://npmmirror.com/mirrors/electron/

electron.vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ export default defineConfig({
1515
resolve: {
1616
alias: {
1717
'@': resolve('src/renderer/src'),
18+
"@framework": resolve("src/renderer/WebSDK/Framework/src"),
19+
"@cubismsdksamples": resolve("src/renderer/WebSDK/src"),
20+
"@motionsyncframework": resolve(
21+
"src/renderer/MotionSync/Framework/src",
22+
),
23+
"@motionsync": resolve("src/renderer/MotionSync/src"),
24+
"/src": resolve("src/renderer/src"),
1825
},
1926
},
2027
plugins: [
@@ -36,6 +43,10 @@ export default defineConfig({
3643
src: normalizePath(resolve(__dirname, 'node_modules/onnxruntime-web/dist/*.wasm')),
3744
dest: './libs/',
3845
},
46+
{
47+
src: normalizePath(resolve(__dirname, 'src/renderer/WebSDK/Core/live2dcubismcore.js')),
48+
dest: './libs/'
49+
}
3950
],
4051
}),
4152
react(),

0 commit comments

Comments
 (0)