Skip to content

Commit

Permalink
版本号改为到配置文件里读取,防止我忘记改
Browse files Browse the repository at this point in the history
  • Loading branch information
Detritalw authored Feb 3, 2025
1 parent f132572 commit dd6276b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
minecraft-part = C:\Users\Admin\Desktop\Bloret-Launcher\.minecraft
first-run = false
logshow = false
ver = 3.0
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -1259,4 +1259,4 @@ def run_cmcl_list(self):
| modpackDownloadSource | 文本 | 整合包下载源,curseforge或modrinth |
| simplifyCommands | JSON对象 | 简化命令(通过“simplify -h”获得相关使用教程以进行修改) |
+-------------------------+----------+----------------------------------------------------------------+
"""
"""

0 comments on commit dd6276b

Please sign in to comment.