From 75faaba23544f5c78e48259be8cac7b756c8860f Mon Sep 17 00:00:00 2001 From: triwinds Date: Thu, 16 Feb 2023 22:06:34 +0800 Subject: [PATCH 1/8] integrate sentry --- main.py | 30 +++++++++++++++++++++++++----- module/sentry.py | 18 ++++++++++++++++++ requirements.txt | 1 + ui.py | 7 ++++--- ui_webview.py | 9 ++++----- 5 files changed, 52 insertions(+), 13 deletions(-) create mode 100644 module/sentry.py diff --git a/main.py b/main.py index a7a6a07..30126c2 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,13 @@ -import sys - -from config import config, dump_config import argparse -from utils.webview2 import ensure_runtime_components, can_use_webview, show_msgbox import logging +import gevent.monkey + +gevent.monkey.patch_ssl() +gevent.monkey.patch_socket() +import sys +from config import config, dump_config +from utils.webview2 import can_use_webview logger = logging.getLogger(__name__) @@ -35,7 +38,7 @@ def fallback_to_browser(): return start_ui(None) -def main(): +def create_parser(): parser = argparse.ArgumentParser() parser.add_argument( "-m", @@ -48,15 +51,32 @@ def main(): choices=['auto', 'webview', 'browser', 'chrome', 'edge', 'user default'], help="切换 ui 启动方式", ) + parser.add_argument( + "--no-sentry", + action='store_true', + help="禁用 sentry", + ) + return parser + + +def main(): + parser = create_parser() args = parser.parse_args() logger.info(f'args: {args}') + if args.switch_mode is not None: logger.info(f'switch mode: {args.switch_mode}') config.setting.ui.mode = args.switch_mode dump_config() return 0 + from module.external.bat_scripts import create_scripts create_scripts() + + if not args.no_sentry: + from module.sentry import init_sentry + init_sentry() + ui_mode = args.mode or config.setting.ui.mode logger.info(f'ui mode: {ui_mode}') if ui_mode is None or ui_mode == 'auto': diff --git a/module/sentry.py b/module/sentry.py new file mode 100644 index 0000000..e5991b0 --- /dev/null +++ b/module/sentry.py @@ -0,0 +1,18 @@ +import sentry_sdk +from config import current_version + + +def sampler(sample_data): + if 'wsgi_environ' in sample_data and sample_data['wsgi_environ']['PATH_INFO'] == '/index.html': + return 1 + return 0 + + +def init_sentry(): + sentry_sdk.init( + dsn="https://022fb678c5bc4859b6052fc409506f23@o527477.ingest.sentry.io/4504689953472512", + auto_session_tracking=False, + traces_sampler=sampler, + release=f'ns-emu-tools@{current_version}' + ) + sentry_sdk.set_user({'ip_address': '{{auto}}'}) diff --git a/requirements.txt b/requirements.txt index 3248d7a..011b450 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ httplib2 requests-cache dnspython[doh] pywebview +sentry-sdk diff --git a/ui.py b/ui.py index 4f06cb2..ca9ecf3 100644 --- a/ui.py +++ b/ui.py @@ -1,7 +1,4 @@ import logging -import gevent.monkey - -gevent.monkey.patch_all(httplib=True, subprocess=False) import eel from config import config from utils.network import get_available_port @@ -73,5 +70,9 @@ def main(port=0, mode=None, dev=False): if __name__ == '__main__': + import gevent.monkey + + gevent.monkey.patch_ssl() + gevent.monkey.patch_socket() main(8888, False, True) # main(0, 'edge') diff --git a/ui_webview.py b/ui_webview.py index 08d9bc8..34e9419 100644 --- a/ui_webview.py +++ b/ui_webview.py @@ -1,9 +1,4 @@ import logging - -import gevent.monkey - -gevent.monkey.patch_ssl() -gevent.monkey.patch_socket() import eel import webview from config import config @@ -49,4 +44,8 @@ def main(): if __name__ == '__main__': + import gevent.monkey + + gevent.monkey.patch_ssl() + gevent.monkey.patch_socket() main() From 630d20171b5ab8d4603b0663504876f9d9e8a767 Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 15:13:19 +0800 Subject: [PATCH 2/8] update user agent for other github download sources & add nuaa.cf source --- module/downloader.py | 2 +- utils/network.py | 25 +++++++++++++------------ vue/src/pages/Settings.vue | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/module/downloader.py b/module/downloader.py index 8e5f0e3..a94a5ca 100644 --- a/module/downloader.py +++ b/module/downloader.py @@ -57,7 +57,7 @@ def init_aria2(): def download(url, save_dir=None, options=None, download_in_background=False): init_aria2() - tmp = init_download_options_with_proxy() + tmp = init_download_options_with_proxy(url) tmp['auto-file-renaming'] = 'false' tmp['allow-overwrite'] = 'false' if options is not None: diff --git a/utils/network.py b/utils/network.py index 8f537ca..0f347da 100644 --- a/utils/network.py +++ b/utils/network.py @@ -17,6 +17,7 @@ 'self': 'https://nsarchive.e6ex.com/gh', 'ghproxy': 'https://ghproxy.com/https://github.com', 'zhiliao': 'https://proxy.zyun.vip/https://github.com', + 'nuaa': 'https://download.nuaa.cf', } if config.setting.network.useDoh: @@ -33,11 +34,13 @@ } options_on_cdn = { - 'split': '4', - 'max-connection-per-server': '4', - 'min-split-size': '8M', + 'split': '8', + 'max-connection-per-server': '8', + 'min-split-size': '4M', } +chrome_ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' \ + 'Chrome/110.0.0.0 Safari/537.36' github_api_fallback_flag = False @@ -58,19 +61,17 @@ def get_proxies(): def get_global_options(): - return { - 'user-agent': user_agent - } + return {} -def init_download_options_with_proxy(): +def init_download_options_with_proxy(url): + options = {'user-agent': user_agent if 'e6ex.com' in url else chrome_ua} if is_using_proxy(): - options = {'all-proxy': iter(get_proxies().values()).__next__()} - if config.setting.network.firmwareSource == 'cdn': - options.update(options_on_cdn) - return options + options['all-proxy'] = iter(get_proxies().values()).__next__() + options.update(options_on_proxy) else: - return options_on_cdn + options.update(options_on_cdn) + return options def get_github_download_url(origin_url: str): diff --git a/vue/src/pages/Settings.vue b/vue/src/pages/Settings.vue index 080442d..0190bb7 100644 --- a/vue/src/pages/Settings.vue +++ b/vue/src/pages/Settings.vue @@ -85,6 +85,7 @@ export default { availableGithubDownloadSource: [ {name: '[美国 Cloudflare CDN] - 自建代理服务器', value: 'self'}, {name: '[美国 Cloudflare CDN] - 该公益加速源由 [知了小站] 提供', value: 'zhiliao'}, + {name: '[美国 Cloudflare CDN] - 该公益加速源由 [LibraryCloud] 提供', value: 'nuaa'}, {name: '[韩国 首尔] - 该公益加速源由 [ghproxy] 提供', value: 'ghproxy'}, {name: '直连', value: 'direct'}, ], From cb6da17d585d6a68a842e4e6e4cbfd4324cdb2df Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 16:11:48 +0800 Subject: [PATCH 3/8] let ttl works in dns cache --- utils/doh.py | 63 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/utils/doh.py b/utils/doh.py index 0c95c0e..4f5c96d 100644 --- a/utils/doh.py +++ b/utils/doh.py @@ -1,7 +1,8 @@ import ipaddress import logging -import os import sys +import time +from typing import Dict, List import dns.message import dns.query @@ -22,7 +23,19 @@ resolver = dns.resolver.Resolver(configure=False) resolver.nameservers = ["223.5.5.5", '119.29.29.29'] -doh_cache = {} + +class DnsCacheItem: + expire_at: float = 0 + answer = None + + def __repr__(self): + return f'DnsCacheItem(expire_at={self.expire_at}, answer={self.answer})' + + def __str__(self): + return self.__repr__() + + +dns_cache: Dict[str, List[DnsCacheItem]] = {} def is_ip_address(hostname: str): @@ -33,6 +46,33 @@ def is_ip_address(hostname: str): return False +def update_dns_cache(name: str, answer): + item = DnsCacheItem() + item.expire_at = time.time() + answer.ttl + item.answer = answer + available_items = _get_available_items(name) + available_items.append(item) + # logger.debug(f'update dns cache [{name}]: {available_items}') + dns_cache[name] = available_items + + +def _get_available_items(name: str): + now = time.time() + cached_items = dns_cache.get(name, []) + available_items = [item for item in cached_items if item.expire_at > now] + return available_items + + +def take_from_dns_cache(name: str): + res = [] + available_items = _get_available_items(name) + available_answers = [item.answer for item in available_items] + for answer in available_answers: + for ip in answer: + res.append(ip.address) + return res + + def query_address(name, record_type='A', server=DOH_SERVER, path="/dns-query", fallback=True, verbose=False): """ Returns domain name query results retrieved by using DNS over HTTPS protocol @@ -47,8 +87,9 @@ def query_address(name, record_type='A', server=DOH_SERVER, path="/dns-query", f if is_ip_address(name): return [name] - retval = doh_cache.get(name) - if retval is not None: + retval = take_from_dns_cache(name) + if retval: + logger.debug(f'use dns answer from cache: {retval}') return retval try: @@ -58,27 +99,26 @@ def query_address(name, record_type='A', server=DOH_SERVER, path="/dns-query", f # print(f'[{name}] doh answer: {resp.answer}') logger.debug(f'doh answer: {resp.answer}') if not resp.answer: - doh_cache[name] = retval return [] retval = [] for answer in resp.answer: + update_dns_cache(name, answer) for item in answer: retval.append(item.address) except Exception as ex: if verbose: logger.debug("Exception occurred: '%s'" % ex) - if retval is None and fallback: - answer = resolver.resolve(name, dns.rdatatype.from_text(record_type)) - logger.debug(f'dns resolver answer: {answer}') + if not retval and fallback: + answer: dns.resolver.Answer = resolver.resolve(name, dns.rdatatype.from_text(record_type)) + update_dns_cache(name, answer) + logger.debug(f'dns resolver answer: {answer.rrset}') retval = [] for item in answer: retval.append(item.address) if not PY3 and retval: retval = [_.encode() for _ in retval] - - doh_cache[name] = retval return retval @@ -102,6 +142,9 @@ def install_doh(): if __name__ == '__main__': + # print(query_address('google.com')) + # print(query_address('google.com')) + # time.sleep(60) # print(query_address('google.com')) install_doh() print(requests.get('http://t.tt')) From 918a659ab0e8179345a74faad3b28ce2bcaec891 Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 16:44:17 +0800 Subject: [PATCH 4/8] update the error message when try to install a non-exist version of ryujinx --- module/ryujinx.py | 8 ++++++++ utils/network.py | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/module/ryujinx.py b/module/ryujinx.py index 72d0094..5f9cd2b 100644 --- a/module/ryujinx.py +++ b/module/ryujinx.py @@ -19,6 +19,10 @@ def get_ryujinx_download_url(target_version: str, branch: str): if branch in {'mainline', 'ava'}: release_info = get_ryujinx_release_info_by_version(target_version) + if 'tag_name' not in release_info: + logger.error(f'fail to get release info of version {target_version} on branch {branch}') + send_notify(f'无法获取 {branch} 分支的 [{target_version}] 版本信息') + raise RuntimeError(f'fail to get release info of version {target_version} on branch {branch}') assets = release_info['assets'] for asset in assets: name: str = asset['name'] @@ -28,6 +32,10 @@ def get_ryujinx_download_url(target_version: str, branch: str): return asset['browser_download_url'] elif branch == 'ldn': release_info = get_ldn_ryujinx_release_info_by_version(target_version) + if 'tag_name' not in release_info: + logger.error(f'fail to get release info of version {target_version} on branch {branch}') + send_notify(f'无法获取 {branch} 分支的 [{target_version}] 版本信息') + raise RuntimeError(f'fail to get release info of version {target_version} on branch {branch}') assets = release_info['assets'] ava_ldn_url, mainline_ldn_url = None, None for asset in assets: diff --git a/utils/network.py b/utils/network.py index 0f347da..ecf9af5 100644 --- a/utils/network.py +++ b/utils/network.py @@ -145,9 +145,9 @@ def request_github_api(url: str): try: resp = session.get(url, timeout=5) data = resp.json() - if isinstance(data, dict) and 'message' in data: - logger.warning(f'github api message: {data["message"]}') - send_notify(f'github api message: {data["message"]}') + if isinstance(data, dict) and 'message' in data and 'API rate limit exceeded' in data["message"]: + logger.warning(f'GitHub API response message: {data["message"]}') + send_notify(f'GitHub API response message: {data["message"]}') send_notify(f'当前 IP 可能已达到 GitHub api 当前时段的使用上限, 尝试转用 CDN') send_notify(f'如果在多次使用中看到这个提示,可以直接在设置中将 GitHub api 设置为使用 cdn,以避免不必要的重试') github_api_fallback_flag = True From baa77db2326bb08f53ff0d99fa84d80d9025c8c8 Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 17:24:06 +0800 Subject: [PATCH 5/8] show full changelog in new version dialog & adjust style --- ui.py | 2 +- vue/src/components/NewVersionDialog.vue | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ui.py b/ui.py index ca9ecf3..b1cc4d8 100644 --- a/ui.py +++ b/ui.py @@ -1,7 +1,6 @@ import logging import eel from config import config -from utils.network import get_available_port logger = logging.getLogger(__name__) @@ -61,6 +60,7 @@ def main(port=0, mode=None, dev=False): size = (1440, 900) logger.info(f'browser mode: {mode}') if port == 0: + from utils.network import get_available_port port = get_available_port() logger.info(f'starting eel at port: {port}') if mode == 'edge': diff --git a/vue/src/components/NewVersionDialog.vue b/vue/src/components/NewVersionDialog.vue index 45dd67e..c387058 100644 --- a/vue/src/components/NewVersionDialog.vue +++ b/vue/src/components/NewVersionDialog.vue @@ -2,20 +2,21 @@
- 版本检测 + {{ $store.state.hasNewVersion ? '更新日志' : '版本检测' }} - +

