Skip to content

Commit

Permalink
Merge branch 'HIllya51:main' into xx
Browse files Browse the repository at this point in the history
  • Loading branch information
test123456654321 authored Oct 7, 2024
2 parents 28fc98a + d094a98 commit 241c33e
Show file tree
Hide file tree
Showing 474 changed files with 142,377 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

#ko_fi: HIllya51
patreon: HIllya51
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bug Report 错误报告
description: Report bugs 报告错误
labels: bug
body:
- type: input
attributes:
label: Version 程序版本
validations:
required: true
- type: input
attributes:
label: OS version and bits 系统版本和位数
placeholder: >
e.g. windows 7 sp1 32 bits, windows 11 23H2 64 bits
validations:
required: true
- type: textarea
attributes:
label: bug's screenshot 错误截图
validations:
required: true

- type: textarea
attributes:
label: Reproduction steps 复现步骤
description: >
Describe the reproduction steps precisely if possible.
尽可能详细描述错误产生的细节。
validations:
required: true

- type: textarea
attributes:
label: Log files 日志文件
description: >
View log files in the "logs" directory. Please upload the log file as an attachment instead of copying its contents.
在"logs"目录中获取日志文件。请将日志文件以附件的形式上传,而不是将其中的内容复制。
validations:
required: true
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/02_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Feature Request 功能请求
description: Create the request for a new feature 提出一个增加新功能的请求
labels: enhancement
body:
- type: markdown
attributes:
value: >
Make sure it hasn't been mentioned before and not implemented in latest version.
确保此类请求之前尚未被其他人提出过且并未在最新版本中实现。
- type: textarea
attributes:
label: Expected behavior 预期的功能
validations:
required: true
- type: textarea
attributes:
label: Alternative behavior (optional) 近似的功能(可选)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/03_question.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Q&A 问询
description: Ask questions about LunaTranslator 提出关于LunaTranslator的问题
labels: question
body:
- type: markdown
attributes:
value: >
Before asking questions, make sure it hasn't been mentioned before.
提问之前应先检查是否已有相关的回答。
Don't ask questions about bugs. To open the right template from the previous selection.
程序报错不要使用此模板,应该返回上级重新选择 `Bug Report 错误报告` 选项。
- type: textarea
attributes:
label: Question 问题
validations:
required: true
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
blank_issues_enabled: true
contact_links:
- name: Game Compatibility 游戏适配
url: https://github.com/HIllya51/LunaHook/issues/new?assignees=&labels=enhancement&projects=&template=01_game_request.yaml
about: Request for an unsupported game, or hooked text is incorrect 请求支持尚未支持的游戏,或提取的文本不正确

- name: Discord
url: https://discord.com/invite/ErtDwVeAbB
about: Discord

- name: QQ群
url: https://qm.qq.com/q/I5rr3uEpi2
about: QQ群
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build

on:
push:
paths: [ '.github/workflows/build.yml','build.py', 'LunaTranslator/**' , 'plugins/**' ]
pull_request:
paths: [ '.github/workflows/build.yml','build.py', 'LunaTranslator/**' , 'plugins/**']

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- architecture: x86
fname: LunaTranslator_x86
- architecture: x64
fname: LunaTranslator
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.7.9'
architecture: ${{ matrix.architecture }}

- name: Install Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Run build script
run: |
python build.py ${{ matrix.architecture }} 3.7.9
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.fname }}
path: build/${{ matrix.fname }}.zip
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- architecture: x86
fname: LunaTranslator_x86
- architecture: x64
fname: LunaTranslator
permissions:
id-token: write
attestations: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Windows 10 SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.7.9'
architecture: ${{ matrix.architecture }}
- name: Install Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run build script
run: |
python build.py ${{ matrix.architecture }} 3.7.9
# - name: Generate attestation for artifact
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: build/${{ matrix.fname }}.zip
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.fname }}
path: build/${{ matrix.fname }}.zip

- name: loadversion
id: loadversion
run: python build.py loadversion | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Release LunaTranslator
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.loadversion.outputs.version }}
files: |
build/${{ matrix.fname }}.zip
build/${{ matrix.fname }}.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
LunaTranslator/userconfig
LunaTranslator/userconfig1

lunatranslator/cache
*.pyc
*.pyc
*.pyc
*.hlsl
*.hlsli
*.dds
*.mp3
*.sqlite
*.tlog
*.log
*.iobj
*.ipdb
*.obj
*.res
*.pdb
Thumbs.db
*.recipe
*.wav
build/

plugins/libs/webview2
plugins/builds
plugins/build
temp/


LunaTranslator/files/plugins
LunaTranslator/files/ocr
LunaTranslator/files/data
LunaTranslator/chrome_cache
plugins/.vscode/settings.json

LunaTranslator/files/themes
LunaTranslator/LunaTranslator/rendertext/luna.png
LunaTranslator/run37.bat
LunaTranslator/run3732.bat
LunaTranslator/run38.bat
LunaTranslator/run3832.bat
LunaTranslator/logs
LunaTranslator/LunaTranslator/.vscode/settings.json
.vscode/settings.json
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "plugins/libs/wil"]
path = plugins/libs/wil
url = https://github.com/microsoft/wil.git
[submodule "plugins/libs/tinymp3"]
path = plugins/libs/tinymp3
url = https://github.com/cpuimage/tinymp3
[submodule "plugins/libs/rapidfuzz-cpp"]
path = plugins/libs/rapidfuzz-cpp
url = https://github.com/rapidfuzz/rapidfuzz-cpp
[submodule "plugins/libs/wechat-ocr"]
path = plugins/libs/wechat-ocr
url = https://github.com/swigger/wechat-ocr
Loading

0 comments on commit 241c33e

Please sign in to comment.