fixed up updater
This commit is contained in:
parent
ecde988fd9
commit
fe9741a20a
4 changed files with 29 additions and 37 deletions
|
|
@ -12,28 +12,21 @@ from glob import glob
|
|||
|
||||
|
||||
def update_all(
|
||||
cache_dir,
|
||||
update_dir,
|
||||
translation_dir,
|
||||
extract_dir,
|
||||
script_dir,
|
||||
languages,
|
||||
is_global,
|
||||
cache_dir, update_dir, translation_dir, extract_dir, script_dir, languages,
|
||||
):
|
||||
print("Cleaning cache")
|
||||
cleanup_cache(cache_dir)
|
||||
|
||||
print("Copying images")
|
||||
# copy_images(cache_dir, update_dir)
|
||||
copy_images(cache_dir, update_dir)
|
||||
|
||||
print("Processing TSV files")
|
||||
# TODO
|
||||
# update_tsv(cache_dir, update_dir, translation_dir, languages, is_global)
|
||||
update_tsv(cache_dir, update_dir, extract_dir, translation_dir, languages)
|
||||
|
||||
print("Processing Quest Json files")
|
||||
# diva.quest.update_missions(cache_dir, translation_dir, languages)
|
||||
diva.quest.update_missions(extract_dir, translation_dir, languages)
|
||||
|
||||
# this code isn't going to run on windows (it will in WSL though) because i need to rewrite it
|
||||
# this code isn't going to run on windows (it is in WSL though) because i need to rewrite it
|
||||
# it just calls my zsh tools and generates it that way, need to replace them
|
||||
# with real python or something
|
||||
|
||||
|
|
@ -92,7 +85,7 @@ def update_all(
|
|||
)
|
||||
|
||||
|
||||
def update_tsv(cache_dir, update_dir, translation_dir, languages, is_global):
|
||||
def update_tsv(cache_dir, update_dir, extract_dir, translation_dir, languages):
|
||||
utage_tmp = tempfile.mkdtemp()
|
||||
copy_tree(os.path.join(cache_dir, "Common/Asset/Utage"), utage_tmp)
|
||||
utage.crypt.crypt_dir(
|
||||
|
|
@ -104,13 +97,20 @@ def update_tsv(cache_dir, update_dir, translation_dir, languages, is_global):
|
|||
except:
|
||||
pass
|
||||
|
||||
# copy over files for the quest updater
|
||||
copy_tree(utage_tmp, os.path.join(extract_dir, "Common/Asset/Utage"))
|
||||
shutil.copy2(os.path.join(cache_dir, "QuestMst.db"), extract_dir)
|
||||
shutil.copy2(os.path.join(cache_dir, "QuestSceneMst.db"), extract_dir)
|
||||
shutil.copy2(os.path.join(cache_dir, "QuestPartMst.db"), extract_dir)
|
||||
shutil.copy2(os.path.join(cache_dir, "ResourceEntry.db"), extract_dir)
|
||||
|
||||
utage.translate.translate_dir(
|
||||
utage_tmp,
|
||||
os.path.join(update_dir, "Utage"),
|
||||
os.path.join(translation_dir, "Missions"),
|
||||
is_global,
|
||||
False,
|
||||
)
|
||||
utage.names.update_names(utage_tmp, translation_dir, languages)
|
||||
utage.names.update_names(utage_tmp, translation_dir, languages, False)
|
||||
copy_tree(os.path.join(utage_tmp, "Diva"), os.path.join(update_dir, "Utage/Diva"))
|
||||
remove_tree(utage_tmp)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue