From dd6276b17d64eba30d737f96d4f07d340da0f63d Mon Sep 17 00:00:00 2001 From: Detrital Date: Mon, 3 Feb 2025 22:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E9=87=8C=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=EF=BC=8C=E9=98=B2=E6=AD=A2=E6=88=91=E5=BF=98=E8=AE=B0?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.ini | 1 + main.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.ini b/config.ini index 3a58fb3..a195e77 100644 --- a/config.ini +++ b/config.ini @@ -2,3 +2,4 @@ minecraft-part = C:\Users\Admin\Desktop\Bloret-Launcher\.minecraft first-run = false logshow = false +ver = 3.0 \ No newline at end of file diff --git a/main.py b/main.py index 14f9006..55e56cf 100644 --- a/main.py +++ b/main.py @@ -584,7 +584,7 @@ def handle_first_run(self): def check_for_updates(self): self.BL_latest_ver = self.get_latest_version() self.log(f"最新正式版: {self.BL_latest_ver}") - BL_ver = 2.2 # 当前版本 + BL_ver = float(self.config.get('DEFAULT', 'ver', fallback='0.0')) # 从config.ini读取当前版本 if BL_ver < float(self.BL_latest_ver): self.log(f"当前版本不是最新版,请更新到 {self.BL_latest_ver} 版本", logging.WARNING) @@ -1259,4 +1259,4 @@ def run_cmcl_list(self): | modpackDownloadSource | 文本 | 整合包下载源,curseforge或modrinth | | simplifyCommands | JSON对象 | 简化命令(通过“simplify -h”获得相关使用教程以进行修改) | +-------------------------+----------+----------------------------------------------------------------+ -""" +""" \ No newline at end of file