This commit is contained in:
gfdgd_xi 2023-02-08 22:47:51 +08:00
commit d0dccbdae3
4 changed files with 12 additions and 5 deletions

View File

@ -17,6 +17,7 @@ import json
import traceback import traceback
import urllib.request import urllib.request
import requests import requests
import updatekiller
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
from UI.AutoConfig import * from UI.AutoConfig import *
from Model import * from Model import *
@ -24,7 +25,7 @@ try:
import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets
webeng = True webeng = True
except: except:
print("未安装此依赖库") print("未安装 QtWebEngine") #这样更容易排查问题
webeng = False webeng = False
print("""太常引·建康中秋夜为吕叔潜赋 print("""太常引·建康中秋夜为吕叔潜赋
一轮秋影转金波飞镜又重磨把酒问姮娥被白发欺人奈何 一轮秋影转金波飞镜又重磨把酒问姮娥被白发欺人奈何
@ -42,6 +43,7 @@ urlSourcesList = [
"http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3 "http://gfdgdxi.free.idcfengye.com/uengine-runner-list/auto/", # 备用源 3
"http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源 "http://127.0.0.1/uengine-runner-list/auto/" # 本地测试源
] ]
urlSourcesIndex = 0
urlSources = urlSourcesList[0] urlSources = urlSourcesList[0]
lists = [] lists = []
@ -522,10 +524,12 @@ def readtxt(path):
def ChangeSources(): def ChangeSources():
global urlSources global urlSources
global urlSourcesIndex
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action] sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
for i in range(0, len(sources)): for i in range(0, len(sources)):
if sources[i].isChecked(): if sources[i].isChecked():
urlSources = urlSourcesList[i] old_urlSources = urlSources #先备份
urlSources = urlSourcesList[i] #然后切换尝试
# 解析云列表 # 解析云列表
try: try:
# 获取列表 # 获取列表
@ -535,9 +539,12 @@ def ChangeSources():
for i in lists: for i in lists:
nmodel.appendRow(QtGui.QStandardItem(i[0])) nmodel.appendRow(QtGui.QStandardItem(i[0]))
ui.searchList.setModel(nmodel) ui.searchList.setModel(nmodel)
urlSourcesIndex = i
except: except:
[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器") QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
urlSources = old_urlSources #如果源不可用则换回来
break break
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1,7 +1,7 @@
<p width=100px align="center"><img src="runner.svg"></p> <p width=100px align="center"><img src="runner.svg"></p>
<h1 align="center">UEngine 运行器 2.0.0</h1> <h1 align="center">UEngine 运行器 2.0.0</h1>
<hr> <hr>
<p align='center'><a href='https://gitee.com/gfdgd-xi/uengine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/star.svg?theme=dark' alt='star'></img></a> <a href='https://gitee.com/gfdgd-xi-org/uengine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi-org/uengine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/gfdgd-xi/uengine-runner/members'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a> <a href='https://gitee.com/gfdgd-xi/uengine-runner/members'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
## 介绍 ## 介绍
@ -48,7 +48,7 @@ sudo apt upgrade
### 三、使用程序自带的更新程序更新 ### 三、使用程序自带的更新程序更新
**1、打开 UEngine 运行器然后点击“关于”=>“检查更新”,点击“更新(更新过程中会关闭所有Python应用包括这个应用)”** **1、打开 UEngine 运行器然后点击“关于”=>“检查更新”,点击“更新(更新过程中会关闭这个应用的所有进程)”**
![image.png](https://storage.deepin.org/thread/202205220759382269_image.png) ![image.png](https://storage.deepin.org/thread/202205220759382269_image.png)
**2、输入密码进行更新** **2、输入密码进行更新**
![image.png](https://storage.deepin.org/thread/202205220801175784_image.png) ![image.png](https://storage.deepin.org/thread/202205220801175784_image.png)