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/path_util.h>
|
||||||
#include <common/scm_rev.h>
|
#include <common/scm_rev.h>
|
||||||
#include "checkUpdate.h"
|
#include "checkUpdate.h"
|
||||||
//#include "externals/minizip-ng/mz.h"
|
// #include "externals/minizip-ng/mz.h"
|
||||||
//#include "externals/minizip-ng/mz_strm.h"
|
// #include "externals/minizip-ng/mz_strm.h"
|
||||||
//#include "externals/minizip-ng/mz_strm_buf.h"
|
// #include "externals/minizip-ng/mz_strm_buf.h"
|
||||||
//#include "externals/minizip-ng/mz_strm_mem.h"
|
// #include "externals/minizip-ng/mz_strm_mem.h"
|
||||||
//#include "externals/minizip-ng/mz_strm_os.h"
|
// #include "externals/minizip-ng/mz_strm_os.h"
|
||||||
//#include "externals/minizip-ng/mz_zip.h"
|
// #include "externals/minizip-ng/mz_zip.h"
|
||||||
|
|
||||||
using namespace Common::FS;
|
using namespace Common::FS;
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
@ -172,32 +172,35 @@ void CheckUpdate::DownloadAndInstallUpdate(const QString& url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CheckUpdate::Unzip() {
|
void CheckUpdate::Unzip() {
|
||||||
//QString userPath =
|
// QString userPath =
|
||||||
// QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::UserDir).string());
|
// QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::UserDir).string());
|
||||||
//QString tempDirPath = userPath + "/temp_download_update";
|
// QString tempDirPath = userPath + "/temp_download_update";
|
||||||
//QString zipFilePath = tempDirPath + "/temp_download_update.zip";
|
// QString zipFilePath = tempDirPath + "/temp_download_update.zip";
|
||||||
|
|
||||||
//if (!fs::exists(zipFilePath.toStdString())) {
|
// if (!fs::exists(zipFilePath.toStdString())) {
|
||||||
// QMessageBox::warning(this, tr("Error"),
|
// QMessageBox::warning(this, tr("Error"),
|
||||||
// QString(tr("Arquivo zip não encontrado:") + "\n%1").arg(zipFilePath));
|
// QString(tr("Arquivo zip não encontrado:") +
|
||||||
// return;
|
// "\n%1").arg(zipFilePath));
|
||||||
//}
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
//void* zip_reader = NULL;
|
// void* zip_reader = NULL;
|
||||||
//void* stream = NULL;
|
// void* stream = NULL;
|
||||||
|
|
||||||
//mz_stream_os_create();
|
// mz_stream_os_create();
|
||||||
//if (mz_stream_os_open(stream, zipFilePath.toStdString().c_str(), MZ_OPEN_MODE_READ) != MZ_OK) {
|
// if (mz_stream_os_open(stream, zipFilePath.toStdString().c_str(), MZ_OPEN_MODE_READ) != MZ_OK)
|
||||||
|
// {
|
||||||
|
|
||||||
// QMessageBox::warning(this, tr("Error"),
|
// 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);
|
// mz_stream_os_delete(&stream);
|
||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//// Criar o leitor do ZIP
|
//// Criar o leitor do ZIP
|
||||||
//mz_zip_create();
|
// mz_zip_create();
|
||||||
//if (mz_zip_open(zip_reader, stream, MZ_OPEN_MODE_READ) != MZ_OK) {
|
// if (mz_zip_open(zip_reader, stream, MZ_OPEN_MODE_READ) != MZ_OK) {
|
||||||
|
|
||||||
// QMessageBox::warning(
|
// QMessageBox::warning(
|
||||||
// this, tr("Error"),
|
// this, tr("Error"),
|
||||||
@ -209,15 +212,15 @@ void CheckUpdate::Unzip() {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//// Passa por (arquivo ou diretório) no arquivo zip
|
//// 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;
|
// mz_zip_file* file_info = nullptr;
|
||||||
// if (mz_zip_entry_get_info(zip_reader, &file_info) != MZ_OK) {
|
// if (mz_zip_entry_get_info(zip_reader, &file_info) != MZ_OK) {
|
||||||
// QMessageBox::warning(
|
// QMessageBox::warning(
|
||||||
// this, tr("Error"),
|
// this, tr("Error"),
|
||||||
// QString(tr("Erro ao obter informações da entrada no zip.") + "\n%1")
|
// QString(tr("Erro ao obter informações da entrada no zip.") + "\n%1")
|
||||||
// .arg(zipFilePath));
|
// .arg(zipFilePath));
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// QString caminho_arquivo = tempDirPath + "/" + file_info->filename;
|
// QString caminho_arquivo = tempDirPath + "/" + file_info->filename;
|
||||||
|
|
||||||
@ -236,7 +239,8 @@ void CheckUpdate::Unzip() {
|
|||||||
|
|
||||||
// QMessageBox::warning(
|
// QMessageBox::warning(
|
||||||
// this, tr("Error"),
|
// 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);
|
// mz_zip_entry_close(zip_reader);
|
||||||
// continue;
|
// continue;
|
||||||
@ -258,13 +262,13 @@ void CheckUpdate::Unzip() {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//// Fechar o arquivo zip
|
//// Fechar o arquivo zip
|
||||||
//mz_zip_close(zip_reader);
|
// mz_zip_close(zip_reader);
|
||||||
//mz_zip_delete(&zip_reader);
|
// mz_zip_delete(&zip_reader);
|
||||||
//mz_stream_os_close(stream);
|
// mz_stream_os_close(stream);
|
||||||
//mz_stream_os_delete(&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));
|
// QString(tr("Descompactação concluída em:") + "\n%1").arg(tempDirPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Criar e executar o arquivo batch para atualizar
|
//// Criar e executar o arquivo batch para atualizar
|
||||||
|
Loading…
Reference in New Issue
Block a user