diff --git a/server-console/src/modules/path-finder.js b/server-console/src/modules/path-finder.js index d4cb9aa277..1898db91ac 100644 --- a/server-console/src/modules/path-finder.js +++ b/server-console/src/modules/path-finder.js @@ -23,9 +23,10 @@ exports.searchPaths = function(name, binaryType, releaseType) { if (!releaseType) { // check in the developer build tree for binaries + var typeSpecificPath = (binaryType == "local-release" ? "Release/" : "Debug/") paths = [ devBasePath + name + extension, - devBasePath + (binaryType == "local-release" ? "Release/" : "Debug/") + name + extension + devBasePath + typeSpecificPath + name + extension ] } else { // check directly beside the binary @@ -33,6 +34,11 @@ exports.searchPaths = function(name, binaryType, releaseType) { path.join(path.dirname(process.execPath), name + extension) ]; + if (process.platform == "win32") { + // check a level back in case we're packaged on windows + paths.push(path.resolve(path.dirname(process.execPath), '../' + name + extension)) + } + // assume we're inside an app bundle on OS X if (process.platform == "darwin") { var contentPath = ".app/Contents/";