Esempio n. 1
0
 def bnp_to_gfx(self, params=None):
     try:
         bnp = Path(self.file_pick({"multiple": False})[0])
     except IndexError:
         return
     with util.TempModContext():
         install.install_mod(
             bnp,
             merge_now=True,
             options={
                 "options": {
                     "texts": {
                         "all_langs": True
                     }
                 },
                 "disable": []
             },
         )
         out = self.window.create_file_dialog(
             webviewb.SAVE_DIALOG,
             file_types=(
                 f"{('Graphic Pack' if util.get_settings('wiiu') else 'Atmosphere')} (*.zip)",
                 "BOTW Nano Patch (*.bnp)",
             ),
             save_filename=f"{bnp.stem}.zip",
         )
         if out:
             output = Path(out if isinstance(out, str) else out[0])
             install.export(output)
Esempio n. 2
0
 def export(self):
     if not util.get_installed_mods():
         raise Exception("No mods installed to export.")
     out = self.window.create_file_dialog(
         webviewb.SAVE_DIALOG,
         file_types=(
             f"{('Graphic Pack' if util.get_settings('wiiu') else 'Atmosphere')} (*.zip)",
             "BOTW Nano Patch (*.bnp)",
         ),
         save_filename="exported-mods.zip",
     )
     if out:
         output = Path(out if isinstance(out, str) else out[0])
         install.export(output)