mirror of
https://github.com/rvtr/unlaunch-installer_dev.git
synced 2026-01-26 13:43:08 -05:00
Directly disable install option if an unlaunch version is found to be already installed
The user will have to explicitly uninstall first and then reinstall
This commit is contained in:
parent
71c1c21234
commit
f6a503a2a3
@ -66,7 +66,7 @@ static int mainMenu(int cursor)
|
||||
|
||||
char uninstallStr[32], installStr[32];
|
||||
sprintf(uninstallStr, "\x1B[%02omUninstall unlaunch", unlaunchFound ? 047 : 037);
|
||||
sprintf(installStr, "\x1B[%02omInstall unlaunch", unlaunchInstallerFound ? 047 : 037);
|
||||
sprintf(installStr, "\x1B[%02omInstall unlaunch", unlaunchInstallerFound && !unlaunchFound ? 047 : 037);
|
||||
addMenuItem(m, uninstallStr, NULL, 0);
|
||||
addMenuItem(m, installStr, NULL, 0);
|
||||
addMenuItem(m, "\x1B[47mExit", NULL, 0);
|
||||
|
||||
@ -128,18 +128,7 @@ static bool patchMainTmd(const char* path)
|
||||
fclose(launcherTmd);
|
||||
return false;
|
||||
}
|
||||
if (getFileSize(launcherTmd) > 520) {
|
||||
// Remove unlaunch if it already exists on the main launcher tmd.
|
||||
// If we don't do this and unlaunch is on the tmd, it will take over and prevent loading HNAA
|
||||
messageBox("Unlaunch is already installed \nwith the legacy method\nTrying to remove...\n");
|
||||
if (ftruncate(fileno(launcherTmd), 520) != 0) {
|
||||
messageBox("\x1B[31mError:\x1B[33m Failed to remove old unlaunch\n");
|
||||
fclose(launcherTmd);
|
||||
return false;
|
||||
}
|
||||
fclose(launcherTmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
fclose(launcherTmd);
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user