Skip to content

Commit

Permalink
some more changes for future templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya-Rand authored Oct 13, 2022
1 parent 6d0651c commit 37518b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions launcher/game/android.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ init python:

PLAY_BUNDLE_TEXT = _("Builds an Android App Bundle (ABB), intended to be uploaded to Google Play. This can include up to 2GB of data.")
UNIVERSAL_APK_TEXT = _("Builds a Universal APK package, intended for sideloading and stores other than Google Play. This can include up to 2GB of data.")
GUIDE_TEXT = _("Opens guide.pdf which goes through the process of releasing mods to Android that are Team Salvato IPG compliant.")
GUIDE_TEXT = _("Opens the Android Mod Guide for DDLC which goes through the process of releasing mods to Android that are Team Salvato IPG compliant.")

import subprocess
import re
Expand Down Expand Up @@ -473,8 +473,8 @@ screen android:
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_clean"))
hovered tt.Action(CLEAN_TEXT)

textbutton _("Open {i}guide.pdf{/i}"):
action OpenDirectory(config.basedir + "/templates/guide.pdf")
textbutton _("Open Android Mod Guide"):
action OpenDirectory(config.basedir + "/templates/Android Mod Guide.pdf")
hovered tt.Action(GUIDE_TEXT)

add SPACER
Expand Down
9 changes: 8 additions & 1 deletion launcher/game/mmupdater.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ init python:
return channels

label mmupdater:
python:
if not os.path.exists(config.basedir + "/update"):
os.makedirs(config.basedir + "/update")

$ ddmm_chan = fetch_ddmm_updates(False)
$ ddmt_chan = fetch_ddmm_updates(False, True)
Expand Down Expand Up @@ -175,7 +178,11 @@ label install_ddmt_update_script(ddmt_chan):
except: pass

with open(config.basedir + "/templates/" + filename, "wb") as newTemplate:
newTemplate.write(zipContent.content)
try:
newTemplate.extract("guide.pdf", config.basedir + "/templates")
os.rename(config.basedir + "/templates/guide.pdf", config.basedir + "/templates/Android Mod Guide.pdf")
except:
newTemplate.extract("Documentation/Android Mod Guide.pdf", config.basedir + "/templates")

with zipfile.ZipFile(config.basedir + "/templates/" + filename) as newTemplate:
newTemplate.extract("guide.pdf", config.basedir + "/templates")
Expand Down
File renamed without changes.

0 comments on commit 37518b9

Please sign in to comment.