当前版本已经是最新版本

-

[{{newVersion}}] 更新内容:

-
+ +
- +
@@ -96,10 +97,12 @@ export default { } }, loadReleaseDescription() { - window.eel.get_net_release_info_by_tag(this.newVersion)((resp) => { + window.eel.load_change_log()((resp) => { + console.log(resp.data) if (resp.code === 0) { const converter = new showdown.Converter() - this.releaseDescriptionHtml = converter.makeHtml(resp.data.body) + let rawMd = resp.data.replace('# Change Log\n\n', '') + this.releaseDescriptionHtml = converter.makeHtml(rawMd) } else { this.releaseDescriptionHtml = '

加载失败

' } From 4d42522bb9f3acfda50f37545d1722d8bd92522b Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 19:03:22 +0800 Subject: [PATCH 6/8] raise VersionNotFoundException instead of RuntimeError --- api/common_response.py | 5 +++++ exception/common_exception.py | 14 ++++++++++++++ module/ryujinx.py | 9 +++------ module/yuzu.py | 5 ++--- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 exception/common_exception.py diff --git a/api/common_response.py b/api/common_response.py index 479fcdc..5968c9d 100644 --- a/api/common_response.py +++ b/api/common_response.py @@ -1,5 +1,6 @@ import logging from module.msg_notifier import send_notify +from exception.common_exception import VersionNotFoundException logger = logging.getLogger(__name__) @@ -11,6 +12,10 @@ def success_response(data=None, msg=None): def exception_response(ex): import traceback + if isinstance(ex, VersionNotFoundException): + logger.error(f'{str(ex)}') + send_notify(f'无法获取 {ex.branch} 分支的 [{ex.target_version}] 版本信息') + return error_response(404, str(ex)) logger.error(ex, exc_info=True) traceback_str = "\n".join(traceback.format_exception(ex)) send_notify(f'出现异常, {traceback_str}') diff --git a/exception/common_exception.py b/exception/common_exception.py new file mode 100644 index 0000000..4389c39 --- /dev/null +++ b/exception/common_exception.py @@ -0,0 +1,14 @@ + + +class VersionNotFoundException(Exception): + msg: str = '' + target_version: str = '' + branch: str = '' + emu_type: str = '' + + def __init__(self, target_version, branch, emu_type): + self.target_version = target_version + self.branch = branch + self.emu_type = emu_type + self.msg = f'Fail to get release info of version [{target_version}] on branch [{branch}]' + super().__init__(self.msg) diff --git a/module/ryujinx.py b/module/ryujinx.py index 5f9cd2b..2fad293 100644 --- a/module/ryujinx.py +++ b/module/ryujinx.py @@ -3,6 +3,7 @@ import time from pathlib import Path +from exception.common_exception import VersionNotFoundException from module.downloader import download from repository.ryujinx import get_ryujinx_release_info_by_version, get_ldn_ryujinx_release_info_by_version from utils.network import get_github_download_url @@ -20,9 +21,7 @@ def get_ryujinx_download_url(target_version: str, branch: str): if branch in {'mainline', 'ava'}: release_info = get_ryujinx_release_info_by_version(target_version) if 'tag_name' not in release_info: - logger.error(f'fail to get release info of version {target_version} on branch {branch}') - send_notify(f'无法获取 {branch} 分支的 [{target_version}] 版本信息') - raise RuntimeError(f'fail to get release info of version {target_version} on branch {branch}') + raise VersionNotFoundException(target_version, branch, 'ryujinx') assets = release_info['assets'] for asset in assets: name: str = asset['name'] @@ -33,9 +32,7 @@ def get_ryujinx_download_url(target_version: str, branch: str): elif branch == 'ldn': release_info = get_ldn_ryujinx_release_info_by_version(target_version) if 'tag_name' not in release_info: - logger.error(f'fail to get release info of version {target_version} on branch {branch}') - send_notify(f'无法获取 {branch} 分支的 [{target_version}] 版本信息') - raise RuntimeError(f'fail to get release info of version {target_version} on branch {branch}') + raise VersionNotFoundException(target_version, branch, 'ryujinx') assets = release_info['assets'] ava_ldn_url, mainline_ldn_url = None, None for asset in assets: diff --git a/module/yuzu.py b/module/yuzu.py index 0af84cf..b729242 100644 --- a/module/yuzu.py +++ b/module/yuzu.py @@ -15,6 +15,7 @@ from repository.yuzu import get_yuzu_release_info_by_version from utils.network import get_github_download_url from utils.common import decode_yuzu_path +from exception.common_exception import VersionNotFoundException logger = logging.getLogger(__name__) @@ -24,9 +25,7 @@ def download_yuzu(target_version, branch): send_notify('正在获取 yuzu 版本信息...') release_info = get_yuzu_release_info_by_version(target_version, branch) if not release_info.get('tag_name'): - logger.error(f'fail to get release info of version {target_version} on branch {branch}') - send_notify(f'无法获取 {branch} 分支的 [{target_version}] 版本信息') - raise RuntimeError(f'fail to get release info of version {target_version} on branch {branch}') + raise VersionNotFoundException(target_version, branch, 'yuzu') logger.info(f'target yuzu version: {target_version}') yuzu_path = Path(config.yuzu.yuzu_path) logger.info(f'target yuzu path: {yuzu_path}') From abebee163eef540a59b1559a5fdc4f85e2e6761d Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 19:22:02 +0800 Subject: [PATCH 7/8] reset version to None on fail detection --- module/firmware.py | 14 +++++++++++--- module/ryujinx.py | 8 +++++--- module/yuzu.py | 8 +++++--- vue/src/pages/Ryujinx.vue | 6 ++---- vue/src/pages/Yuzu.vue | 8 +++----- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/module/firmware.py b/module/firmware.py index a7de754..98d1767 100644 --- a/module/firmware.py +++ b/module/firmware.py @@ -10,7 +10,7 @@ hactool_path = Path(os.path.realpath(os.path.dirname(__file__))).joinpath('hactool.exe') -def detect_firmware_version(emu_type: str): +def _detect_firmware_version(emu_type: str): firmware_files = [] version = None if emu_type == 'yuzu': @@ -38,13 +38,21 @@ def detect_firmware_version(emu_type: str): target_file = find_target_firmware_file(firmware_files, key_path) if target_file: version = extract_version(target_file, key_path) - if version: + return version + + +def detect_firmware_version(emu_type: str): + version = None + try: + version = _detect_firmware_version(emu_type) + except Exception as e: + raise e + finally: if emu_type == 'yuzu': config.yuzu.yuzu_firmware = version else: config.ryujinx.firmware = version dump_config() - return version def find_target_firmware_file(firmware_files, key_path): diff --git a/module/ryujinx.py b/module/ryujinx.py index 2fad293..f6de414 100644 --- a/module/ryujinx.py +++ b/module/ryujinx.py @@ -183,6 +183,8 @@ def detect_ryujinx_version(): rj_path = get_ryujinx_exe_path() if not rj_path: send_notify('未能找到 Ryujinx 程序') + config.ryujinx.version = None + dump_config() return None config.ryujinx.branch = detect_current_branch() st_inf = subprocess.STARTUPINFO() @@ -206,9 +208,9 @@ def detect_ryujinx_version(): idx = version.index('ldn') version = version[idx+3:] config.ryujinx.branch = 'ldn' - config.ryujinx.version = version - dump_config() - return version + config.ryujinx.version = version + dump_config() + return version def update_ryujinx_path(new_ryujinx_path: str): diff --git a/module/yuzu.py b/module/yuzu.py index b729242..ff15f1b 100644 --- a/module/yuzu.py +++ b/module/yuzu.py @@ -130,6 +130,8 @@ def detect_yuzu_version(): yz_path = Path(config.yuzu.yuzu_path).joinpath('yuzu.exe') if not yz_path.exists(): send_notify('未能找到 yuzu 程序') + config.yuzu.yuzu_version = None + dump_config() return None kill_all_yuzu_instance() st_inf = subprocess.STARTUPINFO() @@ -158,10 +160,10 @@ def detect_yuzu_version(): logger.exception('error occur in get_all_window_name') kill_all_yuzu_instance() if version: - config.yuzu.yuzu_version = version config.yuzu.branch = branch - dump_config() - return version + config.yuzu.yuzu_version = version + dump_config() + return version def kill_all_yuzu_instance(): diff --git a/vue/src/pages/Ryujinx.vue b/vue/src/pages/Ryujinx.vue index 264bbeb..1404486 100644 --- a/vue/src/pages/Ryujinx.vue +++ b/vue/src/pages/Ryujinx.vue @@ -276,10 +276,8 @@ export default { }, async detectFirmwareVersion() { this.cleanAndShowConsoleDialog() - window.eel.detect_firmware_version("ryujinx")((data) => { - if (data['code'] === 0) { - this.updateRyujinxConfig() - } + window.eel.detect_firmware_version("ryujinx")(() => { + this.updateRyujinxConfig() }) }, async switchRyujinxBranch() { diff --git a/vue/src/pages/Yuzu.vue b/vue/src/pages/Yuzu.vue index 2bc1bc9..1cc86e9 100644 --- a/vue/src/pages/Yuzu.vue +++ b/vue/src/pages/Yuzu.vue @@ -188,10 +188,8 @@ export default { }, async detectFirmwareVersion() { this.cleanAndShowConsoleDialog() - window.eel.detect_firmware_version("yuzu")((data) => { - if (data['code'] === 0) { - this.updateYuzuConfig() - } + window.eel.detect_firmware_version("yuzu")(() => { + this.updateYuzuConfig() this.appendConsoleMessage('固件版本检测完成') }) }, @@ -199,8 +197,8 @@ export default { this.cleanAndShowConsoleDialog() let previousBranch = this.branch let data = await window.eel.detect_yuzu_version()() + await this.updateYuzuConfig() if (data['code'] === 0) { - await this.updateYuzuConfig() if (previousBranch !== this.branch) { this.updateYuzuReleaseVersions() } From c31f5c297ec50bd7f2fc6604ca60c950b6b05bfa Mon Sep 17 00:00:00 2001 From: triwinds Date: Sat, 18 Feb 2023 19:39:44 +0800 Subject: [PATCH 8/8] bump up version --- changelog.md | 9 +++++++++ config.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 85a8515..9b51980 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ # Change Log +## 0.2.9 + - 添加新 GitHub 下载源 nuaa.cf, 并更新在其它 GitHub 下载源中使用的 UA + - 更正尝试下载一个不存在的 Ryujinx 版本时所展示的文本 + - 集成 sentry sdk 收集异常信息 (可通过 `--no-sentry` 启动参数将其禁用) + - 使 DNS 缓存遵循返回的 ttl 设定 + - 当 yuzu/ryujinx/固件 版本检测失败时, 将记录中的版本号重置为 `未知` + +ps. 目前 Ryujinx LDN 只能下载 3.0.1 及之后的版本。如果需要更久之前的版本,请前往 Ryujinx 官网下载。 + ## 0.2.8 - 调整 ui 启动逻辑 - 启动后自动创建 `切换 UI 启动模式.bat` 用于切换启动模式 diff --git a/config.py b/config.py index 83112d4..4adae6c 100644 --- a/config.py +++ b/config.py @@ -9,7 +9,7 @@ import sys -current_version = '0.2.8' +current_version = '0.2.9' user_agent = f'ns-emu-tools/{current_version}'