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