Skip to content

Commit 1b6e0e8

Browse files
committed
fix hft cmds
1 parent 34ede41 commit 1b6e0e8

9 files changed

Lines changed: 28 additions & 20 deletions

File tree

cli/cmds/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var Promise = require('promise');
3636

3737
var add = function(args) {
3838
return new Promise(function(resolve, reject) {
39-
var fullPath = args._.length > 1 ? path.resolve(args._[1]) : process.cwd();
39+
var fullPath = args._.length > 0 ? path.resolve(args._[0]) : process.cwd();
4040
if (games.add(fullPath) === false) {
4141
reject();
4242
} else {

cli/cmds/download.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ var utils = require('../utils');
3636

3737
var download = function(args) {
3838
return new Promise(function(resolve, reject) {
39-
if (args._.length < 2) {
39+
if (args._.length < 1) {
4040
utils.badArgs(module, "missing gameId");
4141
reject();
4242
return;
4343
}
4444

45-
if (args._.length > 2) {
45+
if (args._.length > 1) {
4646
utils.badArgs(module, "too many arguments");
4747
reject();
4848
return;

cli/cmds/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var utils = require('../utils');
3737

3838
var init = function(args) {
3939
return new Promise(function(resolve, reject) {
40-
if (args._.length != 1) {
40+
if (args._.length != 0) {
4141
utils.badArgs(module, "bad args");
4242
reject();
4343
}

cli/cmds/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ var utils = require('../utils');
3636

3737
var install = function(args) {
3838
return new Promise(function(resolve, reject) {
39-
if (args._.length < 2) {
39+
if (args._.length < 1) {
4040
utils.badArgs(module, "missing srcPath");
4141
}
4242

43-
if (args._.length > 2) {
43+
if (args._.length > 1) {
4444
utils.badArgs(module, "too many arguments");
4545
}
4646

cli/cmds/make-release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ var utils = require('../utils');
3636

3737
var makeRelease = function(args) {
3838
return new Promise(function(resolve, reject) {
39-
if (args._.length < 2) {
39+
if (args._.length < 1) {
4040
utils.badArgs(module, "missing dstPath");
4141
reject();
4242
return;
4343
}
4444

45-
if (args._.length > 2) {
45+
if (args._.length > 1) {
4646
utils.badArgs(module, "too many arguments");
4747
reject();
4848
return;

cli/cmds/publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var askPrompt = function(questions) {
4949

5050
var publish = function(args) {
5151
return new Promise(function(resolve, reject) {
52-
if (args._.length != 1) {
52+
if (args._.length != 0) {
5353
utils.badArgs(module, "too many arguments");
5454
reject();
5555
return;

cli/cmds/uninstall.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ var utils = require('../utils');
3636

3737
var uninstall = function(args) {
3838
return new Promise(function(resolve, reject) {
39-
if (args._.length < 2) {
39+
if (args._.length < 1) {
4040
utils.badArgs(module, "missing path or gameId");
4141
reject();
4242
return;
4343
}
4444

45-
if (args._.length > 2) {
45+
if (args._.length > 1) {
4646
utils.badArgs(module, "too many arguments");
4747
reject();
4848
return;

docs/api-versions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,12 @@ the correct version
7171

7272
For a working example see [http://github.com/greggman/hft-simple-script](http://github.com/greggman/hft-simple-script)
7373

74+
* Fix for Unity Games on Windows
75+
76+
You need to upgrade old Unity Games to the latest .dlls.
77+
[Download the .dll here](https://github.com/greggman/hft-unity3d/releases)
78+
You'll also need the latest version of happyFunTimes. At least verison 0.0.9.
79+
[Download here](http://superhappyfuntimes.net/install)
80+
81+
7482

test/client/roundtrip-test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
*/
3131
"use strict";
3232

33-
var assert = require('assert');
34-
var path = require('path');
35-
var should = require('should');
36-
var testUtils = require('../../lib/test/test-utils');
37-
var TestWebSocketClient = require('../../lib/test/test-websocketclient');
38-
var TestGame = require('../../lib/test/test-game');
39-
var TestController = require('../../lib/test/test-controller');
33+
var assert = require('assert');
34+
var path = require('path');
35+
var should = require('should');
36+
var testUtils = require('../../lib/test/test-utils');
37+
var TestGame = require('../../lib/test/test-game');
38+
var TestController = require('../../lib/test/test-controller');
39+
var WebSocketClient = require('../../lib/websocketclient');
4040

4141
var g_configPath = path.join(__dirname, "..", "testgames", "config.json");
4242
var g_installedGamesListPath = path.join(__dirname, "..", "testgames", "installed-games.json");
@@ -60,11 +60,11 @@ describe('roundtrip', function() {
6060
//
6161
// testUtils.createServer().then(function(result) {
6262
// server = result;
63-
// gameSocket = new TestWebSocketClient({url: "ws://localhost:8087"});
63+
// gameSocket = new WebSocketClient({url: "ws://localhost:8087"});
6464
// game = new TestGame({
6565
// socket: gameSocket,
6666
// });
67-
// controllerSocket = new TestWebSocketClient({url: "ws://localhost:8087"});
67+
// controllerSocket = new WebSocketClient({url: "ws://localhost:8087"});
6868
// controller = new TestController({
6969
// socket: controllerSocket,
7070
// });

0 commit comments

Comments
 (0)