From 3484998775eff16c6777654649d91105be6c78cf Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Tue, 21 Jun 2016 16:54:23 +0530 Subject: [PATCH] Adding proper virtual environment path on windows. --- runtime/Server.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/runtime/Server.cpp b/runtime/Server.cpp index 410e1e2de..c9c0f8931 100644 --- a/runtime/Server.cpp +++ b/runtime/Server.cpp @@ -97,10 +97,10 @@ Server::Server(quint16 port) // end, so expert users can override the path, but we do not save it. // Build (and canonicalise) the virtual environment path - QFileInfo venvBinPath(app_dir + "/../venv"); - QFileInfo venvLibPath(app_dir + "/../venv/Lib"); - QFileInfo venvDLLsPath(app_dir + "/../venv/DLLs"); - QFileInfo venvSitePackagesPath(app_dir + "/../venv/Lib/site-packages"); + QFileInfo venvBinPath(app_dir + "/../pgAdmin 4/venv"); + QFileInfo venvLibPath(app_dir + "/../pgAdmin 4/venv/Lib"); + QFileInfo venvDLLsPath(app_dir + "/../pgAdmin 4/venv/DLLs"); + QFileInfo venvSitePackagesPath(app_dir + "/../pgAdmin 4/venv/Lib/site-packages"); // Prepend the bin directory to the path add_to_path(path_env, venvBinPath.canonicalFilePath(), true); @@ -173,8 +173,10 @@ bool Server::Init() paths.append("../web/"); // Linux source tree paths.append("../../web/"); // Windows source tree paths.append("../../../../web/"); // Mac source tree (in a dev env) -#ifdef Q_OS_MAC +#if definded(Q_OS_MAC) paths.append("../Resources/web/"); // Mac source tree (in a release app bundle) +#elif defined(Q_OS_WIN) + paths.append("../pgAdmin 4/web/"); // Mac source tree (in a release app bundle) #endif paths.append(settings.value("ApplicationPath").toString()); // System configured value paths.append(""); // Should be last!