mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 16:35:13 +00:00
Change the default binary path (lib/http,js, lib/websocket.js)
This commit is contained in:
parent
266971f5d3
commit
f1e45f01bb
|
@ -165,7 +165,14 @@ var HTTPObject = function(engine) {
|
|||
]);
|
||||
} else if (this.engine == "CURL") {
|
||||
this._interface = SHELL.create();
|
||||
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64-mingw\\bin\\curl.exe"); // the location of cURL binary
|
||||
|
||||
// the location of cURL binary
|
||||
var arch = SYS.getArch();
|
||||
if (arch.indexOf("64") > -1) {
|
||||
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64-mingw\\bin\\curl.exe");
|
||||
} else {
|
||||
this.setBinPath("bin\\x86\\curl-8.10.1_1-win32-mingw\\bin\\curl.exe");
|
||||
}
|
||||
} else if (this.engine == "BITS") {
|
||||
this._interface = SHELL.create();
|
||||
this.setBinPath("bitsadmin.exe"); // the location of BITS binary
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// Websocket API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Websocket API for WelsonJS framework
|
||||
// Namhyeon Go <abuse@catswords.net>
|
||||
// https://github.com/gnh1201/welsonjs
|
||||
//
|
||||
// references:
|
||||
// https://stackoverflow.com/questions/52783655/use-curl-with-chrome-remote-debugging
|
||||
// https://github.com/vi/websocat
|
||||
// - https://stackoverflow.com/questions/52783655/use-curl-with-chrome-remote-debugging
|
||||
// - https://github.com/vi/websocat
|
||||
//
|
||||
|
||||
var SHELL = require("lib/shell");
|
||||
var SYS = require("lib/system");
|
||||
|
@ -20,9 +21,9 @@ var WebsocketObject = function() {
|
|||
} else {
|
||||
var arch = SYS.getArch();
|
||||
if(arch.indexOf("64") > -1) {
|
||||
this.binPath = "bin\\websocat_win64";
|
||||
this.binPath = "bin\\x64\\websocat.x86_64-pc-windows-gnu.exe";
|
||||
} else {
|
||||
this.binPath = "bin\\x86\\websocat_win32";
|
||||
this.binPath = "bin\\x86\\websocat.i686-pc-windows-gnu.exe";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -64,7 +65,7 @@ var WebsocketObject = function() {
|
|||
this.create();
|
||||
};
|
||||
|
||||
exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.2.1";
|
||||
exports.VERSIONINFO = "Websocket Lib (websocket.js) version 0.2.2";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user