mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
xp
This commit is contained in:
parent
53d5866975
commit
4be5fc6ba9
@ -69,12 +69,16 @@ def trygetupdate():
|
||||
def doupdate():
|
||||
if not gobject.baseobject.update_avalable:
|
||||
return
|
||||
if platform.architecture()[0] == "64bit":
|
||||
bit = ""
|
||||
_6432 = "64"
|
||||
elif platform.architecture()[0] == "32bit":
|
||||
bit = "_x86"
|
||||
plat = get_platform()
|
||||
if plat == "xp":
|
||||
_6432 = "32"
|
||||
bit = "_x86_winxp"
|
||||
elif plat == "32":
|
||||
bit = "_x86"
|
||||
_6432 = plat
|
||||
elif plat == "64":
|
||||
bit = ""
|
||||
_6432 = plat
|
||||
shutil.copy(
|
||||
r".\files\plugins\shareddllproxy{}.exe".format(_6432),
|
||||
gobject.getcachedir("Updater.exe"),
|
||||
@ -89,9 +93,11 @@ def doupdate():
|
||||
def updatemethod_checkalready(size, savep, sha256):
|
||||
if not os.path.exists(savep):
|
||||
return False
|
||||
stats = os.stat(savep)
|
||||
if stats.st_size != size:
|
||||
return False
|
||||
if get_platform() != "xp":
|
||||
# requests旧版本重定向的resp.headers不正确
|
||||
stats = os.stat(savep)
|
||||
if stats.st_size != size:
|
||||
return False
|
||||
if not sha256:
|
||||
return True
|
||||
with open(savep, "rb") as ff:
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7793456f3844866866612c07e5edc09128d6c99a
|
||||
Subproject commit 6695d90cbff787f0614eae5db49e9d9b97ed802b
|
@ -28,7 +28,8 @@ def parsecode(code: str):
|
||||
)
|
||||
# 移除类型注解
|
||||
code = re.sub(r": [a-zA-Z0-9_]+\)", ")", code)
|
||||
code = re.sub(r": [a-zA-Z0-9_]+ = ", " = ", code)
|
||||
code = re.sub(r": [a-zA-Z0-9_]+,", ",", code)
|
||||
code = re.sub(r": [a-zA-Z0-9_]+ =", " =", code)
|
||||
return code
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user