summaryrefslogtreecommitdiff
path: root/game/3rdparty/manaverse.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/3rdparty/manaverse.rpy')
-rw-r--r--game/3rdparty/manaverse.rpy21
1 files changed, 15 insertions, 6 deletions
diff --git a/game/3rdparty/manaverse.rpy b/game/3rdparty/manaverse.rpy
index a65da63..a639122 100644
--- a/game/3rdparty/manaverse.rpy
+++ b/game/3rdparty/manaverse.rpy
@@ -7,8 +7,8 @@
#################################################################################
####### Constants
-define manaverseWin64 = "https://manaplus.germantmw.de/manaplus/nightly/windows/manaverse.zip"
-define manaverseLinux = "https://manaplus.germantmw.de/manaplus/nightly/linux/ManaPlus-x86_64.AppImage"
+define manaverseWin64 = "https://updates.tmw2.org/mana/windows/manaverse.zip"
+define manaverseLinux = "https://updates.tmw2.org/mana/linux/ManaPlus-x86_64.AppImage"
####### Main Code
init 1 python:
@@ -50,7 +50,10 @@ init 1 python:
def install_manaverse():
status_update("Creating ManaPlus directory...", 61)
installdir=get_path("manaplus")
- os.mkdir(installdir)
+ try:
+ os.mkdir(installdir)
+ except OSError:
+ pass
## Detect your plataform
#########################################################
if renpy.linux:
@@ -85,11 +88,15 @@ init 1 python:
else:
status_update("ERROR: Unsupported Plataform")
return False
- shutil.copytree(get_path('')+"Config", installdir+"/Config")
+ try:
+ shutil.copytree(get_path('')+"Config", installdir+"/Config")
+ except OSError:
+ traceback.print_exc()
+ pass
return True
###############################
- def cli_manaverse(launch=False, download=True):
+ def cli_manaverse(launch=False, download=True, force=False):
global SCR_PROMPT, SCR_RESULT
## Check if ManaPlus or ManaVerse is already installed
try:
@@ -110,10 +117,12 @@ init 1 python:
if (not ret):
return False
+ ## Actual download/installation (for updates)
+ if download and (force or not MANAPLUS):
try:
if not install_manaverse():
# Delete the failed attempt before raising the exception
- shutil.rmtree(get_path("manaplus"))
+ #shutil.rmtree(get_path("manaplus"))
#os.rmdir(get_path("manaplus"))
raise Exception("Installation failed!")
except: