mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-01-13 13:50:10 +08:00
GUI插件添加打包脚本
This commit is contained in:
parent
0b39380f70
commit
175ecdd5a7
87
plugins/native-ui/native-ui.spec
Normal file
87
plugins/native-ui/native-ui.spec
Normal file
@ -0,0 +1,87 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import typing
|
||||
import subprocess
|
||||
import sys
|
||||
if typing.TYPE_CHECKING:
|
||||
import os
|
||||
|
||||
from PyInstaller.building.api import COLLECT, EXE, PYZ
|
||||
from PyInstaller.building.build_main import Analysis
|
||||
|
||||
SPECPATH = ''
|
||||
DISTPATH = ''
|
||||
|
||||
|
||||
# exe文件名、打包目录名
|
||||
NAME = 'native-ui'
|
||||
# 模块搜索路径
|
||||
PYTHONPATH = [
|
||||
os.path.join(SPECPATH, '..', '..'), # 为了找到blcsdk
|
||||
]
|
||||
# 数据
|
||||
DATAS = [
|
||||
('plugin.json', '.'),
|
||||
('LICENSE', '.'),
|
||||
('data/config.example.ini', 'data'),
|
||||
('data/blivechat.ico', 'data'),
|
||||
('log/.gitkeep', 'log'),
|
||||
]
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['main.pyw'],
|
||||
pathex=PYTHONPATH,
|
||||
binaries=[],
|
||||
datas=DATAS,
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
|
||||
pyz = PYZ(
|
||||
a.pure,
|
||||
a.zipped_data,
|
||||
cipher=block_cipher,
|
||||
)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name=NAME,
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=False,
|
||||
console=True,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon='data/blivechat.ico',
|
||||
)
|
||||
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=False,
|
||||
upx_exclude=[],
|
||||
name=NAME,
|
||||
)
|
||||
|
||||
# 打包
|
||||
print('Start to package')
|
||||
subprocess.run([sys.executable, '-m', 'zipfile', '-c', NAME + '.zip', NAME], cwd=DISTPATH)
|
@ -2,7 +2,7 @@
|
||||
"name": "原生UI",
|
||||
"version": "1.0.0",
|
||||
"author": "xfgryujk",
|
||||
"description": "提供托盘图标和用来看弹幕的窗口。支持置顶窗口和设置不透明度。支持付费消息分开显示。统计弹幕数、付费用户等信息",
|
||||
"description": "提供托盘图标和用来看弹幕的窗口。支持置顶窗口和设置不透明度。支持付费消息分开显示。统计弹幕数、付费用户等信息。发布地址:https://github.com/xfgryujk/blivechat/discussions/166",
|
||||
"run": "native-ui.exe",
|
||||
"enabled": true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user