Skip to content

Commit

Permalink
1.2.7rc2 fix bug, 修改更新检查错误提示框为网页跳转提示 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginsakura committed Aug 23, 2024
1 parent b8906e4 commit 3bed813
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main()
{
system("py ./MusyncSavDecodeGUI.py");
system("py ./Launcher.py");
system("pause");
return 0;
}
3 changes: 2 additions & 1 deletion Launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
import json
import os
import sys
# import traceback
# import requests

# from tkinter import *
from tkinter import Tk,font

import Functions
import MainWindowOldStyle as OldStyle
import MusyncSavDecodeGUI as NewStyle
# import MusyncSavDecodeGUI as NewStyle

version = '1.2.7rc2'
isPreRelease = True
Expand Down
8 changes: 7 additions & 1 deletion MainWindowOldStyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import requests
import threading
import time
# import traceback
import webbrowser
#import win32api
#import win32con
Expand Down Expand Up @@ -383,7 +384,8 @@ def CheckJsonUpdate(self):
snju.write(githubVersion)
except Exception as e:
messagebox.showerror("Error", f'发生错误: {e}')
messagebox.showerror("Error", f'若游戏本体已更新,请访问仓库更新songname.update和songname.json两个文件')
if messagebox.askyesno("无法获取谱面信息更新", f'是否前往网页查看是否存在更新?\n(请比对 SongName.update 中的时间是否比本地文件中的时间更大)'):
webbrowser.open("https://raw.githubusercontent.com/Ginsakura/MUSYNCSave/main/musync_data/songname.update")
endTime = time.perf_counter_ns()
print("CheckJsonUpdate Run Time: %f ms"%((endTime - startTime)/1000000))

Expand All @@ -392,6 +394,10 @@ def CheckUpdate(self):
localVersion = float(self.version.replace(".","").replace("rc","."))
try:
response = requests.get("https://api.github.com/repos/ginsakura/MUSYNCSave/releases/latest")
if response.json()["message"][:23] == "API rate limit exceeded":
if messagebox.askyesno("GitHub公共API访问速率已达上限", "是否前往发布页查看是否存在更新?"):
webbrowser.open("https://github.com/Ginsakura/MUSYNCSave/releases/latest")
return
tagVersion = response.json()["tag_name"]
tergetVersion = float(tagVersion.replace(".","").replace("rc","."))
except Exception as e:
Expand Down
1 change: 1 addition & 0 deletions MusyncSavDecode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import time
# import traceback

from struct import unpack
from tkinter import messagebox
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,24 @@ HitDelay模块用法:启用DLL注入后,在本次游戏进行首次谱面游玩
-->
### Version 1.2.7
#### PreRelease
1. 更新
1. xxx
2. 修复
1. xxx
3. 优化
1. xxx
#### Release 3
1. 修复
1. 修复`Launcher.cpp`中没有更改程序入口的bug
2. 修复没有取消新UI导入的bug
2. 优化
1. 将网络连接失败提示改为跳转框,点击``即可自动打开浏览器访问GitHub页面
#### Release 2
1. 更新
1. 将启动函数单独拆分到`Launcher.py`
2. 修复
1. 修复关闭窗口时子线程未被停止的bug
2. (尝试)修复读取村当时字符串无法被解码导致的崩溃
2. (尝试)修复读取存档时字符串无法被解码导致的崩溃
3. 修复控制台输出表格头顺序错误的bug
3. 优化
1. (尝试)优化存档读取兼容性
Expand Down
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@

### Version 1.2.7
#### PreRelease
#### Release 3
1. 修复
1. 修复`Launcher.cpp`中没有更改程序入口的bug
2. 修复没有取消新UI导入的bug
2. 优化
1. 将网络连接失败提示改为跳转框,点击`是`即可自动打开浏览器访问GitHub页面
#### Release 2
1. 更新
1. 将启动函数单独拆分到`Launcher.py`
Expand Down
2 changes: 1 addition & 1 deletion distCPP.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ if not exist ico.res (
windres ico.rc -O coff -o ico.res
)
cd ..
g++ -o .\Launcher.exe .\MusyncSavDecodeLauncher.cpp .\musync_data\ico.res
g++ -o .\LauncherC.exe .\Launcher.cpp .\musync_data\ico.res

0 comments on commit 3bed813

Please sign in to comment.