From 8caac6363f02982d3708da708d06e489e3eaa80d Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 9 Oct 2016 19:50:06 +0200 Subject: [PATCH 1/2] Changed: Support special bundle structure for OS X client --HG-- branch : develop --- .../tools/client/ryzom_installer/src/configfile.cpp | 10 ++++++++++ .../client/ryzom_installer/src/operationdialog.cpp | 9 ++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp index 06c525053..1ec7364cc 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -593,6 +593,11 @@ bool CConfigFile::areRyzomDataInstalledIn(const QString &directory) const QDir dir(directory); +#ifdef Q_OS_MAC + // under OS X, data are in Ryzom.app/Contents/Resources + if (!dir.cd("Ryzom.app") || !dir.cd("Contents") || !dir.cd("Resources")) return false; +#endif + // directory doesn't exist if (!dir.exists()) return false; @@ -643,6 +648,11 @@ bool CConfigFile::isRyzomClientInstalledIn(const QString &directory) const { // client 3.0+ +#ifdef Q_OS_MAC + // under OS X, client_default.cfg is in Ryzom.app/Contents/Resources + if (!dir.cd("Ryzom.app") || !dir.cd("Contents") || !dir.cd("Resources")) return false; +#endif + // client_default.cfg doesn't exist if (!dir.exists("client_default.cfg")) return false; diff --git a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp index 9c84f46cf..4213bec73 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/operationdialog.cpp @@ -547,9 +547,16 @@ void COperationDialog::extractDownloadedData() m_currentOperation = tr("Extracting data required by server %1...").arg(server.name); + QString dest = server.getDirectory(); + +#ifdef Q_OS_MAC + // under OS X, data should be uncompressed in Ryzom.app/Contents/Resources + dest += "/Ryzom.app/Contents/Resources"; +#endif + CFilesExtractor extractor(this); extractor.setSourceFile(config->getInstallationDirectory() + "/" + server.dataDownloadFilename); - extractor.setDestinationDirectory(server.getDirectory()); + extractor.setDestinationDirectory(dest); if (extractor.exec()) { From 7b6a6945e575d59f74688ade062aed6f420f9df8 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 9 Oct 2016 19:50:35 +0200 Subject: [PATCH 2/2] Changed: Error 6 occurs when a 7z file is damaged and can't be uncompressed --HG-- branch : develop --- .../ryzom/tools/client/ryzom_installer/src/filesextractor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp index ab3c7d929..17319bf0e 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp @@ -467,6 +467,10 @@ bool CFilesExtractor::extract7z() error = QApplication::tr("7zip decoder doesn't support this archive"); break; + case SZ_ERROR_INPUT_EOF: + error = QApplication::tr("Errors in 7z file"); + break; + case SZ_ERROR_FAIL: // error already defined break;