mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 16:02:26 +00:00
clang
This commit is contained in:
parent
875363a8da
commit
ab7aaf0524
@ -21,12 +21,12 @@
|
||||
#include <common/path_util.h>
|
||||
#include <common/scm_rev.h>
|
||||
#include "checkUpdate.h"
|
||||
//#include "externals/minizip-ng/mz.h"
|
||||
//#include "externals/minizip-ng/mz_strm.h"
|
||||
//#include "externals/minizip-ng/mz_strm_buf.h"
|
||||
//#include "externals/minizip-ng/mz_strm_mem.h"
|
||||
//#include "externals/minizip-ng/mz_strm_os.h"
|
||||
//#include "externals/minizip-ng/mz_zip.h"
|
||||
// #include "externals/minizip-ng/mz.h"
|
||||
// #include "externals/minizip-ng/mz_strm.h"
|
||||
// #include "externals/minizip-ng/mz_strm_buf.h"
|
||||
// #include "externals/minizip-ng/mz_strm_mem.h"
|
||||
// #include "externals/minizip-ng/mz_strm_os.h"
|
||||
// #include "externals/minizip-ng/mz_zip.h"
|
||||
|
||||
using namespace Common::FS;
|
||||
namespace fs = std::filesystem;
|
||||
@ -172,32 +172,35 @@ void CheckUpdate::DownloadAndInstallUpdate(const QString& url) {
|
||||
}
|
||||
|
||||
void CheckUpdate::Unzip() {
|
||||
//QString userPath =
|
||||
// QString userPath =
|
||||
// QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::UserDir).string());
|
||||
//QString tempDirPath = userPath + "/temp_download_update";
|
||||
//QString zipFilePath = tempDirPath + "/temp_download_update.zip";
|
||||
// QString tempDirPath = userPath + "/temp_download_update";
|
||||
// QString zipFilePath = tempDirPath + "/temp_download_update.zip";
|
||||
|
||||
//if (!fs::exists(zipFilePath.toStdString())) {
|
||||
// if (!fs::exists(zipFilePath.toStdString())) {
|
||||
// QMessageBox::warning(this, tr("Error"),
|
||||
// QString(tr("Arquivo zip não encontrado:") + "\n%1").arg(zipFilePath));
|
||||
// QString(tr("Arquivo zip não encontrado:") +
|
||||
// "\n%1").arg(zipFilePath));
|
||||
// return;
|
||||
//}
|
||||
// }
|
||||
|
||||
//void* zip_reader = NULL;
|
||||
//void* stream = NULL;
|
||||
// void* zip_reader = NULL;
|
||||
// void* stream = NULL;
|
||||
|
||||
//mz_stream_os_create();
|
||||
//if (mz_stream_os_open(stream, zipFilePath.toStdString().c_str(), MZ_OPEN_MODE_READ) != MZ_OK) {
|
||||
// mz_stream_os_create();
|
||||
// if (mz_stream_os_open(stream, zipFilePath.toStdString().c_str(), MZ_OPEN_MODE_READ) != MZ_OK)
|
||||
// {
|
||||
|
||||
// QMessageBox::warning(this, tr("Error"),
|
||||
// QString(tr("Erro ao abrir o arquivo zip") + "\n%1").arg(zipFilePath));
|
||||
// QString(tr("Erro ao abrir o arquivo zip") +
|
||||
// "\n%1").arg(zipFilePath));
|
||||
// mz_stream_os_delete(&stream);
|
||||
// return;
|
||||
//}
|
||||
|
||||
//// Criar o leitor do ZIP
|
||||
//mz_zip_create();
|
||||
//if (mz_zip_open(zip_reader, stream, MZ_OPEN_MODE_READ) != MZ_OK) {
|
||||
// mz_zip_create();
|
||||
// if (mz_zip_open(zip_reader, stream, MZ_OPEN_MODE_READ) != MZ_OK) {
|
||||
|
||||
// QMessageBox::warning(
|
||||
// this, tr("Error"),
|
||||
@ -209,7 +212,7 @@ void CheckUpdate::Unzip() {
|
||||
//}
|
||||
|
||||
//// Passa por (arquivo ou diretório) no arquivo zip
|
||||
//while (mz_zip_goto_next_entry(zip_reader) == MZ_OK) {
|
||||
// while (mz_zip_goto_next_entry(zip_reader) == MZ_OK) {
|
||||
// mz_zip_file* file_info = nullptr;
|
||||
// if (mz_zip_entry_get_info(zip_reader, &file_info) != MZ_OK) {
|
||||
// QMessageBox::warning(
|
||||
@ -236,7 +239,8 @@ void CheckUpdate::Unzip() {
|
||||
|
||||
// QMessageBox::warning(
|
||||
// this, tr("Error"),
|
||||
// QString(tr("Erro ao abrir o arquivo de saída:") + "\n%1").arg(caminho_arquivo));
|
||||
// QString(tr("Erro ao abrir o arquivo de saída:") +
|
||||
// "\n%1").arg(caminho_arquivo));
|
||||
|
||||
// mz_zip_entry_close(zip_reader);
|
||||
// continue;
|
||||
@ -258,12 +262,12 @@ void CheckUpdate::Unzip() {
|
||||
//}
|
||||
|
||||
//// Fechar o arquivo zip
|
||||
//mz_zip_close(zip_reader);
|
||||
//mz_zip_delete(&zip_reader);
|
||||
//mz_stream_os_close(stream);
|
||||
//mz_stream_os_delete(&stream);
|
||||
// mz_zip_close(zip_reader);
|
||||
// mz_zip_delete(&zip_reader);
|
||||
// mz_stream_os_close(stream);
|
||||
// mz_stream_os_delete(&stream);
|
||||
|
||||
//QMessageBox::warning(this, tr("Error"),
|
||||
// QMessageBox::warning(this, tr("Error"),
|
||||
// QString(tr("Descompactação concluída em:") + "\n%1").arg(tempDirPath));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user