Skip to content

Commit

Permalink
优先使用upscayl-bin
Browse files Browse the repository at this point in the history
  • Loading branch information
TransparentLC committed Mar 12, 2024
1 parent cb154ce commit 1179127
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ Quick Start:
* ![Ubuntu 22.04+](https://img.shields.io/badge/Ubuntu-22.04+-e52?logo=ubuntu) Download the latest `realesrgan-gui-ubuntu-bundled-v*.tar.xz` from Release, extract the archive then launch `realesrgan-gui`.
* ![macOS Monterey+](https://img.shields.io/badge/macOS-Monterey+-111?logo=apple) Download the latest `realesrgan-gui-macos-appbundle-v*.tar.xz` from Release, extract the archive and run `chmod u+x "Real-ESRGAN GUI.app/Contents/MacOS/realesrgan-gui"`, `chmod u+x "Real-ESRGAN GUI.app/Contents/MacOS/realesrgan-ncnn-vulkan"` and `xattr -cr "Real-ESRGAN GUI.app"` in terminal, then launch `Real-ESRGAN GUI`.

> [!TIP]
> Real-ESRGAN-ncnn-vulkan has not been updated for a while since April 2022. You can use another actively maintained fork [upscayl/upscayl-ncnn](https://github.com/upscayl/upscayl-ncnn) instead.
>
> Download the latest release and extract `upscayl-bin[.exe]` to the directory where Real-ESRGAN GUI's executable file is located. It will be used in priority.
<details>

<summary>Notes</summary>
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
* ![Ubuntu 22.04+](https://img.shields.io/badge/Ubuntu-22.04+-e52?logo=ubuntu) 在 Release 中下载最新的 `realesrgan-gui-ubuntu-bundled-v*.tar.xz`,解压后打开 `realesrgan-gui` 即可使用。
* ![macOS Monterey+](https://img.shields.io/badge/macOS-Monterey+-111?logo=apple) 在 Release 中下载最新的 `realesrgan-gui-macos-appbundle-v*.tar.xz`,解压后在终端中执行 `chmod u+x "Real-ESRGAN GUI.app/Contents/MacOS/realesrgan-gui"``chmod u+x "Real-ESRGAN GUI.app/Contents/MacOS/realesrgan-ncnn-vulkan"``xattr -cr "Real-ESRGAN GUI.app"`,打开 `Real-ESRGAN GUI` 即可使用。

> [!TIP]
> Real-ESRGAN-ncnn-vulkan 从 2022 年 4 月开始就没有更新了,可以使用 [upscayl/upscayl-ncnn](https://github.com/upscayl/upscayl-ncnn) 这个仍然在维护的分支作为替代。
>
> 下载最新的 Release 并将压缩包中的 `upscayl-bin[.exe]` 解压到 GUI 的主程序所在的目录,它将会被优先使用。
<details>

<summary>其它的运行方式和说明</summary>
Expand All @@ -54,7 +59,8 @@ curl -L https://raw.githubusercontent.com/TransparentLC/realesrgan-gui/master/ma
```
打包好的应用在“下载”文件夹内,请手动拖拽应用到“应用程序”文件夹完成安装。

> ⚠️ 由于我没有运行 macOS 的设备,因此可能无法处理和 macOS 相关的使用问题。
> [!WARNING]
> 由于我没有运行 macOS 的设备,因此可能无法处理和 macOS 相关的使用问题。
### 相关项目

Expand Down
7 changes: 6 additions & 1 deletion define.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
BASE_PATH = os.path.dirname(os.path.realpath(__file__))
APP_PATH = BASE_PATH

RE_PATH = os.path.join(APP_PATH, 'realesrgan-ncnn-vulkan' + ('.exe' if os.name == 'nt' else ''))
for executableName in (
'upscayl-bin',
'realesrgan-ncnn-vulkan',
):
if os.path.exists(RE_PATH := os.path.join(APP_PATH, executableName + ('.exe' if os.name == 'nt' else ''))):
break
APP_TITLE = 'Real-ESRGAN GUI'
APP_CONFIG_PATH = os.path.join(APP_PATH, 'config.ini')
BUILD_TIME: int = None

0 comments on commit 1179127

Please sign in to comment.