Skip to content

Commit

Permalink
Update realesrgan-gui-macos.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrulelinks authored Apr 8, 2024
1 parent 30ba093 commit 0b4dc87
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions realesrgan-gui-macos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ import subprocess
commit_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').strip()
version = "0.2.5." + commit_hash

# 判断是否存在 upscayl-bin 文件
if os.path.exists('upscayl-bin'):
# 存在 upscayl-bin,只需要打包 upscayl-bin
bin = [('upscayl-bin', '.')]
else:
# 不存在 upscayl-bin,打包 realesrgan-ncnn-vulkan
bin = [('realesrgan-ncnn-vulkan', '.')]

# PyInstaller分析脚本
# 指定主入口文件
a = Analysis(
['main.py'],
# 需要打包的二进制
binaries=[
('realesrgan-ncnn-vulkan', '.'),
],
binaries=bin,
# 需要打包的数据文件
datas=[
('models', 'models'),
Expand Down

0 comments on commit 0b4dc87

Please sign in to comment.