Small changes to Tools_Executable and to SLPS update

This commit is contained in:
Stewie
2022-09-24 07:33:03 -04:00
parent bf752a50d5
commit da30e080b9
2 changed files with 17 additions and 20 deletions

View File

@@ -572,7 +572,7 @@ class ToolsTOR(ToolsTales):
print("Writing file %05d/%05d..." % (current - dummies, len(file_list)))
#Use the new SLPS updated and update the pointers for the SCPK
with open("../Data/{}/Menu/New/SLPS_254.50".format(self.repo_name), "r+b") as output_elf:
with open("../Data/{}/Disc/New/SLPS_254.50".format(self.repo_name), "r+b") as output_elf:
output_elf.seek(self.POINTERS_BEGIN)
for i in range(len(sectors) - 1):

View File

@@ -104,7 +104,7 @@ def get_arguments(argv=None):
sp_unpack.add_argument(
"file",
choices=["All", "Main", "Menu", "Story", "Skits"],
choices=["All", "Init", "Main", "Menu", "Story", "Skits"],
metavar="FILE",
help="Options: all, dat, mfh, theirsce, scpk",
)
@@ -169,6 +169,19 @@ def get_arguments(argv=None):
return args
def send_xdelta():
file_link = GoogleAPI.upload_xdelta(xdelta_name, "Stewie") #Need to add user for the folder
message_text = """
Hi {},
here is your xdelta patch :
{}
""".format('fortiersteven1@gmail.com', file_link)
message_text = message_text + "<br>" + RepoFunctions.get_pull_requests_message(org, repo_name)
GoogleAPI.send_message('fortiersteven1@gmail.com', 'fortiersteven1@gmail.com', game_name + " Patch", file_link, message_text)
def hex2bytes(tales_instance, hex_value):
bytes_value = bytes.fromhex(hex_value + " 00")
@@ -222,32 +235,16 @@ if __name__ == "__main__":
if args.action == "pack":
if args.file == "SLPS":
#SLPS
tales_instance.pack_Menu_File("../Data/Tales-Of-Rebirth/Disc/Original/SLPS_254.50")
#Generate Iso
xdelta_name = "../Data/Tales-Of-Rebirth/Disc/New/Tales-Of-Rebirth_patch.xdelta"
xdelta_name = "../Data/Tales-Of-Rebirth/Disc/New/{}.xdelta".format(args.iso.replace(".iso",""))
generate_xdelta_patch(repo_name, xdelta_name)
file_link = GoogleAPI.upload_xdelta(xdelta_name, "Stewie") #Need to add user for the folder
message_text = """
Hi {},
here is your xdelta patch :
{}
""".format('fortiersteven1@gmail.com', file_link)
message_text = message_text + "<br>" + RepoFunctions.get_pull_requests_message(org, repo_name)
GoogleAPI.send_message('fortiersteven1@gmail.com', 'fortiersteven1@gmail.com', game_name + " Patch", file_link, message_text)
if args.file == "Main":