Skip to content

Commit

Permalink
Update realesrgan-gui-macos.spec
Browse files Browse the repository at this point in the history
Add Real-CUGAN to binaries if available
  • Loading branch information
hyrulelinks authored Apr 30, 2024
1 parent 1596904 commit b9d70bf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions realesrgan-gui-macos.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import subprocess
commit_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').strip()
version = "0.2.5." + commit_hash

# 判断是否存在 upscayl-bin 文件
bin = []

if os.path.exists('upscayl-bin'):
# 存在 upscayl-bin,只需要打包 upscayl-bin
bin = [('upscayl-bin', '.')]
else:
# 不存在 upscayl-bin,打包 realesrgan-ncnn-vulkan
bin = [('realesrgan-ncnn-vulkan', '.')]
bin.append(('upscayl-bin', '.'))
elif os.path.exists('realesrgan-ncnn-vulkan'):
bin.append(('realesrgan-ncnn-vulkan', '.'))

if os.path.exists('realcugan-ncnn-vulkan'):
bin.append(('realcugan-ncnn-vulkan', '.'))

# PyInstaller分析脚本
# 指定主入口文件
Expand Down

0 comments on commit b9d70bf

Please sign in to comment.