mirror of
https://github.com/ihaveamac/custom-install.git
synced 2025-12-06 06:41:45 +00:00
check for id0 (closes #49)
This commit is contained in:
11
ci-gui.py
11
ci-gui.py
@@ -642,7 +642,6 @@ class CustomInstallGUI(ttk.Frame):
|
|||||||
for path in self.readers.keys():
|
for path in self.readers.keys():
|
||||||
self.update_status(path, InstallStatus.Waiting)
|
self.update_status(path, InstallStatus.Waiting)
|
||||||
self.disable_buttons()
|
self.disable_buttons()
|
||||||
self.log('Starting install...')
|
|
||||||
|
|
||||||
if taskbar:
|
if taskbar:
|
||||||
taskbar.SetProgressState(self.hwnd, tbl.TBPF_NORMAL)
|
taskbar.SetProgressState(self.hwnd, tbl.TBPF_NORMAL)
|
||||||
@@ -652,6 +651,16 @@ class CustomInstallGUI(ttk.Frame):
|
|||||||
skip_contents=self.skip_contents_var.get() == 1,
|
skip_contents=self.skip_contents_var.get() == 1,
|
||||||
overwrite_saves=self.overwrite_saves_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
|
# use the treeview which has been sorted alphabetically
|
||||||
readers_final = []
|
readers_final = []
|
||||||
for k in self.treeview.get_children():
|
for k in self.treeview.get_children():
|
||||||
|
|||||||
@@ -271,6 +271,10 @@ class CustomInstall:
|
|||||||
free_space = get_free_space(self.sd)
|
free_space = get_free_space(self.sd)
|
||||||
return total_size, free_space
|
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):
|
def start(self):
|
||||||
if frozen:
|
if frozen:
|
||||||
save3ds_fuse_path = join(script_dir, 'bin', 'save3ds_fuse')
|
save3ds_fuse_path = join(script_dir, 'bin', 'save3ds_fuse')
|
||||||
@@ -723,6 +727,10 @@ if __name__ == "__main__":
|
|||||||
installer.event.update_percentage += percent_handle
|
installer.event.update_percentage += percent_handle
|
||||||
installer.event.on_error += error
|
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)
|
installer.prepare_titles(args.cia)
|
||||||
|
|
||||||
if not args.skip_contents:
|
if not args.skip_contents:
|
||||||
|
|||||||
Reference in New Issue
Block a user