From 3d3213363c0309548875f39f4c11cffdb30550a7 Mon Sep 17 00:00:00 2001 From: EillesWan Date: Thu, 8 Feb 2024 18:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- llc_win_wxPython.py | 59 ++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/llc_win_wxPython.py b/llc_win_wxPython.py index 108dee4..204d46f 100644 --- a/llc_win_wxPython.py +++ b/llc_win_wxPython.py @@ -16,7 +16,7 @@ Terms & Conditions: ./Lisense.md import os import random import sys -from types import ModuleType +# from types import ModuleType import requests @@ -49,18 +49,12 @@ from utils.io import ( logger, object_constants, log__init__, - TrimLog, - Tuple, - Any, - Union, - Callable, - Literal, + TrimLog ) -from utils.update_check import check_update_repo, check_update_release +from utils.update_check import check_update_release from utils.packdata import enpack_llc_pack, unpack_llc_pack, load_msct_packed_data from utils.webview import go_update_tip -logger.info("注册变量并读取内容……") WHITE = (242, 244, 246) # F2F4F6 @@ -77,11 +71,27 @@ BLACK2 = (9, 12, 14) __appname__ = "伶伦转换器" -__version__ = "WXGUI 1.1.0" -__zhver__ = "WX图形界面 初代首版第〇次修订" +__version__ = "WXGUI 1.1.1" +__zhver__ = "WX图形界面 初代首版第一次修订" -yanlun_length = len(myWords) +logger.info("检查更新") + +down_paths = check_update_release( + "伶伦转换器", + "https://gitee.com/TriM-Organization/Linglun-Converter/releases/latest", + __version__, + go_update_tip, + logger, + "!有新版本!\n新版本 {app} {latest} 可用,当前仍是 {current}\n请前往下载地址更新\n", +) + + +if down_paths: + wx.LaunchDefaultBrowser("https://gitee.com{}".format([v for i,v in down_paths.items() if sys.platform in i][0])) + exit() + # go_update_tip("点击下方链接下载更新:",'点击此处下载'.format(list(down_paths.values())[0])) + msct_main = msct_plugin = msct_plugin_function = None @@ -258,6 +268,10 @@ if down_paths: to_BDX_file_in_score, ) = msct_plugin_function +logger.info("注册变量并读取内容……") + + + pgb_style: Musicreater.ProgressBarStyle = Musicreater.DEFAULT_PROGRESSBAR_STYLE.copy() # type: ignore on_exit_saving: bool = True ignore_midi_mismatch_error: bool = True @@ -308,10 +322,14 @@ osc.set_console(logger.console) log__init__(osc, TrimLog.PipManage(True, True, 40), True) - +logger.is_logging = True +logger.suffix = ".llc" +logger.is_tips = True logger.printing = not osc.is_release +yanlun_length = len(myWords) + logger.info("加载窗口布局……") @@ -1954,21 +1972,6 @@ logger.info("执行应用。") # 启动应用程序 if __name__ == "__main__": - logger.info("检查更新:") - - check_update_repo( - __appname__, - "https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/llc_win_wxPython.py", - __version__, - lambda text: wx.MessageDialog( - None, - text, - "软件更新", - wx.ICON_INFORMATION | wx.YES_DEFAULT, - ).ShowModal(), - logger, - __zhver__, - ) logger.info("开启窗口")