From 29aa0c1722f352f9a254cb073a31daf3eb1981f7 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 10:23:49 +0200 Subject: [PATCH 1/5] Changed: Restart installed Installer intead of current one --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index 8d5f9b9da..31fbf12e3 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -263,7 +263,7 @@ int main(int argc, char *argv[]) { #if defined(Q_OS_WIN) && !defined(_DEBUG) // restart Installer, so it could be copied in TEMP and allowed to update itself - if (QProcess::startDetached(QApplication::applicationFilePath())) return 0; + if (QProcess::startDetached(config.getInstallerInstalledFilePath())) return 0; #endif } } From 508a6723a239f649907a4454ae8d9f99533ffa51 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 10:24:10 +0200 Subject: [PATCH 2/5] Changed: Use getInstallerCurrentDirPath() instead of QApplication::applicationDirPath() --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index 31fbf12e3..4982fcad8 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation); // check if launched from TEMP directory - if (step == Done && !QApplication::applicationDirPath().startsWith(tempPath)) + if (step == Done && !config.getInstallerCurrentDirPath().startsWith(tempPath)) { // try to delete all temporary installers QDir tempDir(tempPath); From bf8d9aef1241880d49fcc35238aa3c73ee4ee178 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 10:25:31 +0200 Subject: [PATCH 3/5] Changed: Check written bytes at each step and at the end --HG-- branch : develop --- .../tools/client/ryzom_installer/src/filesextractor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp index e038d93bc..bdc092d04 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp @@ -448,8 +448,6 @@ bool CFilesExtractor::extract7z() // errors only occur when returned size is -1 if (currentProcessedSize < 0) { - error = QApplication::tr("Unable to write output file %1").arg(destPath); - res = SZ_ERROR_FAIL; break; } @@ -458,6 +456,13 @@ bool CFilesExtractor::extract7z() } while (currentSizeToProcess > 0); + if (offset != outSizeProcessed) + { + error = QApplication::tr("Unable to write output file %1 (%2 bytes written but expecting %3 bytes)").arg(destPath).arg(offset).arg(outSizeProcessed); + res = SZ_ERROR_FAIL; + break; + } + outFile.close(); totalUncompressed += SzArEx_GetFileSize(&db, i); From 6801bf34d42aa69531b457db365f9834b3559963 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 10:26:41 +0200 Subject: [PATCH 4/5] Fixed: Special case under Windows when Installer is run from TEMP directory --HG-- branch : develop --- .../client/ryzom_installer/src/configfile.cpp | 14 +++++++++++++- 1 file changed, 13 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 a069331f3..babad9397 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/configfile.cpp @@ -983,7 +983,19 @@ OperationStep CConfigFile::getInstallNextStep() const case -1: return LaunchInstalledInstaller; // continue only if 0 and launched Installer is the installed one - default: if (getInstallerCurrentFilePath() != getInstallerInstalledFilePath() && QFile::exists(getInstallerInstalledFilePath())) return LaunchInstalledInstaller; + default: + { +#ifdef Q_OS_WIN32 + QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation); + + // check if launched from TEMP directory + bool rightPath = getInstallerCurrentDirPath().startsWith(tempPath); +#else + bool rightPath = false; +#endif + + if (!rightPath && getInstallerCurrentFilePath() != getInstallerInstalledFilePath() && QFile::exists(getInstallerInstalledFilePath())) return LaunchInstalledInstaller; + } } // no default profile From 94a3626cd382894b575129ce832f48586e2a1b70 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 18 Oct 2016 10:27:09 +0200 Subject: [PATCH 5/5] Changed: Minor change --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.cpp b/code/nel/src/3d/driver/opengl/driver_opengl.cpp index ac70a7cd7..3f2dca9b6 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl.cpp @@ -622,7 +622,7 @@ bool CDriverGL::setupDisplay() checkForPerPixelLightingSupport(); #ifndef USE_OPENGLES - // if EXTVertexShader is used, bind the standard GL arrays, and allocate constant + // if EXTVertexShader is used, bind the standard GL arrays, and allocate constant if (!_Extensions.NVVertexProgram && !_Extensions.ARBVertexProgram && _Extensions.EXTVertexShader) { _EVSPositionHandle = nglBindParameterEXT(GL_CURRENT_VERTEX_EXT);