mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-12-29 10:56:01 +00:00
add option to disable sysmodules prior to updating and a bunch of other stuff
This commit is contained in:
parent
1f452bbdda
commit
173a216777
9 changed files with 113 additions and 73 deletions
2
Makefile
2
Makefile
|
@ -22,7 +22,7 @@ DATA := data
|
||||||
INCLUDES := include lib/zipper/include
|
INCLUDES := include lib/zipper/include
|
||||||
APP_TITLE := All-in-One Switch Updater
|
APP_TITLE := All-in-One Switch Updater
|
||||||
APP_AUTHOR := HamletDuFromage
|
APP_AUTHOR := HamletDuFromage
|
||||||
APP_VERSION := 2.3.4
|
APP_VERSION := 2.3.5
|
||||||
TARGET := $(notdir $(CURDIR))
|
TARGET := $(notdir $(CURDIR))
|
||||||
|
|
||||||
ROMFS := resources
|
ROMFS := resources
|
||||||
|
|
|
@ -10,5 +10,4 @@ class AmsTab : public brls::List
|
||||||
brls::Label *description;
|
brls::Label *description;
|
||||||
public:
|
public:
|
||||||
AmsTab();
|
AmsTab();
|
||||||
~AmsTab();
|
|
||||||
};
|
};
|
|
@ -10,4 +10,5 @@ class ChangelogPage : public brls::AppletFrame
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChangelogPage();
|
ChangelogPage();
|
||||||
|
void ShowChangelogContent(const std::string version, const std::string content);
|
||||||
};
|
};
|
|
@ -39,4 +39,5 @@ std::string readVersion(const char* path);
|
||||||
void cp(const char *to, const char *from);
|
void cp(const char *to, const char *from);
|
||||||
std::string copyFiles(const char* path);
|
std::string copyFiles(const char* path);
|
||||||
int removeDir(const char* path);
|
int removeDir(const char* path);
|
||||||
bool isErista();
|
bool isErista();
|
||||||
|
void removeSysmodulesFlags(const char * directory);
|
|
@ -26,7 +26,7 @@
|
||||||
"quota": "Quota exceeded for today!\nHead on to 'https://www.cheatslips.com/subscriptions' to see how to increase it.",
|
"quota": "Quota exceeded for today!\nHead on to 'https://www.cheatslips.com/subscriptions' to see how to increase it.",
|
||||||
"sheet_content": "Cheatsheet content",
|
"sheet_content": "Cheatsheet content",
|
||||||
"cheatslips_select": "Select a game to download cheats for.",
|
"cheatslips_select": "Select a game to download cheats for.",
|
||||||
"cheatslips_wrong_id": "Couldn't retrieve token, make sure you enter you login properly",
|
"cheatslips_wrong_id": "Couldn't retrieve token, make sure you enter your login properly",
|
||||||
"kb_error": "If they keyboard did not show up, try running the app with full RAM access (title redirection)",
|
"kb_error": "If they keyboard did not show up, try running the app with full RAM access (title redirection)",
|
||||||
"cheatslips_see_more": "See more",
|
"cheatslips_see_more": "See more",
|
||||||
"cheatslips_dl_cheats": "Download cheats and go back",
|
"cheatslips_dl_cheats": "Download cheats and go back",
|
||||||
|
@ -144,7 +144,8 @@
|
||||||
"ams_update": {
|
"ams_update": {
|
||||||
"reboot_rcm": "The Switch will now reboot to a special payload in order to finalise the install.",
|
"reboot_rcm": "The Switch will now reboot to a special payload in order to finalise the install.",
|
||||||
"install_hekate": "Do you want to also download Hekate?\nIf not, the Switch will now launch reboot to a special payload in order to finalise the install.",
|
"install_hekate": "Do you want to also download Hekate?\nIf not, the Switch will now launch reboot to a special payload in order to finalise the install.",
|
||||||
"delete_contents": "Would you like to remove the existing '/atmosphere/contents/' directory? This will prevent crashes if you have sysmodules that do not support the latest Atmosph\u00e8re. Please note that it will delete all your existing sysmodules, mods and cheats."
|
"delete_contents": "Would you like to remove the existing '/atmosphere/contents/' directory? This will prevent crashes if you have sysmodules that do not support the latest Atmosph\u00e8re. Please note that it will delete all your existing sysmodules, mods and cheats.",
|
||||||
|
"delete_sysmodules_flags": "Would you like to delete all the custom sysmodules startup flags? This will turn off all your sysmodules and prevent crashes if you have sysmodules that do not support the latest Atmosphère."
|
||||||
},
|
},
|
||||||
"net": {
|
"net": {
|
||||||
"title": "Internet settings"
|
"title": "Internet settings"
|
||||||
|
|
|
@ -76,8 +76,4 @@ AmsTab::AmsTab() :
|
||||||
this->addView(notFound);
|
this->addView(notFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AmsTab::~AmsTab(){
|
|
||||||
|
|
||||||
}
|
|
|
@ -10,110 +10,113 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
|
||||||
std::string change;
|
std::string change;
|
||||||
std::vector<std::string> changes;
|
std::vector<std::string> changes;
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_0_1"_i18n );
|
verTitles.push_back("v1.0.1");
|
||||||
changes.push_back("menus/v1_0_1_text"_i18n );
|
changes.push_back("\uE016 Added dialogue box asking about ini files.\n\uE016 Fixed update app link when not connected to the internet.\n\uE016 Minor fixes here and there.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_0_2"_i18n );
|
verTitles.push_back("v1.0.2");
|
||||||
changes.push_back("menus/v1_0_2_text"_i18n );
|
changes.push_back("\uE016 Fixed .ini files being handled poorly when installing sigpatches. Now prompts the user if they want to replace hetake_ipl.ini.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_0_3"_i18n );
|
verTitles.push_back("v1.0.3");
|
||||||
changes.push_back("menus/v1_0_3_text"_i18n );
|
changes.push_back("\uE016 Fixed progress bar sometimes being stuck when extracting.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_1_0"_i18n );
|
verTitles.push_back("v1.1.0");
|
||||||
changes.push_back("menus/v1_1_0_text"_i18n );
|
changes.push_back("\uE016 Added an option to download payloads to '/bootloader/payloads'.\n\uE016 Cleaned up some stuff, made .ini overwriting cleaner.\n");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_1_1"_i18n );
|
verTitles.push_back("v1.1.1");
|
||||||
changes.push_back("menus/v1_1_1_text"_i18n );
|
changes.push_back("\uE016 Added some safety checks before downloading/extracting.\n\uE016 Added the possibility to copy a payload to '/atmosphere/reboot_payload.bin'\n\uE016 Added changelog in 'Tools'\n");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_1_2"_i18n );
|
verTitles.push_back("v1.1.2" );
|
||||||
changes.push_back("menus/v1_1_2_text"_i18n );
|
changes.push_back("\uE016 Added GUI to disable cheat updates for specific titles.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_1_3"_i18n );
|
verTitles.push_back("v1.1.3");
|
||||||
changes.push_back("menus/v1_1_3_text"_i18n );
|
changes.push_back("\uE016 Now displays the latest installed cheat version.\n\uE016 Now warns in the app title if a new update is available.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_0"_i18n );
|
verTitles.push_back("v1.2.3");
|
||||||
changes.push_back("menus/v1_2_0_text"_i18n );
|
changes.push_back("\uE016 Now multilingual (thanks to 'github.com/tiansongyu').\n\uE016 Chinese and French are currently supported.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_1"_i18n );
|
verTitles.push_back("v1.2.1");
|
||||||
changes.push_back("menus/v1_2_1_text"_i18n );
|
changes.push_back("\uE016 Added option to set a payload to /bootloader/update.bin");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_2"_i18n );
|
verTitles.push_back("v1.2.2");
|
||||||
changes.push_back("menus/v1_2_2_text"_i18n );
|
changes.push_back("\uE016 Added japanese localisation (thanks to github.com/yyoossk).");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_4"_i18n );
|
verTitles.push_back("v1.2.4");
|
||||||
changes.push_back("menus/v1_2_4_text"_i18n );
|
changes.push_back("\uE016 Fixed app self-update");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_5"_i18n );
|
verTitles.push_back("v1.2.5");
|
||||||
changes.push_back("menus/v1_2_5_text"_i18n );
|
changes.push_back("\uE016 Improved japanese translation");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_2_6"_i18n );
|
verTitles.push_back("v1.2.6");
|
||||||
changes.push_back("menus/v1_2_6_text"_i18n );
|
changes.push_back("\uE016 Added spanish translation (thanks to 'https://github.com/sergiou87'");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_3_0"_i18n );
|
verTitles.push_back("v1.3.0");
|
||||||
changes.push_back("menus/v1_3_0_text"_i18n );
|
changes.push_back("\uE016 Added back the ability to update CFWs");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_3_1"_i18n );
|
verTitles.push_back("v1.3.1");
|
||||||
changes.push_back("menus/v1_3_1_text"_i18n );
|
changes.push_back("\uE016 Small fixes for bugs causing hangs.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_3_2"_i18n );
|
verTitles.push_back("v1.3.2");
|
||||||
changes.push_back("menus/v1_3_2_text"_i18n );
|
changes.push_back("\uE016 Added ability to change the internet color of Pro Controllers.\n\uE016 Added the ability to preserve specific files when updating.\n\uE016 Added the ability to clean up downloaded archives.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_4_0"_i18n );
|
verTitles.push_back("v1.4.0");
|
||||||
changes.push_back("menus/v1_4_0_text"_i18n );
|
changes.push_back("\uE016 Added possibility to use pre-set network settings. Add your own in `config/aio-switch-updater/internet.json.\n\uE016 Added web browser.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_4_1"_i18n );
|
verTitles.push_back("v1.4.1");
|
||||||
changes.push_back("menus/v1_4_1_text"_i18n );
|
changes.push_back("\uE016 Fixed misleading display in internet settings page.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_4_2"_i18n );
|
verTitles.push_back("v1.4.2");
|
||||||
changes.push_back("menus/v1_4_2_text"_i18n );
|
changes.push_back("\uE016 (hopefully) fixed unreliable copy of payloads.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_4_3"_i18n );
|
verTitles.push_back("v1.4.3");
|
||||||
changes.push_back("menus/v1_4_3_text"_i18n );
|
changes.push_back("\uE016 Fixed switch not rebooting to hekate payload after updating.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_5_0"_i18n );
|
verTitles.push_back("v1.5.0");
|
||||||
changes.push_back("menus/v1_5_0_text"_i18n );
|
changes.push_back("\uE016 Overhauled the app update feature.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_5_1"_i18n );
|
verTitles.push_back("v1.5.1");
|
||||||
changes.push_back("menus/v1_5_1_text"_i18n );
|
changes.push_back("\uE016 A few graphical tweaks.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v1_5_2"_i18n );
|
verTitles.push_back("v1.5.2");
|
||||||
changes.push_back("menus/v1_5_2_text"_i18n );
|
changes.push_back("\uE016 Added support for Traditional Chinese (thanks to 'https://github.com/qazrfv1234')");
|
||||||
|
|
||||||
verTitles.push_back("menus/v2_0_0"_i18n );
|
verTitles.push_back("v2.0.0");
|
||||||
changes.push_back("menus/v2_0_0_text"_i18n );
|
changes.push_back("\uE016 Added ability to download cheatslips cheats.\n\uE016 Added way to toggle out tabs.\n\uE016 Various code improvements.");
|
||||||
|
|
||||||
verTitles.push_back("menus/v2_0_1"_i18n );
|
verTitles.push_back("v2.0.1");
|
||||||
changes.push_back("menus/v2_0_1_text"_i18n );
|
changes.push_back("\uE016 Fixed a bug not letting the user click no when asked if they want to install hekate.\n\uE016 Correct a bunch of typos.");
|
||||||
|
|
||||||
verTitles.push_back("v2.1.0");
|
verTitles.push_back("v2.1.0");
|
||||||
changes.push_back("menus/v2_1_0_text"_i18n );
|
changes.push_back("\uE016 Switched to a better way to get links.");
|
||||||
|
|
||||||
verTitles.push_back("v2.1.1");
|
verTitles.push_back("v2.1.1");
|
||||||
changes.push_back("menus/v2_1_1_text"_i18n );
|
changes.push_back("\uE016 Added a friendly reminder to reboot for new sigpatches to apply.\n\uE016 Changed the cheatslips cheatsheet view.");
|
||||||
|
|
||||||
verTitles.push_back("v2.1.2");
|
verTitles.push_back("v2.1.2");
|
||||||
changes.push_back("menus/v2_1_2_text"_i18n );
|
changes.push_back("\uE016 Fixed wronge hekate link.");
|
||||||
|
|
||||||
verTitles.push_back("v2.2.0");
|
verTitles.push_back("v2.2.0");
|
||||||
changes.push_back("menus/v2_2_0_text"_i18n );
|
changes.push_back("\uE016 For cheatslips.com, the build ID of a running game will now be fetched, allowing you to access cheatsheets even if the build ID isn't listed in the versions database.");
|
||||||
|
|
||||||
verTitles.push_back("v2.2.1");
|
verTitles.push_back("v2.2.1");
|
||||||
changes.push_back("menus/v2_2_1_text"_i18n );
|
changes.push_back("\uE016 Fixed non Atmosphere CFW being wrongly categorised as ams.");
|
||||||
|
|
||||||
verTitles.push_back("v2.3.0");
|
verTitles.push_back("v2.3.0");
|
||||||
changes.push_back("menus/v2_3_0_text"_i18n );
|
changes.push_back("\uE016 Added possibility to copy a list of files to custom locations. This may come in handy for trinket/esoteric bootloader users.\n\uE016 Added warning screen on launch.\n\uE016 Few UI tweaks.\n\uE016 Traditional Chinese translation updated (qazrfv1234)");
|
||||||
|
|
||||||
verTitles.push_back("v2.3.1");
|
verTitles.push_back("v2.3.1");
|
||||||
changes.push_back("menus/v2_3_1_text"_i18n );
|
changes.push_back("\uE016 Files for batch copy are now copied according to the json order (formerly alphabetical order).");
|
||||||
|
|
||||||
verTitles.push_back("v2.3.2");
|
verTitles.push_back("v2.3.2");
|
||||||
changes.push_back("menus/v2_3_2_text"_i18n );
|
changes.push_back("\uE016 Fixed batch copy not copying :^)");
|
||||||
|
|
||||||
verTitles.push_back("v2.3.3");
|
verTitles.push_back("v2.3.3");
|
||||||
changes.push_back("menus/v2_3_3_text"_i18n );
|
changes.push_back("\uE016 Hide unsupported features for Mariko Switches");
|
||||||
|
|
||||||
verTitles.push_back("v2.3.4");
|
verTitles.push_back("v2.3.4");
|
||||||
changes.push_back("menus/v2_3_4_text"_i18n );
|
changes.push_back("\uE016 Minor fixes, refactored old switch-cheats updater code and changed way to detect CFW");
|
||||||
|
|
||||||
|
verTitles.push_back("v2.3.5");
|
||||||
|
changes.push_back("\uE016 Added German localisation (thanks to github.com/Slluxx).\n\uE016 Added option to disable sysmodules prior to updating.\n\uE016 Improved Japanese localisation (thanks to github.com/yyoossk).");
|
||||||
|
|
||||||
for(int i = verTitles.size() -1 ; i >= 0; i--){
|
for(int i = verTitles.size() -1 ; i >= 0; i--){
|
||||||
listItem = new brls::ListItem(verTitles[i]);
|
listItem = new brls::ListItem(verTitles[i]);
|
||||||
|
@ -130,4 +133,14 @@ ChangelogPage::ChangelogPage() : AppletFrame(true, true)
|
||||||
list->addView(listItem);
|
list->addView(listItem);
|
||||||
}
|
}
|
||||||
this->setContentView(list);
|
this->setContentView(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangelogPage::ShowChangelogContent(const std::string version, const std::string content) {
|
||||||
|
listItem = new brls::ListItem(version);
|
||||||
|
listItem->getClickEvent()->subscribe([&, content](brls::View* view) {
|
||||||
|
brls::AppletFrame* appView = new brls::AppletFrame(true, true);
|
||||||
|
|
||||||
|
brls::PopupFrame::open(version, appView, "", "");
|
||||||
|
});
|
||||||
|
list->addView(listItem);
|
||||||
}
|
}
|
|
@ -48,6 +48,8 @@ int main(int argc, char* argv[])
|
||||||
brls::Logger::setLogLevel(brls::LogLevel::DEBUG);
|
brls::Logger::setLogLevel(brls::LogLevel::DEBUG);
|
||||||
brls::Logger::debug("Start");
|
brls::Logger::debug("Start");
|
||||||
|
|
||||||
|
removeSysmodulesFlags(AMS_CONTENTS);
|
||||||
|
|
||||||
if(std::filesystem::exists(HIDDEN_AIO_FILE)) {
|
if(std::filesystem::exists(HIDDEN_AIO_FILE)) {
|
||||||
brls::Application::pushView(new MainFrame());
|
brls::Application::pushView(new MainFrame());
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,9 +181,9 @@ void extractArchive(archiveType type, std::string tag){
|
||||||
if(isArchive(AMS_FILENAME)){
|
if(isArchive(AMS_FILENAME)){
|
||||||
overwriteInis = showDialogBox("menus/utils/overwrite_inis"_i18n , "menus/common/no"_i18n, "menus/common/yes"_i18n);
|
overwriteInis = showDialogBox("menus/utils/overwrite_inis"_i18n , "menus/common/no"_i18n, "menus/common/yes"_i18n);
|
||||||
usleep(800000);
|
usleep(800000);
|
||||||
int deleteContents = showDialogBox("menus/ams_update/delete_contents"_i18n , "menus/common/no"_i18n , "menus/common/yes"_i18n);
|
int deleteContents = showDialogBox("menus/ams_update/delete_sysmodules_flags"_i18n , "menus/common/no"_i18n , "menus/common/yes"_i18n);
|
||||||
if(deleteContents == 1)
|
if(deleteContents == 1)
|
||||||
removeDir(AMS_CONTENTS);
|
removeSysmodulesFlags(AMS_CONTENTS);
|
||||||
extract(AMS_FILENAME, ROOT_PATH, overwriteInis);
|
extract(AMS_FILENAME, ROOT_PATH, overwriteInis);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -394,7 +394,6 @@ int removeDir(const char* path) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isErista() {
|
bool isErista() {
|
||||||
splInitialize();
|
splInitialize();
|
||||||
u64 hwType;
|
u64 hwType;
|
||||||
|
@ -418,3 +417,31 @@ bool isErista() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void removeSysmodulesFlags(const char * directory) {
|
||||||
|
const std::set<std::string> AMS_SYSMODULES{
|
||||||
|
"010000000000000D",
|
||||||
|
"010000000000002B",
|
||||||
|
"0100000000000032",
|
||||||
|
"0100000000000036",
|
||||||
|
"0100000000000042",
|
||||||
|
"0100000000000008",
|
||||||
|
"010000000000003C",
|
||||||
|
"0100000000000034",
|
||||||
|
"0100000000000037"
|
||||||
|
};
|
||||||
|
bool found = false;
|
||||||
|
for (const auto & e : std::filesystem::recursive_directory_iterator(directory)) {
|
||||||
|
if(e.path().string().find("boot2.flag") != std::string::npos) {
|
||||||
|
for(const auto & c : AMS_SYSMODULES) {
|
||||||
|
if(e.path().string().find(c) != std::string::npos) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!found)
|
||||||
|
std::filesystem::remove(e.path());
|
||||||
|
}
|
||||||
|
found = false;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue