|
|
|
@ -95,10 +95,11 @@ function startServerProcess(owner, repo) {
|
|
|
|
let serverProcess
|
|
|
|
let serverProcess
|
|
|
|
if (isDevelopment) {
|
|
|
|
if (isDevelopment) {
|
|
|
|
let args = ["--server", game_dir]
|
|
|
|
let args = ["--server", game_dir]
|
|
|
|
let executable = path.join(game_dir, ".lake", "packages", "GameServer", "server", ".lake", "build", "bin", "gameserver")
|
|
|
|
let binDir = path.join(game_dir, ".lake", "packages", "GameServer", "server", ".lake", "build", "bin")
|
|
|
|
if (fs.existsSync(executable)) {
|
|
|
|
// Note: `cwd` is important to be the `bin` directory as `Watchdog` calls `./gameserver` again
|
|
|
|
|
|
|
|
if (fs.existsSync(binDir)) {
|
|
|
|
// Try to use the game's own copy of `gameserver`.
|
|
|
|
// Try to use the game's own copy of `gameserver`.
|
|
|
|
serverProcess = cp.spawn(executable, args, { cwd: game_dir })
|
|
|
|
serverProcess = cp.spawn("./gameserver", args, { cwd: binDir })
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// If the game is built with `-Klean4game.local` there is no copy in the lake packages.
|
|
|
|
// If the game is built with `-Klean4game.local` there is no copy in the lake packages.
|
|
|
|
serverProcess = cp.spawn("./gameserver", args,
|
|
|
|
serverProcess = cp.spawn("./gameserver", args,
|
|
|
|
|