Improve error handling in homebrew install slightly

This commit is contained in:
Henrik Rydgård 2023-12-20 18:25:21 +01:00
parent 28143697b6
commit 7fafc0d83b
45 changed files with 48 additions and 2 deletions

View File

@ -18,7 +18,7 @@ void NiceSizeFormat(uint64_t size, char *out, size_t bufSize) {
if (s == 0)
snprintf(out, bufSize, "%d B", (int)size);
else {
const char* sizes[] = { "B","KB","MB","GB","TB","PB","EB" };
static const char* const sizes[] = { "B","KB","MB","GB","TB","PB","EB" };
snprintf(out, bufSize, "%3.2f %s", f, sizes[s]);
}
}

View File

@ -542,7 +542,9 @@ bool GameManager::ExtractFile(struct zip *z, int file_index, const Path &outFile
delete[] buffer;
return true;
} else {
ERROR_LOG(HLE, "Failed to open file for writing");
auto iz = GetI18NCategory(I18NCat::INSTALLZIP);
g_OSD.Show(OSDType::MESSAGE_ERROR, iz->T("Installation failed"));
ERROR_LOG(HLE, "Failed to open file for writing: %s", outFilename.c_str());
return false;
}
}
@ -613,6 +615,7 @@ bool GameManager::InstallMemstickGame(struct zip *z, const Path &zipfile, const
continue;
if (!ExtractFile(z, i, outFilename, &bytesCopied, allBytes)) {
ERROR_LOG(HLE, "Bailing: Failed to extract file: %s -> %s", zippedName.c_str(), outFilename.c_str());
goto bail;
} else {
createdFiles.push_back(outFilename);

View File

@ -696,6 +696,7 @@ Delete ZIP file = ‎مسح الملف المضغوط
Install = ‎تثبيت
Install game from ZIP file? = ‎تثبيت اللعبة من الملف المضغوط ?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = ‎مثبت!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Изтрий ZIP архива
Install = Инсталирай
Install game from ZIP file? = Инсталирай игра от ZIP архив?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Инсталирано!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Smazat soubor ZIP
Install = Nainstalovat
Install game from ZIP file? = Instalovat hru ze souboru ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Instalováno!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Slet ZIP fil
Install = Installer
Install game from ZIP file? = Installer spil fra ZIP fil?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installeret!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = ZIP Datei löschen
Install = Installieren
Install game from ZIP file? = Spiel aus ZIP Datei installieren?
Install textures from ZIP file? = Texturen von ZIP Datei installieren?
Installation failed = Installation failed
Installed! = Installiert!
Texture pack doesn't support install = Texturpack unterstützt keine Installation
Zip archive corrupt = ZIP Archiv beschädigt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -712,6 +712,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Borrar archivo ZIP
Install = Instalar
Install game from ZIP file? = ¿Instalar juego desde archivo ZIP?
Install textures from ZIP file? = ¿Instalar texturas desde archivo ZIP?
Installation failed = Installation failed
Installed! = ¡Instalado!
Texture pack doesn't support install = El paquete de texturas no es compatible con la instalación.
Zip archive corrupt = El archivo ZIP está dañado.

View File

@ -688,6 +688,7 @@ Delete ZIP file = Borrar archivo ZIP
Install = Instalar
Install game from ZIP file? = ¿Instalar juego desde un archivo ZIP?
Install textures from ZIP file? = ¿Instalar texturas desde un archivo ZIP?
Installation failed = Installation failed
Installed! = ¡Instalado!
Texture pack doesn't support install = El paquete de texturas no es compatible con la instalación.
Zip archive corrupt = El archivo ZIP está dañado.

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Poista ZIP-tiedosto
Install = Asenna
Install game from ZIP file? = Asenna peli ZIP-tiedostosta?
Install textures from ZIP file? = Asenna tekstuureja ZIP-tiedostosta?
Installation failed = Installation failed
Installed! = Asenettu!
Texture pack doesn't support install = Tekstuuripakkaus ei tue asennusta
Zip archive corrupt = ZIP-arkisto on korruptoitunut

View File

@ -688,6 +688,7 @@ Delete ZIP file = Supprimer le fichier ZIP
Install = Installer
Install game from ZIP file? = Installer le jeu depuis le fichier ZIP ?
Install textures from ZIP file? = Installer les textures depuis le fichier ZIP ?
Installation failed = Installation failed
Installed! = Installé !
Texture pack doesn't support install = Le pack de textures ne peut pas être installé
Zip archive corrupt = Archive ZIP corrompue

View File

@ -688,6 +688,7 @@ Delete ZIP file = Borrar arquivo ZIP
Install = Instalar
Install game from ZIP file? = Instalar xogo dende un arquivo ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = ¡Instalado!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Διαγραφή αρχείου ZIP
Install = Εγκατάσταση
Install game from ZIP file? = Εγκατάσταση παιχνιδιού από το αρχείο ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Εγκαταστάθηκε!
Texture pack doesn't support install = Το πακέτο υφής δεν υποστηρίζει την εγκατάσταση
Zip archive corrupt = Το αρχείο ZIP είναι κατεστραμμένο

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Izbriši ZIP datoteku
Install = Instaliraj
Install game from ZIP file? = Instaliraj igru iz ZIP datoteke?
Install textures from ZIP file? = Instaliraj teksture iz ZIP datoteke?
Installation failed = Installation failed
Installed! = Instalirano!
Texture pack doesn't support install = Texture pack ne podržava instaliranje
Zip archive corrupt = Koruptana ZIP arhiva

View File

@ -688,6 +688,7 @@ Delete ZIP file = ZIP fájl törlése
Install = Telepítés
Install game from ZIP file? = Játék telepítése ZIP fájlból?
Install textures from ZIP file? = Textúrák telepítése ZIP fájlból?
Installation failed = Installation failed
Installed! = Telepítve!
Texture pack doesn't support install = A textúra csomag nem támogatja a telepítést
Zip archive corrupt = A ZIP archívum sérült

View File

@ -688,6 +688,7 @@ Delete ZIP file = Hapus berkas ZIP
Install = Pasang
Install game from ZIP file? = Pasang permainan dari berkas ZIP?
Install textures from ZIP file? = Pasang tekstur dari file ZIP?
Installation failed = Installation failed
Installed! = Terpasang!
Texture pack doesn't support install = Paket tekstur tidak mendukung pemasangan
Zip archive corrupt = Arzip ZIP rusak

View File

@ -689,6 +689,7 @@ Delete ZIP file = Elimina file ZIP
Install = Installa
Install game from ZIP file? = Installare il gioco dal file ZIP?
Install textures from ZIP file? = Installare le texture dal file ZIP?
Installation failed = Installation failed
Installed! = Installato!
Texture pack doesn't support install = Il texture pack non supporta l'installazione
Zip archive corrupt = Archivio ZIP corrotto

View File

@ -688,6 +688,7 @@ Delete ZIP file = ZIPファイルを削除
Install = インストールする
Install game from ZIP file? = ZIPファイルからゲームをインストールしますか
Install textures from ZIP file? = ZIPファイルからテクスチャをインストールしますか
Installation failed = Installation failed
Installed! = インストールしました
Texture pack doesn't support install = テクスチャパックがインストールをサポートしていません
Zip archive corrupt = ZIPアーカイブが破損しています

View File

@ -688,6 +688,7 @@ Delete ZIP file = Mbusek berkas ZIP
Install = Nginstal
Install game from ZIP file? = Nginstal dolanan saka berkas ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Keinstal!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = ZIP 파일 삭제
Install = 설치
Install game from ZIP file? = ZIP 파일에서 게임을 설치하겠습니까?
Install textures from ZIP file? = ZIP 파일에서 텍스처를 설치하겠습니까?
Installation failed = Installation failed
Installed! = 설치되었습니다!
Texture pack doesn't support install = 텍스처 팩은 설치를 지원하지 않습니다.
Zip archive corrupt = ZIP 아카이브가 손상되었습니다.

View File

@ -688,6 +688,7 @@ Delete ZIP file = ລຶບໄຟລ໌ ZIP
Install = ຕິດຕັ້ງ
Install game from ZIP file? = ຕິດຕັ້ງເກມຈາກໄຟລ໌ ZIP ຫຼືບໍ່?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = ຕິດຕັ້ງແລ້ວ!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Ištrinti ZIP failą
Install = Instaliuoti
Install game from ZIP file? = Instaliuoti žaidimą iš ZIP failo?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Instaliuota!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Padam fail ZIP
Install = Pasang
Install game from ZIP file? = Pasang permainan dari fail ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Dipasang!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = ZIP-bestand wissen
Install = Installeren
Install game from ZIP file? = Game installeren vanuit het ZIP-bestand?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installatie voltooid!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Delete ZIP file
Install = Install
Install game from ZIP file? = Install game from ZIP file?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -693,6 +693,7 @@ Delete ZIP file = Usuń plik ZIP
Install = Zainstaluj
Install game from ZIP file? = Zainstalować grę z pliku ZIP?
Install textures from ZIP file? = Czy zainstalować teksturę z archiwum ZIP?
Installation failed = Installation failed
Installed! = Zainstalowano!
Texture pack doesn't support install = Paczka tekstur nie obsługuje instalacji
Zip archive corrupt = Niepoprawne archiwum ZIP

View File

@ -712,6 +712,7 @@ Delete ZIP file = Apagar arquivo ZIP
Install = Instalar
Install game from ZIP file? = Instalar o jogo do arquivo ZIP?
Install textures from ZIP file? = Instalar as texturas do arquivo ZIP?
Installation failed = Installation failed
Installed! = Instalado!
Texture pack doesn't support install = O pacote das texturas não suporta a instalação
Zip archive corrupt = Arquivo ZIP corrompido

View File

@ -712,6 +712,7 @@ Delete ZIP file = Eliminar ficheiro .zip
Install = Instalar
Install game from ZIP file? = Instalar o jogo do ficheiro .zip?
Install textures from ZIP file? = Instalar as texturas do ficheiro .zip?
Installation failed = Installation failed
Installed! = Instalado!
Texture pack doesn't support install = O pacote de texturas não é compatível com a instalação.
Zip archive corrupt = Ficheiro .zip compactado corrompido.

View File

@ -689,6 +689,7 @@ Delete ZIP file = Șterge fișier ZIP
Install = Instalează
Install game from ZIP file? = Instalează joc din fișier ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Instalat!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Удалить ZIP файл
Install = Установить
Install game from ZIP file? = Установить игру из ZIP-файла?
Install textures from ZIP file? = Установить текстуры из ZIP-файла?
Installation failed = Installation failed
Installed! = Установлено!
Texture pack doesn't support install = Набор текстур не поддерживает установку
Zip archive corrupt = ZIP-архив повреждён

View File

@ -689,6 +689,7 @@ Delete ZIP file = Ta bort ZIP-fil
Install = Installera
Install game from ZIP file? = Installera spel från ZIP-fil?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installerad!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = Burahin ang ZIP File
Install = Install
Install game from ZIP file? = I-install ang laro mula sa ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Installed!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = ลบไฟล์ ZIP
Install = ติดตั้ง
Install game from ZIP file? = ต้องการติดตั้งเกมจากไฟล์ ZIP เลยหรือไม่?
Install textures from ZIP file? = ต้องการติดตั้งเท็คเจอร์จากไฟล์ ZIP เลยหรือไม่?
Installation failed = Installation failed
Installed! = ติดตั้งเสร็จสิ้น!
Texture pack doesn't support install = เท็คเจอร์แพ็คนี้ไม่รองรับการติดตั้ง
Zip archive corrupt = ไฟล์ ZIP ไม่สมบูรณ์ (เสียจ้า)

View File

@ -690,6 +690,7 @@ Delete ZIP file = Zip dosyasını sil
Install = Yükle
Install game from ZIP file? = Zip dosyasından oyun yüklensin mi?
Install textures from ZIP file? = Zip dosyasından dokular yüklensin mi?
Installation failed = Installation failed
Installed! = Yüklendi!
Texture pack doesn't support install = Doku paketi yüklemeyi desteklemiyor
Zip archive corrupt = ZIP arşivi bozuk

View File

@ -688,6 +688,7 @@ Delete ZIP file = Видалити ZIP файл
Install = Встановити
Install game from ZIP file? = Встановити гру з ZIP-файлу?
Install textures from ZIP file? = Встановити текстури з ZIP-файлу?
Installation failed = Installation failed
Installed! = Встановлено!
Texture pack doesn't support install = Пакет текстур не підтримує встановлення
Zip archive corrupt = ZIP архів пошкоджено

View File

@ -688,6 +688,7 @@ Delete ZIP file = Xóa file ZIP
Install = Cài đặt
Install game from ZIP file? = Cài đặt trò chơi từ file ZIP?
Install textures from ZIP file? = Install textures from ZIP file?
Installation failed = Installation failed
Installed! = Đã cài xong!
Texture pack doesn't support install = Texture pack doesn't support install
Zip archive corrupt = ZIP archive corrupt

View File

@ -688,6 +688,7 @@ Delete ZIP file = 删除ZIP文件
Install = 安装
Install game from ZIP file? = 从ZIP文件安装游戏
Install textures from ZIP file? = 从ZIP文件安装纹理包
Installation failed = Installation failed
Installed! = 安装完成!
Texture pack doesn't support install = 此纹理包不支持安装
Zip archive corrupt = ZIP文档损坏

View File

@ -688,6 +688,7 @@ Delete ZIP file = 刪除 ZIP 檔案
Install = 安裝
Install game from ZIP file? = 從 ZIP 檔案安裝遊戲?
Install textures from ZIP file? = 從 ZIP 檔案安裝紋理?
Installation failed = Installation failed
Installed! = 已安裝!
Texture pack doesn't support install = 紋理套件不支援安裝
Zip archive corrupt = ZIP 封存損毀