mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-22 19:02:17 +08:00
修改图标路径
This commit is contained in:
parent
5b4fe8b8e1
commit
e9cc4b0788
@ -85,16 +85,22 @@ class MediaMsg:
|
|||||||
# # 调用 FFmpeg
|
# # 调用 FFmpeg
|
||||||
if os.path.exists(ffmpeg_path):
|
if os.path.exists(ffmpeg_path):
|
||||||
cmd = f'''{ffmpeg_path} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
cmd = f'''{ffmpeg_path} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
||||||
system(cmd)
|
# system(cmd)
|
||||||
|
# 使用subprocess.run()执行命令
|
||||||
|
subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
else:
|
else:
|
||||||
# 源码运行的时候下面的有效
|
# 源码运行的时候下面的有效
|
||||||
# 这里不知道怎么捕捉异常
|
# 这里不知道怎么捕捉异常
|
||||||
cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data','ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data','ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
||||||
system(cmd)
|
# system(cmd)
|
||||||
|
# 使用subprocess.run()执行命令
|
||||||
|
subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error: {e}")
|
print(f"Error: {e}")
|
||||||
cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data', 'ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data', 'ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}'''
|
||||||
system(cmd)
|
# system(cmd)
|
||||||
|
# 使用subprocess.run()执行命令
|
||||||
|
subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
os.remove(silk_path)
|
os.remove(silk_path)
|
||||||
os.remove(pcm_path)
|
os.remove(pcm_path)
|
||||||
print(mp3_path)
|
print(mp3_path)
|
||||||
|
@ -53,6 +53,11 @@ def makedirs(path):
|
|||||||
os.makedirs(os.path.join(path, 'music'), exist_ok=True)
|
os.makedirs(os.path.join(path, 'music'), exist_ok=True)
|
||||||
os.makedirs(os.path.join(path, 'icon'), exist_ok=True)
|
os.makedirs(os.path.join(path, 'icon'), exist_ok=True)
|
||||||
resource_dir = os.path.join('app', 'resources', 'data', 'icons')
|
resource_dir = os.path.join('app', 'resources', 'data', 'icons')
|
||||||
|
if not os.path.exists(resource_dir):
|
||||||
|
# 获取打包后的资源目录
|
||||||
|
resource_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.path.dirname(__file__)))
|
||||||
|
# 构建 FFmpeg 可执行文件的路径
|
||||||
|
resource_dir = os.path.join(resource_dir, 'app', 'resources', 'data', 'icons')
|
||||||
target_folder = os.path.join(path, 'icon')
|
target_folder = os.path.join(path, 'icon')
|
||||||
# 拷贝一些必备的图标
|
# 拷贝一些必备的图标
|
||||||
for root, dirs, files in os.walk(resource_dir):
|
for root, dirs, files in os.walk(resource_dir):
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
version = '1.0.1'
|
version = '1.0.2'
|
||||||
contact = '701805520'
|
contact = '701805520'
|
||||||
github = 'https://github.com/LC044/WeChatMsg'
|
github = 'https://github.com/LC044/WeChatMsg'
|
||||||
website = 'https://memotrace.lc044.love/'
|
website = 'https://memotrace.lc044.love/'
|
||||||
copyright = '©2022-2023 ShuaikangZhou'
|
copyright = '© 2022-2024 SiYuan'
|
||||||
|
license = 'GPLv3'
|
||||||
description = [
|
description = [
|
||||||
'1. 支持获取个人信息<br>',
|
'1. 支持获取个人信息<br>',
|
||||||
'2. 支持显示聊天界面<br>',
|
'2. 支持显示聊天界面<br>',
|
||||||
'3. 支持导出聊天记录<br> * csv<br> * html<br> * '
|
'3. 支持导出聊天记录<br> * csv<br> * html<br> * '
|
||||||
'txt<br>',
|
'txt<br> * docx<br>',
|
||||||
'4. 生成年度报告——圣诞特别版<br>',
|
'4. 生成年度报告——圣诞特别版',
|
||||||
]
|
]
|
||||||
about = f'''
|
about = f'''
|
||||||
版本:{version}<br>
|
版本:{version}<br>
|
||||||
@ -16,5 +17,6 @@ about = f'''
|
|||||||
地址:<a href='{github}'>{github}</a><br>
|
地址:<a href='{github}'>{github}</a><br>
|
||||||
官网:<a href='{website}'>{website}</a><br>
|
官网:<a href='{website}'>{website}</a><br>
|
||||||
新特性:<br>{''.join(['' + i for i in description])}<br>
|
新特性:<br>{''.join(['' + i for i in description])}<br>
|
||||||
|
License <a href='https://github.com/LC044/WeChatMsg/blob/master/LICENSE'>{license}</a><br>
|
||||||
Copyright {copyright}
|
Copyright {copyright}
|
||||||
'''
|
'''
|
||||||
|
@ -308,3 +308,9 @@ python main.py
|
|||||||
<img src="./doc/images/weixin.png">
|
<img src="./doc/images/weixin.png">
|
||||||
<img src="./doc/images/qq.jpg" height="200">
|
<img src="./doc/images/qq.jpg" height="200">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
WeChatMsg is licensed under [GPLv3](./LICENSE).
|
||||||
|
|
||||||
|
Copyright © 2022-2024 by SiYuan.
|
Loading…
Reference in New Issue
Block a user