mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-10 14:14:21 +00:00
Fix debug ifdefs to be proper + xci nca verification change
This commit is contained in:
parent
368bb258b1
commit
b237f35f67
4 changed files with 7 additions and 7 deletions
|
@ -116,12 +116,12 @@ namespace tin::install::xci
|
||||||
|
|
||||||
startTime = newTime;
|
startTime = newTime;
|
||||||
startSizeBuffered = newSizeBuffered;
|
startSizeBuffered = newSizeBuffered;
|
||||||
|
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||||
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
||||||
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
||||||
#endif
|
#endif
|
||||||
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
|
|
||||||
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
||||||
inst::ui::setInstBarPerc((double)downloadProgress);
|
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||||
|
@ -137,11 +137,11 @@ namespace tin::install::xci
|
||||||
inst::ui::setInstBarPerc(0);
|
inst::ui::setInstBarPerc(0);
|
||||||
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
||||||
{
|
{
|
||||||
|
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
||||||
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
||||||
#endif
|
#endif
|
||||||
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
inst::ui::setInstBarPerc((double)installProgress);
|
inst::ui::setInstBarPerc((double)installProgress);
|
||||||
}
|
}
|
||||||
inst::ui::setInstBarPerc(100);
|
inst::ui::setInstBarPerc(100);
|
||||||
|
|
|
@ -99,7 +99,7 @@ namespace tin::install::xci
|
||||||
{
|
{
|
||||||
tin::install::NcaHeader header;
|
tin::install::NcaHeader header;
|
||||||
u64 hfs0Offset = m_xci->GetDataOffset() + fileEntry->dataOffset;
|
u64 hfs0Offset = m_xci->GetDataOffset() + fileEntry->dataOffset;
|
||||||
m_xci->BufferData(&header, hfs0Offset, 0xc00);
|
m_xci->BufferData(&header, hfs0Offset, sizeof(tin::install::NcaHeader));
|
||||||
|
|
||||||
Crypto::AesXtr decryptor(Crypto::Keys().headerKey, false);
|
Crypto::AesXtr decryptor(Crypto::Keys().headerKey, false);
|
||||||
decryptor.decrypt(&header, &header, sizeof(header), 0, 0x200);
|
decryptor.decrypt(&header, &header, sizeof(header), 0, 0x200);
|
||||||
|
|
|
@ -116,12 +116,12 @@ namespace tin::install::nsp
|
||||||
|
|
||||||
startTime = newTime;
|
startTime = newTime;
|
||||||
startSizeBuffered = newSizeBuffered;
|
startSizeBuffered = newSizeBuffered;
|
||||||
|
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||||
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
||||||
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
||||||
#endif
|
#endif
|
||||||
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
|
|
||||||
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
||||||
inst::ui::setInstBarPerc((double)downloadProgress);
|
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||||
|
@ -137,11 +137,11 @@ namespace tin::install::nsp
|
||||||
inst::ui::setInstBarPerc(0);
|
inst::ui::setInstBarPerc(0);
|
||||||
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
||||||
{
|
{
|
||||||
|
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
||||||
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
||||||
#endif
|
#endif
|
||||||
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
inst::ui::setInstBarPerc((double)installProgress);
|
inst::ui::setInstBarPerc((double)installProgress);
|
||||||
}
|
}
|
||||||
inst::ui::setInstBarPerc(100);
|
inst::ui::setInstBarPerc(100);
|
||||||
|
|
|
@ -116,12 +116,12 @@ namespace tin::install::xci
|
||||||
|
|
||||||
startTime = newTime;
|
startTime = newTime;
|
||||||
startSizeBuffered = newSizeBuffered;
|
startSizeBuffered = newSizeBuffered;
|
||||||
|
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
u64 totalSizeMB = bufferedPlaceholderWriter.GetTotalDataSize() / 1000000;
|
||||||
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
u64 downloadSizeMB = bufferedPlaceholderWriter.GetSizeBuffered() / 1000000;
|
||||||
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
LOG_DEBUG("> Download Progress: %lu/%lu MB (%i%s) (%.2f MB/s)\r", downloadSizeMB, totalSizeMB, downloadProgress, "%", speed);
|
||||||
#endif
|
#endif
|
||||||
int downloadProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeBuffered() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
|
|
||||||
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
inst::ui::setInstInfoText("Downloading " + inst::util::formatUrlString(ncaFileName) + " at " + std::to_string(speed).substr(0, std::to_string(speed).size()-4) + "MB/s");
|
||||||
inst::ui::setInstBarPerc((double)downloadProgress);
|
inst::ui::setInstBarPerc((double)downloadProgress);
|
||||||
|
@ -137,11 +137,11 @@ namespace tin::install::xci
|
||||||
inst::ui::setInstBarPerc(0);
|
inst::ui::setInstBarPerc(0);
|
||||||
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
while (!bufferedPlaceholderWriter.IsPlaceholderComplete())
|
||||||
{
|
{
|
||||||
|
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
||||||
#ifdef NXLINK_DEBUG
|
#ifdef NXLINK_DEBUG
|
||||||
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
u64 installSizeMB = bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / 1000000;
|
||||||
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
LOG_DEBUG("> Install Progress: %lu/%lu MB (%i%s)\r", installSizeMB, totalSizeMB, installProgress, "%");
|
||||||
#endif
|
#endif
|
||||||
int installProgress = (int)(((double)bufferedPlaceholderWriter.GetSizeWrittenToPlaceholder() / (double)bufferedPlaceholderWriter.GetTotalDataSize()) * 100.0);
|
|
||||||
inst::ui::setInstBarPerc((double)installProgress);
|
inst::ui::setInstBarPerc((double)installProgress);
|
||||||
}
|
}
|
||||||
inst::ui::setInstBarPerc(100);
|
inst::ui::setInstBarPerc(100);
|
||||||
|
|
Loading…
Reference in a new issue