diff --git a/cli/cmds/add.js b/cli/cmds/add.js index d2adecd2..00e30220 100644 --- a/cli/cmds/add.js +++ b/cli/cmds/add.js @@ -36,7 +36,7 @@ var Promise = require('promise'); var add = function(args) { return new Promise(function(resolve, reject) { - var fullPath = args._.length > 1 ? path.resolve(args._[1]) : process.cwd(); + var fullPath = args._.length > 0 ? path.resolve(args._[0]) : process.cwd(); if (games.add(fullPath) === false) { reject(); } else { diff --git a/cli/cmds/download.js b/cli/cmds/download.js index f0aadddc..3aa76361 100644 --- a/cli/cmds/download.js +++ b/cli/cmds/download.js @@ -36,13 +36,13 @@ var utils = require('../utils'); var download = function(args) { return new Promise(function(resolve, reject) { - if (args._.length < 2) { + if (args._.length < 1) { utils.badArgs(module, "missing gameId"); reject(); return; } - if (args._.length > 2) { + if (args._.length > 1) { utils.badArgs(module, "too many arguments"); reject(); return; diff --git a/cli/cmds/init.js b/cli/cmds/init.js index f4d7d523..0cbcbe00 100644 --- a/cli/cmds/init.js +++ b/cli/cmds/init.js @@ -37,7 +37,7 @@ var utils = require('../utils'); var init = function(args) { return new Promise(function(resolve, reject) { - if (args._.length != 1) { + if (args._.length != 0) { utils.badArgs(module, "bad args"); reject(); } diff --git a/cli/cmds/install.js b/cli/cmds/install.js index 5ce6ac52..4532dd83 100644 --- a/cli/cmds/install.js +++ b/cli/cmds/install.js @@ -36,11 +36,11 @@ var utils = require('../utils'); var install = function(args) { return new Promise(function(resolve, reject) { - if (args._.length < 2) { + if (args._.length < 1) { utils.badArgs(module, "missing srcPath"); } - if (args._.length > 2) { + if (args._.length > 1) { utils.badArgs(module, "too many arguments"); } diff --git a/cli/cmds/make-release.js b/cli/cmds/make-release.js index 7d16ccdb..c4c3801d 100644 --- a/cli/cmds/make-release.js +++ b/cli/cmds/make-release.js @@ -36,13 +36,13 @@ var utils = require('../utils'); var makeRelease = function(args) { return new Promise(function(resolve, reject) { - if (args._.length < 2) { + if (args._.length < 1) { utils.badArgs(module, "missing dstPath"); reject(); return; } - if (args._.length > 2) { + if (args._.length > 1) { utils.badArgs(module, "too many arguments"); reject(); return; diff --git a/cli/cmds/publish.js b/cli/cmds/publish.js index 389c7288..f6720e80 100644 --- a/cli/cmds/publish.js +++ b/cli/cmds/publish.js @@ -49,7 +49,7 @@ var askPrompt = function(questions) { var publish = function(args) { return new Promise(function(resolve, reject) { - if (args._.length != 1) { + if (args._.length != 0) { utils.badArgs(module, "too many arguments"); reject(); return; diff --git a/cli/cmds/uninstall.js b/cli/cmds/uninstall.js index 19fdf875..dc85f8b7 100644 --- a/cli/cmds/uninstall.js +++ b/cli/cmds/uninstall.js @@ -36,13 +36,13 @@ var utils = require('../utils'); var uninstall = function(args) { return new Promise(function(resolve, reject) { - if (args._.length < 2) { + if (args._.length < 1) { utils.badArgs(module, "missing path or gameId"); reject(); return; } - if (args._.length > 2) { + if (args._.length > 1) { utils.badArgs(module, "too many arguments"); reject(); return; diff --git a/docs/api-versions.md b/docs/api-versions.md index 3a06c1c9..cef4ac2e 100644 --- a/docs/api-versions.md +++ b/docs/api-versions.md @@ -71,4 +71,12 @@ the correct version For a working example see [http://github.com/greggman/hft-simple-script](http://github.com/greggman/hft-simple-script) + * Fix for Unity Games on Windows + + You need to upgrade old Unity Games to the latest .dlls. + [Download the .dll here](https://github.com/greggman/hft-unity3d/releases) + You'll also need the latest version of happyFunTimes. At least verison 0.0.9. + [Download here](http://superhappyfuntimes.net/install) + + diff --git a/test/client/roundtrip-test.js b/test/client/roundtrip-test.js index 513210a6..50c7b64b 100644 --- a/test/client/roundtrip-test.js +++ b/test/client/roundtrip-test.js @@ -30,13 +30,13 @@ */ "use strict"; -var assert = require('assert'); -var path = require('path'); -var should = require('should'); -var testUtils = require('../../lib/test/test-utils'); -var TestWebSocketClient = require('../../lib/test/test-websocketclient'); -var TestGame = require('../../lib/test/test-game'); -var TestController = require('../../lib/test/test-controller'); +var assert = require('assert'); +var path = require('path'); +var should = require('should'); +var testUtils = require('../../lib/test/test-utils'); +var TestGame = require('../../lib/test/test-game'); +var TestController = require('../../lib/test/test-controller'); +var WebSocketClient = require('../../lib/websocketclient'); var g_configPath = path.join(__dirname, "..", "testgames", "config.json"); var g_installedGamesListPath = path.join(__dirname, "..", "testgames", "installed-games.json"); @@ -60,11 +60,11 @@ describe('roundtrip', function() { // // testUtils.createServer().then(function(result) { // server = result; -// gameSocket = new TestWebSocketClient({url: "ws://localhost:8087"}); +// gameSocket = new WebSocketClient({url: "ws://localhost:8087"}); // game = new TestGame({ // socket: gameSocket, // }); -// controllerSocket = new TestWebSocketClient({url: "ws://localhost:8087"}); +// controllerSocket = new WebSocketClient({url: "ws://localhost:8087"}); // controller = new TestController({ // socket: controllerSocket, // });