mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-10 14:14:21 +00:00
Add source to install page text
This commit is contained in:
parent
3cebefb785
commit
985e682d9a
5 changed files with 13 additions and 9 deletions
|
@ -21,6 +21,6 @@ SOFTWARE.
|
|||
*/
|
||||
|
||||
namespace netInstStuff {
|
||||
void installTitleNet(std::vector<std::string> ourUrlList, int ourStorage, std::vector<std::string> urlListAltNames);
|
||||
void installTitleNet(std::vector<std::string> ourUrlList, int ourStorage, std::vector<std::string> urlListAltNames, std::string ourSource);
|
||||
std::vector<std::string> OnSelected();
|
||||
}
|
|
@ -113,7 +113,7 @@ namespace netInstStuff{
|
|||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
void installTitleNet(std::vector<std::string> ourUrlList, int ourStorage, std::vector<std::string> urlListAltNames)
|
||||
void installTitleNet(std::vector<std::string> ourUrlList, int ourStorage, std::vector<std::string> urlListAltNames, std::string ourSource)
|
||||
{
|
||||
inst::util::initInstallServices();
|
||||
if (appletGetAppletType() == AppletType_Application || appletGetAppletType() == AppletType_SystemApplication) appletBeginBlockingHomeButton(0);
|
||||
|
@ -127,11 +127,11 @@ namespace netInstStuff{
|
|||
std::vector<std::string> urlNames;
|
||||
if (urlListAltNames.size() > 0) {
|
||||
for (long unsigned int i = 0; i < urlListAltNames.size(); i++) {
|
||||
urlNames.push_back(inst::util::shortenString(urlListAltNames[i], 42, true));
|
||||
urlNames.push_back(inst::util::shortenString(urlListAltNames[i], 38, true));
|
||||
}
|
||||
} else {
|
||||
for (long unsigned int i = 0; i < ourUrlList.size(); i++) {
|
||||
urlNames.push_back(inst::util::shortenString(inst::util::formatUrlString(ourUrlList[i]), 42, true));
|
||||
urlNames.push_back(inst::util::shortenString(inst::util::formatUrlString(ourUrlList[i]), 38, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ namespace netInstStuff{
|
|||
try {
|
||||
for (urlItr = 0; urlItr < ourUrlList.size(); urlItr++) {
|
||||
printf("%s %s\n", "Install request from", ourUrlList[urlItr].c_str());
|
||||
inst::ui::setTopInstInfoText("Installing " + urlNames[urlItr]);
|
||||
inst::ui::setTopInstInfoText("Installing " + urlNames[urlItr] + ourSource);
|
||||
|
||||
tin::install::Install* installTask;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace nspInstStuff {
|
|||
try
|
||||
{
|
||||
for (titleItr = 0; titleItr < ourTitleList.size(); titleItr++) {
|
||||
inst::ui::setTopInstInfoText("Installing " + inst::util::shortenString(ourTitleList[titleItr].filename().string(), 42, true));
|
||||
inst::ui::setTopInstInfoText("Installing " + inst::util::shortenString(ourTitleList[titleItr].filename().string(), 40, true) + " from SD card");
|
||||
tin::install::Install* installTask;
|
||||
|
||||
inst::ui::mainApp->CreateShowDialog(ourTitleList[titleItr].filename().string(), ourTitleList[titleItr].filename().string(), {ourTitleList[titleItr].filename().string()}, true);
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace inst::ui {
|
|||
|
||||
std::string lastUrl = "https://";
|
||||
std::string lastFileID = "";
|
||||
std::string sourceString = "";
|
||||
|
||||
netInstPage::netInstPage() : Layout::Layout() {
|
||||
this->SetBackgroundColor(COLOR("#670000FF"));
|
||||
|
@ -93,6 +94,7 @@ namespace inst::ui {
|
|||
mainApp->CreateShowDialog("The URL specified is invalid!", "", {"OK"}, false);
|
||||
break;
|
||||
}
|
||||
sourceString = " from URL";
|
||||
this->selectedUrls = {keyboardResult};
|
||||
this->startInstall(true);
|
||||
return;
|
||||
|
@ -105,6 +107,7 @@ namespace inst::ui {
|
|||
std::string fileName = inst::util::getDriveFileName(keyboardResult);
|
||||
if (fileName.size() > 0) this->alternativeNames = {fileName};
|
||||
else this->alternativeNames = {"Google Drive File"};
|
||||
sourceString = " from Google Drive";
|
||||
this->selectedUrls = {"https://www.googleapis.com/drive/v3/files/" + keyboardResult + "?key=" + inst::config::gAuthKey + "&alt=media"};
|
||||
this->startInstall(true);
|
||||
return;
|
||||
|
@ -114,6 +117,7 @@ namespace inst::ui {
|
|||
this->startNetwork();
|
||||
return;
|
||||
} else {
|
||||
sourceString = " over local network";
|
||||
this->pageInfoText->SetText("Select what files you want to install from the server, then press the Plus button!");
|
||||
this->butText->SetText("\ue0e0 Select File \ue0e3 Select All \ue0ef Install File(s) \ue0e1 Cancel ");
|
||||
this->drawMenuItems(true);
|
||||
|
@ -136,7 +140,7 @@ namespace inst::ui {
|
|||
this->startNetwork();
|
||||
return;
|
||||
}
|
||||
netInstStuff::installTitleNet(this->selectedUrls, dialogResult, this->alternativeNames);
|
||||
netInstStuff::installTitleNet(this->selectedUrls, dialogResult, this->alternativeNames, sourceString);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace usbInstStuff {
|
|||
|
||||
std::vector<std::string> fileNames;
|
||||
for (long unsigned int i = 0; i < ourTitleList.size(); i++) {
|
||||
fileNames.push_back(inst::util::shortenString(ourTitleList[i], 42, true));
|
||||
fileNames.push_back(inst::util::shortenString(ourTitleList[i], 40, true));
|
||||
}
|
||||
/*
|
||||
std::vector<int> previousClockValues;
|
||||
|
@ -85,7 +85,7 @@ namespace usbInstStuff {
|
|||
*/
|
||||
try {
|
||||
for (fileItr = 0; fileItr < ourTitleList.size(); fileItr++) {
|
||||
inst::ui::setTopInstInfoText("Installing " + fileNames[fileItr]);
|
||||
inst::ui::setTopInstInfoText("Installing " + fileNames[fileItr] + " over USB");
|
||||
|
||||
tin::install::Install* installTask;
|
||||
|
||||
|
|
Loading…
Reference in a new issue