diff --git a/ci-gui.py b/ci-gui.py index dd08244..20f4526 100644 --- a/ci-gui.py +++ b/ci-gui.py @@ -642,7 +642,6 @@ class CustomInstallGUI(ttk.Frame): for path in self.readers.keys(): self.update_status(path, InstallStatus.Waiting) self.disable_buttons() - self.log('Starting install...') if taskbar: taskbar.SetProgressState(self.hwnd, tbl.TBPF_NORMAL) @@ -652,6 +651,16 @@ class CustomInstallGUI(ttk.Frame): skip_contents=self.skip_contents_var.get() == 1, overwrite_saves=self.overwrite_saves_var.get() == 1) + if not installer.check_for_id0(): + self.show_error(f'id0 {installer.crypto.id0.hex()} was not found inside "Nintendo 3DS" on the SD card.\n' + f'\n' + f'Before using custom-install, you should use this SD card on the appropriate console.\n' + f'\n' + f'Otherwise, make sure the correct movable.sed is being used.') + return + + self.log('Starting install...') + # use the treeview which has been sorted alphabetically readers_final = [] for k in self.treeview.get_children(): diff --git a/custominstall.py b/custominstall.py index 06e938c..ae25f25 100644 --- a/custominstall.py +++ b/custominstall.py @@ -271,6 +271,10 @@ class CustomInstall: free_space = get_free_space(self.sd) return total_size, free_space + def check_for_id0(self): + sd_path = join(self.sd, 'Nintendo 3DS', self.crypto.id0.hex()) + return isdir(sd_path) + def start(self): if frozen: save3ds_fuse_path = join(script_dir, 'bin', 'save3ds_fuse') @@ -723,6 +727,10 @@ if __name__ == "__main__": installer.event.update_percentage += percent_handle installer.event.on_error += error + if not installer.check_for_id0(): + installer.event.on_error(f'Could not find id0 directory {installer.crypto.id0.hex()} ' + f'inside Nintendo 3DS directory.') + installer.prepare_titles(args.cia) if not args.skip_contents: