kopia lustrzana https://github.com/c9/core
fix local version
rodzic
0a495532a6
commit
dc91171b1a
|
@ -1,21 +1,19 @@
|
|||
var fs = require("fs");
|
||||
var join = require("path").join;
|
||||
var proc = require("child_process");
|
||||
var path = require("path");
|
||||
require("amd-loader");
|
||||
|
||||
var fs = require("fs");
|
||||
var join = require("path").join;
|
||||
var proc = require("child_process");
|
||||
var path = require("path");
|
||||
|
||||
// set up env variables for windows
|
||||
if (process.platform == "win32") {
|
||||
// HOME usually isn't defined on windows
|
||||
if (!process.env.HOME)
|
||||
process.env.HOME = process.env.HOMEDRIVE + process.env.HOMEPATH;
|
||||
// add cloud9 cygwin to path
|
||||
var msysBin = join(process.env.HOME, ".c9", "msys/bin");
|
||||
process.env.Path = msysBin + ";" + process.env.path;
|
||||
process.env.C9_BASH_BIN = msysBin + "/bash.exe";
|
||||
process.env.CYGWIN = "nodosfilewarning " + (process.env.CYGWIN || "");
|
||||
process.env.CHERE_INVOKING = 1; // prevent cygwin from changing bash path
|
||||
}
|
||||
|
||||
// HOME usually isn't defined on windows, so weload settings/standalone which adds it
|
||||
var localSettings = require(join(__dirname, "../settings/local.js"))({ revision: " " }, null);
|
||||
|
||||
// Ports on which we'd like to run preview (see http://saucelabs.com/docs/connect#localhost)
|
||||
var SAFE_PORTS = [2222, 2310, 3000, 3001, 3030, 3210, 3333, 4000, 4001,
|
||||
4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555,
|
||||
|
@ -252,7 +250,6 @@ var server = {
|
|||
getPlugins : function(options, cb, restoreWindow) {
|
||||
var windowConfig = options.windowConfig || {};
|
||||
var configPath = join(__dirname, "../configs/ide/default-local.js");
|
||||
var settingsPath = join(__dirname, "../settings/local.js");
|
||||
var themeDir = join(__dirname, "../build/standalone/skin/" +
|
||||
(windowConfig.isRemote ? "full" : "default-local"));
|
||||
|
||||
|
@ -370,7 +367,7 @@ var server = {
|
|||
loadTheme(themeName, cb);
|
||||
}
|
||||
|
||||
var settings = require(settingsPath)(null, null, settingDir);
|
||||
var settings = localSettings;
|
||||
settings.packed = options.packed;
|
||||
|
||||
settings.vfsServers = options.vfsServers;
|
||||
|
|
|
@ -1,26 +1,9 @@
|
|||
module.exports = function(manifest, installPath, settingDir) {
|
||||
module.exports = function(manifest, installPath) {
|
||||
var path = require("path");
|
||||
var fs = require("fs");
|
||||
|
||||
if (typeof installPath != "string") {
|
||||
installPath = process.platform == "darwin" && false // disabled for sdk
|
||||
? "/Library/Application Support/Cloud9"
|
||||
: path.join(process.env.HOME, ".c9");
|
||||
}
|
||||
|
||||
var config = require("./standalone")(manifest, installPath);
|
||||
|
||||
// Support legacy installations
|
||||
if (!config.settingDir) {
|
||||
if (settingDir)
|
||||
config.settingDir = settingDir;
|
||||
else {
|
||||
config.settingDir = installPath;
|
||||
if (installPath === "/Library/Application Support/Cloud9")
|
||||
config.settingDir = path.join(process.env.HOME, installPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
config.local = true;
|
||||
config.standalone = false;
|
||||
config.host = "localhost";
|
||||
|
@ -47,13 +30,6 @@ module.exports = function(manifest, installPath, settingDir) {
|
|||
// config.update.port = "8888"
|
||||
// config.update.host = "http"
|
||||
|
||||
// config.nodeBin = [process.platform == "win32"
|
||||
// ? path.join(process.execPath, "..\\node.exe")
|
||||
// : path.join(installPath, "node/bin/node")];
|
||||
config.bashBin = process.platform == "win32"
|
||||
? process.env.C9_BASH_BIN || "C:\\cygwin\\bin\\bash.exe"
|
||||
: "/bin/bash";
|
||||
|
||||
config.raygun.client.apiKey = "sraXwWUvvI6TQT6d45u4bw==";
|
||||
config.raygun.server.apiKey = "sraXwWUvvI6TQT6d45u4bw==";
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue