Comments (3)
and "install and delete all" please
from goldleaf.
diff --git a/include/mode/install_nsp_mode.hpp b/include/mode/install_nsp_mode.hpp
index fcdc415..04bcf92 100644
--- a/include/mode/install_nsp_mode.hpp
+++ b/include/mode/install_nsp_mode.hpp
@@ -12,6 +12,7 @@ namespace tin::ui
std::string m_name;
FsStorageId m_destStorageId = FsStorageId_SdCard;
bool m_ignoreReqFirmVersion = false;
+ bool m_deleteAfterInstall = false;
public:
InstallNSPMode();
@@ -20,5 +21,6 @@ namespace tin::ui
void OnNSPSelected();
void OnDestinationSelected();
void OnIgnoreReqFirmVersionSelected();
+ void OnDeleteAfterInstallSelected();
};
diff --git a/source/mode/install_nsp_mode.cpp b/source/mode/install_nsp_mode.cpp
index 36efa5d..b64c907 100644
--- a/source/mode/install_nsp_mode.cpp
+++ b/source/mode/install_nsp_mode.cpp
@@ -102,6 +102,29 @@ namespace tin::ui
auto optStr = prevView->GetSelectedOptionValue()->GetText();
m_ignoreReqFirmVersion = (optStr == "Yes");
+
+ auto view = std::make_unique<tin::ui::ConsoleOptionsView>();
+ view->AddEntry("Delete file after install", tin::ui::ConsoleEntrySelectType::HEADING, nullptr);
+ view->AddEntry("", tin::ui::ConsoleEntrySelectType::NONE, nullptr);
+ view->AddEntry("No", tin::ui::ConsoleEntrySelectType::SELECT, std::bind(&InstallNSPMode::OnDeleteAfterInstallSelected, this));
+ view->AddEntry("Yes", tin::ui::ConsoleEntrySelectType::SELECT, std::bind(&InstallNSPMode::OnDeleteAfterInstallSelected, this));
+ manager.PushView(std::move(view));
+ }
+
+ void InstallNSPMode::OnDeleteAfterInstallSelected()
+ {
+ // Retrieve previous selection
+ tin::ui::ViewManager& manager = tin::ui::ViewManager::Instance();
+ ConsoleOptionsView* prevView;
+
+ if (!(prevView = dynamic_cast<ConsoleOptionsView*>(manager.GetCurrentView())))
+ {
+ throw std::runtime_error("Previous view must be a ConsoleOptionsView!");
+ }
+
+ auto optStr = prevView->GetSelectedOptionValue()->GetText();
+ m_deleteAfterInstall = (optStr == "Yes");
+
std::vector<std::string> installList;
if (m_name == "Install All")
@@ -151,6 +174,16 @@ namespace tin::ui
fprintf(stdout, "%s", e.what());
break;
}
+
+ if (m_deleteAfterInstall)
+ {
+ FsFileSystem sdcard;
+ fsMountSdcard(&sdcard);
+ std::string nspPath = "/tinfoil/nsp/" + installList[i];
+ nspPath.reserve(FS_MAX_PATH);
+ fsFsDeleteFile(&sdcard, nspPath.c_str());
+ fsFsClose(&sdcard);
+ }
}
printf("Done!\n\nPress (B) to return.\n");
from goldleaf.
Sometimes the install blocks midway, there is an error message about firmware or fs mitm problem. Do not delete all if install stops half way.
from goldleaf.
Related Issues (20)
- Error installing nsp HOT 2
- quark stops transfering nsp install HOT 1
- Error 2001-0123 on atmosphere 1.5.0 (pre-release) with switch OS 16.0.0 HOT 21
- Build error latest LIBNX HOT 5
- building error HOT 4
- Build Error HOT 4
- Typo in latest release HOT 1
- 0.10.1 - Cannot mount USB Drive HOT 14
- USB passthrough controller (DOBE) doesnt connect via USB
- v0.10.1 - Goldleaf fails to install NSP dumps from nxdumptool rewrite builds HOT 1
- Can't install NSP using Goldleaf & Quark 0.10.1 HOT 1
- Installing DLC NSPs causes a "metadata NCA could not be located in the NSP" error HOT 5
- Deletion prompt after installation could cause accidentaly deleted files HOT 2
- Cannot launch Quark on Java 17 + M1 HOT 2
- Installing NSP package (2356-001) HOT 1
- Bulk Install Bug - Overwritting existing Files
- Invalid Characters for Folders when NSP Dump HOT 1
- Please add Page UP/Down on File browser
- is reset launch version bannable?
- Keygeneration stuck on 9.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goldleaf.