mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:36:45 +02:00
assume that production console is an app bundle on OS X
This commit is contained in:
parent
41a58f7ef4
commit
3e3831dbdd
1 changed files with 9 additions and 5 deletions
|
@ -33,17 +33,21 @@ exports.searchPaths = function(name, binaryType) {
|
||||||
path.join(path.dirname(process.execPath), name + extension)
|
path.join(path.dirname(process.execPath), name + extension)
|
||||||
];
|
];
|
||||||
|
|
||||||
// check if we're inside an app bundle on OS X
|
// assume we're inside an app bundle on OS X
|
||||||
if (process.platform == "darwin") {
|
if (process.platform == "darwin") {
|
||||||
var contentPath = ".app/Contents/";
|
var contentPath = ".app/Contents/";
|
||||||
var contentEndIndex = __dirname.indexOf(contentPath);
|
var contentEndIndex = __dirname.indexOf(contentPath);
|
||||||
|
|
||||||
if (contentEndIndex != -1) {
|
if (contentEndIndex != -1) {
|
||||||
// this is an app bundle, check in Contents/MacOS for the binaries
|
// this is an app bundle
|
||||||
var appPath = __dirname.substring(0, contentEndIndex);
|
var appPath = __dirname.substring(0, contentEndIndex) + ".app";
|
||||||
appPath += ".app/Contents/MacOS/Components.app/Contents/MacOS/";
|
|
||||||
|
|
||||||
paths.push(appPath + name + extension);
|
// check in Contents/MacOS for the binaries
|
||||||
|
var componentsPath = appPath + "/Contents/MacOS/Components.app/Contents/MacOS/";
|
||||||
|
paths.push(componentsPath + name + extension);
|
||||||
|
|
||||||
|
// check beside the app bundle for the binaries
|
||||||
|
paths.push(path.join(path.dirname(appPath), name + extension));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue