-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 新增竹影.spec文件用于PyInstaller构建配置 - 简化build.sh脚本,使用spec文件进行构建 - 优化DMG打包流程 - 改进依赖项管理和资源打包
- Loading branch information
Showing
6 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Configuration | ||
APP_NAME="竹影" | ||
VERSION="1.0.0" | ||
|
||
# Clean previous builds | ||
echo "清理旧构建..." | ||
rm -rf build dist | ||
|
||
# Build using spec file | ||
echo "构建应用程序..." | ||
pyinstaller --clean 竹影.spec | ||
|
||
# Create DMG | ||
if [ -d "dist/${APP_NAME}.app" ]; then | ||
echo "创建 DMG 安装包..." | ||
create-dmg \ | ||
--volname "${APP_NAME} Installer" \ | ||
--volicon "assets/icon.icns" \ | ||
--window-pos 200 120 \ | ||
--window-size 800 400 \ | ||
--icon-size 100 \ | ||
--icon "${APP_NAME}.app" 200 190 \ | ||
--hide-extension "${APP_NAME}.app" \ | ||
--app-drop-link 600 185 \ | ||
"dist/${APP_NAME}-${VERSION}.dmg" \ | ||
"dist/${APP_NAME}.app" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[tool.briefcase] | ||
project_name = "竹影" | ||
version = "1.0.0" | ||
bundle = "com.钟智强" | ||
author = "钟智强" | ||
|
||
[tool.briefcase.app.zhuying] | ||
formal_name = "竹影" | ||
description = "Video Transcription and Translation Tool" | ||
sources = ["src", "main.py"] | ||
requires = [ | ||
"opencv-python>=4.8.0", | ||
"pillow>=10.0.0", | ||
"sv-ttk>=2.5.0", | ||
"ffmpeg-python>=0.2.0", | ||
"openai-whisper>=20230918", | ||
"moviepy>=1.0.3", | ||
"gTTS>=2.3.2", | ||
"googletrans>=3.1.0a0", | ||
"jieba>=0.42.1", | ||
"numpy>=1.24.0", | ||
"torch>=2.0.0", | ||
"tqdm>=4.65.0" | ||
] | ||
|
||
[tool.briefcase.app.zhuying.macOS] | ||
requires = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ moviepy>=1.0.3 | |
gTTS>=2.3.2 | ||
googletrans>=3.1.0a0 | ||
jieba>=0.42.1 | ||
sqlite3 | ||
numpy>=1.24.0 | ||
torch>=2.0.0 | ||
tqdm>=4.65.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from setuptools import setup | ||
|
||
setup( | ||
name="竹影", | ||
app=['main.py'], | ||
version='1.0.0', | ||
setup_requires=['py2app'], | ||
options={ | ||
'py2app': { | ||
'argv_emulation': True, | ||
'packages': ['PIL', 'numpy', 'cv2', 'torch', 'whisper'], | ||
'includes': ['tkinter'], | ||
'resources': ['assets'], | ||
'iconfile': 'assets/icon.icns', | ||
'plist': { | ||
'CFBundleName': "竹影", | ||
'CFBundleDisplayName': "竹影", | ||
'CFBundleIdentifier': "com.钟智强.竹影", | ||
'CFBundleVersion': "1.0.0", | ||
'CFBundleShortVersionString': "1.0.0", | ||
} | ||
} | ||
} | ||
) |