diff options
Diffstat (limited to 'game/client.rpy')
-rw-r--r-- | game/client.rpy | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/game/client.rpy b/game/client.rpy index 032ab47..f9be113 100644 --- a/game/client.rpy +++ b/game/client.rpy @@ -184,19 +184,21 @@ init 2 python: return def md5check_client(silent=False): - renpy.notify("Checking md5sum...") + if not silent: + renpy.notify("Checking md5sum...") ## Theirs try: installdir=get_path("manaplus") ## Get the file name + fname=handle_client(launch=True, download=False).split("/").pop() ## Get the MD5 Hash - if renpy.linux and persistent.evol2cli == "manaverse: + if renpy.linux and persistent.evol2cli == "manaverse": r=requests.get(manaverseLinux+".md5", timeout=10.0) - elif renpy.windows and persistent.evol2cli == "manaverse: + elif renpy.windows and persistent.evol2cli == "manaverse": r=requests.get(manaverseWin64+".md5", timeout=10.0) elif (persistent.evol2cli != "builtin"): ## FIXME: Simplify - fname=handle_client(launch=True, download=False).split("/").pop() + stdout("[INFO] Client '%s' is supplied by the launcher team..." % persistent.evol2cli) r=requests.get(persistent.host+"/%s.md5" % fname, timeout=10.0) else: raise Exception("Built-in has no MD5 Hash (builtin)") @@ -214,6 +216,8 @@ init 2 python: md5us=md5sum(fname) else: md5us=md5sum(installdir+"/%s" % fname) + + ## The check itself if md5up != md5us: stdout("MD5 Mismatch: hashes differ", True) stdout("Ours: %s" % md5us, True) @@ -221,15 +225,17 @@ init 2 python: shutil.rmtree(get_path("manaplus")) if not silent: renpy.notify("Files are outdated!") + return False else: if not silent: renpy.notify("All files up to date!") + return True except: traceback.print_exc() shutil.rmtree(get_path("manaplus")) if not silent: renpy.notify("An error happened (outdated?)") - return + return False ############################################ # TODO: Launch thread requesting /soul data |