summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/3rdparty/manaverse.rpy6
-rw-r--r--game/client.rpy15
2 files changed, 15 insertions, 6 deletions
diff --git a/game/3rdparty/manaverse.rpy b/game/3rdparty/manaverse.rpy
index 7ae498a..cceaf26 100644
--- a/game/3rdparty/manaverse.rpy
+++ b/game/3rdparty/manaverse.rpy
@@ -49,7 +49,7 @@ init 1 python:
## Detect your plataform
#########################################################
if renpy.linux:
- if not download_manaplus("ManaVerse.AppImage"):
+ if not download_manaverse("ManaVerse.AppImage"):
return False
status_update("Marking as executable...", 72)
@@ -57,7 +57,7 @@ init 1 python:
status_update("Installation successful!", 75)
#########################################################
elif renpy.windows:
- if not download_manaplus("ManaPlus.zip"):
+ if not download_manaverse("ManaPlus.zip"):
return False
status_update("Unzipping file...", 72)
@@ -97,7 +97,7 @@ init 1 python:
return False
try:
- if not install_manaplus():
+ if not install_manaverse():
# Delete the failed attempt before raising the exception
shutil.rmtree(get_path("manaplus"))
#os.rmdir(get_path("manaplus"))
diff --git a/game/client.rpy b/game/client.rpy
index 461c7a8..cd23d52 100644
--- a/game/client.rpy
+++ b/game/client.rpy
@@ -155,18 +155,26 @@ init 2 python:
def md5check_client(silent=False):
renpy.notify("Checking md5sum...")
+ ## Theirs
try:
- installdir=get_path(persistent.evol2cli)
+ installdir=get_path("manaplus")
fname=handle_client(launch=True, download=False).split("/").pop()
r=requests.get(persistent.host+"/%s.md5" % fname, timeout=10.0)
md5up=r.text.replace("\n", "")
+ except:
+ traceback.print_exc()
+ if not silent:
+ renpy.notify("An error happened.")
+ return
+ ## Ours
+ try:
md5us=md5sum(installdir+"/%s" % fname)
if md5up != md5us:
stdout("MD5 Mismatch: hashes differ", True)
stdout("Ours: %s" % md5us, True)
stdout("Them: %s" % md5up, True)
- shutil.rmtree(get_path(persistent.evol2cli))
+ shutil.rmtree(get_path("manaplus"))
if not silent:
renpy.notify("Files are outdated!")
else:
@@ -174,8 +182,9 @@ init 2 python:
renpy.notify("All files up to date!")
except:
traceback.print_exc()
+ shutil.rmtree(get_path("manaplus"))
if not silent:
- renpy.notify("An error happened.")
+ renpy.notify("An error happened (outdated?)")
return
############################################