mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-10 14:14:21 +00:00
Made install progress look less jumpy and odd
This commit is contained in:
parent
fe435842d4
commit
ad388c412d
4 changed files with 11 additions and 2 deletions
|
@ -132,6 +132,7 @@ namespace tin::install::nsp
|
|||
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||
//consoleUpdate(NULL);
|
||||
}
|
||||
inst::ui::setInstBarPerc(100);
|
||||
|
||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||
|
||||
|
@ -146,6 +147,7 @@ namespace tin::install::nsp
|
|||
inst::ui::setInstBarPerc((double)installProgress);
|
||||
//consoleUpdate(NULL);
|
||||
}
|
||||
inst::ui::setInstBarPerc(100);
|
||||
|
||||
thrd_join(curlThread, NULL);
|
||||
thrd_join(writeThread, NULL);
|
||||
|
|
|
@ -147,6 +147,7 @@ namespace tin::install::nsp
|
|||
fileOff += readSize;
|
||||
//consoleUpdate(NULL);
|
||||
}
|
||||
inst::ui::setInstBarPerc(100);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
@ -142,18 +142,20 @@ namespace netInstStuff{
|
|||
printf("Failed to install");
|
||||
printf("%s", e.what());
|
||||
fprintf(stdout, "%s", e.what());
|
||||
inst::ui::setInstInfoText("Failed to install");
|
||||
inst::ui::setInstBarPerc(0);
|
||||
inst::ui::mainApp->CreateShowDialog("Failed to install!", "Partially installed contents can be removed from the System Settings applet.\n\n" + (std::string)e.what(), {"OK"}, true);
|
||||
nspInstalled = false;
|
||||
}
|
||||
|
||||
printf("%s\n", "Telling the server we're done installing");
|
||||
inst::ui::setInstInfoText("Telling the server we're done installing...");
|
||||
// Send 1 byte ack to close the server
|
||||
u8 ack = 0;
|
||||
tin::network::WaitSendNetworkData(m_clientSocket, &ack, sizeof(u8));
|
||||
inst::ui::setInstBarPerc(100);
|
||||
|
||||
if(nspInstalled) {
|
||||
inst::ui::setInstInfoText("Install complete");
|
||||
inst::ui::setInstBarPerc(100);
|
||||
if (ourUrlList.size() > 1) inst::ui::mainApp->CreateShowDialog("Selected files installed!", nspInstStuff::finishedMessage(), {"OK"}, true);
|
||||
else inst::ui::mainApp->CreateShowDialog(inst::util::shortenString(inst::util::formatUrlString(ourUrlList[0]), 64, true) + " installed!", nspInstStuff::finishedMessage(), {"OK"}, true);
|
||||
}
|
||||
|
|
|
@ -127,11 +127,15 @@ namespace nspInstStuff {
|
|||
printf("Failed to install");
|
||||
printf("%s", e.what());
|
||||
fprintf(stdout, "%s", e.what());
|
||||
inst::ui::setInstInfoText("Failed to install");
|
||||
inst::ui::setInstBarPerc(0);
|
||||
inst::ui::mainApp->CreateShowDialog("Failed to install!", "Partially installed contents can be removed from the System Settings applet.\n\n" + (std::string)e.what(), {"OK"}, true);
|
||||
nspInstalled = false;
|
||||
}
|
||||
|
||||
if(nspInstalled) {
|
||||
inst::ui::setInstInfoText("Install complete");
|
||||
inst::ui::setInstBarPerc(100);
|
||||
if (ourNspList.size() > 1) {
|
||||
if(inst::ui::mainApp->CreateShowDialog("Selected files installed! Delete them from the SD card?", nspInstStuff::finishedMessage(), {"No","Yes"}, false) == 1) {
|
||||
for (long unsigned int i = 0; i < ourNspList.size(); i++) {
|
||||
|
|
Loading…
Reference in a new issue